.autokey-tool {
    --autokey-text: #152033;
    --autokey-muted: #687385;
    --autokey-border: #d8dbe0;
    --autokey-panel: #ffffff;
    --autokey-panel-soft: #fcfcfd;
    --autokey-danger: #9b3333;
    --autokey-danger-soft: rgba(155, 51, 51, 0.08);
    --autokey-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    color: var(--autokey-text);
    font-family: "Inter", var(--font-sans);
}

html[data-theme="dark"] .autokey-tool {
    --autokey-text: #f2f5fb;
    --autokey-muted: #aeb8c5;
    --autokey-border: #2f3742;
    --autokey-panel: #1c2128;
    --autokey-panel-soft: #222831;
    --autokey-danger: #ff9f9f;
    --autokey-danger-soft: rgba(95, 28, 28, 0.32);
}

.autokey-panel,
.autokey-field {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.autokey-field {
    gap: 8px;
}

.autokey-field-label {
    display: block;
    font-size: 0.93rem;
    font-weight: 700;
    color: #465162;
    letter-spacing: -0.01em;
}

html[data-theme="dark"] .autokey-field-label {
    color: #dce5ef;
}

.autokey-text-input,
.autokey-textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--autokey-border);
    background: var(--autokey-panel);
    color: var(--autokey-text);
    border-radius: 14px;
    padding: 12px 14px;
    font-family: var(--autokey-mono);
    font-size: 0.98rem;
    line-height: 1.45;
    outline: none;
    transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.autokey-text-input {
    min-height: 48px;
}

.autokey-text-input.is-invalid {
    border-color: var(--autokey-danger);
    background: var(--autokey-danger-soft);
}

.autokey-textarea {
    min-height: 188px;
    resize: vertical;
}

.autokey-textarea[readonly] {
    background: var(--autokey-panel-soft);
}

.autokey-text-input:focus,
.autokey-textarea:focus,
.autokey-button:focus-visible,
.autokey-mode button:focus-visible {
    border-color: rgba(63, 127, 216, 0.55);
    box-shadow: 0 0 0 3px rgba(63, 127, 216, 0.12);
    outline: none;
}

.autokey-mini,
.autokey-copy {
    margin: 0;
    color: var(--autokey-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.autokey-copy {
    font-size: 0.94rem;
    line-height: 1.5;
}

.autokey-mini strong,
.autokey-copy strong,
.autokey-pill strong {
    color: var(--autokey-text);
}

.autokey-mini.autokey-error {
    color: var(--autokey-danger);
    font-weight: 700;
}

.autokey-copy code,
.autokey-mini code,
.autokey-note code,
.autokey-key-preview code {
    display: inline-block;
    padding: 2px 7px;
    border: 1px solid var(--autokey-border);
    border-radius: 999px;
    background: var(--autokey-panel);
    color: var(--autokey-text);
    font-family: var(--autokey-mono);
    font-size: 0.86em;
    font-weight: 700;
}

.autokey-key-preview {
    display: grid;
    gap: 7px;
    border: 1px solid var(--autokey-border);
    background: var(--autokey-panel);
    border-radius: 14px;
    padding: 10px 12px;
    color: var(--autokey-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.autokey-key-preview strong {
    color: var(--autokey-text);
}

.autokey-textarea-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.autokey-copy-inline {
    flex: 0 0 auto;
}

@media (min-width: 1024px) {
    .autokey-textarea {
        min-height: 0;
        height: 100%;
        resize: none;
    }
}
