/* 화면 스타일 (글로벌 영어 우선, 한국어 지원)
   기준: anthropics/skills frontend-design(미적 방향·글쓰기), vercel-labs/web-interface-guidelines(품질 점검)
   디자인 계획
   - 주제: 세 철학자가 내 결정에 표를 던지는 작은 법정. 대담함은 두 곳에만: 아바타 무대, 판결 숫자(2 : 1)
   - 색 (6): Ink #15171c 글자 / Paper #f6f7f9 바탕 / Slate #5b6270 보조 글자 / Ballot indigo #3e63dd 강조 /
             Assent #218358 YES / Dissent #c4361b NO  (크림+테라코타, 검정+형광 강조 같은 생성형 기본값을 피함)
   - 글꼴: Instrument Sans(본문·UI), Newsreader(제목과 원전 인용, 책의 목소리), 한글은 Pretendard가 받친다
   - 배치: 제목·본문은 왼쪽 정렬, 무대와 판결 숫자만 가운데. 한 줄 80자 이하
   - 피한 것: 대문자 라벨, 가운뎃점으로 이은 메타 문구, 섹션마다 떠오르는 애니메이션(투표 공개 한 번만), 버튼 화살표
   - 애니메이션은 transform/opacity만, 동작 줄이기 설정 존중 */

/* hidden 속성은 언제나 숨긴다: display를 정한 칸(.premium의 grid 등)이 hidden을 이겨 의료·법률·투자 고민에도
   조언 칸이 보였다 (2026-10-11 시뮬레이터 점검. jsdom 테스트는 CSS를 적용하지 않아 놓쳤다) */
[hidden] { display: none !important; }

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --text: #15171c;
  --muted: #5b6270;
  --line: #e1e4ea;
  --accent: #3e63dd;
  --accent-ink: #ffffff;
  --accent-soft: #edf2fe;
  --yes: #1a744c; /* 밝은 바탕·옅은 초록·회색 칸 위 글씨 모두 5:1 이상 (예전 #218358은 4.1~4.7, 2026-10-11 점검) */
  --yes-soft: #e6f6eb;
  --no: #c4361b;
  --no-soft: #feebe7;
  --abstain: #6f7380;
  --abstain-soft: #eff0f3;
  --warn-soft: #fff4d5;
  --info-soft: #edf2fe;
  --radius: 14px;
  --radius-sm: 10px;
  --sans: "Instrument Sans", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --serif: "Newsreader", "Pretendard Variable", Georgia, serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1015;
    --surface: #161922;
    --surface-2: #1f2330;
    --text: #edeef0;
    --muted: #9ba1ae;
    --line: #2a2f3c;
    --accent: #8da4ef;
    --accent-ink: #0e1015;
    --accent-soft: #1a2240;
    --yes: #3dd68c;
    --yes-soft: #12291e;
    --no: #ff977d;
    --no-soft: #3b1a14;
    --abstain: #b0b4ba;
    --abstain-soft: #22252d;
    --warn-soft: #2e2611;
    --info-soft: #1a2240;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.page { max-width: 1040px; margin: 0 auto; padding: 20px 16px 72px; }

/* 상단 */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 4px 0 28px; }
.brand { font-weight: 700; letter-spacing: -0.01em; }
.topbar .flavor-link { margin-left: auto; margin-right: 12px; font-size: 0.9rem; color: var(--muted); text-underline-offset: 3px; }
.lang-switch { font: inherit; font-size: 0.9rem; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; min-height: 36px; cursor: pointer; max-width: 9.5rem; }
.lang-switch option { color: var(--text); background: var(--surface); }
.lang-switch:hover { color: var(--text); border-color: color-mix(in srgb, var(--muted) 45%, var(--line)); }

.hero { margin-bottom: 28px; }
h1 { font-family: var(--serif); font-size: clamp(2rem, 5.5vw, 3.4rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 500; margin: 0 0 14px; max-width: 18em; font-optical-sizing: auto; }
:lang(ko) h1 { font-family: var(--sans); font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; }
/* 일본어·중국어: 시스템 고딕을 먼저, 제목은 명조/송체. 한자·가나는 기울이면 어색해 기울임을 끈다 */
:lang(ja) { --sans: "Instrument Sans", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif; --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif; }
:lang(zh-Hans) { --sans: "Instrument Sans", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; --serif: "Noto Serif SC", "Songti SC", serif; }
:lang(zh-Hant) { --sans: "Instrument Sans", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif; --serif: "Noto Serif TC", "Songti TC", serif; }
:is(:lang(ja), :lang(zh)) h1 { letter-spacing: 0; line-height: 1.25; }
:is(:lang(ja), :lang(zh)) :is(em, .stage-direction, .verdict-question, .house-note) { font-style: normal; }
.lede { margin: 0; max-width: 34em; color: var(--muted); font-size: 1.05rem; }
/* 서비스 소개 한 줄 (Kant Decide: "Can't decide? Three philosophers will.") */
.tagline { margin: 0 0 8px; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em; color: var(--accent); }

/* 공통 블록 */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}
.section-title { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 6px; }
.field-label { display: block; font-weight: 650; margin: 0 0 10px; }
.hint { color: var(--muted); font-size: 0.9rem; margin: 8px 0 0; }
.hint-warn { color: var(--no); }
/* 글자 수: 한도에 가까워지면 색으로 알린다 */
.char-count { margin: 4px 0 0; text-align: right; font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.char-count.near { color: var(--no); font-weight: 600; }
/* 되묻기: 오류가 아니라 대화라 빨간 띠 대신 차분한 안내로 */
.follow-up { color: var(--text); background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
#access-section .premium-row { margin-top: 10px; }

textarea, .text-input, .proposition-input {
  width: 100%;
  font: inherit;
  font-size: 16px; /* 모바일 확대 방지 */
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
textarea:hover, .text-input:hover, .proposition-input:hover { border-color: color-mix(in srgb, var(--muted) 45%, var(--line)); }
textarea:focus-visible, .text-input:focus-visible, .proposition-input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
/* 판결 질문: 화면 너비를 넘으면 줄을 바꿔 한눈에 보이게 (휴대폰에서 옆으로 끌어 보던 문제, 2026-10-09) */
.proposition-input { font-size: 1.15rem; font-weight: 650; min-height: 0; resize: none; overflow: hidden; line-height: 1.45; field-sizing: content; }
::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }

.button {
  font: inherit;
  font-weight: 650;
  min-height: 44px;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), transform 150ms var(--ease);
}
.button:active { transform: translateY(1px); }
.button:disabled { opacity: 0.6; cursor: progress; }
.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.button-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.button-ghost:hover { background: var(--surface-2); }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 판결단 선택: 세그먼트 */
.panel-picker { margin: 4px 0 18px; }
.segmented { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); max-width: 100%; overflow-x: auto; }
.panel-option {
  font: inherit;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  min-height: 40px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.panel-option strong { font-weight: 650; }
.panel-option span { display: none; }
.panel-option[aria-checked="true"] { background: var(--text); color: var(--bg); }

/* 입력 */
.form-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.mode-row { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); }
.mode-option { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; min-height: 44px; }
.mode-option input { accent-color: var(--accent); }
.options-box { margin-top: 14px; }
.option-row { display: flex; gap: 8px; margin-bottom: 8px; }
.option-row .text-input { flex: 1; }
.confirm-options { margin: 12px 0 0; padding-left: 1.2em; }
/* 질문 후보: 하소연·모호한 글일 때 다른 결정을 골라 쓰는 버튼 */
.question-choices, .either-or { margin-top: 12px; }
.either-or .button { margin-top: 6px; }
.question-choice-list { display: grid; gap: 8px; margin-top: 6px; }
.question-choice { font: inherit; text-align: left; padding: 10px 14px; min-height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.question-choice:hover { border-color: var(--accent); }
.question-choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 650; }

/* 알림 */
.banner { border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 18px; font-size: 0.95rem; }
.banner-warn { background: var(--warn-soft); }
.banner-info { background: var(--info-soft); margin-top: 14px; }
.banner-error { background: var(--no-soft); color: var(--no); }
.crisis { border-color: var(--accent); }
.crisis-list { padding-left: 1.2em; }

/* 아바타 무대 */
.stage { margin: 0 0 22px; }
.stage-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 3vw, 28px); }
.stage-column { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.face-canvas { width: 100%; max-width: 230px; border-radius: 50%; }
.face-canvas canvas { display: block; }
.stage-column[data-persona="schopenhauer"] .face-canvas { background: radial-gradient(circle at 50% 42%, #e6ebf4 0%, #cdd6e6 72%); }
.stage-column[data-persona="nietzsche"] .face-canvas { background: radial-gradient(circle at 50% 42%, #f7e7d6 0%, #ebcdb0 72%); }
.stage-column[data-persona="kant"] .face-canvas { background: radial-gradient(circle at 50% 42%, #e1f1ea 0%, #c4ddd2 72%); }
.stage-name { font-weight: 700; font-size: 1.02rem; margin: 10px 0 0; letter-spacing: -0.01em; }
.stage-answer { min-height: 1.7em; margin: 2px 0 0; font-weight: 650; font-size: 0.92rem; color: var(--accent); text-align: center; }
.emotion-bars { width: 100%; max-width: 210px; display: grid; gap: 4px; margin-top: 8px; }
.emotion-row { display: grid; grid-template-columns: 4.4em 1fr 2.6em; align-items: center; gap: 8px; font-size: 0.76rem; color: var(--muted); }
.emotion-row span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.emotion-row span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
:lang(en) .emotion-row { grid-template-columns: 4.6em 1fr 2.6em; }
:lang(de) .emotion-row { grid-template-columns: 6.4em 1fr 2.6em; }
.emotion-track { height: 4px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.emotion-fill { height: 100%; width: 100%; background: color-mix(in srgb, var(--muted) 70%, transparent); border-radius: 999px; transform-origin: left center; transform: scaleX(0); transition: transform 600ms var(--ease); }
.emotion-row.top { color: var(--text); font-weight: 600; }
.emotion-row.top .emotion-fill { background: var(--accent); }
.stage-calm { margin: 8px 0 0; font-size: 0.8rem; color: var(--muted); text-align: center; }
.stage-status { text-align: center; font-size: 0.9rem; color: var(--muted); margin: 16px 0 0; }
@media (max-width: 560px) {
  .emotion-row { grid-template-columns: 4.3em 1fr 2.3em; font-size: 0.68rem; gap: 4px; }
  :lang(en) .emotion-row { grid-template-columns: 4.3em 1fr 2.3em; }
  :lang(de) .emotion-row { grid-template-columns: 5.6em 1fr 2.3em; }
  .stage-name { font-size: 0.9rem; }
  .stage-answer { font-size: 0.8rem; }
}

/* 판결 */
.result { margin-top: 8px; }
.verdict-head { text-align: center; margin: 12px 0 26px; }
.verdict-question { margin: 0 auto; max-width: 32em; color: var(--muted); font-family: var(--serif); font-size: 1.1rem; font-style: italic; }
:lang(ko) .verdict-question { font-style: normal; }
/* 질문 줄바꿈: 줄 길이를 고르게, 한국어는 낱말 중간에서 끊지 않고, 일본어는 지원 브라우저에서 구절 단위로 */
.verdict-question, .verdict-headline { text-wrap: balance; overflow-wrap: anywhere; }
:lang(ko) :is(.verdict-question, .verdict-headline) { word-break: keep-all; }
:lang(ja) :is(.verdict-question, .verdict-headline) { word-break: auto-phrase; }
/* 판결 자리표: 질문과 한 장의 판으로 묶는다 */
.verdict-board { display: grid; gap: 16px; max-width: 34rem; margin: 0 auto; }
.verdict-score { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tally-yesno { display: grid; grid-template-columns: auto minmax(0, auto) auto; justify-content: center; align-items: center; gap: 16px; }
.tally-side { display: flex; flex-direction: column; align-items: center; min-width: 3rem; color: var(--muted); }
.tally-count { font-size: clamp(2.4rem, 10vw, 3.2rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.tally-caption { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; margin-top: 4px; }
.tally-side.yes.win { color: var(--yes); }
.tally-side.no.win { color: var(--no); }
.tally-bench { display: flex; justify-content: center; gap: 8px; padding: 8px 12px; border-radius: 999px; background: var(--surface-2); }
.seat {
  --size: 46px;
  --ring: var(--line);
  inline-size: var(--size);
  block-size: var(--size);
  flex: none;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--surface) center / cover no-repeat;
  box-shadow: 0 0 0 2.5px var(--ring);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  animation: seat-hop 460ms var(--ease) both;
  animation-delay: calc(250ms + var(--i, 0) * 160ms);
}
.seat[data-persona="schopenhauer"] { background-color: #cdd6e6; }
.seat[data-persona="nietzsche"] { background-color: #ebcdb0; }
.seat[data-persona="kant"] { background-color: #c4ddd2; }
/* 인물 자리 바탕은 옅은 색이라 어두운 화면에서도 첫 글자는 짙게 (var(--text)는 어두운 화면에서 1.3:1, 2026-10-11 점검) */
.seat[data-persona] { color: #22252c; }
.seat.has-face { background-size: 170%; background-position: 50% 44%; }
.seat.has-face .seat-initial { visibility: hidden; }
.seat.yes { --ring: var(--yes); }
.seat.no { --ring: var(--no); }
.seat.abstain { --ring: var(--abstain); }
.seat.chosen { --ring: var(--accent); }
.seat.empty { background: transparent; box-shadow: none; border: 2px dashed var(--line); animation: none; }
@keyframes seat-hop {
  from { transform: translateY(12px) scale(0.6); opacity: 0; }
  60% { transform: translateY(-4px) scale(1.06); opacity: 1; }
  to { transform: none; opacity: 1; }
}
.tally-choice { display: grid; gap: 8px; text-align: start; }
.tally-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 1.4em; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.tally-row .seat { --size: 34px; font-size: 0.78rem; }
.tally-seats { display: flex; gap: 6px; }
.tally-option { font-weight: 600; line-height: 1.35; text-wrap: balance; }
.tally-n { font-weight: 800; font-size: 1.15rem; text-align: end; font-variant-numeric: tabular-nums; color: var(--muted); }
.tally-row.top { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.tally-row.top .tally-option { font-size: 1.06rem; font-weight: 700; }
.tally-row.top .tally-n { color: var(--accent); }
.tally-row.aside { background: transparent; border-style: dashed; }
.tally-row.aside .tally-option { font-weight: 500; color: var(--muted); }
/* 아주 좁은 화면(320px): 보기 글이 한 줄을 다 쓰고, 얼굴 자리와 표 수는 그 아래 줄로 */
@media (max-width: 360px) {
  .tally-row { grid-template-columns: minmax(0, 1fr) auto; }
  .tally-option { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .seat { animation: none; } }
.verdict-headline { font-size: clamp(1.25rem, 3.5vw, 1.6rem); font-weight: 750; letter-spacing: -0.02em; margin: 10px 0 4px; }
.verdict-tone { font-weight: 600; color: var(--accent); margin: 0 0 4px; }
.verdict-sub { color: var(--muted); margin: 0; font-size: 0.92rem; }

/* 인물 카드: 판결 세기를 위계로 (강력 = 색 채움, 이 정도면 = 진한 테두리, 애매 = 점선) */
/* 카드는 언제나 셋: 좁은 화면은 한 줄에 하나, 넓은 화면은 셋 나란히 (2칸 + 1칸으로 어긋나지 않게) */
.vote-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 640px; margin: 0 auto 26px; }
@media (min-width: 760px) { .vote-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; } }
.vote-card {
  --tone: var(--abstain);
  --tone-soft: var(--abstain-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  animation: reveal 420ms var(--ease) both;
}
.vote-card:nth-child(2) { animation-delay: 120ms; }
.vote-card:nth-child(3) { animation-delay: 240ms; }
.vote-card.tone-yes { --tone: var(--yes); --tone-soft: var(--yes-soft); }
.vote-card.tone-no { --tone: var(--no); --tone-soft: var(--no-soft); }
.vote-card.strength-strong { background: var(--tone-soft); border-color: color-mix(in srgb, var(--tone) 35%, transparent); }
.vote-card.strength-moderate { border-color: color-mix(in srgb, var(--tone) 55%, var(--line)); }
.vote-card.strength-weak { border-style: dashed; }
.vote-card header { display: flex; flex-direction: column; gap: 0; }
.vote-name { font-size: 1.1rem; font-weight: 750; margin: 0; letter-spacing: -0.01em; }
.vote-life { color: var(--muted); font-size: 0.8rem; }
.vote-tagline { color: var(--muted); font-size: 0.9rem; margin: 0; }
.stance { align-self: flex-start; font-weight: 700; color: var(--tone); font-size: 1.05rem; }
.stance.strength-strong { font-size: 1.2rem; }
.stance.strength-weak { font-weight: 600; } /* 흐리게(opacity) 하면 대비가 4.2:1로 떨어져 굵기로만 구분 */
.minority-badge { align-self: flex-start; font-size: 0.75rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; }
.meter { height: 6px; border-radius: 999px; background: var(--no-soft); overflow: hidden; }
.meter-fill { height: 100%; background: var(--yes); }
.meter-label { font-size: 0.78rem; color: var(--muted); display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.passages summary { cursor: pointer; font-size: 0.9rem; color: var(--accent); font-weight: 650; min-height: 32px; display: flex; align-items: center; }
.passage { margin: 12px 0 0; padding-left: 12px; border-left: 2px solid var(--line); font-family: var(--serif); font-size: 1rem; line-height: 1.6; }
:lang(ko) .passage { font-size: 0.92rem; line-height: 1.75; }
.passage cite { display: block; font-family: var(--sans); font-style: normal; color: var(--muted); font-size: 0.78rem; margin-top: 4px; }
/* 지금이라면(추론): 카드에서 가장 잘 보이게 */
.vote-today { display: grid; gap: 6px; background: var(--surface, #fff); border-left: 3px solid var(--tone, var(--accent)); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 10px 12px; }
.vote-today-label { margin: 0 0 2px; font-size: 0.78rem; font-weight: 700; color: var(--tone, var(--accent)); letter-spacing: 0.02em; }
.vote-today-text { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--text); }
.reasons-open { align-self: flex-start; font-size: 0.88rem; }
.vote-today-rest { display: grid; gap: 6px; }
.vote-today-toggle { justify-self: start; font-size: 0.85rem; }
/* 속마음 팝업: 한 사람씩 */
.reasons-dialog { width: min(560px, calc(100vw - 32px)); max-height: min(80vh, 720px); border: 0; border-radius: var(--radius); padding: 22px 22px 18px; background: var(--surface, #fff); color: var(--text); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25); overflow: auto; }
.reasons-dialog:not([open]) { display: none; } /* <dialog>를 모르는 옛 브라우저에서 닫힌 팝업이 보이지 않게 (3차 확인 B3) */
.reasons-dialog::backdrop { background: rgba(20, 14, 10, 0.45); }
.reasons-title { margin: 0; font-size: 1.25rem; padding-right: 36px; }
.reasons-stance { margin: 4px 0 14px; font-weight: 700; color: var(--accent); }
.dialog-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.dialog-close:hover { background: var(--line); }
/* 판결 이유: 근거 구절과 같은 접힘, 주제별 관점과 이어지는 생각 */
.reasons summary { cursor: pointer; font-size: 0.9rem; color: var(--accent); font-weight: 650; min-height: 32px; display: flex; align-items: center; }
.reasons-heading { margin: 0 0 4px; font-size: 0.95rem; font-weight: 700; color: var(--accent); }
.reason-topic, .reason-path, .reason-passages { margin-top: 10px; font-size: 0.92rem; line-height: 1.6; }
.reason-topic p, .reason-path p { margin: 0 0 4px; }
.reason-heading { font-weight: 650; }
.reason-today { color: var(--muted); }
.reason-path ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.reason-step { color: var(--text); }
.reason-link { display: block; font-size: 0.8rem; color: var(--muted); }
.reason-note { font-size: 0.82rem; color: var(--muted); }
.advice { border-top: 1px solid var(--line); padding-top: 12px; font-size: 0.95rem; white-space: pre-wrap; }
.advice-error { color: var(--no); }
.vote-card.minority { box-shadow: 0 0 0 2px var(--accent-soft); }

/* 유료: 무료 결과와 구분선으로 분리 */
.share-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 4px 0 24px; }
.share-box .hint { flex-basis: 100%; margin: 0; }
.share-hide { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.9rem; cursor: pointer; }
.premium { border-top: 1px solid var(--line); padding-top: 22px; display: grid; gap: 12px; }
.premium .hint { margin: 0; }
.premium-row { display: flex; gap: 10px; flex-wrap: wrap; }
.premium-row .text-input { flex: 1 1 200px; }

/* 자주 묻는 질문: 검색·AI 답변이 읽을 수 있게 정적 HTML에 영어 기본 문구가 들어 있다 (scripts/static-copy.mjs) */
.faq { margin-top: 48px; max-width: 46rem; }
.faq-title { font-size: 1.05rem; margin: 0 0 8px; }
.faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; min-height: 24px; }
.faq details p { margin: 8px 0 0; color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.footnote { color: var(--muted); font-size: 0.8rem; text-align: center; margin-top: 40px; line-height: 1.6; }
.footnote p { margin: 0 0 8px; }
.footnote-safety { color: var(--text); }

@keyframes reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}

/* 이용 동의 카드: 법적 안내라 장식 없이 (docs/copy-guide.md 6) */
.consent-list { margin: 12px 0 0; padding-left: 1.2em; display: grid; gap: 8px; line-height: 1.55; font-size: 0.92rem; color: var(--muted); }
.consent-checks { display: grid; gap: 12px; margin: 14px 0 0; }
.consent-check { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; line-height: 1.55; cursor: pointer; }
.consent-check input { width: 1.15rem; height: 1.15rem; margin: 0.2rem 0 0; accent-color: var(--accent); }
.consent-check strong { font-weight: 700; }
.live-toggle { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 0.9rem; cursor: pointer; }
.live-hint { margin: 2px 0 0; font-size: 0.8rem; }
.consent-links { margin: 14px 0; }
.consent-links a, .legal-links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; }
.link-button { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.ai-note { margin: 10px 0 0; font-size: 0.82rem; color: var(--muted); }

/* 일본어·중국어는 띄어쓰기가 없어 keep-all이면 문장부호에서만 줄이 바뀐다 (2차 M9) */
:is(:lang(ja), :lang(zh)) body { word-break: normal; line-break: strict; }

/* 동의 뒤 초점을 받는 카드 묶음(tabindex=-1): 마우스·터치로는 테두리를 그리지 않는다 */
.card[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }

/* 한 번 누르는 반응 (납득되나요? / 다음에 바라는 것). 숫자만 센다 */
.react-box, .wish-box { max-width: 34rem; margin: 0 auto 22px; text-align: center; }
.react-question { margin: 0 0 12px; font-weight: 600; }
.react-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.react-box .hint, .wish-box .hint { margin: 0; }

/* 페이지 스크롤바를 숨긴다: 휴대폰에서 오른쪽 끝 칸트 얼굴 테두리 위에 겹쳐 잘린 것처럼 보였다 (2026-10-09). 스크롤은 그대로 된다
   iOS 사파리는 화면 스크롤 표시줄을 CSS로 숨길 수 없어(스크롤할 때 잠깐 뜨는 시스템 표시), 얼굴 줄 양옆에 여백을 두어 겹치지 않게 한다 */
#stage-columns { padding-inline: 10px; }
html { scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* 얼굴을 길게 눌러도 글자 선택·확대 메뉴가 뜨지 않게 (얼굴 위에 파란 선택 표시가 겹치던 것) */
.stage-column, .face-canvas, .seat { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
