.rot13-tool {
    --rot13-panel: #ffffff;
    --rot13-panel-soft: #fcfcfd;
    --rot13-text: #101418;
    --rot13-muted: #5a6872;
    --rot13-border: #d8dee4;
    --rot13-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    color: var(--rot13-text);
    font-family: "Inter", var(--font-sans);
    padding-top: 0;
}

html[data-theme="dark"] .rot13-tool {
    --rot13-panel: #181b1f;
    --rot13-panel-soft: #20242a;
    --rot13-text: #f1f3f5;
    --rot13-muted: #9aa2ab;
    --rot13-border: #2a3037;
}

.rot13-tool * {
    box-sizing: border-box;
}

.rot13-tool .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.rot13-topbar,
.rot13-status,
.rot13-pill-row,
.rot13-textarea-header {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.rot13-topbar {
    justify-content: space-between;
}

.rot13-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.rot13-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    height: 100%;
}

.rot13-mini {
    margin: 0;
    color: var(--rot13-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.rot13-mini strong,
.rot13-pill strong,
.rot13-note strong {
    color: var(--rot13-text);
}

.rot13-mini code,
.rot13-pill code,
.rot13-note code {
    padding: 2px 6px;
    border: 1px solid var(--rot13-border);
    border-radius: 8px;
    background: var(--rot13-panel);
    color: var(--rot13-text);
    font-family: var(--rot13-mono);
    font-size: 0.86em;
    white-space: nowrap;
}

.rot13-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.rot13-textarea-header {
    justify-content: space-between;
}

.rot13-textarea {
    width: 100%;
    min-width: 0;
    min-height: 240px;
    resize: vertical;
    padding: 10px 12px;
    border: 1px solid var(--rot13-border);
    border-radius: 12px;
    background: var(--rot13-panel);
    color: var(--rot13-text);
    font-family: var(--rot13-mono);
    font-size: 14px;
    line-height: 1.45;
    outline: none;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

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

.rot13-textarea:focus,
.rot13-button:focus-visible {
    border-color: rgba(11, 132, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(11, 132, 255, 0.1);
    outline: none;
}

.rot13-copy-inline {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    flex: 0 0 auto;
}

@media (max-width: 560px) {
    .rot13-tool {
        padding-top: 0;
    }

    .rot13-topbar {
        align-items: stretch;
    }

    .rot13-actions {
        width: 100%;
    }

    .rot13-textarea {
        min-height: 220px;
    }
}
