/* RT-TXT-063 — Korean Passport Name Romanizer.
 * Colour rule (docs/contrast-conventions.md): values inside the navy
 * --rt-result-bg box use --rt-result-ink, labels --rt-result-muted; everything
 * on the light surfaces uses --rt-ink / --rt-ink-soft. Nothing crosses over.
 * Spacing tokens are a 4px scale: --rt-s-3 is 12px, --rt-s-4 is 16px. */

.kp-form { display: flex; flex-direction: column; gap: var(--rt-s-4); min-width: 0; }
.kp-fields { display: grid; grid-template-columns: 160px 1fr; gap: var(--rt-s-3); }
@media (max-width: 480px) { .kp-fields { grid-template-columns: 1fr; } }
.kp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kp-label { font-family: var(--rt-font-mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; font-weight: 600; color: var(--rt-ink-muted); }
.kp-input {
    width: 100%; box-sizing: border-box; padding: 10px 14px;
    border: 1px solid var(--rt-hairline); border-radius: var(--rt-r-button);
    background: var(--rt-surface); color: var(--rt-ink); font-size: 22px; line-height: 1.4;
}
.kp-input:focus { outline: none; border-color: var(--rt-accent); box-shadow: 0 0 0 3px var(--rt-accent-soft); }

.kp-samples { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kp-samples-label { font-size: 11px; color: var(--rt-ink-soft); margin-right: 2px; }
.kp-chip {
    padding: 5px 11px; border-radius: var(--rt-r-chip); cursor: pointer;
    border: 1px solid var(--rt-hairline); background: var(--rt-surface-2);
    color: var(--rt-ink); font-size: 13px;
    transition: border-color 140ms ease, background 140ms ease;
}
.kp-chip:hover { border-color: var(--rt-accent); background: var(--rt-surface); }

.kp-style { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.kp-style legend { float: left; margin-right: 8px; }
.kp-style label { font-size: 13px; color: var(--rt-ink); display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }

/* ── result (navy) ───────────────────────────────────────────────────────── */
.kp-result { background: var(--rt-result-bg); border-radius: var(--rt-r-card); padding: var(--rt-s-3) var(--rt-s-4); min-width: 0; }
.kp-result-label { display: block; font-size: 12px; color: var(--rt-result-muted); }
.kp-name {
    margin: 4px 0 2px; font-family: var(--rt-font-mono); font-size: 30px; line-height: 1.25; letter-spacing: .04em;
    color: var(--rt-result-ink); overflow-wrap: anywhere; cursor: pointer; border-radius: 6px; padding: 1px 4px;
}
.kp-name:hover, .kp-name:focus { outline: none; box-shadow: 0 0 0 2px rgba(246, 244, 239, .28); }
.kp-name[data-copied]::after { content: ' ✓'; font-family: var(--rt-font-sans); font-size: 14px; color: var(--rt-result-muted); }
.kp-result-sub { display: block; font-size: 12.5px; color: var(--rt-result-muted); }

/* ── syllable choosers (light) ───────────────────────────────────────────── */
.kp-syllables { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kp-row { border: 1px solid var(--rt-hairline); border-radius: 10px; padding: 10px 12px; background: var(--rt-surface-2); min-width: 0; }
.kp-row-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 8px; }
.kp-syl { font-size: 26px; line-height: 1; color: var(--rt-ink); }
.kp-row-label { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--rt-ink); }
.kp-row-total { font-size: 12px; color: var(--rt-ink-soft); }
.kp-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.kp-opt {
    display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px;
    padding: 6px 10px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--rt-hairline); background: var(--rt-surface); color: var(--rt-ink);
}
.kp-opt:hover { border-color: var(--rt-accent); }
.kp-opt.is-on { border-color: var(--rt-accent); box-shadow: inset 0 0 0 1px var(--rt-accent); }
.kp-opt.is-neg .kp-opt-sp { text-decoration: underline wavy var(--rt-danger); text-underline-offset: 3px; }
.kp-opt-sp { font-family: var(--rt-font-mono); font-size: 14px; font-weight: 600; }
.kp-opt-meta { font-size: 11px; color: var(--rt-ink-soft); }

/* ── notes (light) ───────────────────────────────────────────────────────── */
.kp-notes { display: flex; flex-direction: column; gap: 8px; }
.kp-notes:empty { display: none; }
.kp-note { margin: 0; padding: 9px 12px; border-radius: 8px; font-size: 13px; line-height: 1.55; color: var(--rt-ink); background: var(--rt-surface-2); border-left: 3px solid var(--rt-hairline); }
.kp-note-warn { border-left-color: var(--rt-accent); }
.kp-note-info { border-left-color: var(--rt-hairline); }

.kp-stamp { font-size: 11.5px; color: var(--rt-ink-soft); line-height: 1.6; margin: 0; }

/* CLS floors for the default name (홍길동), whose syllable choosers and notes
   app.js renders after first paint. MEASURED 2026-09-27: choosers 359px and
   notes 78px at 1280 and 768; 490px and 139px at 375. Released by app.js on the
   first interaction, a user-initiated shift (docs/cls-conventions.md rule 1). */
.kp-syllables.kp-reserve { min-height: 355px; }
.kp-notes.kp-reserve { min-height: 76px; }
@media (max-width: 560px) {
    .kp-syllables.kp-reserve { min-height: 486px; }
    .kp-notes.kp-reserve { min-height: 136px; }
}
