/* 회의 노트: confirmed style (prototype/style: B format + A colours).
   Listening: no cards, white page, big Korean words. Minutes, records, settings: light grey page
   with white sections (radius 14). One blue for emphasis; one blue button per screen.
   Built to survive a phone with enlarged text: no fixed heights on anything that holds text
   (min-height instead), rows wrap, numbers and dates are never cut with an ellipsis.

   Contrast (WCAG): ink #191c22 on white 17:1; sub #646b78 on white 5.4:1, on #f3f4f7 4.9:1;
   tab off #626875 on white 5.6:1; blue #2f4fe0 on white 6.3:1, on #e9eeff 5.4:1, white on blue 6.3:1;
   red #c8303b on white 5.3:1. */

:root {
  --brand: #0331C7; /* the logo's blue (marketing/brand/README.md), only for the logo */
  --blue: #2f4fe0;
  --blue-press: #2843c4;
  --blue-soft: #e9eeff;
  --blue-line: #d7dcf8;
  --ink: #191c22;
  --ink-2: #3b4250; /* chips, 10:1 */
  --act: #535a67; /* header action, 7:1 */
  --sub: #646b78;
  --tab-off: #626875;
  --line: #e6e8ec;
  --box: #878d98; /* chevrons, check boxes, switch off: 3.3:1 on white (icons and control edges need 3:1) */
  --bg: #ffffff;
  --soft: #f3f4f7;
  --own: #f1f2f5;
  --red: #c8303b;
  --red-soft: #fdeeef;
  --ok: #12b886; /* listening (as in the first app) */
  --warn-bg: #fff4e5;
  --warn-ink: #9a5a00; /* 5.0:1 on --warn-bg, 5.5:1 on white */
  --warn-dot: #f59f00;
  --radius: 14px;
  --gutter: 18px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body {
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.2px;
  overscroll-behavior: none;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; text-align: inherit; }
button:disabled { cursor: default; }
input, textarea, select { font: inherit; font-size: 17px; color: var(--ink); }
svg { display: block; }
h1, h2, p, ul, ol { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
#app { height: 100%; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }
.screen { flex: 1; display: flex; flex-direction: column; min-height: 0; padding-top: var(--safe-t); background: var(--bg); }
.screen.soft { background: var(--soft); }
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 12px calc(16px + var(--safe-b)); }

/* ---- headers ---- */
.tab-head { flex: 0 0 auto; padding: 18px var(--gutter) 12px; }
.tab-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.6px; line-height: 1.3; }
.topbar { min-height: 52px; flex: 0 0 auto; display: flex; align-items: center; gap: 2px; padding: 4px 6px; }
.topbar h1 { font-size: 17px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-gap { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.back { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; flex: 0 0 auto; color: var(--ink); }
.back svg { width: 24px; height: 24px; }

/* ---- tabs ---- */
.tabbar { flex: 0 0 auto; display: flex; border-top: 1px solid var(--line); background: var(--bg); padding: 4px 8px calc(4px + var(--safe-b)); }
.tab { flex: 1; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--tab-off); border-radius: 12px; text-align: center; }
.tab svg { width: 24px; height: 24px; }
.tab.on { color: var(--ink); font-weight: 700; }
/* line icons (prototype/tabbar B안): unselected = grey outline, selected = ink, thicker, its .fillon part filled */
.ln svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ln .tab.on svg { stroke-width: 2.2; }
.ln .tab.on svg .fillon { fill: currentColor; }
.ln .tab.on svg .cut { stroke: var(--bg); }

/* ---- white sections on the grey page ---- */
.sec { background: var(--bg); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 10px; }
.sec-h { display: block; font-size: 17px; font-weight: 800; letter-spacing: -0.3px; color: var(--ink); margin: 0 0 10px; }
.sec-row { display: flex; align-items: baseline; gap: 8px; }
.sec-row .sec-h { flex: 1; }
.sec.rows { padding: 4px 0; }
.sec.rows .sec-h { padding: 12px 16px 2px; margin: 0; }
.field-l { font-size: 14.5px; font-weight: 600; color: var(--ink-2); margin: 0 0 8px; }
.seg-help { margin: 10px 0 0; }
.help { font-size: 13px; color: var(--sub); margin: 0 0 10px; line-height: 1.45; }
.help.warn { color: var(--red); margin: 8px 0 0; }

.row { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px; text-align: left; }
.row + .row { border-top: 1px solid var(--line); }
.sec.rows .sec-h + .row { border-top: 0; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-t { font-size: 16px; font-weight: 600; color: var(--ink); }
.row-s { font-size: 13px; color: var(--sub); }
.row-v { font-size: 14px; color: var(--sub); flex: 0 0 auto; }
.chev { flex: 0 0 auto; color: var(--box); font-size: 22px; line-height: 1; }
.down { flex: 0 0 auto; color: var(--box); font-size: 13px; line-height: 1; }
.row-s.warn { color: var(--warn-ink); }
.row-v.pick-v { color: var(--ink-2); font-weight: 600; white-space: nowrap; } /* a value picked from a sheet (▾) */
.row-v.ctx-v { max-width: 45%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--ink-2); }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* listening goes on behind other screens: this bar leads back */
.live-bar { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; width: calc(100% - 24px); margin: 8px 12px 0; min-height: 52px; padding: 8px 16px; border-radius: var(--radius); background: var(--bg); color: var(--ink); font-size: 15.5px; font-weight: 700; text-align: left; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); }
.live-bar-t { flex: 1; min-width: 0; }
.live-bar-clock { font-weight: 500; color: var(--act); margin-left: 4px; }
.row.danger .row-t { color: var(--red); font-weight: 600; }
/* 기록 전체 보기 at the bottom of 최근 기록: a grey line, not a button that stands out */
.row.all-row { min-height: 50px; justify-content: center; }
.row.all-row .row-main { flex: 0 1 auto; }
.row.all-row .row-t { font-size: 15px; font-weight: 600; color: var(--sub); }

/* ---- buttons ---- */
.btn { width: 100%; min-height: 54px; padding: 12px 16px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; text-align: center; font-size: 16.5px; font-weight: 700; line-height: 1.3; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:disabled { background: #b7c1f1; color: #fff; }
.btn.secondary { background: var(--soft); color: var(--ink); }
.btn.danger { background: var(--red); color: #fff; }
.screen.soft .bottom .btn.secondary { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); } /* on the grey page */
.btn.small { width: auto; min-height: 44px; padding: 8px 14px; font-size: 15px; border-radius: 12px; flex: 0 0 auto; }
.bottom { flex: 0 0 auto; padding: 10px var(--gutter) calc(14px + var(--safe-b)); background: inherit; }

@media (hover: hover) and (pointer: fine) {
  .btn.primary:not(:disabled):hover { background: var(--blue-press); }
  .btn.secondary:hover, .row:hover, .opt:hover { filter: brightness(0.98); }
  .tab:hover { color: var(--ink); }
  .pause:not(:disabled):hover, .end:not(:disabled):hover, .icon-btn:hover { filter: brightness(0.97); }
}

/* ---- start tab (picked 2026-11-16): a Korean card with its start button, three foreign tiles ---- */
.tf { font-family: Tossface; font-style: normal; line-height: 1; }
.home-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ctx-chip { flex: 0 1 auto; min-width: 0; max-width: 58%; min-height: 36px; padding: 7px 12px; border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 700; color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.ctx-chip .ctx-v { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.grp-l { font-size: 13.5px; font-weight: 800; color: var(--sub); padding: 6px 10px 8px; }
.ko-card { padding: 18px 18px 16px; border-radius: 20px; margin-bottom: 14px; }
.ko-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ko-em { font-size: 34px; flex: 0 0 auto; }
.ko-t { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; color: var(--ink); }
.ko-start { gap: 8px; }
.ko-start svg { width: 21px; height: 21px; flex: 0 0 auto; }
.fx-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.fx-tile { background: var(--bg); border-radius: 18px; padding: 14px 6px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.fx-em { font-size: 30px; }
.fx-t { font-size: 15px; font-weight: 800; letter-spacing: -0.4px; color: var(--ink); }
.fx-s { font-size: 12px; color: var(--sub); line-height: 1.35; }
@media (hover: hover) and (pointer: fine) { .fx-tile:hover, .ctx-chip:hover { filter: brightness(0.98); } }

/* ---- start tab ---- */
.sit-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex: 0 0 auto; }
.sit-ico svg { width: 22px; height: 22px; }
.sit-ico.g { background: var(--soft); color: var(--ink-2); }
.resume { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.resume-t { flex: 1 1 160px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.resume-t b { font-size: 16px; font-weight: 700; }
.resume-t span { font-size: 13px; color: var(--sub); }

/* ---- bottom sheet ---- */
.sheet-backdrop, .dlg-backdrop { position: fixed; inset: 0; background: rgba(17, 20, 26, 0.42); z-index: 30; display: flex; pointer-events: auto; }
.sheet-backdrop { align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 80vh; display: flex; flex-direction: column; background: var(--bg); border-radius: 18px 18px 0 0; padding: 6px 0 calc(10px + var(--safe-b)); }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 4px 20px; }
.sheet-head h2 { flex: 1; font-size: 17px; font-weight: 700; }
.sheet-x { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--sub); }
.sheet-x svg { width: 22px; height: 22px; }
.sheet-sub { font-size: 13px; color: var(--sub); padding: 0 20px 6px; }
.sheet-body { overflow-y: auto; padding: 4px 8px 6px; }
.opt-note { font-size: 13px; color: var(--sub); padding: 12px; }
.opt { width: 100%; min-height: 54px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; text-align: left; }
.opt-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 16px; font-weight: 600; }
.opt-s { font-size: 13px; font-weight: 400; color: var(--sub); }
.opt.on { background: var(--blue-soft); }
.opt.on .opt-t { color: var(--blue); }
.opt.on .opt-s { color: var(--blue); }
.opt-check { color: var(--blue); flex: 0 0 auto; }
.opt-check svg { width: 22px; height: 22px; }
.opt.add .opt-t, .opt.add .act-ico { color: var(--blue); }
.act-ico { width: 24px; height: 24px; flex: 0 0 auto; color: var(--ink-2); display: grid; place-items: center; }
.act-ico svg { width: 22px; height: 22px; }
.opt.act .opt-t { font-size: 16.5px; }
.opt.act.danger .opt-t, .opt.act.danger .act-ico { color: var(--red); }
.opt.radio.on { background: none; }
.opt.radio.on .opt-t { color: var(--ink); }
.opt.radio.on .opt-s { color: var(--sub); }
.radio-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--box); flex: 0 0 auto; }
.opt.radio.on .radio-dot { border: 7px solid var(--blue); }
.sheet-warn { margin: 6px 12px 4px; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; font-weight: 600; }
.sheet-cta { padding: 8px 4px 2px; }
/* the main button below the part that scrolls (openSheet lifts .sheet-cta here): always in view */
.sheet-foot { flex: 0 0 auto; padding: 0 8px; border-top: 1px solid var(--line); }
.sheet-foot .sheet-cta { padding: 10px 4px 2px; }
.sheet-foot .ai-preview { padding: 10px 4px 0; }
.sheet-foot .ai-preview:empty { display: none; }
.sheet-foot .sheet-warn { margin: 10px 4px 0; }
/* AI로 채우기: three numbered steps, the question to copy, the answer box, what was read */
.ai-steps { list-style: none; counter-reset: step; padding: 4px 12px 0; margin: 0; }
.ai-steps li { counter-increment: step; position: relative; padding-left: 32px; margin: 0 0 14px; }
.ai-steps li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 13px; font-weight: 800; display: grid; place-items: center; }
.ai-step { font-size: 15.5px; font-weight: 600; color: var(--ink); margin: 0 0 8px; }
.ai-ask { margin: 0 0 8px; padding: 10px 12px; max-height: 112px; overflow-y: auto; white-space: pre-wrap; word-break: break-all; border-radius: 12px; background: var(--soft); color: var(--ink-2); font: inherit; font-size: 13px; line-height: 1.5; }
.ai-in { display: block; min-height: 96px; resize: vertical; margin: 0 0 8px; line-height: 1.45; }
.ai-preview { padding: 0 12px; }
.ai-got { padding: 10px 14px; border-radius: 12px; background: var(--blue-soft); }
.ai-name { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.ai-bg { font-size: 15px; color: var(--ink); }
.ai-counts { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.ai-miss { padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; font-weight: 600; }

/* ---- dialogs ---- */
.dlg-backdrop { align-items: center; justify-content: center; padding: 20px; }
.dlg { width: 100%; max-width: 360px; background: var(--bg); border-radius: 18px; padding: 22px 20px 18px; }
.dlg h2 { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.dlg p { font-size: 15px; color: var(--sub); margin: 0 0 18px; }
.dlg-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dlg-actions .btn { flex: 1 1 120px; min-height: 50px; white-space: nowrap; } /* large text: the buttons stack, words never split */

.toast.over-sheet { top: calc(16px + var(--safe-t)); bottom: auto; }
.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); max-width: calc(100% - 40px); width: max-content; background: rgba(25, 28, 34, 0.92); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 15px; z-index: 40; text-align: center; }

/* ---- listening ---- */
.live { background: var(--bg); position: relative; }
/* title and state pill on one row, the pack's name under them; with large text the pill moves down
   beside the pack's name (.stacked, set by fitHeader) so the title is never cut. The rows never change
   between states: the layout is chosen for the longest state word. */
.lhead { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t s" "p p"; align-items: center; column-gap: 10px; row-gap: 2px; padding: 8px 14px 10px var(--gutter); flex: 0 0 auto; border-bottom: 1px solid var(--line); }
.lhead h1 { grid-area: t; min-width: 0; font-size: 19px; font-weight: 800; letter-spacing: -0.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lhead .state { grid-area: s; justify-self: end; }
.lhead .packline { grid-area: p; min-width: 0; }
.lhead.stacked { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "t t" "s p"; row-gap: 6px; }
.lhead.stacked .state { justify-self: start; }
/* 화면 설정 button at the top right (user 2026-11-18 "나로 가자"); with it, a stacked header keeps it beside the title */
.lhead.with-tool { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "t s b" "p p p"; padding-right: 6px; } /* the button's own space stands for the edge */
.lhead.with-tool.stacked { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "t t b" "s p p"; }
/* as ⋯ at a record's top right (.back.more): no fill, ink, 24px, 44 square; pulled in so the title row keeps one line past an hour */
.head-tool { grid-area: b; width: 44px; height: 44px; margin-left: -10px; border-radius: 12px; display: grid; place-items: center; color: var(--ink); flex: 0 0 auto; }
.head-tool svg { width: 24px; height: 24px; }
.vs-sec { padding: 4px 12px 16px; }
.vs-sec:last-child { padding-bottom: 0; } /* 16px below the last row, as in the other sheets */
.vs-sec + .vs-sec { border-top: 1px solid var(--line); padding-top: 16px; }
.vs-h { font-size: 14.5px; font-weight: 600; color: var(--ink-2); margin: 0 0 8px; } /* as .field-l: under the sheet title */
.vs-ear { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; } /* narrow or big text: the side above, the choices on a whole row */
.vs-ear + .vs-ear { margin-top: 12px; } /* a side and its choices closer than the two sides */
.vs-side { flex: 0 0 auto; min-width: 3.5em; font-size: 14px; font-weight: 500; color: var(--sub); } /* a step under the 이어폰 title */
.vs-ear .seg { flex: 1 1 240px; min-width: 0; }
.vs-ear .seg button { white-space: nowrap; }
/* state and time in one pill (as in the first app) */
.state { display: inline-flex; align-items: center; gap: 6px; background: var(--soft); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.state-clock { font-weight: 500; color: var(--act); }
.packline { font-size: 13.5px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.packline[hidden] { display: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--box); flex: 0 0 auto; }
.dot.on { background: var(--ok); animation: pulse 1.6s ease-in-out infinite; }
.dot.busy { background: var(--warn-dot); }
.dot.err { background: var(--red); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .dot.on { animation: none; } }
.chip { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--soft); color: var(--ink-2); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
button.chip { min-height: 32px; }
.chip.on { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.banner { margin: 12px var(--gutter) 0; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; font-weight: 600; flex: 0 0 auto; }
.banner.err { background: var(--red-soft); color: var(--red); }

.feed-wrap { flex: 1; min-height: 0; position: relative; display: flex; }
.feed { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px var(--gutter) 24px; display: flex; flex-direction: column; gap: 16px; }
.item-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 5px; }
/* speakers as coloured tags, one colour per number (the first app's palette); me in grey */
.who { display: inline-block; font-size: 13px; font-weight: 800; border-radius: 7px; padding: 2px 8px; }
.spk-1 { background: #e8f3ff; color: #1b5fc4; }
.spk-2 { background: #e5f8ef; color: #0b7a4b; }
.spk-3 { background: #f1ecfe; color: #6d3fd9; }
.spk-4 { background: #e3f6f8; color: #08707f; }
.spk-5 { background: #fdeef5; color: #b4246b; }
.spk-6 { background: #eef5e1; color: #4a7a0a; }
.spk-7 { background: #e9ebf5; color: #3b4a8a; }
.spk-8 { background: #f4ebe4; color: #7a4a2a; }
.spk-me { background: var(--soft); color: var(--ink-2); }
button.who { cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; }
.rn-field { padding: 4px 12px 0; }
.rn-sugs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 6px; }
.rn-sug { font-size: 14px; padding: 7px 12px; min-height: 36px; }
.tag-warn { display: inline-block; font-size: 13px; font-weight: 700; border-radius: 7px; padding: 2px 8px; background: var(--warn-bg); color: var(--warn-ink); }
.item .tr { font-size: calc(22px * var(--text-scale, 1)); font-weight: 600; line-height: 1.45; letter-spacing: -0.3px; }
.item .og { font-size: calc(13.5px * var(--text-scale, 1)); line-height: 1.45; color: var(--sub); margin-top: 4px; }
/* words not yet settled: lighter, still readable (3:1 for the big line, 4.5:1 for the small one) */
.item.live-item .tr { color: #8b95a1; }
.item.live-item .og { color: #6b7684; }
.feed-empty { margin: auto 0; padding: 24px 6px; text-align: center; font-size: 16px; color: var(--sub); }
.newest { position: absolute; right: var(--gutter); bottom: 14px; min-height: 40px; padding: 8px 14px; border-radius: 999px; background: var(--bg); color: var(--blue); font-size: 13px; font-weight: 700; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.14); z-index: 2; }
/* the three controls in one row at the thumb (as in the first app): 읽어 주기 icon, a wide 일시정지, a red 종료 */
.controls { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 10px 12px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--bg); }
.icon-btn { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: var(--blue-soft); color: var(--blue); }
.icon-btn svg { width: 27px; height: 27px; }
.icon-btn.off { background: var(--soft); color: var(--act); }
.pause { flex: 1 1 auto; min-width: 0; min-height: 56px; padding: 6px 10px; border-radius: 28px; display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--soft); color: var(--ink); font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; }
.pause svg { width: 1.05em; height: 1.05em; flex: 0 0 auto; }
.pause span { overflow: hidden; text-overflow: ellipsis; }
.pause.go { background: var(--blue); color: #fff; }
.pause:disabled { opacity: 0.55; }
.pause[hidden] { display: none; }
.end { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 6px 18px; border-radius: 28px; background: var(--red-soft); color: var(--red); font-size: 18px; font-weight: 800; white-space: nowrap; }
.end:disabled { opacity: 0.55; }
.end.close { flex: 1 1 auto; background: var(--soft); color: var(--ink); }

/* 1:1: the phone between two people, the top half for the other person */
.panes { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pane { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; padding: 8px var(--gutter) 0; }
.pane + .pane { border-top: 1.5px dashed var(--line); }
.pane.flip { transform: rotate(180deg); }
.pane-label { font-size: 12px; font-weight: 700; color: var(--sub); letter-spacing: 0.4px; padding: 2px 0 6px; flex: 0 0 auto; }
/* 1:1: the 마주 보기 button at the end of the 한국어 label row (turns the English half to the other person) */
.pane-label.with-btn { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 0 0 6px; }
.flip-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 4px 12px; border-radius: 18px; background: var(--soft); color: var(--ink-2); font-size: 14px; font-weight: 700; letter-spacing: 0; }
.flip-btn svg { width: 18px; height: 18px; }
.flip-btn[aria-pressed="true"] { background: var(--blue-soft); color: var(--blue); }
.pane-feed { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 16px; padding-bottom: 14px; }
.pane .newest { bottom: 10px; }

/* microphone blocked: what to do, in place of the words */
.mic-help { flex: 1; padding: 8px var(--gutter) 16px; overflow-y: auto; }
.mic-help { padding-top: 24px; }
.mic-ico { width: 56px; height: 56px; border-radius: 50%; background: var(--soft); color: var(--ink-2); display: grid; place-items: center; }
.mic-ico svg { width: 28px; height: 28px; }
.mic-help h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; margin: 16px 0 14px; }
.mic-help ol { padding-left: 22px; margin: 0 0 18px; font-size: 16px; display: flex; flex-direction: column; gap: 8px; }
.live.denied .feed-wrap, .live.denied .panes { display: none; }

/* ---- 녹음 (prototype/record-mode/real.html): no words while recording, the time and the sound bars.
   The bars follow the microphone's level (main.ts showLevel), the one moving thing on the screen;
   with reduced motion they stand still. */
.rec-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; padding: 0 var(--gutter) 40px; }
.rec-time { font-size: 64px; font-weight: 800; letter-spacing: -1.5px; line-height: 1; color: var(--ink); white-space: nowrap; }
.rec-time.long { font-size: 52px; } /* only when 1:04:12 would not fit (enlarged text): main.ts fitRecTime */
.rec-time.paused { color: var(--sub); }
.rec-wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 76px; width: 100%; max-width: 300px; }
.rec-wave i { display: block; width: 5px; border-radius: 3px; background: var(--ink-2); transform-origin: center; transition: height 0.2s ease-out; }
.rec-wave.flat i { height: 4px !important; background: var(--line); opacity: 1 !important; }
@media (prefers-reduced-motion: reduce) { .rec-wave i { transition: none; } }
.live.denied .rec-stage { display: none; }

/* ---- minutes ---- */
.doc { padding-top: 2px; }
.doc-head { padding: 0 6px 12px; }
.sit-chip { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); background: #e6e9ee; border-radius: 6px; padding: 3px 8px; margin: 0 0 8px; }
.doc-ttl { display: block; width: 100%; font-size: 24px; font-weight: 800; line-height: 1.35; letter-spacing: -0.6px; text-align: left; }
.doc-ttl-input { width: 100%; font-size: 24px; font-weight: 800; line-height: 1.3; letter-spacing: -0.4px; padding: 4px 8px; margin: -5px -9px; border: 1px solid var(--blue); border-radius: 10px; background: var(--bg); outline: none; }
.doc-meta { font-size: 14px; color: var(--sub); margin-top: 6px; }
.doc-tabs { display: flex; align-items: center; gap: 8px; padding: 0 6px; margin: 0 0 12px; }
.tablist { display: flex; gap: 18px; flex: 1; }
.tablist [role="tab"] { min-height: 44px; padding: 10px 2px; font-size: 16px; font-weight: 600; color: var(--tab-off); border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.tablist [role="tab"][aria-selected="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.mdoc { padding: 4px 18px 20px; }
.msec h2, .fail h2 { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; color: var(--ink); margin: 18px 0 8px; }
.fail h2 { margin-top: 4px; }
.doc .sec p { font-size: 15.5px; line-height: 1.6; }
.mlist { padding-left: 18px; font-size: 15.5px; line-height: 1.6; }
.mlist li + li { margin-top: 4px; }
.busy-line { font-size: 15px; font-weight: 600; color: var(--ink-2); padding: 2px 8px 10px; }
/* 양식 · 기본 ▾ at the top inside the minutes card: opens the template sheet; off while the minutes are being made */
.tmpl-row { padding: 14px 0 0; }
.fail .tmpl-row { padding: 0 0 12px; }
.tmpl-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; max-width: 100%; padding: 8px 14px; border-radius: 999px; background: var(--soft); font-size: 14px; font-weight: 700; color: var(--ink-2); }
.tmpl-chip:disabled { color: var(--sub); opacity: 0.7; }
@media (hover: hover) and (pointer: fine) { .tmpl-chip:not(:disabled):hover { filter: brightness(0.98); } }
.doc .sec p + p { margin-top: 6px; }
.gist + .gist { margin-top: 10px; }
.src { font-size: 13px; line-height: 1.45; margin-top: 6px; padding-left: 9px; color: var(--sub); border-left: 2px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo { display: flex; align-items: flex-start; gap: 10px; font-size: 15.5px; line-height: 1.5; padding: 4px 0; cursor: pointer; }
.todo + .todo { margin-top: 4px; }
.todo input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 1px 0 0; border: 2px solid var(--box); border-radius: 7px; flex: 0 0 auto; display: grid; place-items: center; background: var(--bg); }
.todo input:checked { background: var(--blue); border-color: var(--blue); }
.todo input:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.todo-body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.todo-t { min-width: 0; }
.todo.done .todo-t { color: var(--sub); text-decoration: line-through; }
/* who and by when: plain grey words under the to-do, not a pill that looks like a button */
.own { font-size: 13px; color: var(--sub); max-width: 100%; }
.who-sum + .who-sum { margin-top: 12px; }
.who-sum .who { margin: 0 0 6px; }
.fail { padding: 20px 18px; }
.fail p { font-size: 15.5px; color: var(--ink-2); }
.transcript { padding: 6px 16px; }
.line { padding: 10px 0; }
.line + .line { border-top: 1px solid var(--line); }
.line-who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--sub); margin-bottom: 4px; }
.line-main { font-size: 15.5px; line-height: 1.5; }
.line-sub { font-size: 13px; line-height: 1.45; color: var(--sub); margin-top: 2px; }
/* 다시 듣기: the line being played, and the player at the bottom of the 받아쓰기 tab */
.line[role="button"] { cursor: pointer; }
.line.now { background: var(--blue-soft); margin: 0 -16px; padding: 10px 16px; border-radius: 10px; }
.line.now + .line, .line + .line.now { border-top-color: transparent; }
.rec-player { display: flex; align-items: center; gap: 14px; }
.rec-play { width: 54px; height: 54px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.rec-play svg { width: 24px; height: 24px; }
.rec-track { flex: 1; min-width: 0; padding-top: 12px; margin-top: -12px; touch-action: none; cursor: pointer; } /* a taller place to put the finger on */
.rec-bar { position: relative; height: 6px; border-radius: 3px; background: var(--box); } /* not heard yet: 3.1:1 on the grey bottom */
.rec-bar:focus-visible { outline: 2px solid var(--blue-line); outline-offset: 6px; }
.rec-bar b { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: var(--blue); }
.rec-bar b::after { content: ""; position: absolute; right: -8px; top: -5px; width: 16px; height: 16px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px #fff; }
.rec-times { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; color: var(--sub); }
@media (hover: hover) and (pointer: fine) { .rec-play:hover { background: var(--blue-press); } .line[role="button"]:hover { background: var(--soft); } .line.now[role="button"]:hover { background: var(--blue-soft); } }

/* ---- loading skeletons (same layout as what they stand for) ---- */
.sk-h, .sk-line, .sk-title { background: linear-gradient(90deg, #eceef2 0%, #f5f6f8 50%, #eceef2 100%); background-size: 200% 100%; animation: sk 1.4s ease-in-out infinite; border-radius: 6px; }
.sk-title { height: 26px; width: 70%; margin: 1px 0 3px; }
.sk-h { height: 12px; width: 60px; margin-bottom: 10px; }
.sk-line { height: 14px; width: 100%; margin-top: 8px; }
.sk-line.short { width: 62%; }
.sk-row { padding: 14px 16px; }
.sk-row + .sk-row { border-top: 1px solid var(--line); }
.sk-row .sk-line:first-child { margin-top: 0; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .sk-h, .sk-line, .sk-title { animation: none; } }

/* ---- records ---- */
.search { padding: 2px; position: relative; }
.search-ico { position: absolute; left: 16px; top: 15px; width: 20px; height: 20px; color: var(--box); pointer-events: none; }
.search-ico svg { width: 20px; height: 20px; }
.search input { width: 100%; min-height: 46px; padding: 10px 14px 10px 42px; border-radius: 12px; border: 0; background: var(--soft); font-size: 16px; outline: none; -webkit-appearance: none; appearance: none; }
.search input:focus { box-shadow: 0 0 0 2px var(--blue-line); }
.search input::-webkit-search-cancel-button { filter: grayscale(1) opacity(0.5); }
.search-sec { padding: 8px; }
.nw { white-space: nowrap; }
.sheet-gap { flex: 1; }
.sk-sec + .sk-sec { margin-top: 18px; }
.sk-sec .sk-h { margin-top: 14px; }
.empty-line { padding: 18px 16px; font-size: 15px; color: var(--sub); text-align: center; }
.empty { padding: 26vh 8px 0; display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.empty-t { font-size: 15px; color: var(--sub); text-align: center; line-height: 1.5; }
.help.center { text-align: center; margin: 4px 8px 10px; }

/* ---- settings ---- */
/* 설정 이어폰: the left card on the left, the right on the right; tap one to pick its language */
.buds { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bud { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 120px; padding: 16px 8px 12px; border-radius: 12px; background: var(--soft); color: var(--ink); text-align: center; }
.bud:active { background: var(--line); }
.bud-icon { width: 44px; height: 44px; margin-bottom: 4px; }
.bud-side { font-size: 15px; font-weight: 700; color: var(--sub); }
.bud-val { font-size: 20px; font-weight: 800; color: var(--blue); }
.bud-val.off { color: var(--sub); }
.help.buds-help { margin: 10px 0 0; }
/* notes as bullets, in .help's size and colour (user 2026-11-19 "bullet point 해두면 더 좋겠다") */
.help-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.help-list.buds-help { margin: 10px 0 0; }
.help-list li { display: flex; gap: 8px; font-size: 13px; line-height: 1.45; color: var(--sub); }
.help-list li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; margin-top: calc(0.725em - 2px); flex: 0 0 auto; } /* the first line's middle, at any text size */
.seg { display: flex; background: var(--soft); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { flex: 1; min-height: 42px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--sub); text-align: center; padding: 6px 8px; }
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.field { margin: 0 0 14px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--sub); margin: 0 0 6px; }
.field input:not([type="range"]) { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); outline: none; }
.field input:not([type="range"]):focus { border-color: var(--blue); }
.range { width: 100%; height: 28px; -webkit-appearance: none; appearance: none; background: transparent; margin: 0; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--blue) var(--fill, 50%), var(--line) var(--fill, 50%)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); border: 2px solid var(--blue); margin-top: -9px; }
.range::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
.range::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--blue); }
.range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 2px solid var(--blue); }
.range-labels { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--sub); margin-top: 2px; }
.switch-row { cursor: pointer; }
.switch-row input { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 999px; background: var(--box); position: relative; flex: 0 0 auto; margin: 0; transition: background 0.15s; }
.switch-row input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); transition: transform 0.15s; }
.switch-row input:checked { background: var(--blue); }
.switch-row input:checked::after { transform: translateX(20px); }
@media (prefers-reduced-motion: reduce) { .switch-row input, .switch-row input::after { transition: none; } }
/* 설정 › 읽어 주기 (S2, prototype/read-aloud, 2026-11-20): one card in the row-list look. The speed with its value and its
   sample button in one group, a line, then 밀릴 때 줄여 읽기. Side insets as the rows (16px). */
.help.rows-help { margin: 0; padding: 4px 16px 0; }
.speed-grp { padding: 8px 16px 12px; }
.speed-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.speed-head .num { flex: 0 0 auto; white-space: nowrap; }
.speed-test { padding: 0 16px 12px; }
.row.line-top { border-top: 1px solid var(--line); }

/* ---- context pack ---- */
label.sec-h { display: block; }
.text-in { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); outline: none; font-size: 17px; }
.text-in:focus { border-color: var(--blue); }
.screen.form { background: var(--bg); }
.screen.form .sec { background: none; padding: 10px 8px 8px; margin: 0; border-radius: 0; }
.screen.form .sec-h { font-size: 17px; font-weight: 800; margin: 0 0 8px; }
.screen.form .text-in, .screen.form .add-row input { border: 0; background: var(--soft); }
.screen.form .text-in:focus, .screen.form .add-row input:focus { box-shadow: 0 0 0 2px var(--blue-line); }
.screen.form .gauge-sec.over, .screen.form .gauge-sec.near { background: var(--bg); }
/* over the engine's room: the bar and its line stay at the top while entries are added below */
.gauge-sec.over { position: sticky; top: 0; z-index: 3; box-shadow: 0 4px 14px rgba(25, 28, 34, 0.12); }
.gauge-n { font-size: 13px; font-weight: 700; color: var(--warn-ink); }
.gauge-n.over { color: var(--red); }
.gauge { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.gauge i { display: block; height: 100%; width: 0; background: var(--warn-dot); border-radius: 4px; }
.gauge i.over { background: var(--red); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags:not(:empty) { margin-bottom: 10px; }
.chip.tag { display: inline-flex; align-items: center; gap: 2px; padding: 4px 4px 4px 12px; font-size: 14px; white-space: normal; overflow: visible; }
.tag-x { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--sub); flex: 0 0 auto; }
.tag-x svg { width: 16px; height: 16px; }
.add-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.add-row input { flex: 1 1 140px; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); outline: none; font-size: 16px; }
.add-row input:focus { border-color: var(--blue); }
.pair-add input { flex: 1 1 90px; }
.arrow { color: var(--sub); flex: 0 0 auto; }
.pairs:not(:empty) { margin-bottom: 10px; }
.pair { display: flex; align-items: center; gap: 6px; padding: 4px 0; }
.pair + .pair { border-top: 1px solid var(--line); }
.pair-t { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 15px; }

/* 내 목소리 (2026-11-17): 설정 › 내 목소리 등록 (agree, read, done) and the naming sheet's 등록하기 row.
   Mockup prototype/live-voice. One blue button per step, alone in .bottom (a warning sits just above it). */
.vo-body { display: flex; flex-direction: column; gap: 16px; padding: 8px 20px 16px; }
.vo-title { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.4; }
.vo-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.vo-list li { display: flex; gap: 12px; font-size: 16px; line-height: 1.5; }
.vo-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); margin-top: calc(0.75em - 3px); flex: 0 0 auto; } /* the first line's middle, at any text size */
.vo-script { background: var(--soft); border-radius: var(--radius); padding: 16px; font-size: 19px; font-weight: 600; line-height: 1.6; letter-spacing: -0.3px; }
.vo-script p + p { margin-top: 12px; }
.vo-rec { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 8px; }
.vo-clock { font-size: 44px; font-weight: 800; letter-spacing: -1px; line-height: 1; color: var(--ink); }
.vo-warn { margin: 0 0 8px; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; font-weight: 600; } /* as .ai-miss */
.vo-done { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; min-height: 360px; }
.vo-check { width: 64px; height: 64px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.vo-check svg { width: 32px; height: 32px; }
.vo-sub { font-size: 15px; color: var(--sub); }
.sheet .rn-me { padding: 10px 12px; border-radius: 12px; } /* lines up with the radio rows above it (.opt) */
.row-v.name-v { display: inline-flex; align-items: center; gap: 4px; max-width: 45%; min-width: 0; } /* a long name is cut, the row keeps its shape */
.row-v.name-v .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.vo-name .text-in { border: 0; background: var(--soft); } /* as the boxes on 내 정보 (.screen.form) */
.vo-name .text-in:focus { box-shadow: 0 0 0 2px var(--blue-line); }

/* 계정 (설정 맨 아래) and 기록 옮기기: two buttons in a sheet, one above the other */
.sheet-cta.sheet-two { display: flex; flex-direction: column; gap: 8px; }
.row-s.acct-mail { overflow-wrap: anywhere; }

/* Sign-in screen (login.html, lo-fi A안): the name and icon above, Google's own button at the bottom */
.login { min-height: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; padding: calc(24px + var(--safe-t)) 20px calc(24px + var(--safe-b)); }
.login-top { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 32px 0; }
.login-icon { width: 72px; height: 72px; border-radius: var(--radius); }
.login-name { margin: 0; line-height: 0; color: var(--brand); }
.login-word { display: block; height: 36px; width: auto; }
.login-bottom { display: flex; flex-direction: column; gap: 12px; padding-bottom: 8px; }
.login-err { font-size: 15px; color: var(--red); text-align: center; }
.login-google { width: 100%; max-width: 400px; min-height: 44px; margin: 0 auto; display: flex; justify-content: center; }
/* the store app's button (login.ts phoneButton): Google's outline button look, its colors are Google's */
.login-google-phone { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 12px; border: 1px solid #dadce0; border-radius: 4px; background: #fff; color: #3c4043; font: inherit; font-size: 15px; font-weight: 500; }
.login-google-phone:active { background: #f1f3f4; }
.login-google-phone:disabled { opacity: 0.6; }

/* 약관 동의 시트 (docs/terms-spec.md 화면 1, terms.ts): cannot be closed, one blue button, 로그아웃 as a small grey word under it.
   Rows: the whole line (check + words) is one button, 보기 › is its own button (44 square at least). */
.terms-sheet { max-height: 92vh; padding-top: 12px; }
.terms-body { padding: 8px 20px 8px; }
.terms-title { font-size: 20px; font-weight: 800; line-height: 1.4; letter-spacing: -0.5px; margin: 0 0 20px; }
.terms-all, .terms-pick { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.terms-all { min-height: 56px; padding: 12px 16px; border-radius: var(--radius); background: var(--soft); font-size: 16.5px; font-weight: 700; }
.terms-list { list-style: none; margin: 8px 0 0; padding: 0; }
.terms-item { display: flex; align-items: center; }
.terms-pick { flex: 1; min-width: 0; min-height: 52px; padding: 8px 4px 8px 16px; }
.terms-t { flex: 1; min-width: 0; font-size: 16px; line-height: 1.4; }
.terms-all .terms-t { font-size: 16.5px; }
.terms-ck { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--box); display: grid; place-items: center; flex: 0 0 auto; color: transparent; }
.terms-ck svg { width: 16px; height: 16px; }
.terms-all.on .terms-ck, .terms-pick.on .terms-ck { background: var(--blue); border-color: var(--blue); color: #fff; }
.terms-see { flex: 0 0 auto; min-width: 44px; min-height: 44px; padding: 0 12px; display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--sub); white-space: nowrap; }
.terms-foot { padding: 0 20px; }
.terms-foot .sheet-cta { padding: 12px 0 0; }
.terms-err { font-size: 15px; color: var(--red); text-align: center; padding: 12px 0 0; }
.terms-out { display: block; min-height: 44px; margin: 4px auto 0; padding: 0 16px; font-size: 14px; color: var(--sub); }
@media (hover: hover) and (pointer: fine) { .terms-all:hover, .terms-pick:hover, .terms-see:hover, .terms-out:hover { filter: brightness(0.98); } }

/* 문서 층: a document over the page (terms.ts openLegal), back (‹) and the document's name at the top; its own
   heading is not drawn again under the title */
.legal-layer { position: fixed; inset: 0; z-index: 35; background: var(--bg); }
.legal-layer-in { height: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; padding-top: var(--safe-t); }
.legal-scroll { padding: 0; }
.legal-load { padding: 16px var(--gutter); }
.legal-layer .legal h1 { display: none; }

/* legal:begin (the same rules are in legal/legal.css, the page opened without signing in: tests/terms.test.ts keeps the two equal) */
.legal { padding: 8px var(--gutter) calc(32px + var(--safe-b)); font-size: 16px; line-height: 1.7; color: var(--ink); overflow-wrap: anywhere; word-break: keep-all; }
.legal h1 { font-size: 24px; font-weight: 800; line-height: 1.35; letter-spacing: -0.6px; margin: 0 0 8px; }
.legal .meta { font-size: 14px; line-height: 1.5; color: var(--sub); margin: 0 0 24px; }
.legal h2 { font-size: 18px; font-weight: 800; line-height: 1.4; letter-spacing: -0.3px; margin: 32px 0 8px; }
.legal h3 { font-size: 16px; font-weight: 700; line-height: 1.5; margin: 20px 0 4px; }
.legal p { margin: 0 0 12px; }
.legal ul, .legal ol { margin: 0 0 12px; padding-left: 20px; }
.legal li + li { margin-top: 4px; }
.legal a { color: var(--blue); text-decoration: underline; }
.legal table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; line-height: 1.5; }
.legal th, .legal td { min-width: 64px; padding: 8px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal th { background: var(--soft); font-weight: 700; }
.legal pre { margin: 0 0 16px; font: inherit; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
/* legal:end */

/* 녹음 전 공개 (micconsent.ts, prototype/mic-disclosure): the store app, before the first microphone.
   Two lines with an icon each, the AI document as a row, 동의하고 시작하기 and a plain 취소 under it. */
.sheet-head-plain { padding: 12px 20px 4px; }
.disc-list { list-style: none; margin: 4px 12px 8px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.disc-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.55; color: var(--ink); }
.disc-ico { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; }
.disc-ico svg { width: 18px; height: 18px; }
.sheet-body .disc-doc { min-height: 48px; margin-top: 4px; padding: 8px 12px; border-top: 1px solid var(--line); }
.disc-doc .row-t { font-size: 14px; font-weight: 500; color: var(--sub); }
.disc-cancel { display: block; width: 100%; min-height: 44px; margin-top: 4px; text-align: center; font-size: 15px; color: var(--sub); }
