/* Pearl silver (v5b tpl/01_head.html values). Local/system fonts only; no remote assets. */
:root {
  --bg: #fdfcf9; --bg-grad: radial-gradient(ellipse at 36% 15%, #ffffff 0%, #fdfcf9 45%, #f4f3ef 100%);
  --card: #ffffff; --soft: #f4f4f0; --soft2: #fafaf7;
  --text: #2b2e33; --muted: #5b606a; --placeholder: #8a8f98;
  --line: #e3e3de; --line2: #d6d6d1; --focus: #6b7079; --graphite: #34373c;
  --warn: #8b5a1f; --warn-line: #e2d3bd; --warn-soft: #fbf7f0;
  font-family: "Pretendard", "Apple SD Gothic Neo", system-ui, -apple-system, "Malgun Gothic", sans-serif;
  color: var(--text); background: var(--bg); color-scheme: light;
  font-synthesis: none; -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 88px; scroll-padding-bottom: 170px; background: var(--bg); }
body { margin: 0; min-height: 100vh; font-size: 0.9375rem; line-height: 1.6; background: var(--bg-grad) fixed, var(--bg); word-break: keep-all; }
body, main, section, article, form, div { min-width: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; touch-action: manipulation; color: var(--text); }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
button:disabled { cursor: default; opacity: .55; }
a { color: var(--text); overflow-wrap: anywhere; }
a:hover { color: #000; }
p { margin: .5em 0; }
[hidden] { display: none !important; }
.app-shell { width: 100%; max-width: 660px; margin: 0 auto; padding: 0 16px; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(253,252,249,.96); backdrop-filter: blur(6px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; padding: max(6px, env(safe-area-inset-top)) 0 0; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-size: 1.0625rem; text-decoration: none; letter-spacing: -.02em; min-height: 44px; }
.brand svg { flex: 0 0 auto; }
.brand strong { font-weight: 700; }
.icon-button { width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 1.25rem; color: var(--text); }
main { padding: 14px 0 calc(48px + env(safe-area-inset-bottom)); }
.welcome { padding: 22px 0 10px; }
h1 { margin: 14px 0 8px; font-size: 1.5rem; line-height: 1.35; letter-spacing: -.03em; font-weight: 700; }
.example-questions { display: grid; gap: 9px; margin-top: 24px; }
.example-questions button { text-align: left; width: 100%; min-height: 44px; border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; background: var(--soft2); font-size: 14px; line-height: 1.6; }
.example-questions button:hover { border-color: var(--focus); }
.conversation { display: flex; flex-direction: column; gap: 18px; }
.bubble { max-width: 100%; border-radius: 12px; overflow-wrap: anywhere; }
.user-bubble { margin-left: 32px; align-self: flex-end; padding: 12px 15px; background: #efeee9; border: 1px solid var(--line); white-space: pre-wrap; font-size: 0.9375rem; }
.assistant-bubble { display: flex; flex-direction: column; gap: 12px; }
.bubble-label, .eyebrow, .card-cap { display: block; font-size: 0.6875rem; letter-spacing: .04em; color: var(--muted); }

/* Round header and lens tabs (image 06 · v5b read screen). */
.round-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 0.75rem; color: var(--muted); }
.round-head .round-meta { text-align: right; }
.round-head[data-preserved="false"] .round-meta { color: var(--warn); }
.lens-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lens-tab { min-height: 46px; padding: 4px 6px; border-radius: 12px; border: 1px solid var(--line2); background: var(--soft2); font-size: 0.875rem; line-height: 1.25; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lens-tab[aria-pressed="true"] { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.lens-tab:disabled { opacity: 1; color: var(--placeholder); }
.lens-state { font-size: 0.625rem; color: var(--placeholder); }

/* Reading cards. */
.read-card { padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; }
.assistant-bubble h3 { margin: 0; font-size: 0.6875rem; font-weight: 500; letter-spacing: .04em; color: var(--muted); }
.short-answer { font-size: 1.0625rem; line-height: 1.75; letter-spacing: -.01em; }
.calculated-fact, .model-interpretation { margin: 0; }
.calculated-fact { color: var(--muted); font-size: 0.75rem; line-height: 1.6; }
.calculated-fact + .calculated-fact { margin-top: 2px; }
.calculated-fact + .model-interpretation, .model-interpretation + .calculated-fact { margin-top: 8px; }
.short-answer .model-interpretation { font-size: 1.0625rem; }
.card-foot { margin: 4px 0 0; font-size: 0.6875rem; color: var(--muted); }
.reason-caption { margin: 6px 2px 0; font-size: 0.75rem; color: var(--muted); }
.reasons { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 0.875rem; }
.reasons > li { padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.sentence { cursor: pointer; }
.sentence[data-expanded="true"] { border-color: var(--focus); }
.sentence-open { display: inline-flex; align-items: center; min-height: 44px; margin-top: 2px; padding: 0; border: 0; background: none; font-size: 0.8125rem; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.cites { display: flex; flex-wrap: wrap; gap: 18px 5px; margin-top: 10px; } /* row gap > 2 x 8px hit extension: no overlap after pixel snapping */
.cite { position: relative; min-height: 28px; color: var(--muted); border: 1px solid var(--line2); background: var(--soft2); border-radius: 8px; padding: 2px 8px; font-size: 0.6875rem; }
/* Visual chips stay small; the tappable area reaches 44px (28 + 2 x 8). */
.fact-link::after { content: ""; position: absolute; inset: -8px 0; }
.cite::after { content: ""; position: absolute; inset: -9px -1px; } /* measured from the padding box: 1px border + 8px */
.check-one { padding: 14px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 0.875rem; display: flex; flex-direction: column; gap: 4px; }
.suggestion-label { color: var(--muted); font-size: 0.6875rem; }
.time-card { padding: 12px 14px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); font-size: 0.8125rem; }
.time-card strong { display: block; font-size: 0.875rem; }
.time-card .varying { color: var(--muted); }

/* Sentence evidence panel: 쉽게 / 근거 / 원문 (image 06). */
.sentence-panel { margin-top: 4px; padding: 14px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; font-size: 0.8125rem; }
.panel-title { margin: 0; font-size: 0.8125rem; font-weight: 700; }
.panel-quote { margin: 0; padding: 8px 10px; border-left: 2px solid var(--graphite); background: var(--card); border-radius: 0 8px 8px 0; font-size: 0.8125rem; }
.depth-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.depth-tab { min-height: 44px; border-radius: 10px; border: 1px solid var(--line2); background: var(--soft2); font-size: 0.8125rem; }
.depth-tab[aria-selected="true"] { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.depth-body { display: flex; flex-direction: column; gap: 8px; }
.depth-body h5 { margin: 4px 0 0; font-size: 0.6875rem; font-weight: 500; letter-spacing: .04em; color: var(--muted); }
.panel-facts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.panel-facts li { padding: 8px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.panel-fact-label { display: block; font-size: 0.6875rem; color: var(--muted); }
.source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.source-cell { padding: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.source-cell .original { font-family: "Songti SC", "Noto Serif KR", serif; font-size: 0.875rem; line-height: 1.85; margin: 4px 0 0; }
.source-cell .translation { font-size: 0.8125rem; line-height: 1.75; margin: 4px 0 0; }
.source-label { font-size: 0.6875rem; color: var(--muted); }
.panel-back { min-height: 46px; border-radius: 12px; border: 1px solid var(--line2); background: var(--soft2); font-size: 0.875rem; }

/* Revisit (image 09): 그때 읽은 것 / 내가 겪은 것. */
.revisit { padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 10px; }
.revisit h4 { margin: 0; font-size: 0.9375rem; font-weight: 700; }
.revisit-line { display: flex; justify-content: space-between; gap: 8px; font-size: 0.75rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.revisit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.revisit-cell { padding: 10px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; font-size: 0.8125rem; }
.revisit-cell textarea { width: 100%; min-height: 96px; resize: vertical; border: 1px solid var(--line2); border-radius: 8px; padding: 8px; background: var(--card); color: var(--text); font-size: 0.875rem; line-height: 1.55; }
.revisit-cell textarea::placeholder, .composer textarea::placeholder, input::placeholder { color: var(--placeholder); }
.match-group { border: 0; padding: 0; margin: 0; }
.match-group legend { font-size: 0.8125rem; margin-bottom: 6px; }
.match-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.match-choices label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--soft2); font-size: 0.8125rem; }
.match-choices label:has(input:checked) { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.revisit-log { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 0.8125rem; }
.revisit-log li { padding: 8px 10px; border-radius: 8px; background: var(--soft); border: 1px solid var(--line); white-space: pre-wrap; }
.revisit-status { margin: 0; font-size: 0.75rem; color: var(--muted); }
.revisit-status[data-kind="error"] { color: var(--warn); }

.note, .notice { font-size: 0.75rem; line-height: 1.65; color: var(--muted); overflow-wrap: anywhere; }
.notice { padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; color: var(--text); }
.error-note { color: var(--warn); }
.error-bubble { padding: 14px 16px; border: 1px solid var(--warn-line); background: var(--warn-soft); }
.divider-note { display: flex; align-items: center; gap: 10px; font-size: 0.6875rem; color: var(--muted); text-align: center; }
.divider-note::before, .divider-note::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
.disclaimer { margin: 22px 4px 0; color: var(--muted); font-size: 0.6875rem; line-height: 1.75; }
.welcome > .disclaimer { color: var(--muted); font-size: 11px; }
.assistant-bubble .disclaimer { margin: 2px 2px 0; }
.evidence { padding: 4px 16px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
summary { cursor: pointer; color: var(--text); font-size: 0.8125rem; line-height: 20px; padding: 12px 0; }
.evidence h4 { font-size: 0.6875rem; font-weight: 500; letter-spacing: .04em; margin: 20px 0 8px; color: var(--muted); }
.pillar-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pillar { padding: 10px 2px; text-align: center; border: 1px solid var(--line); border-radius: 10px; background: var(--soft2); }
.pillar span, .pillar small { display: block; color: var(--muted); font-size: 0.6875rem; }
.pillar strong { display: block; font-size: 1.375rem; font-weight: 500; color: var(--text); }
.pillar .pillar-unknown { font-size: 0.9375rem; padding: 5px 0; color: var(--muted); }
.evidence-list { margin: 0; padding-left: 17px; font-size: 0.75rem; }
.evidence-list li { margin: 10px 0; }
.evidence-list strong { color: var(--text); font-weight: 600; }
.fact-index { display: flex; flex-wrap: wrap; gap: 18px 12px; list-style: none; padding: 8px 0; margin: 0; }
.fact-link { position: relative; border: 0; padding: 2px 0; min-height: 28px; min-width: 44px; text-align: left; background: none; color: var(--text); font-size: 0.75rem; text-decoration: underline; text-underline-offset: 3px; }
.calculation-details { display: grid; grid-template-columns: max-content 1fr; gap: 3px 10px; margin: 6px 0; font-size: 0.6875rem; color: var(--muted); }
.calculation-details dt { font-weight: 600; }
.calculation-details dd { margin: 0; overflow-wrap: anywhere; }
.value-block { font-size: 0.75rem; line-height: 1.65; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.decision-marker { display: inline-block; color: var(--warn); font-size: 0.625rem; margin-left: 5px; padding: 0 5px; border: 1px solid var(--warn-line); border-radius: 4px; }
.policy-confirmed { color: var(--muted); font-size: 0.625rem; margin-left: 5px; }
.excerpt { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 12px 0; background: var(--soft2); }
.excerpt .original { font-family: "Songti SC", "Noto Serif KR", serif; font-size: 0.875rem; line-height: 1.85; }
.excerpt .translation { font-size: 0.75rem; line-height: 1.75; }
.excerpt .attribution { font-size: 0.6875rem; color: var(--muted); }
.excerpt a.attribution { display: inline-flex; align-items: center; min-height: 44px; }
.failed-sentence { border-left: 2px solid var(--warn); padding-left: 11px; margin: 10px 0; }
.failed-sentence p { font-size: 0.75rem; }
.progress { color: var(--muted); font-size: 0.8125rem; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow-wrap: anywhere; }
.progress::before { content: "◌"; color: var(--graphite); margin-right: 9px; display: inline-block; animation: turn 2s linear infinite; }
.progress-steps { font-size: 0.6875rem; color: var(--muted); margin-top: 8px; }
@keyframes turn { to { transform: rotate(360deg); } }
.today-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 22px; background: var(--card); overflow-wrap: anywhere; }
.today-card .last-question { font-size: 0.75rem; color: var(--muted); white-space: pre-wrap; }
.today-card .today-line { font-size: 0.875rem; }
.text-button { border: 0; background: none; color: var(--text); padding: 8px 0 0; min-height: 44px; font-size: 0.8125rem; text-decoration: underline; text-underline-offset: 3px; }
.composer-dock { margin-top: 18px; }
.composer { position: relative; }
.composer textarea { display: block; resize: none; width: 100%; max-height: 125px; padding: 12px 60px 11px 14px; border: 1px solid var(--line2); border-radius: 12px; background: var(--card); color: var(--text); font-size: 0.9375rem; line-height: 1.5; }
.send-button { position: absolute; right: 6px; top: 6px; width: 46px; height: 46px; border: 0; border-radius: 12px; background: var(--graphite); color: #fff; font-size: 1.25rem; font-weight: 500; }
.composer-hint { margin: 5px 4px 0; color: var(--muted); font-size: 0.6875rem; }
.birth-card { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 16px; }
.birth-card h2 { margin: 0 0 3px; font-size: 1rem; font-weight: 700; }
.birth-card .subtitle { margin: 0 0 16px; font-size: 0.75rem; color: var(--muted); }
.birth-card fieldset { border: 0; padding: 0; margin: 16px 0; }
.birth-card legend, .field-label { display: block; font-size: 0.75rem; margin-bottom: 7px; color: var(--muted); }
.toggle-group { display: flex; gap: 8px; flex-wrap: wrap; }
.toggle-group label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 0.875rem; border: 1px solid var(--line2); border-radius: 12px; padding: 0 12px; background: var(--soft2); }
.toggle-group label:has(input:checked) { background: var(--graphite); border-color: var(--graphite); color: #fff; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--graphite); width: 18px; height: 18px; margin: 0; }
.checkbox-label { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 0.875rem; margin-top: 6px; }
.date-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 7px; }
select, .birth-card input[type="text"], .birth-card input[type="time"] { width: 100%; min-width: 0; min-height: 46px; color: var(--text); background: var(--card); border: 1px solid var(--line2); border-radius: 12px; padding: 10px 8px; font-size: 0.9375rem; }
select { text-overflow: ellipsis; }
.field-error { color: var(--warn); font-size: 0.75rem; margin: 5px 0; }
.field-error:empty { display: none; }
.birth-card [aria-invalid="true"] { border-color: var(--warn); }
.other-fields { display: grid; gap: 10px; margin-top: 11px; }
.primary-button, .wide-button { width: 100%; min-height: 46px; border-radius: 12px; padding: 0 16px; font-size: 0.875rem; }
.primary-button { background: var(--graphite); border: 0; color: #fff; font-weight: 500; }
.wide-button { border: 1px solid var(--line2); background: var(--soft2); margin: 7px 0; text-align: left; }
.search-button { min-height: 44px; border: 1px solid var(--line2); background: var(--soft2); padding: 0 14px; border-radius: 12px; font-size: 0.8125rem; }
.place-candidate { min-height: 44px; border: 1px solid var(--line2); background: var(--soft2); border-radius: 12px; padding: 6px 12px; margin: 4px 4px 0 0; font-size: 0.8125rem; text-align: left; }
.place-candidate[aria-pressed="true"] { background: var(--graphite); color: #fff; }
.form-actions { display: flex; gap: 9px; margin-top: 20px; }
.form-actions .text-button { flex: 0 0 56px; padding: 0; color: var(--muted); }
dialog { width: min(390px, calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; border: 1px solid var(--line); padding: 20px; background: var(--card); color: var(--text); border-radius: 12px; }
dialog::backdrop { background: rgba(43,46,51,.35); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.dialog-heading h2 { margin: 0; font-size: 1.0625rem; }
.privacy-note { font-size: 0.75rem; color: var(--muted); margin-top: 20px; }
.danger-button { color: var(--warn); }
.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; }

/* Compact mobile evidence is an explicit display projection, never a JSON dump. */
.daeun-list { padding: 0; margin: 0; list-style: none; display: grid; gap: 4px; font-size: 0.75rem; }
.daeun-list li { padding: 5px 8px; border-radius: 6px; color: var(--muted); }
.daeun-list .daeun-current { color: #fff; background: var(--graphite); }
.current-marker { font-size: 0.625rem; margin-left: 8px; }
.technical-detail { margin-top: 5px; }
.technical-detail summary { font-size: 0.6875rem; line-height: 18px; padding: 13px 0; }
.evidence li, .evidence .value-block, .evidence .pillar, .excerpt { scroll-margin-top: 88px; }
/* Text selection in pearl. The time input's active-segment highlight is the browser/OS selection colour;
   per-segment :focus styling does not apply in Chromium 1243 (measured), and hiding it would hide the active segment. */
::selection { background: #dcdcd6; color: var(--text); }
.birth-card input[type="time"]:disabled { opacity: .6; color: var(--placeholder); background: var(--soft); border-style: dashed; }
.today-facts { font-size: 0.6875rem; color: var(--muted); }
.today-evidence { margin-top: 8px; }
#notices { max-height: 140px; overflow-y: auto; }
#notices:empty { display: none; }
#notices .notice { padding: 6px 10px; margin: 0 0 7px; font-size: 0.75rem; }

@media (max-width: 360px) {
  .app-shell { padding: 0 16px; }
  .birth-card, .read-card, .check-one, .revisit, .evidence { padding-left: 12px; padding-right: 12px; }
  .toggle-group { gap: 5px; } .toggle-group label { padding: 0 9px; }
  .lens-tab { font-size: 0.8125rem; }
  .source-grid, .revisit-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .progress::before { animation: none; }
}

/* ---- Five-screen frame (질문 / 답 / 관점 / 뽑기 / 시간) ---- */
.screen-nav { flex: 1 0 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; margin: 0 -4px; }
.screen-nav button { min-height: 44px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-size: 0.875rem; }
.screen-nav button[aria-current="page"] { color: var(--text); border-bottom-color: var(--graphite); font-weight: 700; }
.screen { display: flex; flex-direction: column; gap: 14px; }
.hero-logo { display: block; margin: 6px 0 0; }
.welcome h1 { margin-top: 10px; }
.example-questions button::after { content: " ✎"; color: var(--placeholder); }
.entrances { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.entry { min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--soft2); font-size: 0.8125rem; color: var(--muted); }
.entry.primary-entry { border-color: var(--graphite); color: var(--text); }
.focus-card { padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.focus-card h2 { margin: 0 0 10px; font-size: 1rem; }
.focus-choices { display: grid; gap: 8px; }
.focus-choice { min-height: 46px; text-align: left; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--soft2); font-size: 0.9375rem; }
.focus-choice[aria-pressed="true"] { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.pillar-cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.pillar-col { display: grid; gap: 4px; text-align: center; }
.pillar-col-label { font-size: 0.6875rem; color: var(--muted); }
.pillar-cell { display: block; padding: 8px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--soft2); font-size: 1.375rem; line-height: 1.2; color: var(--placeholder); }
.pillar-cell[data-filled="true"] { color: var(--text); background: var(--card); }
.pillar-cells .note { grid-column: 1 / -1; margin: 0; }
.progress::before { content: none; }
.progress-label { display: block; color: var(--text); }
/* Answer screen: main shows only the answer, why, what to check and the judgement. */
.answer-question { margin: 4px 0 0; font-size: 1.1875rem; line-height: 1.45; letter-spacing: -.02em; }
.answer-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.answer-tab { min-height: 44px; border-radius: 12px; border: 1px solid var(--line2); background: var(--soft2); font-size: 0.875rem; }
.answer-tab[aria-selected="true"] { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.answer-main, .answer-evidence { display: flex; flex-direction: column; gap: 12px; }
.answer-main > section { padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; }
.answer-line, .why-line, .check-line { font-size: 1rem; line-height: 1.75; }
.answer-line { font-size: 1.0625rem; }
.answer-line p, .why-line p, .check-line p { display: inline; margin: 0; font-size: inherit; color: var(--text); }
.answer-line .calculated-fact, .why-line .calculated-fact, .check-line .calculated-fact { color: var(--text); font-size: inherit; }
.answer-line p + p::before, .why-line p + p::before, .check-line p + p::before { content: " "; }
/* 답·왜 are two lines: the fact sentence (code, muted) above the interpretation (model). */
.two-line p { display: block; }
.two-line p + p::before { content: none; }
.two-line .calculated-fact { color: var(--muted); font-size: 0.875rem; line-height: 1.6; }
.two-line .calculated-fact + .model-interpretation { margin-top: 4px; }
.month-pick { padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.month-pick p { margin: 4px 0 0; font-size: 0.875rem; line-height: 1.65; }
.month-lines { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.month-lines li { font-size: 0.8125rem; line-height: 1.65; }
.month-lines strong { display: block; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.month-lines li.picked strong, .month-table tr.picked td { color: var(--text); }
.month-table tr.picked td:first-child { box-shadow: inset 3px 0 0 var(--graphite); padding-left: 7px; }
.excerpt-condition { margin: 2px 0 6px; font-size: 0.75rem; color: var(--muted); }
.sentence[role="button"] { cursor: pointer; border-radius: 8px; }
.sentence[role="button"]:hover { background: var(--soft2); }
.judge { padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.judge-q { margin: 0 0 8px; font-size: 0.875rem; }
.judge-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.judge-choice { min-height: 46px; border-radius: 12px; border: 1px solid var(--line2); background: var(--soft2); font-size: 0.875rem; padding: 0 4px; }
.judge-choice[aria-pressed="true"] { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.judge-status { margin: 6px 0 0; font-size: 0.75rem; color: var(--muted); }
.judge-status[data-kind="error"] { color: var(--warn); }
.role-line { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); font-size: 0.75rem; color: var(--text); }
.answer-evidence .round-meta { margin: 0; font-size: 0.75rem; color: var(--muted); }
.sentence-evidence { display: flex; flex-direction: column; gap: 10px; }
.sentence-evidence h4, .other-schools h4 { margin: 6px 0 0; font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.sentence-entry { padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.entry-text { margin: 4px 0 0; font-size: 0.875rem; line-height: 1.7; cursor: pointer; }
.other-schools { padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.school-case { margin: 8px 0 4px; font-size: 0.75rem; color: var(--muted); }
/* Stacked label/value pairs: a long school name never squeezes into a few characters. */
.school-table { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; margin: 0; font-size: 0.8125rem; }
.school-table dt { color: var(--muted); overflow-wrap: normal; word-break: keep-all; }
.school-table dd { margin: 0 0 8px; }
/* Lens screen: two circles and product A. */
.lens-view, .draw-view, .time-view { display: flex; flex-direction: column; gap: 14px; }
.lens-view h2, .draw-view h2, .time-view h2 { margin: 6px 0 0; font-size: 1.1875rem; }
/* The two circles carry only the lens names; each lens's full text sits below, never clipped. */
.circles { display: grid; grid-template-columns: 1fr 1fr; margin: 4px auto 0; width: min(100%, 300px); }
.circle { aspect-ratio: 1 / 1; border-radius: 50%; border: 1px solid var(--line2); background: rgba(255,255,255,.75); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 12%; font-size: 0.75rem; }
.circle.left { margin-right: -12%; }
.circle.right { margin-left: -12%; background: rgba(244,244,240,.75); }
.circle strong { font-size: 0.8125rem; }
.circle span { font-size: 0.6875rem; color: var(--muted); margin-top: 2px; }
.circle.demo { border-style: dashed; }
.lens-texts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lens-text { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-size: 0.8125rem; line-height: 1.65; }
.lens-text.demo { border-style: dashed; }
.lens-text p { margin: 4px 0 0; }
.overlap-note { margin: 0; text-align: center; font-size: 0.75rem; color: var(--muted); }
.product-card { padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 8px; }
.product-card h3 { margin: 0; font-size: 1.0625rem; }
.product-card p { margin: 0; }
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.product-col { padding: 10px 12px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); font-size: 0.8125rem; }
.product-col ul { margin: 6px 0 0; padding-left: 18px; }
.product-col li { margin: 4px 0; }
.product-sample { padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 12px; }
.product-sample h3 { margin: 0; font-size: 1.0625rem; line-height: 1.45; }
.product-sample h4 { margin: 0 0 6px; font-size: 0.875rem; }
.product-sample section { padding-top: 10px; border-top: 1px solid var(--line); }
.sample-line { margin: 6px 0; font-size: 0.875rem; line-height: 1.75; }
.sample-line .card-cap { display: block; }
.cal-row { margin: 4px 0; font-size: 0.875rem; line-height: 1.7; }
.cal-row.now { font-weight: 600; }
.table-wrap { overflow-x: auto; }
.month-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; }
.month-table th, .month-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
/* Only the period stays on one line; headers and ten-god cells wrap so all four columns fit 320px. */
.month-table td:first-child { white-space: nowrap; }
.month-table th { word-break: keep-all; }
.month-table th { color: var(--muted); font-weight: 500; }
.month-table tr.now td { font-weight: 700; }
.demo-note { color: var(--warn); }
.date-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.date-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--soft2); font-size: 0.8125rem; }
button.date-chip[aria-pressed="true"] { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.unconnected-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.unconnected-list li { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.judge-tally, .round-list, .time-axis { padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 8px; }
.judge-tally p, .time-axis p { margin: 0; }
.round-card { padding: 12px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.round-card:first-of-type { border-top: 0; }
.round-card p { margin: 0; }
.round-question { font-size: 0.9375rem; overflow-wrap: anywhere; }
.round-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.secondary-button { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--soft2); font-size: 0.8125rem; }
.round-revisit { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.revisit-dates { display: flex; flex-direction: column; gap: 6px; }
.empty-screen { padding: 18px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.today-card { padding: 10px 14px; margin-bottom: 0; }
/* One sentence at the top; it wraps rather than being cut, since its meaning is often at the end. */
.today-line { margin: 0; font-size: 0.875rem; line-height: 1.6; }
.today-full { font-size: 0.8125rem; line-height: 1.7; }
.today-full p { display: inline; margin: 0; }
.today-full p + p::before { content: " "; }
.today-card .today-line p { display: inline; margin: 0; }
.today-card .today-line p + p::before { content: " "; }
.due-line { width: 100%; text-align: left; min-height: 44px; border: 0; background: none; padding: 0; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.today-evidence summary { padding: 12px 0; font-size: 0.75rem; color: var(--muted); }
.time-mode { margin-bottom: 8px; }
.fact-condition { display: block; margin-top: 2px; font-size: 0.75rem; color: var(--muted); }
.entry-conditions { margin: 6px 0 0; padding-left: 18px; font-size: 0.75rem; color: var(--muted); }
.to-evidence { display: block; margin: 2px 0 0 auto; min-height: 44px; padding: 0 4px; border: 0; background: none; font-size: 0.75rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.free-answer { padding: 10px 12px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); }
@media (max-width: 360px) {
  .product-grid { grid-template-columns: 1fr; }
  .lens-texts { grid-template-columns: 1fr; }
  .screen-nav button { font-size: 0.8125rem; }
  .judge-choice { font-size: 0.8125rem; }
}
