:root{
  /* --ink-faint #8A939C → #6B7480 (21.9). 종이 위 대비 2.99 → 4.53:1 — 뜻·탭 이름·위치 표시가
     이 색이라 4.5:1(WCAG AA)을 넘겨야 한다. 더 옅은 회색이 필요하면 새 이름을 만든다. */
  --ink:#111A22; --ink-soft:#4A5561; --ink-faint:#6B7480;
  --paper:#FBFAF6; --rule:#DFDCD2; --sunk:#EFEDE6;
  --seal:#A3341C; --seal-deep:#8A2B16;
  --kr:'NaruveSerif','Apple SD Gothic Neo','Malgun Gothic','Nanum Gothic',serif;
  --ui:'Archivo','NaruveSans',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  --hd:'Archivo','NaruveSans',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  --tap:200ms cubic-bezier(.2,.8,.2,1);

  /* record button docked in the middle of the tab bar.
     sink = size/2 keeps the button exactly half over the bar; rise is the
     other half and .stage's padding-bottom is computed from it. Change
     --mic-size and the other two follow by the same halves. */
  --mic-size:84px;      /* diameter */
  --mic-sink:42px;      /* how deep it sits into the bar (= size/2) */
  --mic-rise:42px;      /* = mic-size - mic-sink, the part above the bar */
  --hint-h:18px;        /* the hint's own line box. Its font did not change,
                           so this stays 18 — the hint rides up with the
                           button because the dock is a flex column. */

  /* ---------- tile fill ----------
     Tiles used to be ink black. Deep navy reads as "measured" rather than
     "redacted" and stays clearly apart from --seal red, which marks the
     recording button and question chips.
     #172554. 0.1.20의 #1E3A8A보다 어둡다 — 만점 타일이 확실히 진해야
     "다 맞았다"가 눈에 들어온다. 100점 배경이 rgb(39,66,142) -> rgb(32,46,90),
     종이 대비 8.94 -> 12.61. 0점 쪽은 1.23 -> 1.26으로 사실상 그대로다.
     Both numbers below are read by app.js inkTile() so the colour
     and its flip point have one home. */
  --tile-rgb:23,37,84;
  /* score at which the glyph flips from --ink to --paper. NOT 52.
     Navy at a given alpha is much lighter than black at the same alpha, so
     the crossover moved: measured with WCAG relative luminance, the two
     contrasts are equal at 57.5 for #172554 (65.8 for the lighter #1E3A8A,
     54.4 for the original black). 색을 바꿀 때마다 다시 재야 하는 값이다 —
     node scripts/test_layout.js 가 재고 +-2를 넘으면 실패한다. */
  --tile-flip:58;

  /* ---------- safe area: declared here, nowhere else ----------
     env() appears exactly twice in this file, both on the next two lines.
     Every edge inset in the layout comes from .phone's padding below.
     Do not add env() to a component. If something sits near an edge and
     collides with a system bar, the fix belongs on .phone, not on the
     component — otherwise the insets drift apart again.               */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
/* Nothing in this app should ever scroll sideways. Anything wider than the
   column is a bug, not something to swipe past — the guard is here at the
   root so a new component cannot reintroduce it further down. */
/* WebView·모바일 사파리의 텍스트 자동확대(font boosting)를 끈다.
   **이것은 시스템 접근성 글꼴 배율과 다른 것이다** — 그쪽은 WebView 의
   textZoom 이고 CSS 로 막을 수 없다. MainActivity 에서 100으로 고정한다. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
html,body{height:100%;max-width:100%;overflow-x:hidden}
body{background:var(--paper);color:var(--ink);font-family:var(--ui);
  display:flex;justify-content:center;overscroll-behavior:none;-webkit-text-size-adjust:100%}
/* 21.9 — 한국어 화면 글자 다듬기. 줄은 어절 단위로 꺾고("들어보세 / 요"를 막는다), 영어 대문자 표지용
   자간은 한글에 걸지 않는다 — 한글을 띄엄띄엄 만든다. 큰 제목만 조금 좁힌다. */
:lang(ko) body{word-break:keep-all;overflow-wrap:break-word}
:lang(ko) .brand span,:lang(ko) .you-title{letter-spacing:-.02em}
:lang(ko) .brand span,
:lang(ko) .credits,
:lang(ko) .strip .where,
:lang(ko) .tab,
:lang(ko) .set-group,
:lang(ko) .b-title,
:lang(ko) .score-label,
:lang(ko) .you-soon,
:lang(ko) .hint,
:lang(ko) .navpos{letter-spacing:0}

/* The one place that knows about system bars.
   Fixed height (not min-height) so the column is bounded and .stage — the
   only scroller — absorbs tall content. With min-height the tab bar gets
   pushed past the bottom of the screen by a long sentence. */
.phone{width:100%;max-width:430px;height:100dvh;display:flex;flex-direction:column;
  background:var(--paper);position:relative;overflow:hidden;
  padding-top:var(--safe-top);padding-bottom:var(--safe-bottom)}

/* 21.9: 머리와 상단 띠는 선 없이 종이 위에 둔다. 내용이 그 밑으로 스크롤될 때만 선 한 줄(.scrolled, app.js) */
.topbar{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 4px;border-bottom:none;
  position:relative;z-index:2;background:var(--paper)}
.brand{display:flex;align-items:center;gap:10px}
/* long-pressed to unlock dev mode — must not select or pop a callout */
.seal-mark{width:28px;height:28px;border-radius:7px;background:var(--seal);display:grid;place-items:center;
  font-family:var(--kr);font-size:16px;font-weight:700;color:#fff;line-height:1;
  user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.brand span{font-family:var(--hd);font-size:18px;font-weight:700;letter-spacing:-.01em;text-transform:none;color:var(--ink)}
.credits{font-family:var(--hd);font-size:13px;font-weight:600;letter-spacing:0;text-transform:none;color:var(--ink-soft);font-variant-numeric:tabular-nums;background:var(--sunk);border-radius:100px;padding:7px 12px}
.credits b{color:var(--ink);font-weight:700}

.strip{display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:0 20px;border-bottom:none;position:relative;z-index:2;background:var(--paper)}
.strip .where{font-family:var(--hd);font-size:15px;font-weight:600;letter-spacing:0;text-transform:none;
  color:var(--ink-soft);display:flex;align-items:center;gap:7px;min-width:0;border:none;background:none;padding:0;min-height:44px;cursor:pointer}
.strip .where b{color:var(--ink);font-weight:700}
.strip .where .dot{width:4px;height:4px;border-radius:50%;background:var(--ink-faint);flex:none}
/* 세트 이름은 문장처럼 읽힌다. 컬렉션 이름만 대문자 표지로 둔다. */
.strip .where .set{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  text-transform:none;letter-spacing:0;font-weight:500}
.strip .where:active{opacity:.6}
.phone.scrolled .strip,.phone.you-on.scrolled .topbar{box-shadow:0 1px 0 rgba(17,26,34,.08)}
.strip .where::after{content:'';width:18px;height:18px;flex:none;margin-left:-1px;background:var(--ink-soft);-webkit-mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/18px no-repeat;mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/18px no-repeat}

/* min-height:0 lets this flex item shrink below its content height;
   without it overflow-y never engages and the column grows instead. */
/* padding-bottom must clear what floats above the tab bar: the raised half
   of the record button (MIC_RISE) plus the hint line above it. Those three
   numbers are declared once here and reused by .mic-dock below. */
/* scroll-padding-bottom 은 같은 높이를 scrollIntoView 에도 알려준다.
   없으면 revealResult() 가 결과의 아래 끝을 스크롤 영역 끝에 맞춰서
   "결과 카드 · 다음 문장" 버튼이 떠 있는 녹음 안내 뒤로 숨었다 (21.5). */
.stage{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;
  padding:10px 20px calc(var(--mic-rise) + var(--hint-h) + 14px);
  scroll-padding-bottom:calc(var(--mic-rise) + var(--hint-h) + 22px);
  -webkit-overflow-scrolling:touch}

/* ---------- 21.1 문장 카드 ----------
   무엇을 말하나(이동·타일·로마자·뜻·예시 듣기)는 한 장, 어떻게 말하나(억양
   칩과 설명)는 그 바로 아래 한 묶음. 근접성만으로는 칩이 로마자·뜻 사이에
   끼어 설명과 짝으로 읽히지 않았다. */
.say-card{flex:none;background:#fff;border:1px solid #E8E5DC;border-radius:22px;
  padding:14px 16px 16px;display:flex;flex-direction:column;gap:6px;
  box-shadow:0 1px 2px rgba(17,26,34,.04),0 10px 28px rgba(17,26,34,.06)}
.say-how{flex:none;margin:12px 4px 0;display:flex;flex-direction:column;gap:8px}

/* 문장 좌우 이동. 컬렉션 안에서만 움직이고 끝에서는 멈춘다 — 컬렉션을
   넘나드는 것은 Browse 의 일이다. */
.navrow{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 8px}
.navbtn{width:40px;height:40px;flex:none;border:1px solid transparent;background:var(--sunk);
  border-radius:50%;font-family:inherit;font-size:0;line-height:1;color:var(--ink);
  cursor:pointer;display:grid;place-items:center}
/* 21.9: 화살표는 글자(‹ ›) 대신 선 아이콘. 버튼 글자 크기를 0으로 두고 ::before 가 그린다 */
#nextSent::before{-webkit-mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") center/20px no-repeat;mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") center/20px no-repeat}
#prevSent::before{-webkit-mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E") center/20px no-repeat;mask:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E") center/20px no-repeat}
.navbtn::before{content:'';width:20px;height:20px;background:currentColor}
.navbtn:active{background:var(--rule)}
.navbtn[disabled]{opacity:.3;cursor:default}
.navpos{font-size:13px;font-weight:600;letter-spacing:.04em;color:var(--ink-soft);
  font-variant-numeric:tabular-nums}

.tiles{display:flex;flex-wrap:wrap;gap:8px;margin:2px 0 8px;align-items:flex-end}
.tile{position:relative;width:clamp(44px,12.6vw,54px);height:clamp(58px,16vw,68px);
  border-radius:9px;border:1px solid var(--rule);background:transparent;display:grid;place-items:center;
  font-family:var(--kr);font-weight:500;font-size:clamp(24px,6.9vw,29px);line-height:1;color:var(--ink);
  transition:background-color 620ms ease,color 620ms ease,border-color 620ms ease}
.tile.space{width:8px;border-color:transparent}
/* 15.9 — 첫 버전 타일은 어절이다. 한 음절 폭에 맞춰 둔 고정 width를 풀고
   글자 수만큼 늘어나게 한다. 높이와 리듬은 그대로 둔다. */
.tile.word{width:auto;min-width:clamp(50px,14vw,60px);padding:0 11px;
  font-size:clamp(25px,6.8vw,30px)}
.tile.omit{border-style:dashed}
/* A안 확정 (2026-08-19). 낮은 어절에 seal 테두리를 덧대는 B안은 버렸다 —
   채움만으로 이미 읽히고, 테두리를 더하면 seal이 "녹음 중"이라는 뜻과 겹쳤다.
   .low 클래스는 남겨 둔다: 나중에 낮은 어절을 다시 표시할 자리다. */
.tile.punct{width:20px;border-color:transparent;color:var(--ink-faint);font-weight:700}
.tile .num{position:absolute;bottom:4px;left:0;right:0;font-family:var(--ui);font-size:10px;font-weight:700;
  letter-spacing:.05em;opacity:0;transition:opacity 460ms ease;font-variant-numeric:tabular-nums}
.tile.flag{padding-bottom:6px}
.tile.flag .num{opacity:.9}

/* 점수를 못 낸 회차(소진·미인식·서버 오류)에는 숫자 자리를 통째로 감춘다.
   0점과 "이번엔 점수가 없다"는 다른 말이다. */
.result.noscore .score-row{display:none}

.meta-row{display:flex;flex-wrap:wrap;gap:7px;margin:0}
.chip{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--rule);border-radius:100px;
  padding:6px 13px 6px 10px;font-size:13px;font-weight:600;color:var(--ink-soft)}
.chip svg{display:block;flex:none}
.chip.q{border-color:#E8C4BF;color:var(--seal)}

.romanized{font-size:17px;font-weight:500;color:var(--ink-soft);line-height:1.4}
.gloss{font-size:15px;color:var(--ink-faint);margin-top:0;line-height:1.45}
.toneHint{font-size:15px;color:var(--ink-soft);margin:0;line-height:1.45}
.toneHint b{color:var(--ink);font-weight:700}

.pair-link{display:none;flex:none;margin-top:13px;width:100%;text-align:left;cursor:pointer;
  border:1px solid var(--rule);border-radius:11px;background:none;padding:11px 13px;font-family:inherit}
.pair-link.show{display:block}
.pair-link:active{background:var(--sunk)}
.pair-link .pl-lab{font-size:10px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-faint)}
.pair-link .pl-txt{font-family:var(--kr);font-size:17px;font-weight:500;color:var(--ink);margin-top:4px}

/* 카드 안에서는 폭을 채운다. 테두리는 투명으로 두고 재생 중에만 먹색으로. */
.listen{margin-top:10px;align-self:stretch;display:inline-flex;align-items:center;justify-content:center;gap:10px;
  min-height:48px;padding:0 20px 0 16px;background:var(--sunk);border:1.5px solid transparent;border-radius:100px;
  font-family:inherit;font-size:15px;font-weight:600;color:var(--ink);cursor:pointer;
  transition:border-color var(--tap),color var(--tap),background-color var(--tap)}
.listen:active{background:var(--rule)}
.listen:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
/* 아이콘만 약 1.3배 (9x12 -> 12x16). 버튼 높이(min-height:46px)와 터치 영역은
   그대로다 — 아이콘이 그보다 훨씬 작아 높이를 결정하지 않는다. 선택자가
   .listen 안으로 묶여 있어 다른 요소에는 닿지 않는다. 재생 중 막대도 같은
   비율로 키운다. 한쪽만 키우면 버튼 폭이 재생/정지에서 눈에 띄게 튄다. */
.listen .tri{width:0;height:0;flex:none;border-left:12px solid currentColor;border-top:8px solid transparent;border-bottom:8px solid transparent}
.listen .bars{display:none;gap:3px;align-items:flex-end;height:20px;width:22px;flex:none}
.listen .bars i{width:3px;background:currentColor;border-radius:2px;animation:eq .85s ease-in-out infinite}
.listen .bars i:nth-child(2){animation-delay:.18s}
.listen .bars i:nth-child(3){animation-delay:.36s}
@keyframes eq{0%,100%{height:7px}50%{height:20px}}
.listen.playing{border-color:var(--ink);color:var(--ink)}
.listen.playing .tri{display:none}
.listen.playing .bars{display:flex}
.audio-note{margin-top:8px;font-size:12px;line-height:1.45;color:var(--seal);display:none}
.audio-note.show{display:block}
/* 30회를 다 쓴 것은 잘못이 아니라 상태다(18절). 빨강은 "틀렸다"는 뜻이라
   여기 쓰면 다 쓴 사람을 야단치는 화면이 된다. */
.audio-note.calm{color:var(--ink-soft)}

/* 임시 예시 음성 토글. 설정 화면(16.6)·온보딩(P6-B)이 생기면 이 블록과
   index.html의 .voicebar를 함께 지운다. .stage 안의 일반 흐름이라
   탭바 높이나 safe-area와 무관하다. */
/* ---------- 온보딩 ----------
   .phone 안을 덮는다. position:absolute 이고 기준이 .phone 이라
   safe-area 나 탭바 높이를 상수로 박지 않는다. */
.onboard{position:absolute;inset:0;z-index:40;background:var(--paper);
  overflow-y:auto;-webkit-overflow-scrolling:touch;
  padding:calc(var(--safe-top) + 22px) 20px calc(var(--safe-bottom) + 22px)}
.onboard[hidden]{display:none}
.ob-title{font-family:var(--hd);font-size:28px;font-weight:700;letter-spacing:-.02em}
.ob-sub{margin-top:6px;font-size:15px;line-height:1.5;color:var(--ink-soft)}
.ob-q{margin-top:20px}
.ob-lab{font-size:12px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-faint)}
.ob-note{margin-top:4px;font-size:13px;line-height:1.45;color:var(--ink-faint)}
.ob-opts{display:flex;flex-wrap:wrap;gap:7px;margin-top:9px}
.ob-opts.ob-pairs{gap:10px}
.ob-opt{border:1px solid var(--rule);background:none;border-radius:100px;padding:10px 16px;
  font:inherit;font-size:15px;color:var(--ink);cursor:pointer;min-height:44px}
/* 고른 상태는 먹색 채움. 빨강은 녹음·경고의 색이다 (19.6 쓰임 범위). */
.ob-opt.on{background:var(--ink);border-color:var(--ink);color:var(--paper);font-weight:600}
/* "나중에"는 선택지가 아니라 건너뛰기라 글자 링크 모양. 골라도 링크로 남는다. */
.ob-skip{border-color:transparent;color:var(--ink-faint);font-size:14px;
  text-decoration:underline;text-underline-offset:3px;padding-left:6px;padding-right:6px}
.ob-skip.on{background:none;border-color:transparent;color:var(--ink);font-weight:700}
.ob-play{border:1px solid var(--rule);background:none;border-radius:100px;padding:9px 13px;
  font:inherit;font-size:13px;color:var(--ink-soft);cursor:pointer;min-height:44px}
/* 목소리와 '들어보기'는 한 쌍. .on 은 app.js obSelect 가 쌍에도 단다. */
.ob-pair{display:inline-flex;border:1px solid var(--rule);border-radius:100px;overflow:hidden}
.ob-pair.on{border-color:var(--ink)}
.ob-pair .ob-opt{border:none;border-radius:0;min-width:64px}
.ob-pair .ob-play{border:none;border-left:1px solid var(--rule);border-radius:0}
.ob-pair .ob-opt.on + .ob-play{background:var(--sunk);border-left-color:var(--ink)}
/* 동의는 행 전체가 탭 영역이다. 체크박스만 눌러야 하면 손가락으로는 어렵고,
   어려우면 읽지 않고 넘긴다. 필수는 실선, 선택은 점선 — 모양으로 갈린다. */
.ob-consent{display:flex;gap:11px;align-items:flex-start;margin-top:16px;
  padding:12px 13px;border:1px solid var(--rule);border-radius:10px;cursor:pointer}
.ob-consent.req{border-color:var(--ink-soft)}
.ob-consent.opt{background:transparent;border-style:dashed}
.ob-consent input{width:21px;height:21px;flex:none;margin-top:1px;accent-color:var(--ink)}
.ob-consent span{font-size:14px;line-height:1.5;color:var(--ink)}
.ob-policy{display:inline-block;margin-top:12px;font-size:13px;color:var(--ink-soft)}
/* 동의 전 안내는 회색. 아직 아무것도 잘못하지 않았다 (21.4). */
.ob-warn{margin-top:10px;font-size:13px;color:var(--ink-faint)}
.ob-warn[hidden]{display:none}
.ob-start{margin-top:16px;width:100%;position:sticky;bottom:0;box-shadow:0 14px 0 var(--paper),0 -14px 18px var(--paper)}
/* .btn.primary(0,2,0)가 파일 뒤쪽에 있어 같은 우선순위로는 비활성이 덮였다 —
   시작 버튼이 활성처럼 보였다. .btn 을 붙여 (0,3,0)으로 이긴다. */
.btn.ob-start[disabled]{opacity:1;background:var(--sunk);border-color:var(--sunk);color:var(--ink-faint);cursor:default}

/* ---------- 21.3 설정: 딤 위의 시트 ----------
   둘 다 position:absolute 이고 기준이 .phone 이다. 탭바 높이를 상수로
   박지 않는다. .phone 의 padding-bottom 은 콘텐츠 상자에만 걸리고 절대
   위치 요소의 bottom:0 은 그 바깥(시스템 바 쪽) 끝이라, 시트는 아래
   여백에 --safe-bottom 을 스스로 더한다. .onboard 와 같은 방식이고
   env() 를 직접 부르지 않는다. APK 에서는 네이티브가 이미 밀어 놓아 0이다. */
.dim{position:absolute;inset:0;background:rgba(17,26,34,.46);z-index:28;
  opacity:0;pointer-events:none;transition:opacity 220ms ease}
.dim.on{opacity:1;pointer-events:auto}
.settings{position:absolute;left:0;right:0;bottom:0;z-index:30;max-height:88%;
  overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;
  background:var(--paper);border-radius:20px 20px 0 0;
  padding:8px 18px calc(var(--safe-bottom) + 22px);
  box-shadow:0 -8px 30px rgba(17,26,34,.18)}
.settings[hidden]{display:none}
.settings::before{content:'';display:block;width:38px;height:4px;border-radius:4px;
  background:var(--rule);margin:2px auto 8px}
.set-head{display:flex;align-items:center;justify-content:space-between;
  padding-bottom:2px;font-size:17px}
.set-head b{font-family:var(--hd);font-size:20px;font-weight:700}
.set-group{font-family:var(--hd);font-size:16px;font-weight:700;letter-spacing:-.005em;color:var(--ink);margin:28px 4px 10px}
.set-box{background:#fff;border:1px solid var(--rule);border-radius:14px;padding:0 13px}
.set-row{display:flex;align-items:center;justify-content:space-between;gap:10px;
  flex-wrap:wrap;padding:9px 0;border-bottom:1px solid var(--rule)}
/* display:flex 가 hidden 속성(UA 의 display:none)을 이긴다. #setDevRow 가
   웹에서도 늘 보였다. hidden 을 풀면(네이티브 셸) 다시 flex 로 돌아온다. */
.set-row[hidden]{display:none}
.set-row:last-child{border-bottom:none}
.set-block{padding:10px 0;border-bottom:1px solid var(--rule)}
.set-box .set-row:last-child,.set-box .set-block:last-child{border-bottom:none}
.set-lab{font-size:15px;font-weight:600;color:var(--ink)}
.set-ctl{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:6px}
.set-row .set-ctl{margin-top:0}
.set-state{font-size:13px;color:var(--ink-soft)}
.set-note{margin-top:5px;font-size:13px;line-height:1.45;color:var(--ink-faint)}
.set-uuid{display:block;margin-top:7px;font-family:ui-monospace,monospace;font-size:12px;
  color:var(--ink-soft);word-break:break-all}
.set-best{margin-top:8px;font-size:15px;line-height:1.75;color:var(--ink-soft)}
.set-best b{color:var(--ink);font-variant-numeric:tabular-nums}
/* 되돌리기 어려운 동작은 맨 아래 따로 떼고 빨간 글자로 (19.6 쓰임 범위) */
.set-danger{margin:26px 4px 0;padding-top:16px;border-top:1px solid var(--rule)}
.settings .set-danger .vb{border:none;padding:0;min-height:0;color:var(--seal);font-weight:700;
  text-decoration:none;font-size:15px}
/* 버전은 맨 아래 작은 글씨. 숫자가 스스로 버전이라 이름표는 접는다. */
.set-ver{border-bottom:none;justify-content:center;margin-top:18px}
.set-ver .set-lab{display:none}
.settings .set-ver .vb{border:none;font-size:13px;color:var(--ink-faint);text-decoration:underline}

/* ---------- 22.3 나 화면 ----------
   열리면 .phone.you-on 이 .strip 과 .stage 를 접고 이것이 그 자리를 쓴다.
   머리 띠와 탭 바는 그대로라 높이를 상수로 박지 않는다. 아래 여백은 .stage
   와 같은 계산이라 마지막 줄이 떠 있는 녹음 버튼·안내에 가리지 않는다.
   카드는 연습 카드와 같은 흰 바탕·선·모서리, 묶음 이름은 .set-group 그대로.
   새 색은 없고 빨강은 쓰지 않는다 (19.6). */
.phone.you-on .strip,.phone.you-on .stage{display:none}
.you{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;
  padding:14px 20px calc(var(--mic-rise) + var(--hint-h) + 14px)}
.you[hidden]{display:none}
.you-title{font-family:var(--hd);font-size:28px;font-weight:700;letter-spacing:-.02em;color:var(--ink)}
.you-sub{margin-top:6px;font-size:14px;line-height:1.45;color:var(--ink-soft)}
.you-stats{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:20px}
.you-stat,.you-card{background:#fff;border:1px solid #E8E5DC;border-radius:18px;
  box-shadow:0 1px 2px rgba(17,26,34,.04),0 8px 24px rgba(17,26,34,.05)}
.you-stat{padding:16px 16px 15px}
.you-num{font-size:30px;font-weight:700;line-height:1.1;color:var(--ink);font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.you-lab{margin-top:6px;font-size:13px;font-weight:500;line-height:1.35;color:var(--ink-soft)}
.you-card{padding:2px 16px}
.you-card[hidden],.you-lock[hidden]{display:none}
.you-best{padding:2px 16px}
.you-best .set-note{margin-top:0}
.you-best .set-note:empty{display:none}
.you-best .set-best{margin-top:0}
/* 문장은 연습 문장과 같은 글꼴·굵기, 점수 숫자는 라틴 그대로 (21.6 보강) */
.you-best .set-best div{font-family:var(--kr);font-weight:500;display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:12px 0;border-bottom:1px solid var(--rule);font-size:16px}
.you-best .set-best div:last-child{border-bottom:none}
.you-best .set-best b{font-family:var(--ui);font-size:15px}
.you-col{display:flex;align-items:center;gap:10px;padding:13px 0;border-bottom:1px solid var(--rule)}
.you-col:last-child{border-bottom:none}
.you-col-n{flex:0 0 32%;min-width:0;font-size:15px;font-weight:500;color:var(--ink);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.you-bar{flex:1;height:8px;border-radius:4px;background:var(--sunk);overflow:hidden}
.you-bar i{display:block;height:100%;background:var(--ink)}
.you-col-c{flex:none;min-width:44px;text-align:right;font-size:13px;color:var(--ink-soft);
  font-variant-numeric:tabular-nums}
.you-lock{border:1px dashed var(--rule);border-radius:18px;padding:12px 14px;
  font-size:12.5px;line-height:1.5;color:var(--ink-soft)}
.you-lock .vb{margin-top:9px}
.you-row{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-height:56px;padding:10px 0;border:none;border-bottom:1px solid var(--rule);background:none;
  font-family:inherit;font-size:16px;font-weight:500;color:var(--ink);text-align:left;cursor:pointer}
.you-row:last-child{border-bottom:none}
.you-row.off{color:var(--ink-faint);cursor:default}
.you-aside{min-width:0;font-size:14px;font-weight:500;color:var(--ink-soft);text-align:right}
.you-soon{flex:none;border:1px solid var(--rule);border-radius:100px;padding:3px 9px;
  font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-faint)}
.you-foot{margin-top:22px;text-align:center;font-size:13px;line-height:1.8;color:var(--ink-faint)}
.you-foot a{color:var(--ink-faint)}

/* ---------- 후속 제안 ---------- */
.ask{margin-top:14px;padding:11px 12px;border:1px solid var(--rule);border-radius:10px;background:#fff}
.ask[hidden]{display:none}
.ask-t{font-size:14px;line-height:1.5}
.ask-b{display:flex;gap:7px;margin-top:9px}

.vb-lab{font-size:12px}
.vb{border:1px solid var(--rule);background:none;border-radius:100px;
  padding:5px 13px;font:inherit;font-size:14px;color:inherit;cursor:pointer}
.settings .vb{min-height:40px;padding:6px 14px;font-size:14px}
/* 고른 상태는 먹색 채움 (19.6 쓰임 범위) */
.vb.on{background:var(--ink);border-color:var(--ink);color:var(--paper);font-weight:600}
.vb-x{margin-left:auto;color:var(--ink-faint)}
.settings .vb-x{border:none;font-size:13px;color:var(--ink-soft)}
.vb-sep{width:1px;align-self:stretch;background:var(--rule);margin:0 2px}
/* D: 임시 계측 창. P6-B에서 이 규칙과 index.html의 #logView를 함께 지운다.

   flex:none 이 핵심이다. .stage 는 flex column 이고 이 상자는 그 직계
   자식이라 기본값이 flex-shrink:1 이다. stage 내용이 넘치면 이 상자가 가장
   많이 줄어들어 한 줄 높이로 눌리고, 그렇게 눌린 뒤에는 overflow-y:auto 가
   스크롤할 높이 자체를 못 가진다. 0.1.22에서 실제로 그렇게 안 보였다. */
.logbox{flex:none;margin:0 0 14px;padding:8px 9px;border:1px solid var(--rule);
  border-radius:8px;background:#fff;display:flex;flex-direction:column;gap:7px}
.logbox[hidden]{display:none}
.logbar{display:flex;align-items:center;gap:8px;flex:none}
.logbar .lstat{font-size:10.5px;color:var(--ink-faint)}
.logtext{flex:none;max-height:40vh;overflow-y:auto;-webkit-overflow-scrolling:touch;
  margin:0;font-family:ui-monospace,monospace;font-size:10px;line-height:1.55;
  color:var(--ink-soft);white-space:pre-wrap;overflow-wrap:anywhere}
/* B: 감점 줄. 억양 안내 바로 아래 작게. */
.into-penalty{display:none;margin-top:5px;font-size:13px;font-weight:700;
  letter-spacing:.04em;color:var(--seal)}
.into-penalty.show{display:block}

/* 21.2: 결과는 바탕이 다른 패널. 문장 카드(흰 바탕)와 전경·배경이 갈린다. */
.result{flex:none;margin-top:12px;padding:16px;background:var(--sunk);border-radius:22px;
  opacity:0;transform:translateY(10px);pointer-events:none;transition:opacity 500ms ease,transform 500ms ease}
.result.show{opacity:1;transform:none;pointer-events:auto}
.score-row{display:flex;align-items:flex-end;gap:14px}
.score-num{font-size:58px;font-weight:700;line-height:.86;letter-spacing:-.045em;font-variant-numeric:tabular-nums}
/* 큰 숫자에 기준을 붙인다 (3.1 · 6.1). 음수 여백은 score-row 의 gap 을 줄인다. */
.score-of{font-size:20px;font-weight:700;color:var(--ink-faint);letter-spacing:-.01em;
  margin-left:-10px;padding-bottom:5px;font-variant-numeric:tabular-nums}
.score-meta{padding-bottom:6px}
.score-label{font-size:12px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--ink-soft)}
.score-verdict{font-size:16px;font-weight:600;margin-top:4px;line-height:1.35}
/* the one line that says what the final contour did */
.into-note{margin-top:13px;padding-left:11px;border-left:2.5px solid var(--rule);
  font-size:15px;line-height:1.5;color:var(--ink-soft);display:none}
.into-note.show{display:block}
.into-note.miss{border-left-color:var(--seal);color:var(--ink)}
.note{margin-top:14px;font-size:15px;line-height:1.55;color:var(--ink-soft)}
.note .syl{font-family:var(--kr);font-size:17px;font-weight:700;color:var(--ink)}
.l1box{margin-top:13px;border-left:2.5px solid var(--seal);padding:2px 0 2px 13px;display:none}
.l1box.show{display:block}
.l1box .l1-lab{font-size:9.5px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--seal)}
.l1box .l1-txt{font-size:13.5px;line-height:1.55;color:var(--ink-soft);margin-top:5px}
.l1box .l1-txt + .l1-txt{margin-top:9px}
.l1box b{color:var(--ink);font-weight:700}
.l1box .syl{font-family:var(--kr);font-size:16px;font-weight:700;color:var(--ink)}
.actions{display:flex;gap:9px;margin-top:14px}
.btn{flex:1;min-height:48px;border-radius:12px;font-family:inherit;font-size:15px;font-weight:600;
  cursor:pointer;border:1.5px solid var(--rule);background:none;color:var(--ink);
  transition:background-color var(--tap),border-color var(--tap)}
.btn:active{background:var(--sunk)}
.btn:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
.btn.primary{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.btn.primary:active{background:#000}
.result .btn:not(.primary){background:#fff}

/* The dock hangs off the top edge of .tabs. bottom is expressed against
   the bar's own box (100% = its top edge), so nothing here depends on the
   bar's pixel height or on the safe-area inset. Do not turn this into
   position:fixed — that is the mistake the buildtag note warns about. */
.mic-dock{position:absolute;left:0;right:0;bottom:calc(100% - var(--mic-sink));
  display:flex;flex-direction:column;align-items:center;gap:6px;pointer-events:none}
.mic-dock .hint,.mic-dock .seal-btn{pointer-events:auto}

.seal-btn{width:var(--mic-size);height:var(--mic-size);border-radius:50%;background:var(--seal);
  border:none;cursor:pointer;display:grid;place-items:center;position:relative;
  /* 21.9: 종이 테 대신 그림자로 띄운다. 탭 바가 흰 면이 되어 종이 테는 바 위에서 보이지 않는다 */
  box-shadow:0 10px 24px rgba(163,52,28,.32),0 2px 6px rgba(17,26,34,.18);
  transition:transform 140ms ease,box-shadow 140ms ease,background-color var(--tap)}
.seal-btn:active{transform:translateY(2px);box-shadow:0 4px 12px rgba(163,52,28,.30),0 1px 3px rgba(17,26,34,.18)}
.seal-btn[disabled]{opacity:.55;cursor:default}
.seal-btn:focus-visible{outline:3px solid var(--ink);outline-offset:4px}
.seal-btn svg{display:block}
.seal-btn::after{content:'';position:absolute;inset:-9px;border-radius:50%;border:2px solid var(--seal);opacity:0}
.seal-btn.rec{background:var(--seal-deep)}
.seal-btn.rec::after{animation:ping 1.1s ease-out infinite}
@keyframes ping{0%{transform:scale(1);opacity:.55}100%{transform:scale(1.36);opacity:0}}
.hint{font-size:13px;font-weight:600;letter-spacing:.04em;color:var(--ink-faint);
  height:var(--hint-h);line-height:var(--hint-h);
  /* it sits over the page, so it needs its own ground to stay legible */
  background:var(--paper);padding:0 9px;border-radius:100px}
.hint.live{color:var(--seal)}
/* 21.7: 누르라는 안내는 없다. 비어 있으면 종이 알약만 남으므로 감추되,
   자리(--hint-h)는 그대로 둔다 — 진행 상태가 그 자리에 나온다. */
.hint:empty{visibility:hidden}

/* A-4 mic readout — dev only, so it can never affect the shipped layout */
.micdev{display:none}
body.dev .micdev{display:block;flex:none;padding:0 18px 6px}
.micdev-bar{height:5px;border-radius:3px;background:var(--sunk);overflow:hidden}
.micdev-bar i{display:block;height:100%;width:0;background:var(--rule);transition:width 60ms linear}
.micdev-txt{margin-top:4px;font-size:9.5px;line-height:1.5;color:var(--ink-faint);
  font-variant-numeric:tabular-nums;white-space:pre-line;text-align:center}

/* The sim row always exists because .buildtag lives in it and the build
   number is how a deploy gets confirmed on the phone. Only the SIMULATE
   controls hide; body.dev brings them back. See DEV_UNLOCK in app.js. */
/* 21.5: 점선 위 테두리를 뺐다. 화면을 가르는 선으로 읽혀 탭바 위에 띠가 하나 더 생겼다. */
.sim{flex:none;border-top:none;padding:6px 18px 8px;display:none;align-items:center;gap:7px;flex-wrap:wrap}
body.dev .sim{padding:10px 18px 12px;display:flex}
.sim-label,.sim-btn{display:none}
body.dev .sim-label{display:block}
body.dev .sim-btn{display:block}
.sim-label{font-size:9.5px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-faint)}
.sim-btn{border:1px solid var(--rule);background:none;border-radius:100px;padding:6px 11px;
  font-family:inherit;font-size:11px;font-weight:600;color:var(--ink-faint);cursor:pointer}
.sim-btn.on{background:var(--ink);border-color:var(--ink);color:var(--paper)}
/* in normal flow at the end of the sim row — no fixed position, no offsets */
.buildtag{margin-left:auto;font-family:var(--ui);font-size:9px;font-weight:600;letter-spacing:.08em;
  color:var(--ink-faint);opacity:.5;pointer-events:none;font-variant-numeric:tabular-nums}

.tabs{flex:none;display:flex;border-top:none;padding:8px 0 12px;
  position:relative;background:#fff;box-shadow:0 -1px 0 rgba(17,26,34,.05),0 -10px 28px rgba(17,26,34,.06)}
/* the empty middle cell the record button sits in. The button is
   --mic-size across plus a 5px paper ring on each side, so the cell has to
   be at least that wide or the circle sits on top of its neighbours and
   steals their taps. min-width, not width: on a wide screen the cell keeps
   flexing with the rest. */
.tab-gap{flex:1;min-width:calc(var(--mic-size) + 20px)}
.tab{flex:1;background:none;border:none;cursor:pointer;min-height:56px;font-family:inherit;font-size:10.5px;
  font-weight:700;letter-spacing:0;text-transform:none;color:var(--ink-soft);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}
/* 21.7: 탭 이름은 고딕. 아이콘 글자('나')는 .ico 라 그대로 --kr 이다. */
.tab > span:not(.ico){font-family:var(--hd);font-size:12.5px;font-weight:600}
.tab .ico{font-family:var(--kr);font-size:20px;font-weight:500;line-height:1;letter-spacing:0;text-transform:none;height:26px;display:flex;align-items:center;justify-content:center}
/* 선 아이콘(문장 보기)은 글자 아이콘과 같은 줄에 앉는다. 색은 currentColor. */
.tab .ico svg{display:block;width:26px;height:26px}
/* three cells since 22.2, so labels have room. Clip anyway rather than let
   a long translated label spill across the cell boundary. */
.tab>span:not(.ico){max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tab[aria-selected="true"]{color:var(--ink)}
/* 21.9: '나'는 프로필 자리라 아바타 동그라미 안에 둔다(글자는 그대로 마루 부리, 21.6). 고른 칸은 먹색 채움(19.6) */
#tabYou .ico{width:26px;height:26px;border:1.7px solid currentColor;border-radius:50%;font-size:13.5px;font-weight:700}
#tabYou[aria-selected="true"] .ico{background:var(--ink);border-color:var(--ink);color:#fff}
.tab[aria-selected="true"] > span:not(.ico){font-weight:700}

.browse{position:absolute;inset:0;background:var(--paper);z-index:20;display:flex;flex-direction:column;
  transform:translateY(100%);transition:transform 320ms cubic-bezier(.2,.8,.2,1);visibility:hidden}
.browse.open{transform:none;visibility:visible}
.b-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--rule)}
.b-title{font-family:var(--hd);font-size:18px;font-weight:700;letter-spacing:-.01em;text-transform:none}
.b-close{border:none;background:none;cursor:pointer;font-size:26px;line-height:1;color:var(--ink-soft);padding:6px 10px;min-height:40px}
/* wraps instead of scrolling: the row used to run off the right edge and
   the last collection could only be reached by dragging the screen */
.b-cols{display:flex;flex-wrap:wrap;gap:8px;padding:12px 20px;border-bottom:1px solid var(--rule)}
/* name on its own line, progress underneath — one line could not hold both */
.b-col{flex:0 1 auto;border:1px solid var(--rule);background:none;border-radius:12px;padding:8px 14px;
  font-family:inherit;font-size:14px;font-weight:600;color:var(--ink-soft);cursor:pointer;
  display:flex;flex-direction:column;align-items:flex-start;gap:1px;min-height:48px;justify-content:center;
  text-align:left;max-width:100%}
.b-col.on{background:var(--ink);border-color:var(--ink);color:var(--paper)}
.b-col .n{font-size:12px;font-weight:600;opacity:.6;letter-spacing:.02em;font-variant-numeric:tabular-nums}
.b-blurb{padding:14px 20px 2px;font-size:15px;line-height:1.5;color:var(--ink-soft)}
.b-list{flex:1;min-height:0;overflow-y:auto;padding:6px 20px 26px;-webkit-overflow-scrolling:touch}
.b-set{font-size:12px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--ink-faint);margin:17px 0 8px}
.b-item{width:100%;text-align:left;border:1px solid #E8E5DC;border-radius:14px;background:#fff;
  padding:14px 16px;margin-bottom:8px;cursor:pointer;display:block;font-family:inherit}
.b-item:active{background:var(--sunk)}
.b-item .k{font-family:var(--kr);font-size:20px;font-weight:500;color:var(--ink);line-height:1.35}
.b-item .r{font-size:13px;color:var(--ink-faint);margin-top:3px}
/* without the meaning the list is 15 Korean strings and no way to choose */
.b-item .g{font-size:14px;color:var(--ink-soft);margin-top:5px;line-height:1.4}
.b-item .t{display:flex;gap:6px;margin-top:7px;flex-wrap:wrap}
.b-item .t span{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  color:var(--ink-faint);border:1px solid var(--rule);border-radius:100px;padding:3px 8px}
.b-item .t span.q{color:var(--seal);border-color:#E8C4BF}

@media (prefers-reduced-motion:reduce){*{animation:none!important;transition-duration:1ms!important}}

/* ---------- update bar ----------
   position:fixed escapes .phone's padding box, so this is the one element
   that has to add the bottom inset itself. It reads the same variable. */
.update-bar{
  position:fixed;left:50%;transform:translateX(-50%);
  bottom:calc(var(--safe-bottom) + 14px);z-index:60;
  border:none;border-radius:100px;cursor:pointer;
  background:var(--ink);color:var(--paper);
  font-family:var(--ui);font-size:12.5px;font-weight:700;
  letter-spacing:.04em;padding:12px 20px;
  box-shadow:0 3px 14px rgba(17,26,34,.28);
}
.update-bar:active{background:#000}
