/* ============================================================
   "Luminous" — text IS the interface
   Clean white. Bold type. Warm gradient accent. Glass depth.
   ============================================================ */

:root {
  /* --- Mono palette — black, white, and the space between --- */
  --white: #FFFFFF;
  --bg: #FAFAFA;
  --surface: #F2F2F7;
  --border: rgba(0,0,0,0.06);

  --t1: #1A1A1A;  /* primary text */
  --t2: #48484A;  /* secondary */
  --t3: #8E8E93;  /* tertiary */
  --t4: #AEAEB2;  /* quaternary */
  --t5: #C7C7CC;  /* disabled */

  /* --- Accent: warm gradient — refined, slightly desaturated for luxury --- */
  --ac: #EF6C50;
  --ac2: #F09068;
  --ac-grad: linear-gradient(135deg, #EF6C50 0%, #F08B62 28%, #F2A474 58%, #F2B480 100%);
  --ac-soft: #FEF2ED;
  --ac-glow: rgba(239, 108, 80, 0.12);
  --ac-glow-lg: rgba(239, 108, 80, 0.06);

  /* --- Feedback --- */
  --ok:     #34C759;
  --ok-bg:  #EEFBF0;
  --warn:   #FF9F0A;
  --warn-bg:#FFF6E6;
  --err:    #FF3B30;
  --err-bg: #FFF0EF;

  /* --- Phase bg (barely-there warmth shifts) --- */
  --bg-listen:    #FFFCF9;
  --bg-structure: #F9FAFF;
  --bg-produce:   #FFFAF6;
  --bg-warmup:    #FFF6F2;
  --bg-converse:  #F8FFF8;
  --bg-wrap:      #FFFFFF;

  /* --- Type --- */
  --font-en: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-ui: 'Pretendard Variable', system-ui, sans-serif;

  --mega:    clamp(2.25rem, 8vw, 3.25rem);
  --hero:    clamp(1.5rem, 5vw, 2rem);
  --display: clamp(1.188rem, 3.5vw, 1.5rem);
  --lg:   1.125rem;
  --base: 1rem;
  --sm:   0.9375rem;
  --xs:   0.8125rem;
  --xxs:  0.6875rem;

  /* --- Space --- */
  --s2: 0.125rem; --s4: 0.25rem; --s6: 0.375rem;
  --s8: 0.5rem; --s12: 0.75rem; --s16: 1rem;
  --s20: 1.25rem; --s24: 1.5rem; --s32: 2rem;
  --s40: 2.5rem; --s48: 3rem; --s64: 4rem; --s96: 6rem;

  /* --- Radius --- */
  --r8: 8px; --r12: 12px; --r16: 16px; --r20: 20px; --r99: 9999px;

  /* --- Motion --- */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --smooth: cubic-bezier(0.25, 1, 0.5, 1);
  --expo: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 150ms; --t-med: 300ms; --t-slow: 500ms; --t-dramatic: 700ms;

  /* --- Layout --- */
  --pad: var(--s24);
  --max-w: 440px;
  --safe-b: max(var(--s16), env(safe-area-inset-bottom));

  --phase-bg: var(--white);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}


/* === RESET === */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

::selection { background: var(--ac-soft); color: var(--ac); }
::-webkit-scrollbar { width: 0; background: transparent; }

body {
  font-family: var(--font-ui); color: var(--t2); background: var(--phase-bg);
  line-height: 1.6; min-height: 100dvh; overflow-x: hidden;
  padding-top: env(safe-area-inset-top);
  transition: background 1s var(--smooth);
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; border: none; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, textarea { font: inherit; color: inherit; border: none; background: none; outline: none; -webkit-tap-highlight-color: transparent; }
input:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px solid var(--ac); outline-offset: 3px; border-radius: var(--r8); }


/* === SCREENS === */

.screen { display: none; min-height: 100dvh; }
.screen.active { display: flex; flex-direction: column; animation: screenIn var(--t-med) var(--smooth) both; }
@keyframes screenIn { from { opacity: 0; } to { opacity: 1; } }


/* === TYPOGRAPHY — hierarchy through weight & scale === */

.en-hero     { font-family: var(--font-en); font-size: var(--mega); font-weight: 700; line-height: 1.12; color: var(--t1); letter-spacing: -0.03em; font-feature-settings: "kern" 1, "liga" 1, "calt" 1; text-rendering: geometricPrecision; }
.en-body     { font-family: var(--font-en); font-size: var(--lg); font-weight: 400; line-height: 1.6; color: var(--t1); }
.en-sentence { font-family: var(--font-en); font-size: var(--display); font-weight: 600; line-height: 1.45; color: var(--t1); }
.ko-label    { font-size: var(--xxs); font-weight: 500; color: var(--t4); }
.ko-body     { font-size: var(--sm); color: var(--t2); line-height: 1.6; }


/* === BUTTONS === */

/* Primary — gradient pill, layered shadow for depth */
.btn-primary {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 50px;
  padding: var(--s12) var(--s32);
  background: var(--ac-grad); color: var(--white);
  font-size: var(--sm); font-weight: 600; letter-spacing: 0.02em;
  border-radius: var(--r16);
  box-shadow:
    0 1px 2px rgba(0,0,0,0.08),
    0 4px 12px var(--ac-glow),
    0 16px 32px var(--ac-glow-lg);
  transition: transform 350ms var(--spring), box-shadow 350ms var(--smooth), filter 200ms ease;
  will-change: transform;
  position: relative; isolation: isolate;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
  background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.06) 100%);
}
.btn-primary:hover {
  filter: brightness(1.04);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 6px 18px var(--ac-glow), 0 20px 40px var(--ac-glow-lg);
}
.btn-primary:active {
  transform: scale(0.95);
  box-shadow: 0 0 0 rgba(0,0,0,0), 0 1px 3px var(--ac-glow);
  filter: brightness(0.94) saturate(1.1);
  transition: transform 100ms ease, box-shadow 100ms ease, filter 100ms ease;
}

/* Ghost / text */
.btn-text { display: block; width: 100%; padding: var(--s8); font-size: var(--xs); color: var(--t4); text-align: center; transition: color var(--t-med) var(--smooth); }
.btn-text:hover { color: var(--t3); }
.btn-text:active { color: var(--t2); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s8);
  padding: var(--s12) var(--s24);
  border: 1.5px solid var(--border); color: var(--t2);
  font-size: var(--sm); font-weight: 500;
  border-radius: var(--r12);
  transition: transform var(--t-fast) var(--spring);
  min-height: 46px;
}
.btn-secondary:hover { border-color: rgba(0,0,0,0.12); background: var(--surface); }
.btn-secondary:active { transform: scale(0.97); background: var(--surface); }

.btn-profile {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; color: var(--t4); border-radius: var(--r99);
  transition: background var(--t-med) var(--smooth);
}
.btn-profile:active { background: var(--surface); }

.btn-back { display: inline-flex; align-items: center; gap: var(--s6); font-size: var(--xs); color: var(--t4); padding: var(--s8) 0; transition: color var(--t-med) var(--smooth); cursor: pointer; }
.btn-back:hover { color: var(--t3); }
.btn-back:active { color: var(--t2); }
.btn-back svg { width: 14px; height: 14px; }

/* Divider */
.divider { border: none; height: 1px; background: var(--border); margin: var(--s32) 0; }


/* === MAIN SCREEN === */

.main-header { display: flex; align-items: center; justify-content: space-between; padding: var(--s12) var(--pad); }
.main-header-spacer { flex: 1; }

.main-body {
  flex: 1; padding: 0 var(--pad); padding-bottom: var(--safe-b);
  max-width: var(--max-w); margin: 0 auto; width: 100%;
}

.scenario-preview { padding-top: var(--s20); display: flex; flex-direction: column; min-height: calc(100dvh - 80px); }

.series-label {
  display: inline-block;
  font-size: var(--xxs); font-weight: 600; color: var(--ac);
  background: var(--ac-soft); padding: 3px var(--s8); border-radius: var(--r99);
  margin-bottom: var(--s8); align-self: flex-start;
}

.scenario-title { font-size: var(--display); font-weight: 700; color: var(--t1); line-height: 1.3; margin-bottom: var(--s4); }
.scenario-subtitle { font-size: var(--xs); color: var(--t3); line-height: 1.4; }

/* The expression — owns the viewport but compact enough to fit */
.expression-preview { flex: 1; display: flex; align-items: center; min-height: 28vh; }
.expression-item {
  font-family: var(--font-en); font-size: var(--mega); font-weight: 700;
  color: var(--t1); line-height: 1.12; letter-spacing: -0.035em;
  text-wrap: balance;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  text-rendering: geometricPrecision;
}

.scenario-meta { font-size: var(--xxs); color: var(--t4); margin-bottom: var(--s16); margin-top: auto; text-align: right; }

/* Reading teaser — clean, no container */
.reading-teaser { padding: 0; }
.reading-teaser-label { font-size: var(--xxs); font-weight: 600; color: var(--t3); margin-bottom: var(--s12); }
.reading-teaser-title { font-family: var(--font-en); font-size: var(--display); font-weight: 600; color: var(--t1); line-height: 1.3; margin-bottom: var(--s8); letter-spacing: -0.01em; cursor: pointer; transition: color var(--t-med) var(--smooth); }
.reading-teaser-title:active { color: var(--ac); }
.reading-teaser-meta { font-size: var(--xxs); color: var(--t4); text-align: right; }

.weekly-mini { font-size: var(--xs); color: var(--t3); padding-bottom: var(--s48); }
.weekly-mini-label { font-size: var(--xxs); font-weight: 600; color: var(--t3); margin-bottom: var(--s8); }


/* === PHASE BAR — ultra-thin glass strip === */

.phase-bar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  padding: var(--s8) var(--pad) 0;
  border-bottom: none;
  box-shadow: 0 0.5px 0 rgba(255,255,255,0.8) inset, 0 -0.5px 0 rgba(0,0,0,0.03) inset, 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.02);
  transition: transform var(--t-med) var(--expo), opacity var(--t-med) var(--expo);
}
.phase-bar.keyboard-hidden { transform: translateY(-100%); opacity: 0; pointer-events: none; }

.phase-icons { display: flex; align-items: center; gap: 0; margin-bottom: var(--s8); }

.phase-icon {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--r99);
  color: var(--t5);
  transition: all var(--t-slow) var(--smooth);
}
.phase-icon.active { color: var(--ac); background: var(--ac-soft); transform: scale(1.15); }
.phase-icon.done { color: var(--t3); }

.phase-connector { width: 16px; height: 2px; background: var(--t5); border-radius: var(--r99); transition: background var(--t-slow) var(--smooth); }
.phase-connector.done { background: var(--t3); }

.progress-track { height: 3px; background: var(--surface); border-radius: var(--r99); overflow: hidden; margin-bottom: var(--s8); }
.progress-track.keyboard-hidden { transform: translateY(-60px); opacity: 0; }
.progress-fill { height: 100%; background: var(--ac-grad); border-radius: var(--r99); width: 0%; transition: width var(--t-slow) var(--expo); }

.phase-bar-bottom { display: flex; align-items: center; justify-content: space-between; padding-bottom: var(--s8); }
.phase-label { font-size: var(--xxs); font-weight: 500; color: var(--t3); }

.btn-pause { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: var(--t4); border-radius: var(--r99); }
.btn-pause:active { background: var(--surface); }


/* === STREAM CONTENT === */

.stream-content {
  flex: 1; padding: var(--s16) var(--pad); padding-bottom: var(--safe-b);
  max-width: var(--max-w); margin: 0 auto; width: 100%;
  position: relative; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column;
}
.stream-content > .phase-enter { flex: 1; display: flex; flex-direction: column; }

.phase-enter { animation: slideUp var(--t-slow) var(--expo) both; }
@keyframes slideUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }

.phase-enter.enter-listen    { animation: fadeIn var(--t-dramatic) var(--smooth) both; }
.phase-enter.enter-structure { animation: slideUp var(--t-slow) var(--expo) both; }
.phase-enter.enter-produce   { animation: clipUp 500ms var(--expo) both; }
.phase-enter.enter-warmup    { animation: scaleIn 400ms var(--expo) both; }
.phase-enter.enter-converse  { animation: fadeIn var(--t-dramatic) var(--smooth) both; }
.phase-enter.enter-wrap      { animation: fadeIn 900ms var(--smooth) both; }

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes clipUp  { from { opacity: 0; clip-path: inset(100% 0 0 0); } to { opacity: 1; clip-path: inset(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

.phase-exit { position: absolute; inset: 0; padding: var(--s24) var(--pad); animation: slideOut var(--t-med) ease-in both; pointer-events: none; }
@keyframes slideOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-20px); } }

.stagger > * { opacity: 0; animation: staggerIn var(--t-slow) var(--expo) both; }
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 80ms; animation-duration: 460ms; }
.stagger > *:nth-child(3) { animation-delay: 160ms; animation-duration: 480ms; }
.stagger > *:nth-child(4) { animation-delay: 260ms; animation-duration: 500ms; }
.stagger > *:nth-child(5) { animation-delay: 380ms; animation-duration: 520ms; }
.stagger > *:nth-child(6) { animation-delay: 500ms; animation-duration: 540ms; }
.stagger > *:nth-child(7) { animation-delay: 640ms; animation-duration: 560ms; }
@keyframes staggerIn {
  0%   { opacity: 0; transform: translateY(14px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}


/* === PHASE CONTENT === */

.phase-instruction { font-size: var(--sm); color: var(--t3); line-height: 1.6; margin-bottom: var(--s24); }
.phase-instruction strong { font-weight: 600; color: var(--t1); }

.scene-badge {
  display: inline-flex; align-items: center; gap: var(--s6);
  font-size: var(--xxs); font-weight: 500; color: var(--t3);
  background: var(--surface); padding: var(--s4) var(--s12); border-radius: var(--r99);
  margin-bottom: var(--s32);
}
.scene-badge svg { color: var(--t4); }

/* Choices — clean text list, NOT cards */
.choices { display: flex; flex-direction: column; gap: 0; }
.choice-btn {
  display: block; width: calc(100% + var(--s24)); margin-left: calc(-1 * var(--s12)); text-align: left;
  padding: var(--s12) var(--s12); font-size: var(--sm); line-height: 1.55; color: var(--t2);
  background: transparent; border-radius: var(--r12);
  border-bottom: none;
  transition: transform 250ms var(--spring), background 150ms ease, color 200ms ease;
  min-height: 46px;
}
.choice-btn + .choice-btn { border-top: 1px solid var(--border); border-radius: 0; }
.choice-btn:first-child { border-radius: var(--r12) var(--r12) 0 0; }
.choice-btn:last-child { border-radius: 0 0 var(--r12) var(--r12); border-bottom: none; }
.choice-btn:only-child { border-radius: var(--r12); }
.choice-btn:active { transform: translateX(4px) scale(0.99); background: var(--surface); color: var(--t1); }
.choice-btn.correct { color: var(--ok); font-weight: 600; border-bottom-color: var(--ok); }
.choice-btn.incorrect { color: var(--err); border-bottom-color: var(--err); }
.choice-btn.disabled { pointer-events: none; opacity: 0.35; }
.choice-btn .en-choice-text { font-family: var(--font-en); font-size: var(--lg); }

/* Dialogue — large, immersive */
.dialogue-block { margin-bottom: var(--s24); }
.dialogue-line { margin-bottom: var(--s24); }
.dialogue-speaker { font-size: var(--xxs); font-weight: 600; color: var(--t4); letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: var(--s8); }
.dialogue-text { font-family: var(--font-en); font-size: var(--hero); font-weight: 500; line-height: 1.32; color: var(--t1); letter-spacing: -0.015em; text-wrap: pretty; }
.dialogue-text .highlight,
.pattern-example-text .highlight,
.reading-highlight { color: var(--ac); font-weight: 600; background: var(--ac-soft); padding: 2px 6px; border-radius: 6px; border-bottom: none; }

/* Audio */
.audio-player { display: flex; align-items: center; gap: var(--s12); padding: var(--s16) 0; margin-bottom: var(--s24); }
.audio-player--centered { justify-content: center; margin-bottom: var(--s8); }

.audio-play-btn {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; background: var(--surface); color: var(--t2);
  border: none; border-radius: var(--r99); flex-shrink: 0;
  transition: transform var(--t-fast) var(--spring), background var(--t-med) var(--smooth);
}
.audio-play-btn--large { width: 80px; height: 80px; background: var(--ac-soft); color: var(--ac); }
.audio-play-btn--large svg { width: 28px; height: 28px; }
.audio-play-btn:active { transform: scale(0.9); }
.audio-play-btn.listening { background: var(--ac-soft); color: var(--ac); }

.listen-focus { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; flex: 1; min-height: 40vh; }
.listen-focus .scene-badge { margin-bottom: var(--s8); }
.listen-focus .phase-instruction { margin-bottom: var(--s48); }
.listen-focus .audio-player:last-child { width: 60%; }

.audio-bar { flex: 1; height: 3px; background: var(--surface); border-radius: var(--r99); }
.audio-bar-fill { height: 100%; background: var(--ac); border-radius: var(--r99); width: 0%; transition: width 200ms linear; }
.audio-time { font-size: var(--xxs); color: var(--t4); font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* Text input */
.text-input-wrap { margin-bottom: var(--s24); }
.text-input {
  display: block; width: 100%; padding: var(--s16) 0;
  font-family: var(--font-en); font-size: var(--display); font-weight: 500; color: var(--t1);
  background: none; border: none; border-bottom: 2px solid var(--surface);
  transition: border-color var(--t-med) var(--smooth);
}
.text-input:focus { border-bottom-color: var(--ac); }
.text-input::placeholder { color: var(--t5); font-weight: 400; }
.text-input.input-shake { animation: shake 0.4s var(--smooth); }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-6px)} 40%{transform:translateX(6px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)} }

.hint-text { font-size: var(--xs); color: var(--t4); margin-top: var(--s8); font-style: italic; }

/* Word blocks */
.word-blocks-target {
  min-height: 56px; padding: var(--s12);
  background: var(--white); border-radius: var(--r12);
  border: 1.5px solid var(--border); margin-bottom: var(--s24);
  display: flex; flex-wrap: wrap; gap: var(--s8); align-items: center;
  transition: border-color var(--t-med) var(--smooth), background var(--t-med) var(--smooth);
}
.word-blocks-target.has-words { border-color: var(--ac); border-style: solid; background: var(--ac-soft); }
.word-blocks-source { display: flex; flex-wrap: wrap; gap: var(--s8); margin-bottom: var(--s32); }

.word-block {
  display: inline-flex; align-items: center;
  padding: var(--s8) var(--s16); font-family: var(--font-en); font-size: var(--base); font-weight: 500; color: var(--t1);
  background: var(--white); border: 1px solid rgba(0,0,0,0.06); border-radius: var(--r8);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.03);
  transition: transform 180ms var(--spring), opacity var(--t-med) var(--smooth), box-shadow var(--t-med) var(--smooth);
  user-select: none; min-height: 44px;
}
.word-block:active { transform: scale(0.93); }
.word-block.placed { opacity: 0.2; pointer-events: none; }
.word-block.in-target { background: var(--white); border-color: var(--ac); color: var(--t1); }

/* Mic — warm glow, THE focal point */
.mic-btn {
  display: flex; align-items: center; justify-content: center; gap: var(--s8);
  width: 72px; height: 72px; padding: 0;
  background: var(--ac-grad); color: var(--white);
  font-size: 0; border-radius: var(--r99);
  margin: var(--s32) auto; position: relative;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.2) inset,
    0 1px 2px rgba(0,0,0,0.1),
    0 4px 12px rgba(239,108,80,0.25),
    0 12px 32px rgba(239,108,80,0.15);
  transition: transform 200ms var(--spring), box-shadow var(--t-med) var(--smooth);
  animation: micBreathe 3.5s ease-in-out infinite;
}
.mic-btn::before {
  content: ''; position: absolute; inset: -16px; border-radius: var(--r99); z-index: -1;
  background: radial-gradient(circle, rgba(239,108,80,0.08) 0%, transparent 70%);
  animation: micAura 3.5s ease-in-out infinite;
}
.mic-btn::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.08) 100%);
}
@keyframes micAura {
  0%,100% { transform: scale(1); opacity: 0.6; }
  50%     { transform: scale(1.15); opacity: 1; }
}
@keyframes micBreathe {
  0%,100% { box-shadow: 0 0 0 1px rgba(255,255,255,0.2) inset, 0 1px 2px rgba(0,0,0,0.1), 0 4px 12px rgba(239,108,80,0.25), 0 12px 32px rgba(239,108,80,0.15); }
  50%     { box-shadow: 0 0 0 1px rgba(255,255,255,0.2) inset, 0 1px 2px rgba(0,0,0,0.1), 0 8px 24px rgba(239,108,80,0.3), 0 20px 48px rgba(239,108,80,0.1); }
}
.mic-btn:active { transform: scale(0.88); transition: transform 100ms ease; }
.mic-btn--inline { width: 48px; height: 48px; margin: 0; flex-shrink: 0; animation: none; }
.mic-btn--inline::before { display: none; }
.mic-btn.recording {
  background: var(--err); animation: micPulse 1s ease infinite;
  width: 100%; height: auto; min-height: 54px; border-radius: var(--r16);
  font-size: var(--sm); padding: var(--s12) var(--s16);
  box-shadow: 0 4px 16px rgba(255,59,48,0.15);
}
@keyframes micPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.01)} }
.mic-btn svg { flex-shrink: 0; width: 26px; height: 26px; }
.mic-label { font-size: var(--xxs); color: var(--t4); text-align: center; margin-top: var(--s4); margin-bottom: var(--s16); }

/* Feedback — minimal, colored accent */
.feedback-card {
  padding: var(--s16) var(--s20); border-radius: var(--r16); margin-top: var(--s20);
  animation: feedbackIn var(--t-med) var(--spring) both;
  box-shadow: 0 0.5px 0 rgba(255,255,255,0.6) inset, 0 1px 2px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.03);
  border: 0.5px solid rgba(0,0,0,0.04);
  position: relative; overflow: hidden;
}
.feedback-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  border-radius: var(--r16) var(--r16) 0 0;
}
.feedback-card.green::before { background: var(--ok); }
.feedback-card.amber::before { background: var(--warn); }
.feedback-card.coral::before { background: var(--err); }
@keyframes feedbackIn {
  0%   { opacity: 0; transform: translateY(12px) scale(0.96); }
  60%  { transform: translateY(-2px) scale(1.005); }
  100% { opacity: 1; transform: none; }
}
.feedback-card.green { background: var(--ok-bg); }
.feedback-card.amber { background: var(--warn-bg); }
.feedback-card.coral { background: var(--err-bg); }
.feedback-label { font-size: var(--sm); font-weight: 600; margin-bottom: var(--s4); }
.feedback-card.green .feedback-label { color: var(--ok); }
.feedback-card.amber .feedback-label { color: var(--warn); }
.feedback-card.coral .feedback-label { color: var(--err); }
.feedback-body { font-size: var(--sm); color: var(--t2); line-height: 1.6; }
.feedback-body .en-text { font-family: var(--font-en); font-size: var(--lg); font-weight: 500; color: var(--t1); }

/* Conversation — NPC open, User accent bubble */
.convo-area { display: flex; flex-direction: column; gap: var(--s20); min-height: 36vh; }
.convo-bubble { max-width: 100%; animation: convoIn var(--t-dramatic) var(--smooth) both; }
@keyframes convoIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.convo-bubble.npc { align-self: flex-start; }
.convo-bubble.user { align-self: flex-end; max-width: 80%; }

.convo-npc-label { font-size: var(--xxs); font-weight: 600; color: var(--t4); letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: var(--s8); }
.convo-npc-text { font-family: var(--font-en); font-size: var(--hero); font-weight: 500; line-height: 1.3; color: var(--t1); letter-spacing: -0.01em; text-wrap: pretty; }
.convo-user-text {
  font-family: var(--font-en); font-size: var(--base); font-weight: 500; line-height: 1.55;
  color: var(--white); padding: var(--s12) var(--s16);
  background: var(--ac-grad); border-radius: var(--r16) var(--r16) var(--s4) var(--r16);
  text-align: right;
  box-shadow: 0 2px 8px var(--ac-glow), 0 1px 2px rgba(0,0,0,0.06);
}

.convo-input-area {
  margin-top: auto; padding-top: var(--s32); position: sticky; bottom: 0; z-index: 5;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  padding-bottom: var(--s16);
  border-top: 0.5px solid rgba(0,0,0,0.03);
}
.convo-hint { font-size: var(--xs); color: var(--t4); margin-bottom: var(--s16); display: flex; align-items: flex-start; gap: var(--s8); }
.convo-hint svg { flex-shrink: 0; color: var(--t5); margin-top: 2px; }

.silence-hint { opacity: 0; transition: opacity var(--t-dramatic) var(--smooth); font-family: var(--font-en); font-size: var(--sm); color: var(--t4); font-style: italic; margin-top: var(--s8); text-align: center; }
.silence-hint.visible { opacity: 0.5; }

.thinking-dots { display: inline-flex; gap: 5px; padding: var(--s6) var(--s12); background: var(--surface); border-radius: var(--r99); }
.thinking-dots span { display: block; width: 6px; height: 6px; background: var(--t4); border-radius: var(--r99); animation: dotBounce 1.4s var(--smooth) infinite; }
.thinking-dots span:nth-child(2) { animation-delay: 0.15s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dotBounce { 0%,60%,100%{transform:translateY(0);opacity:.3} 30%{transform:translateY(-4px);opacity:1} }

/* Pattern (Phase 2) */
.pattern-display { margin-bottom: var(--s32); }
.pattern-expression { font-family: var(--font-en); font-size: var(--mega); font-weight: 700; color: var(--t1); line-height: 1.12; margin-bottom: var(--s32); letter-spacing: -0.035em; padding-top: var(--s12); text-wrap: balance; }
.pattern-meaning { font-size: var(--sm); color: var(--t2); margin-bottom: var(--s4); }
.pattern-comparison { font-size: var(--xs); color: var(--t3); font-style: italic; }
.pattern-example { margin-top: var(--s40); padding: var(--s4) 0 var(--s4) var(--s16); border-left: 2px solid var(--border); }
.pattern-example-label { font-size: var(--xxs); color: var(--t4); font-weight: 600; margin-bottom: var(--s12); }
.pattern-example-text { font-family: var(--font-en); font-size: var(--lg); color: var(--t2); line-height: 1.6; }

/* Fill-blank */
.fill-sentence { font-family: var(--font-en); font-size: var(--hero); font-weight: 600; line-height: 1.35; color: var(--t1); margin-bottom: var(--s32); margin-top: var(--s8); }
.fill-blank { display: inline-block; min-width: 80px; border-bottom: 2.5px solid var(--ac); color: var(--ac); font-weight: 600; text-align: center; padding: 0 var(--s4); }

/* Pronunciation */
.pron-score { display: flex; align-items: baseline; gap: var(--s4); margin-bottom: var(--s4); }
.pron-score-num { font-family: var(--font-en); font-size: 3rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: -0.03em; }
.pron-score-num.green { color: var(--ok); }
.pron-score-num.amber { color: var(--warn); }
.pron-score-num.coral { color: var(--err); }
.pron-score-label { font-size: var(--xxs); color: var(--t4); }

.adaptive-notice { padding: var(--s12) var(--s16); background: var(--ac-soft); border-radius: var(--r12); font-size: var(--sm); color: var(--ac); margin-bottom: var(--s16); animation: feedbackIn var(--t-slow) var(--smooth) both; }


/* === PAUSE OVERLAY — glass === */

.pause-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.18); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn var(--t-med) var(--expo) both; }
.pause-overlay[hidden] { display: none; }

.pause-sheet {
  width: 100%; max-width: var(--max-w);
  background: rgba(255,255,255,0.72); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); border-top: 0.5px solid rgba(255,255,255,0.6);
  border-radius: var(--r20) var(--r20) 0 0;
  padding: var(--s16) var(--s24) var(--safe-b);
  animation: sheetUp var(--t-slow) var(--expo) both;
  box-shadow: 0 -2px 20px rgba(0,0,0,0.06), 0 -8px 40px rgba(0,0,0,0.04);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.pause-option { display: block; width: 100%; padding: var(--s16) 0; text-align: center; font-size: var(--sm); color: var(--t2); border-radius: var(--r8); transition: background var(--t-med) var(--smooth); }
.pause-option:active { background: var(--surface); }
.pause-option--resume { color: var(--ac); font-weight: 600; }
.pause-divider { border: none; height: 1px; background: var(--border); }


/* === RESULT === */

.result-body { flex: 1; padding: 0 var(--pad) var(--safe-b); max-width: var(--max-w); margin: 0 auto; width: 100%; display: flex; flex-direction: column; min-height: 100dvh; }

.result-check {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; color: var(--white); background: var(--ok);
  border-radius: var(--r99); margin-bottom: var(--s12); margin-top: var(--s32);
  animation: checkIn 600ms var(--spring) both; animation-delay: 200ms;
}
.result-check svg { width: 24px; height: 24px; }
@keyframes checkIn { 0% { opacity: 0; transform: scale(0.3); } 60% { opacity: 1; transform: scale(1.08); } 100% { transform: scale(1); } }

.result-title { font-size: var(--sm); font-weight: 700; color: var(--t1); letter-spacing: -0.01em; }
.result-section-label { font-size: var(--xxs); font-weight: 600; color: var(--t4); margin-bottom: var(--s16); }

.result-expressions { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: var(--s32) 0; min-height: 28vh; }
.result-expression {
  font-family: var(--font-en); font-size: var(--hero); font-weight: 600; color: var(--t1);
  line-height: 1.25; letter-spacing: -0.02em; margin-bottom: var(--s24);
  opacity: 0; animation: resultIn 900ms var(--expo) both;
}
.result-expression:nth-child(1) { animation-delay: 600ms; }
.result-expression:nth-child(2) { animation-delay: 1400ms; }
.result-expression:nth-child(3) { animation-delay: 2300ms; }
.result-expression:nth-child(4) { animation-delay: 3100ms; }
.result-expression:nth-child(5) { animation-delay: 3900ms; }
@keyframes resultIn { from { opacity: 0; transform: translateY(16px) scale(0.98); filter: blur(4px); } to { opacity: 1; transform: none; filter: blur(0); } }

.result-improvement { font-size: var(--xs); color: var(--t4); margin-bottom: var(--s4); }
.result-trend { font-size: var(--xs); color: var(--t4); margin-bottom: var(--s32); }
.result-trend strong { color: var(--t1); font-weight: 600; }
.result-actions { margin-top: auto; padding-bottom: var(--s24); display: flex; flex-direction: column; gap: var(--s8); }
.action-row { display: flex; flex-direction: column; gap: var(--s12); }


/* === UTILITIES === */

.mt-4{margin-top:var(--s4)}.mt-8{margin-top:var(--s8)}.mt-12{margin-top:var(--s12)}.mt-16{margin-top:var(--s16)}.mt-24{margin-top:var(--s24)}.mt-32{margin-top:var(--s32)}.mt-48{margin-top:var(--s48)}
.mb-8{margin-bottom:var(--s8)}.mb-12{margin-bottom:var(--s12)}.mb-16{margin-bottom:var(--s16)}.mb-24{margin-bottom:var(--s24)}.mb-32{margin-bottom:var(--s32)}
.text-center { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }


/* === ONBOARDING === */

.onboarding-section { padding-top: var(--s64); display: flex; flex-direction: column; min-height: 90dvh; overflow-y: auto; }
.onboarding-section--center { align-items: center; justify-content: center; text-align: center; }
.onboarding-title { font-size: var(--hero); font-weight: 700; color: var(--t1); line-height: 1.3; margin-bottom: var(--s32); }

.onboarding-choices { display: flex; flex-direction: column; gap: 0; margin-top: auto; padding-bottom: var(--s48); }
.onboarding-choice {
  display: block; width: 100%; text-align: left;
  padding: var(--s16) 0; border-bottom: 1px solid var(--border);
  transition: transform var(--t-fast) var(--spring); cursor: pointer;
}
.onboarding-choice:last-child { border-bottom: none; }
.onboarding-choice:active { transform: translateX(6px); }
.onboarding-choice-main { font-size: var(--sm); font-weight: 600; color: var(--t1); margin-bottom: var(--s4); }
.onboarding-choice-sub { font-size: var(--xs); color: var(--t3); }

.onboarding-mic-area { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; min-height: 40vh; padding: var(--s48) 0; }
.onboarding-mic-area .en-sentence { font-family: var(--font-en); font-size: var(--mega); font-weight: 700; color: var(--t1); letter-spacing: -0.03em; margin-bottom: var(--s48); }

.purpose-grid { display: flex; flex-direction: column; gap: 0; margin-bottom: var(--s32); }
.purpose-btn { padding: var(--s16) 0; border-bottom: 1px solid var(--border); font-size: var(--sm); color: var(--t2); text-align: left; transition: transform var(--t-fast) var(--spring); min-height: 48px; cursor: pointer; }
.purpose-btn:last-child { border-bottom: none; }
.purpose-btn.selected { color: var(--ac); font-weight: 600; border-bottom-color: var(--ac); }
.purpose-btn:active { transform: translateX(6px); }


/* === SCENARIO SELECT === */

.scenario-section-label { font-size: var(--xxs); font-weight: 600; color: var(--t4); margin-bottom: var(--s12); }

.scenario-card {
  padding: var(--s16) 0; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: transform var(--t-fast) var(--spring);
}
.scenario-card:active { transform: translateX(6px); }
.scenario-card--locked { opacity: 0.35; pointer-events: none; }
.scenario-card--rec { border-left: 3px solid var(--ac); padding-left: var(--s16); margin-left: calc(-1 * var(--s4)); }
.scenario-card-title { font-size: var(--sm); font-weight: 600; color: var(--t1); margin-bottom: var(--s4); }
.scenario-card-meta { font-size: var(--xs); color: var(--t3); margin-bottom: var(--s4); }
.scenario-card-expr { font-family: var(--font-en); font-size: var(--lg); color: var(--t1); font-weight: 500; line-height: 1.45; margin-top: var(--s8); }
.lock-badge { font-size: var(--xxs); color: var(--t4); }

.series-dots { display: flex; gap: 4px; margin-bottom: var(--s8); }
.series-dot { width: 8px; height: 8px; border-radius: var(--r99); background: var(--surface); }
.series-dot.filled { background: var(--ac); }

.scenario-confirm-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,0.18); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn var(--t-med) var(--expo) both; }
.scenario-confirm-sheet {
  width: 100%; max-width: var(--max-w);
  background: rgba(255,255,255,0.72); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); border-top: 0.5px solid rgba(255,255,255,0.6);
  border-radius: var(--r20) var(--r20) 0 0;
  padding: var(--s24) var(--s24) var(--safe-b);
  animation: sheetUp var(--t-slow) var(--expo) both;
}
.scenario-confirm-title { font-size: var(--sm); font-weight: 600; color: var(--t1); text-align: center; }


/* === RE-ENTRY === */

.reentry-section { padding-top: var(--s64); display: flex; flex-direction: column; min-height: 85dvh; }
.reentry-section .btn-primary { margin-top: auto; }
.onboarding-section > .btn-primary { margin-top: auto; }
.reentry-welcome { font-size: var(--hero); font-weight: 700; color: var(--t1); line-height: 1.25; margin-bottom: var(--s16); }


/* === READING === */

.reading-title-screen { font-family: var(--font-en); font-size: var(--mega); font-weight: 700; color: var(--t1); line-height: 1.12; letter-spacing: -0.025em; }
.reading-body { padding: var(--s32) 0 var(--s16); }
.reading-paragraph { font-family: var(--font-en); font-size: var(--display); font-weight: 400; line-height: 1.75; color: var(--t2); margin-bottom: var(--s24); }
.reading-word { border-bottom: 1.5px dashed var(--t5); cursor: pointer; position: relative; transition: color var(--t-fast) var(--smooth); }
.reading-word:hover, .reading-word:active { color: var(--ac); }
.reading-highlight { color: var(--ac); font-weight: 600; background: var(--ac-soft); padding: 2px 6px; border-radius: 6px; border-bottom: none; }
.reading-tooltip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--t1); color: var(--white); font-family: var(--font-ui); font-size: var(--xs); padding: var(--s6) var(--s12); border-radius: var(--r8); white-space: nowrap; animation: feedbackIn var(--t-fast) var(--expo) both; z-index: 10; pointer-events: none; }

/* Stream reading (Phase 1 Part B) */
.reading-title-stream { font-family: var(--font-en); font-size: var(--hero); font-weight: 700; color: var(--t1); line-height: 1.2; }
.reading-body-stream { padding: var(--s16) 0; }
.reading-body-stream .reading-paragraph { font-family: var(--font-en); font-size: var(--lg); font-weight: 400; line-height: 1.8; color: var(--t2); margin-bottom: var(--s16); }

/* === WRITING SYSTEM === */
.writing-header { display: flex; gap: var(--s8); align-items: center; }
.writing-type-badge { font-family: var(--font-ui); font-size: var(--xs); font-weight: 600; color: var(--ac); background: var(--ac-soft); padding: var(--s4) var(--s12); border-radius: var(--r99); }
.writing-level-badge { font-family: var(--font-ui); font-size: var(--xs); font-weight: 600; color: var(--t3); background: var(--surface); padding: var(--s4) var(--s12); border-radius: var(--r99); }
.writing-instruction { font-family: var(--font-ui); font-size: var(--lg); font-weight: 600; color: var(--t1); line-height: 1.5; }
.writing-hint { font-family: var(--font-ui); font-size: var(--sm); color: var(--t3); }

.writing-scaffold { margin-top: var(--s16); }
.writing-scaffold-toggle { font-family: var(--font-ui); font-size: var(--xs); color: var(--ac); background: none; border: 1px solid var(--ac-soft); padding: var(--s6) var(--s16); border-radius: var(--r99); cursor: pointer; }
.writing-scaffold-body { display: none; margin-top: var(--s12); }
.writing-scaffold.open .writing-scaffold-body { display: block; }
.writing-scaffold.open .writing-scaffold-toggle { background: var(--ac-soft); }
.writing-scaffold-item { display: inline-block; font-family: var(--font-en); font-size: var(--sm); color: var(--t2); background: var(--surface); border: none; padding: var(--s6) var(--s12); border-radius: var(--r8); margin: 0 var(--s4) var(--s4) 0; cursor: pointer; transition: background var(--t-fast) var(--smooth); }
.writing-scaffold-item:hover { background: var(--ac-soft); color: var(--ac); }

.writing-area { position: relative; }
.writing-textarea { width: 100%; font-family: var(--font-en); font-size: var(--base); line-height: 1.75; color: var(--t1); background: var(--white); border: 1.5px solid var(--border); border-radius: var(--r12); padding: var(--s16); resize: vertical; min-height: 200px; transition: border-color var(--t-fast) var(--smooth); box-sizing: border-box; }
.writing-textarea:focus { outline: none; border-color: var(--ac); }
.writing-textarea::placeholder { color: var(--t4); }
.writing-counter { font-family: var(--font-ui); font-size: var(--xs); color: var(--t3); text-align: right; margin-top: var(--s8); }
.writing-error { font-family: var(--font-ui); font-size: var(--sm); color: var(--coral); }

.writing-fb-card { background: var(--surface); border-radius: var(--r16); padding: var(--s24); }
.writing-fb-title { font-family: var(--font-ui); font-size: var(--lg); font-weight: 700; color: var(--t1); margin-bottom: var(--s16); }
.writing-fb-stats { font-family: var(--font-ui); font-size: var(--xs); color: var(--t3); margin-bottom: var(--s16); }
.writing-fb-row { display: flex; align-items: center; gap: var(--s8); margin-bottom: var(--s8); }
.writing-fb-label { font-family: var(--font-ui); font-size: var(--sm); color: var(--t2); width: 40px; flex-shrink: 0; }
.writing-fb-bar { flex: 1; height: 6px; background: var(--white); border-radius: var(--r99); overflow: hidden; }
.writing-fb-fill { height: 100%; border-radius: var(--r99); transition: width 0.6s var(--expo); }
.writing-fb-score { font-family: var(--font-ui); font-size: var(--sm); font-weight: 600; color: var(--t2); width: 28px; text-align: right; }
.writing-fb-overall { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s16); padding-top: var(--s12); border-top: 1px solid var(--border); font-family: var(--font-ui); font-size: var(--base); font-weight: 600; color: var(--t1); }
.writing-fb-overall-score { font-size: var(--hero); font-weight: 700; background: var(--ac-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.writing-issues { background: var(--white); border-radius: var(--r8); padding: var(--s12); }
.writing-issue-item { font-family: var(--font-ui); font-size: var(--sm); color: var(--coral); line-height: 1.6; }
.writing-fb-note { font-family: var(--font-ui); font-size: var(--sm); color: var(--t2); line-height: 1.5; }


/* === PROFILE === */

.profile-level { padding-top: var(--s32); margin-bottom: var(--s24); }
.profile-level-name { font-family: var(--font-en); font-size: var(--hero); font-weight: 700; color: var(--t1); letter-spacing: -0.02em; line-height: 1.2; }
.profile-level-number { font-size: var(--xxs); font-weight: 600; color: var(--ac); margin-bottom: var(--s4); }
.profile-section-title { font-size: var(--xxs); font-weight: 600; color: var(--t4); margin-bottom: var(--s16); }

.profile-stat-row { display: flex; align-items: center; gap: var(--s12); margin-bottom: var(--s12); }
.profile-stat-label { font-size: var(--xs); color: var(--t2); width: 64px; flex-shrink: 0; }
.profile-bar { flex: 1; height: 4px; background: var(--surface); border-radius: var(--r99); overflow: hidden; }
.profile-bar--wide { height: 5px; }
.profile-bar-fill { height: 100%; background: var(--ac-grad); border-radius: var(--r99); width: 0%; transition: width 800ms var(--expo); }
.profile-bar-fill--good { background: var(--ok); }
.profile-bar-fill--warn { background: var(--warn); }
.profile-stat-value { font-size: var(--xs); color: var(--t3); width: 36px; text-align: right; font-variant-numeric: tabular-nums; flex-shrink: 0; }

.profile-setting { display: block; width: 100%; text-align: left; padding: var(--s16) 0; font-size: var(--sm); color: var(--t2); border-bottom: 1px solid var(--border); }
.profile-setting:last-child { border-bottom: none; }
.profile-setting:active { color: var(--t1); }


/* === WEEKLY REPORT === */

.report-header { font-size: var(--display); font-weight: 700; color: var(--t1); line-height: 1.3; margin-bottom: var(--s4); }
.report-summary-num { font-family: var(--font-en); font-size: var(--hero); font-weight: 700; color: var(--t1); letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.report-summary-unit { font-size: var(--xxs); color: var(--t4); margin-left: var(--s4); }
.report-section--good { color: var(--ok); }
.report-section--focus { color: var(--warn); }
.report-item { margin-bottom: var(--s24); }
.report-item-title { font-size: var(--sm); font-weight: 600; color: var(--t1); margin-bottom: var(--s8); }
.report-item-change { font-family: var(--font-en); font-size: var(--lg); font-weight: 500; color: var(--t1); }
.report-rec { font-size: var(--sm); color: var(--t2); padding: var(--s12) 0; border-bottom: 1px solid var(--border); }
.report-rec:last-child { border-bottom: none; }
.report-trend-block { padding: var(--s16) 0; }
.report-trend-val { font-family: var(--font-en); font-size: var(--display); font-weight: 600; color: var(--t1); }


/* === PACK COMPLETE === */

.pack-section { padding-top: var(--s64); display: flex; flex-direction: column; min-height: 90dvh; }
.pack-title { font-size: var(--sm); font-weight: 500; color: var(--t3); }
.pack-series-name { font-family: var(--font-en); font-size: var(--hero); font-weight: 700; color: var(--t1); letter-spacing: -0.02em; line-height: 1.2; margin-bottom: var(--s8); }
.pack-expressions { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: var(--s32) 0; min-height: 28vh; }


/* === LEVEL UP === */

.levelup-section { padding-top: var(--s64); display: flex; flex-direction: column; min-height: 90dvh; }
.levelup-badge { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s12); margin-bottom: var(--s48); }
.levelup-from { font-family: var(--font-en); font-size: var(--sm); color: var(--t4); }
.levelup-arrow { color: var(--ac); display: flex; align-items: center; }
.levelup-to { font-family: var(--font-en); font-size: var(--mega); color: var(--t1); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.levelup-from-label { font-size: var(--xxs); color: var(--t4); }
.levelup-to-label { font-size: var(--xxs); font-weight: 600; color: var(--ac); }
.levelup-desc { font-size: var(--sm); color: var(--t2); line-height: 1.75; margin-bottom: var(--s48); }
.levelup-series { text-align: left; width: 100%; margin-top: auto; }
.levelup-series-item { padding: var(--s12) 0; font-size: var(--sm); color: var(--t2); border-bottom: 1px solid var(--border); }
.levelup-series-item:last-child { border-bottom: none; }


/* === REVIEW BURST === */

.review-section { padding-top: var(--s64); display: flex; flex-direction: column; min-height: 80dvh; }
.review-counter { font-size: var(--xxs); font-weight: 600; color: var(--t4); text-align: right; margin-bottom: var(--s48); }
.review-situation { font-size: var(--sm); color: var(--t2); line-height: 1.6; margin-bottom: var(--s48); }


/* === SESSION PICKER — glass === */

.session-picker-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,0.18); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn var(--t-med) var(--expo) both; }
.session-picker-overlay[hidden] { display: none; }
.session-picker-dim { position: absolute; inset: 0; }
.session-picker-sheet {
  position: relative; width: 100%; max-width: var(--max-w);
  max-height: 85dvh; overflow-y: auto;
  background: rgba(255,255,255,0.72); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%); border-top: 0.5px solid rgba(255,255,255,0.6);
  border-radius: var(--r20) var(--r20) 0 0;
  padding: var(--s16) var(--s24) var(--safe-b);
  animation: sheetUp var(--t-slow) var(--expo) both;
  box-shadow: 0 -2px 20px rgba(0,0,0,0.06), 0 -8px 40px rgba(0,0,0,0.04);
}
.session-picker-title { font-size: var(--xxs); font-weight: 600; color: var(--t4); text-align: center; margin-bottom: var(--s16); }
.session-picker-option { display: block; width: 100%; text-align: left; padding: var(--s12) 0; border-radius: var(--r8); transition: transform var(--t-fast) var(--spring); }
.session-picker-option:active { transform: translateX(6px); }
.session-picker-label { display: block; font-family: var(--font-en); font-size: var(--lg); font-weight: 600; color: var(--t1); margin-bottom: var(--s2); }
.session-picker-desc { display: block; font-size: var(--xs); color: var(--t3); }
.session-picker-cancel { display: block; width: 100%; padding: var(--s12) 0; text-align: center; font-size: var(--sm); color: var(--ac); font-weight: 600; cursor: pointer; transition: opacity var(--t-fast) ease; }
.session-picker-cancel:active { opacity: 0.6; }


/* === GUIDE BUBBLE === */

.guide-bubble { display: flex; align-items: flex-start; gap: var(--s8); padding: var(--s12) var(--s16); font-size: var(--xs); color: var(--t2); line-height: 1.6; background: var(--ac-soft); border-radius: var(--r12); margin-bottom: var(--s16); animation: feedbackIn var(--t-med) var(--smooth) both; }
.guide-bubble svg { flex-shrink: 0; color: var(--ac); margin-top: 2px; }
.guide-dismiss { flex-shrink: 0; font-size: var(--xs); color: var(--ac); font-weight: 600; margin-left: auto; white-space: nowrap; cursor: pointer; transition: opacity var(--t-fast) ease; }
.guide-dismiss:active { opacity: 0.5; }


/* === FEEDBACK AUTO-DISMISS === */

.feedback-card--auto { animation: feedbackIn var(--t-med) var(--smooth) both, feedbackOut 0.3s ease-in 2.7s both; }
@keyframes feedbackOut { to { opacity: 0; transform: translateY(-6px); } }


/* === FLUENCY DRILL TIMER === */

#fluency-timer { margin-top: var(--s16); }
#fluency-timer-fill { transition-timing-function: linear; }


/* === CALIBRATION === */

.calibration-notice { padding: var(--s12) var(--s16); background: var(--surface); border-radius: var(--r12); animation: feedbackIn var(--t-slow) var(--smooth) both; animation-delay: 2.5s; }
