/* 한 화면 앱 — 가운데 한 줄(최대 480px), 위 머리줄 · 가운데 스크롤 · 아래 메뉴 또는 진한 단추 하나. 겉 = 옛 TUH 디자인 언어(tuh.education · tuh-chat): 웜 뉴트럴 · 세이지 · 올리브 · 시스템 글꼴 + 세리프 네 자리(work/design/spec.md). */
:root {
  --bg: #F8F8F6; --surface: #FFFFFF; --surface-2: #EFEEE9; --line: #E1E0D9; --line-input: #7B7A79;
  --ink: #1A1A1A; --ink-2: #555555; --ink-3: #62615C; --ink-4: #62615C;
  --accent: #566049; --accent-press: #47503C; --accent-soft: #EBEDE7; --accent-ink: #FFFFFF; --accent-weak: #D5DACF;
  --sage: #8A9B7C; --brand: #566049;
  --good: #5A6E4E; --good-bg: #EBEDE7; --good-line: rgba(138, 155, 124, 0.35); --good-title: #47503C; --good-ink: #1A1A1A;
  --bad: #B34E48; --bad-bg: #F3E8E6; --bad-line: rgba(200, 90, 84, 0.25); --bad-title: #B03F39; --bad-ink: #1A1A1A;
  --warm: #47503C; --warm-bg: #EBEDE7; --warm-icon: #566049;
  --scrim: rgba(30, 30, 28, 0.32); --shadow: 0 1px 3px rgba(0, 0, 0, 0.04); --shadow-hero: 0 18px 50px rgba(29, 29, 27, 0.09); --shadow-sheet: 0 -12px 40px rgba(0, 0, 0, 0.12);
  --f-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Segoe UI', 'Helvetica Neue', Arial, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  --f-display: var(--f-body);
  --serif: 'Iowan Old Style', 'Palatino', 'Palatino Linotype', Georgia, 'Times New Roman', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Noto Sans CJK KR', serif;
  --r-card: 20px; --r-btn: 999px; --gutter: 20px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1F1F1D; --surface: #262624; --surface-2: #2C2C2A; --line: #3A3A36; --line-input: #7B7A79;
    --ink: #F8F8F6; --ink-2: #C2C1B6; --ink-3: #A3A19A; --ink-4: #96948B;
    --accent: #8A9B7C; --accent-press: #A9B89B; --accent-soft: #32352E; --accent-ink: #171716; --accent-weak: #4A5143;
    --sage: #8A9B7C; --brand: #A9B89B;
    --good: #8A9B7C; --good-bg: #32352E; --good-line: rgba(138, 155, 124, 0.35); --good-title: #B9C4AC; --good-ink: #F8F8F6;
    --bad: #FF9B96; --bad-bg: #382825; --bad-line: rgba(200, 90, 84, 0.35); --bad-title: #FF9B96; --bad-ink: #F8F8F6;
    --warm: #B9C4AC; --warm-bg: #32352E; --warm-icon: #A9B89B;
    --scrim: rgba(0, 0, 0, 0.45); --shadow: 0 1px 4px rgba(0, 0, 0, 0.3); --shadow-hero: 0 18px 50px rgba(0, 0, 0, 0.38); --shadow-sheet: 0 -12px 40px rgba(0, 0, 0, 0.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1F1F1D; --surface: #262624; --surface-2: #2C2C2A; --line: #3A3A36; --line-input: #7B7A79;
  --ink: #F8F8F6; --ink-2: #C2C1B6; --ink-3: #A3A19A; --ink-4: #96948B;
  --accent: #8A9B7C; --accent-press: #A9B89B; --accent-soft: #32352E; --accent-ink: #171716; --accent-weak: #4A5143;
  --sage: #8A9B7C; --brand: #A9B89B;
  --good: #8A9B7C; --good-bg: #32352E; --good-line: rgba(138, 155, 124, 0.35); --good-title: #B9C4AC; --good-ink: #F8F8F6;
  --bad: #FF9B96; --bad-bg: #382825; --bad-line: rgba(200, 90, 84, 0.35); --bad-title: #FF9B96; --bad-ink: #F8F8F6;
  --warm: #B9C4AC; --warm-bg: #32352E; --warm-icon: #A9B89B;
  --scrim: rgba(0, 0, 0, 0.45); --shadow: 0 1px 4px rgba(0, 0, 0, 0.3); --shadow-hero: 0 18px 50px rgba(0, 0, 0, 0.38); --shadow-sheet: 0 -12px 40px rgba(0, 0, 0, 0.4);
}

html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.6; letter-spacing: -0.022em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; word-break: keep-all; overflow-wrap: break-word; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
/* 한국어는 낱말 가운데서 줄을 바꾸지 않는다(긴 낱말만 넘침 막기) */
:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }

#app { height: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 20px var(--gutter) 28px; display: flex; flex-direction: column; gap: 14px; }
.h1 { margin: 2px 0 4px; font-family: var(--f-display); font-size: 28px; line-height: 1.25; font-weight: 760; letter-spacing: -0.025em; text-wrap: balance; }
.h2 { margin: 0; font-family: var(--f-display); font-size: 21px; line-height: 1.4; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.muted { color: var(--ink-3); }
.small { font-size: 13.5px; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; box-shadow: var(--shadow); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; }
.pill.skill { align-self: flex-start; color: var(--accent-press); background: var(--accent-soft); }
.pill.streak { background: var(--warm-bg); color: var(--warm); font-weight: 700; font-size: 13px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border: 0; border-radius: var(--r-btn); background: var(--accent); color: var(--accent-ink); font-family: var(--f-display); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; width: 100%; transition: background .15s, box-shadow .15s; }
.btn:active { background: var(--accent-press); }
.btn[disabled] { background: var(--surface-2); color: var(--ink-4); cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:active { background: var(--accent-soft); }
/* .btn.white = 오늘 카드의 단추. 카드가 밝은 면이 되어 따로 꾸미지 않고 .btn(올리브)을 그대로 씀 */
.link { background: none; border: 0; padding: 10px 4px; min-height: 44px; color: var(--accent-press); font-weight: 600; font-size: 15px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.foot { flex: none; padding: 12px var(--gutter) calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; background: var(--bg); }

/* 시작 — 'Tuh' 세리프 워드마크(tuh.education 머리와 같은 꼴) */
.brand { font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.2; letter-spacing: 0.02em; color: var(--brand); }
.tagline { font-family: var(--f-display); font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -0.025em; margin: 8px 0 0; text-wrap: balance; }
.course { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); min-height: 76px; transition: border-color .15s, box-shadow .15s; }
.course[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.badge { flex: none; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--accent-soft); color: var(--accent-press); font-size: 16px; }
.course[aria-pressed="true"] .badge { background: var(--accent); color: var(--accent-ink); }
.course b { display: block; font-size: 17px; font-weight: 650; }
.course span.sub { font-size: 13.5px; color: var(--ink-3); }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--ink-3); padding: 6px 2px; min-height: 44px; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }

/* 오늘 — 밝은 카드(랜딩 데모 카드 꼴) + 세리프 큰 수 + 올리브 알약 */
.hero { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-hero); }
.hero .lbl { font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.hero .big { font-family: var(--serif); font-size: 40px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.05; font-variant-numeric: lining-nums; }
.hero .mid { font-size: 16px; font-weight: 500; color: var(--ink-3); }
.hero .hchip { font-size: 12.5px; font-weight: 600; color: var(--accent-press); background: var(--accent-soft); padding: 5px 11px; border-radius: 999px; }
.hero .lv { font-size: 12.5px; font-weight: 700; color: var(--ink-2); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }
.rowlink { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); min-height: 72px; }
.rowlink .ic { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--warm-bg); display: flex; align-items: center; justify-content: center; }
.rowlink .t { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.rowlink .t b { font-size: 16px; font-weight: 650; }
.bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 6px; border-radius: 999px; background: var(--accent); }
.week { display: flex; justify-content: space-between; padding: 4px 4px 0; }
.week .d { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.week .o { width: 34px; height: 34px; border-radius: 999px; box-sizing: border-box; border: 1.5px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; }
.week .o.done { background: var(--accent); border-color: var(--accent); }
.week .o.done svg { stroke: var(--accent-ink); }
.week .o.today { border: 2px solid var(--accent); }

/* 아래 메뉴 — 고른 칸은 아이콘 뒤 옅은 세이지 알약 */
.nav { flex: none; display: flex; background: var(--bg); border-top: 1px solid var(--line); padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px)); }
.nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; background: none; border: 0; color: var(--ink-4); font-size: 12px; font-weight: 500; }
.nav button svg { box-sizing: content-box; padding: 4px 16px; border-radius: 999px; transition: background .15s; }
.nav button[aria-current="page"] { color: var(--ink); font-weight: 650; }
.nav button[aria-current="page"] svg { background: var(--accent-soft); color: var(--accent); }

/* 문제 */
.qtop { flex: none; display: flex; align-items: center; gap: 14px; padding: 16px var(--gutter) 0; }
.iconbtn { flex: none; width: 44px; height: 44px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: transparent; color: var(--ink-2); border: 0; }
.iconbtn:active { background: var(--surface-2); }
.prog { flex: 1; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.prog > i { display: block; height: 6px; border-radius: 999px; background: var(--accent); transition: width .3s; }
.qn { flex: none; font-size: 13.5px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* 지문 = 랜딩 데모 카드 꼴. 영어 지문만 세리프(한국어 지문은 산세리프 그대로) */
.textbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px 22px; box-shadow: var(--shadow); font-size: 19px; line-height: 1.75; overflow-wrap: break-word; }
.textbox.sm { font-size: 17px; line-height: 1.7; }
.textbox:lang(en) { font-family: var(--serif); line-height: 1.66; }
.textbox.sm:lang(en) { font-size: 18px; }
.textbox .lab { display: block; font-family: var(--f-body); font-size: 12px; font-weight: 700; color: var(--accent-press); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; line-height: 1.5; }
.textbox + .textbox { margin-top: -4px; }
.tok { background: none; border: 0; padding: 0 1px; margin: 0; font: inherit; color: inherit; letter-spacing: inherit; text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: var(--ink-4); text-decoration-thickness: 1.5px; text-underline-offset: 5px; border-radius: 6px; }
.tok[aria-pressed="true"] { color: var(--ink); background: var(--accent-soft); text-decoration-style: solid; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.gap { display: inline-block; width: 7em; height: 1.1em; vertical-align: -0.15em; border-bottom: 2px solid var(--accent); background: var(--accent-soft); border-radius: 6px 6px 2px 2px; margin: 0 2px; }
/* 낱말 풀이 · 힌트 · 시트 '왜 그럴까요' = 랜딩 끊어 읽기 메모 꼴(왼쪽 세이지 줄) */
.gloss { background: var(--accent-soft); color: var(--ink); border-left: 3px solid var(--sage); border-radius: 0 12px 12px 0; padding: 10px 14px; font-size: 15px; line-height: 1.7; }
.question { font-weight: 650; font-size: 17px; }
.opts { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.opt { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; min-height: 56px; box-shadow: var(--shadow); font-size: 16px; line-height: 1.55; transition: border-color .15s, box-shadow .15s; }
.opt .n { flex: none; width: 28px; height: 28px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; margin-top: 1px; }
.opt .l1 { display: block; font-size: 13.5px; color: var(--ink-3); margin-top: 2px; }
.opt[aria-pressed="true"] { border-color: var(--ink-2); box-shadow: 0 0 0 1px var(--ink-2), var(--shadow); }
.opt[aria-pressed="true"] .n { background: var(--ink); color: var(--surface); }
.opt.right { background: var(--good-bg); border-color: var(--good); box-shadow: 0 0 0 1px var(--good); }
.opt.right .n { background: var(--good); color: var(--surface); }
.opt.wrong { background: var(--bad-bg); border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
.opt.wrong .n { background: var(--bad); color: var(--surface); }
/* 맞음 · 틀림을 색 말고도 가름(색맹) — 칸 오른쪽 끝 ✓ / ✕. 글 몫은 비움(읽는 기계에 안 읽힘) */
.opt.right::after, .opt.wrong::after { flex: none; margin-left: auto; align-self: center; padding-left: 4px; font-size: 17px; font-weight: 700; line-height: 1; }
.opt.right::after { content: '\2713'; content: '\2713' / ''; color: var(--good-title); }
.opt.wrong::after { content: '\2715'; content: '\2715' / ''; color: var(--bad-title); }
.opt.dim { opacity: 0.55; }
.hintbox { background: var(--accent-soft); color: var(--ink); border-left: 3px solid var(--sage); border-radius: 0 12px 12px 0; padding: 12px 14px; font-size: 15px; line-height: 1.7; }
.blank { display: inline-block; min-width: 3.2em; height: 36px; box-sizing: border-box; margin: 0 2px; padding: 2px 6px 0; border: 0; border-bottom: 3px solid var(--ink-4); background: var(--surface-2); border-radius: 8px 8px 2px 2px; font-weight: 700; letter-spacing: 0.08em; text-align: center; vertical-align: baseline; font-size: 18px; }
.blank:focus { border-bottom-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 2px var(--accent); outline: none; }
.blank.ok { border-bottom-color: var(--good); background: var(--good-bg); }
.blank.no { border-bottom-color: var(--bad); background: var(--bad-bg); text-decoration: line-through; text-decoration-color: var(--bad); }
select.blank { letter-spacing: 0; font-weight: 600; font-size: 16px; padding: 2px 4px 0; max-width: 100%; }
.sent { background: none; border: 0; padding: 2px 1px; margin: 0; min-height: 30px; text-align: left; font: inherit; color: inherit; letter-spacing: inherit; line-height: inherit; border-radius: 6px; }
.sent.on { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); color: var(--ink); text-decoration-line: underline; text-decoration-color: var(--ink-2); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.sent.right { background: var(--good-bg); box-shadow: 0 0 0 3px var(--good-bg); text-decoration-line: underline; text-decoration-color: var(--good); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.sent.wrong { background: var(--bad-bg); box-shadow: 0 0 0 3px var(--bad-bg); text-decoration-line: line-through; text-decoration-color: var(--bad); text-decoration-thickness: 1.5px; }
/* 쓰기 칸 = 채팅 입력칸 질감(흰 면 · 1px 선 · 옅은 그림자), 선은 대비 3:1 넘는 값 */
textarea.ta { width: 100%; box-sizing: border-box; min-height: 120px; resize: vertical; border: 1px solid var(--line-input); border-radius: 16px; padding: 14px 16px; background: var(--surface); box-shadow: var(--shadow); font-size: 16px; line-height: 1.6; transition: border-color .15s, box-shadow .15s; }
textarea.ta:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); outline: none; }
.player { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; box-shadow: var(--shadow); }
.play { flex: none; width: 64px; height: 64px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; }
.play[disabled] { background: var(--surface-2); color: var(--ink-4); }
.diff ins { text-decoration: none; background: var(--good-bg); color: var(--good-title); border-radius: 4px; padding: 0 2px; }
.diff del { background: var(--bad-bg); color: var(--bad-title); border-radius: 4px; padding: 0 2px; }
.photo { width: 100%; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-card); background: var(--surface-2); }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-size: 15px; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin: 1px 0 0; }
.sample { background: var(--surface); border-radius: 14px; padding: 16px; font-size: 15.5px; line-height: 1.65; border: 1px dashed var(--sage); }
.sample:lang(en) { font-family: var(--serif); font-size: 16.5px; line-height: 1.66; }
.word-big { font-family: var(--f-display); font-size: 40px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.word-big:lang(en) { font-family: var(--serif); font-weight: 650; letter-spacing: -0.01em; }
.waiting { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 15px; padding: 6px 2px; }
.dot3 { display: inline-flex; gap: 4px; }
.dot3 i { width: 7px; height: 7px; border-radius: 999px; background: var(--sage); animation: blink 1.2s infinite; }
.dot3 i:nth-child(2) { animation-delay: .2s; } .dot3 i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* 시트 — 흰 면(위 모서리 20) + 맞음/틀림은 머리 띠(옛 복습 결과 띠 꼴)로 */
.scrim { position: absolute; inset: 0; background: var(--scrim); pointer-events: none; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 82%; overflow-y: auto; border-radius: 20px 20px 0 0; border-top: 1px solid var(--line); padding: 22px var(--gutter) calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-sheet); }
.sheet.enter { animation: up .22s cubic-bezier(0.2, 0, 0, 1); }
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet.good { background: var(--surface); color: var(--good-ink); }
.sheet.bad { background: var(--surface); color: var(--bad-ink); }
.sheet.plain { background: var(--surface); color: var(--ink); }
.sheet .head { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.sheet.good .head { color: var(--good-title); }
.sheet.bad .head { color: var(--bad-title); }
.sheet .head[role="status"] { padding: 12px 14px; border-radius: 14px; border: 1px solid transparent; }
.sheet.good .head[role="status"] { background: var(--good-bg); border-color: var(--good-line); }
.sheet.bad .head[role="status"] { background: var(--bad-bg); border-color: var(--bad-line); }
.sheet .mark { width: 28px; height: 28px; border-radius: 999px; display: flex; align-items: center; justify-content: center; flex: none; }
.sheet.good .mark { background: var(--good); }
.sheet.bad .mark { background: var(--bad); }
.sheet .mark svg { stroke: var(--surface); }
.sheet .line { margin: 0; font-size: 16px; line-height: 1.65; letter-spacing: -0.01em; }
.sheet .more { background: var(--accent-soft); color: var(--ink); border-left: 3px solid var(--sage); border-radius: 0 12px 12px 0; padding: 12px 14px; font-size: 15px; line-height: 1.7; letter-spacing: -0.01em; display: flex; flex-direction: column; gap: 8px; }
.sheet .more .ex { font-size: 15px; }
.sheet .note { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.sheet .link { color: var(--accent-press); text-decoration: underline; text-underline-offset: 4px; align-self: flex-start; padding-left: 0; }
/* 고르기 칩 = 목업 상태 탭 꼴(흰 알약 · 1px 선 → 고르면 올리브) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.chip[aria-pressed="true"] > span { color: var(--accent-ink); }
.why-in { display: flex; gap: 8px; }
.why-in input { flex: 1; min-width: 0; min-height: 44px; border-radius: 12px; border: 1px solid var(--line-input); background: var(--surface); color: var(--ink); padding: 0 12px; font-size: 16px; }
.why-in input:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); outline: none; }
.qlabel { font-size: 14px; font-weight: 650; }

/* 카드 */
.flash { flex: 1; min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 28px 22px; box-shadow: var(--shadow); width: 100%; }
.flash .kind { font-size: 12.5px; font-weight: 600; color: var(--accent-press); background: var(--accent-soft); padding: 5px 11px; border-radius: 999px; }
.flash .big { font-family: var(--f-display); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.35; white-space: pre-line; overflow-wrap: break-word; }
.flash .big:lang(en) { font-family: var(--serif); font-weight: 650; letter-spacing: -0.01em; }
.flash .big.long { font-size: 19px; font-weight: 700; line-height: 1.5; }
.flash .smallt { font-size: 15.5px; color: var(--ink-3); white-space: pre-line; overflow-wrap: break-word; line-height: 1.6; }
.flash .tap { font-size: 13px; color: var(--ink-4); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 기록 */
.ladder { display: flex; gap: 6px; }
.ladder span { flex: 1; text-align: center; padding: 8px 0; border-radius: 999px; font-weight: 700; font-size: 13px; background: var(--surface-2); color: var(--ink-4); }
.ladder span.done { background: var(--accent-soft); color: var(--accent-press); }
.ladder span.cur { background: var(--accent); color: var(--accent-ink); }
.grid35 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.grid35 i { aspect-ratio: 1; border-radius: 6px; background: var(--surface-2); }
.grid35 i.l1 { background: var(--accent-weak); } .grid35 i.l2 { background: var(--sage); } .grid35 i.l3 { background: var(--accent-press); }
.grid35 i.now { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.list { display: flex; flex-direction: column; gap: 0; }
.list .it { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); min-height: 44px; }
.list .it:last-child { border-bottom: 0; }
.list button.it { width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-family: var(--serif); font-size: 26px; font-weight: 650; letter-spacing: -0.01em; font-variant-numeric: lining-nums tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.code { font-size: 12px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 12.5px; color: var(--ink-3); font-weight: 650; }
.wrapx { overflow-x: auto; }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; flex: 1; }
.toast { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600; z-index: 5; max-width: 90%; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); }

/* S2 — 신고 판 · 아는 언어 · 처리방침 줄 */
.rpanel { display: flex; flex-direction: column; gap: 10px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
textarea.ta.rnote { min-height: 72px; font-size: 16px; }
.lvsel { flex: none; min-height: 40px; border-radius: 12px; border: 1px solid var(--line-input); background: var(--surface); padding: 0 8px; font-size: 14px; }
.legal a { color: var(--accent-press); font-weight: 600; }
.list .it > .check { padding: 0; min-height: 0; }
.spread > .link { flex: none; white-space: nowrap; }

/* 마우스 기기만 — 옛 TUH hover(옅은 그림자 · 칠은 그대로 — 누른 뒤 찍은 그림이 눌린 색으로 보이지 않게) */
@media (hover: hover) {
  .btn:not([disabled]):hover { box-shadow: 0 6px 18px rgba(86, 96, 73, 0.32); }
  .btn.ghost:not([disabled]):hover { background: var(--accent-soft); box-shadow: none; }
  .course:not([aria-pressed="true"]):hover, .rowlink:hover, .opt:not([disabled]):not([aria-pressed="true"]):hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); }
  .iconbtn:hover { background: var(--surface-2); }
  .chip:not([aria-pressed="true"]):hover { background: var(--accent-soft); }
}
