/*
 * Éloqarté web kit: the mobile TaskKit and PopupKit look (3D cards, lime and
 * dark 3D buttons, purple coach card, sheets). Loaded after app.css; it also
 * restyles the older classes (.btn, .card, .option, .sheet) so every screen
 * shares the same building blocks.
 */
:root {
  --ink: #1a2d09;
  --ink-deep: #0b1604;
  --muted: #5e6b58;
  --body: #3c4a36;
  --page: #f2f5f0;
  --purple: #a12be8;
  --purple-deep: #7b1fc2;
  --purple-soft: #f3eafe;
  --lime: #c2ff60;
  --lime-deep: #8fbf3f;
  --lime-soft: #eef8de;
  --coral: #ff5a50;
  --coral-deep: #b8423a;
  --line: #cfe0c6;
  --track: #e3e9df;
  --white: #ffffff;
  --col: 440px;
  --text: var(--ink);
  --forest: var(--ink);
  --bg: var(--page);
}

/* ---------- Layout: one column, 440 px at most, centred ---------- */
body { background: var(--page); color: var(--ink); font-weight: 500; }
.mesh { display: none; }
.topbar, .app { width: min(var(--col), 100%); padding-left: 16px; padding-right: 16px; }
.app { min-height: calc(100vh - 60px); min-height: calc(100dvh - 60px); padding-top: 8px; }
.tabbar { width: min(calc(var(--col) - 32px), calc(100% - 32px)); }
.brand { font-weight: 900; font-size: 20px; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; border-radius: 10px; }

/* ---------- Type ---------- */
.k-eyebrow, .eyebrow {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--purple-deep);
}
.k-title { font-size: 26px; line-height: 32px; font-weight: 800; letter-spacing: -0.3px; }
.k-title.big { font-size: 32px; line-height: 38px; }
.k-body { font-size: 15px; line-height: 21px; font-weight: 600; color: var(--body); }
.k-muted { font-size: 13px; font-weight: 700; color: var(--muted); }
.k-center { text-align: center; }
.headline { font-weight: 800; letter-spacing: -0.4px; }

/* ---------- Buttons (3D) ---------- */
.btn, .k-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 56px; padding: 0 22px; border: 0; border-radius: 999px;
  font: 700 17px/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  background: var(--ink); color: var(--white); box-shadow: 0 4px 0 var(--ink-deep);
  transition: transform 0.06s ease, box-shadow 0.06s ease, opacity 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover:not(:disabled), .k-btn:hover:not(:disabled) { transform: none; opacity: 0.94; }
.btn:active:not(:disabled), .k-btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 var(--ink-deep); }
.btn:disabled, .k-btn:disabled { opacity: 0.45; }
.btn.lime, .k-btn.lime { background: var(--lime); color: var(--ink); box-shadow: 0 4px 0 var(--lime-deep); }
.btn.lime:active:not(:disabled), .k-btn.lime:active:not(:disabled) { box-shadow: 0 0 0 var(--lime-deep); }
.btn.coral { background: var(--coral); box-shadow: 0 4px 0 var(--coral-deep); }
.btn.light, .k-btn.secondary {
  background: var(--white); color: var(--ink); box-shadow: none; border: 2px solid var(--ink); min-height: 52px;
}
.btn.light:active:not(:disabled), .k-btn.secondary:active:not(:disabled) { transform: translateY(2px); }
.btn.ghost, .k-later {
  background: none; box-shadow: none; color: var(--muted); min-height: 40px; width: auto; align-self: center;
  font-size: 15px; font-weight: 700; padding: 6px 10px; border: 0;
}
.btn.ghost:active:not(:disabled), .k-later:active { transform: none; box-shadow: none; opacity: 0.7; }
.k-btn.small { min-height: 44px; font-size: 15px; width: auto; padding: 0 18px; box-shadow: 0 3px 0 var(--ink-deep); }

/* ---------- Cards (3D) ---------- */
.card, .k-card {
  background: var(--white); border-radius: 22px; padding: 14px 16px; box-shadow: 0 3px 0 var(--line);
}
.card.dark { background: var(--ink); color: var(--white); box-shadow: 0 4px 0 var(--ink-deep); }
.k-card.tap { display: block; width: 100%; text-align: left; border: 0; cursor: pointer; font: inherit; color: inherit;
  transition: transform 0.06s ease, box-shadow 0.06s ease; }
.k-card.tap:active { transform: translateY(3px); box-shadow: 0 0 0 var(--line); }
.k-card.green { background: #eaf6dc; box-shadow: 0 4px 0 #cfe5b0; }
.k-card.red { background: #ffe9e5; box-shadow: 0 4px 0 #f3bdb5; }
.k-card.purple { background: var(--purple-soft); box-shadow: 0 4px 0 #dcc4f5; }

/* Option tiles (pickers) */
.option {
  background: var(--white); border-radius: 18px; padding: 14px 16px; box-shadow: 0 3px 0 var(--line);
  border: 2px solid transparent; transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.option:hover { transform: none; background: var(--white); }
.option:active { transform: translateY(3px); box-shadow: 0 0 0 var(--line); }
.option.selected { background: var(--lime-soft); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.option-label { font-weight: 800; font-size: 16px; }
.option.selected .check { background: var(--ink); }

/* Chips */
.k-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.k-chip { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.k-chip.purple { background: var(--purple-soft); color: #4a1a7a; }
.k-chip.green { background: var(--lime-soft); color: #2c6322; }
.k-chip.ink { background: var(--ink); color: var(--white); }

/* Icon tiles */
.k-icon-tile {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 16px; display: flex; align-items: center; justify-content: center;
}
.k-icon-tile.big { width: 76px; height: 76px; border-radius: 24px; background: var(--white); box-shadow: 0 4px 0 var(--line); align-self: center; }
.k-icon-tile.dark { background: var(--ink); box-shadow: 0 4px 0 var(--ink-deep); }

/* Lock badge (shows what is behind it) */
.k-lock {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px;
  background: var(--ink); color: var(--lime); font-size: 11px; font-weight: 800; letter-spacing: 0.3px;
}
.k-lock svg { width: 11px; height: 11px; }

/* ---------- Task screens (TaskKit) ---------- */
.k-task { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.k-task-header { display: flex; align-items: center; gap: 10px; }
.k-close {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: var(--white); box-shadow: 0 3px 0 var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 24px; line-height: 1; font-weight: 700; color: var(--ink);
}
.k-close:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.k-task-title { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-task-meta { font-size: 12px; font-weight: 700; color: var(--muted); }

/* Purple coach card */
.k-coach-card {
  position: relative; min-height: 150px; padding: 16px 14px 20px 128px; border-radius: 26px; overflow: hidden;
  background: var(--purple); border: 0; width: 100%; text-align: left; font: inherit; color: inherit; display: block;
}
button.k-coach-card { cursor: pointer; }
.k-coach-card::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--purple-deep); }
.k-coach-card .k-blob { position: absolute; left: -50px; bottom: -70px; width: 190px; height: 170px; border-radius: 50%; background: var(--purple-deep); }
.k-coach-card .k-coach-fig { position: absolute; left: 4px; bottom: -6px; width: 124px; }
.k-bubble {
  position: relative; background: var(--white); border-radius: 18px 18px 18px 6px; padding: 11px 13px;
  box-shadow: 0 3px 0 rgba(26, 45, 9, 0.25); font-size: 14px; line-height: 19px; font-weight: 700; color: var(--ink);
}
.k-bubble .k-ghost { visibility: hidden; }
.k-bubble .k-live { position: absolute; left: 13px; right: 13px; top: 11px; }

/* Small coach card (one line, face only) */
.k-coach-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 20px;
  background: var(--purple); box-shadow: 0 4px 0 var(--purple-deep);
}
.k-coach-row .coach-art { flex-shrink: 0; border-radius: 50%; }
.k-coach-row .k-bubble { padding: 7px 10px; font-size: 13px; line-height: 17px; box-shadow: none; border-radius: 12px 12px 12px 4px; }

/* Task card */
.k-task-card { padding: 14px; border-radius: 22px; background: var(--white); box-shadow: 0 4px 0 var(--line); }
.k-task-card .k-task-text { margin-top: 6px; font-size: 19px; line-height: 25px; font-weight: 800; }
.k-task-card .k-chips { margin-top: 10px; }

/* Voice bars */
.k-wave { height: 48px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.k-wave i { width: 5px; height: 6px; border-radius: 3px; background: var(--line); transform-origin: center; }
.k-wave.live i { background: var(--purple); animation: kBar 0.7s ease-in-out infinite alternate; }
.k-wave.live i:nth-child(5n + 1) { background: var(--coral); }
@keyframes kBar { from { transform: scaleY(1); } to { transform: scaleY(0.25); } }

/* Mic in a progress ring */
.k-mic-area { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.k-mic { position: relative; width: 92px; height: 92px; }
.k-mic svg.k-ring { position: absolute; inset: 0; }
.k-mic .k-ring-fill { transition: stroke-dashoffset 0.25s linear; }
.k-mic::before { content: ''; position: absolute; left: 9px; top: 14px; width: 74px; height: 74px; border-radius: 50%; background: var(--lime-deep); }
.k-mic.live::before { background: var(--coral-deep); }
.k-mic button {
  position: absolute; left: 9px; top: 9px; width: 74px; height: 74px; border-radius: 50%; border: 0;
  background: var(--lime); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: transform 0.06s ease;
}
.k-mic button:active:not(:disabled) { transform: translateY(5px); }
.k-mic button svg { width: 30px; height: 30px; }
.k-mic.live button { background: var(--coral); }
.k-mic .k-stop { width: 24px; height: 24px; border-radius: 6px; background: var(--white); }
.k-mic.locked { opacity: 0.4; }
.k-mic.live .k-pulse { position: absolute; inset: 0; border-radius: 50%; background: var(--coral); animation: kPulse 1.4s ease-out infinite; }
@keyframes kPulse { from { transform: scale(1); opacity: 0.5; } to { transform: scale(1.7); opacity: 0; } }
.k-mic-hint { min-height: 18px; font-size: 13px; font-weight: 700; color: var(--muted); text-align: center; }
.k-spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(26, 45, 9, 0.2); border-top-color: var(--ink); animation: kSpin 0.8s linear infinite; }
@keyframes kSpin { to { transform: rotate(360deg); } }

/* Score bars (Clarté / Confiance / Impact) */
.k-scores { display: flex; flex-direction: column; gap: 9px; }
.k-score { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.k-score > span:first-child { width: 92px; font-weight: 800; }
.k-score .k-bar { flex: 1; height: 10px; border-radius: 5px; background: var(--track); overflow: hidden; }
.k-score .k-bar i { display: block; height: 100%; border-radius: 5px; }
.k-score b { width: 30px; text-align: right; font-weight: 900; }

/* ---------- Popups (PopupKit) ---------- */
.modal, .k-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(26, 45, 9, 0.45);
  display: flex; align-items: flex-end; justify-content: center; animation: kFade 0.2s ease;
}
.k-backdrop.center { align-items: center; padding: 24px; }
.sheet, .k-sheet {
  position: relative; width: min(var(--col), 100%); max-height: 90vh; max-height: 90dvh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px; padding: 12px 20px max(26px, env(safe-area-inset-bottom));
  border-radius: 32px 32px 0 0; background: var(--page); animation: kUp 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.k-sheet .k-handle { width: 44px; height: 5px; border-radius: 3px; background: var(--line); align-self: center; margin-bottom: 8px; flex-shrink: 0; }
.k-dialog {
  width: min(400px, 100%); border-radius: 28px; background: var(--page); padding: 20px 20px 26px;
  display: flex; flex-direction: column; gap: 12px; animation: kPop 0.2s ease;
}
.k-popup-title { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
@keyframes kFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kUp { from { transform: translateY(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes kPop { from { transform: scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }
.k-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 51; }
.k-confetti i { position: absolute; border-radius: 2px; animation: kFloat 3.6s ease-in-out infinite; }
@keyframes kFloat { 0%, 100% { transform: translateY(0) rotate(var(--r)); } 50% { transform: translateY(10px) rotate(var(--r)); } }

/* Tab bar sits at the bottom of the column */
.tabbar { box-shadow: 0 5px 0 var(--ink-deep), 0 14px 34px rgba(26, 45, 9, 0.22); }
.tab { font-weight: 700; }

/* ---------- Reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .k-wave.live i { animation: none; }
}

/* ---------- Coach choice ---------- */
.coach-select { gap: 12px; }
.coach-stage-wrap { position: relative; }
.coach-stage { position: relative; height: 210px; display: flex; align-items: flex-end; justify-content: center; gap: 4px; overflow: hidden; border-radius: 28px; }
.coach-stage-blob { position: absolute; left: 50%; bottom: -120px; width: 330px; height: 300px; transform: translateX(-50%); border-radius: 50%; background: var(--lime); }
.coach-stage-fig { position: relative; transition: transform 0.25s ease, opacity 0.25s ease; transform-origin: bottom center; margin-bottom: -18px; }
.coach-stage-fig.picked { transform: scale(1.08); }
.coach-stage-fig.dim { opacity: 0.45; transform: scale(0.92); }
.coach-stage-bubble { position: absolute; top: 6px; left: 8px; max-width: 58%; }
.coach-stage-bubble.right { left: auto; right: 8px; border-radius: 18px 18px 6px 18px; }
.coach-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.coach-pick {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border-radius: 20px; text-align: left;
  background: var(--white); border: 2px solid transparent; box-shadow: 0 3px 0 var(--line); cursor: pointer;
}
.coach-pick.on { border-color: var(--ink); background: var(--purple-soft); box-shadow: 0 3px 0 var(--ink); }
.coach-pick-name { font-size: 22px; font-weight: 800; }
.coach-pick-role { font-size: 13px; font-weight: 600; color: var(--muted); }
.coach-pick-chip { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--page); font-size: 12px; font-weight: 700; }
.coach-pick.on .coach-pick-chip { background: var(--ink); color: var(--white); }
.grow { flex: 1; min-height: 12px; }

/* ---------- Training language step ---------- */
.lang-coach { display: flex; align-items: center; gap: 12px; }
.lang-coach .coach-art { border-radius: 50%; flex-shrink: 0; }
.lang-q { font-size: 20px; line-height: 26px; font-weight: 800; margin: 0; }
.lang-cards { display: flex; flex-direction: column; gap: 12px; }
.lang-card {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border-radius: 22px; text-align: left;
  border: 2px solid transparent; box-shadow: 0 4px 0 var(--shadow); cursor: pointer; transition: transform 0.12s ease;
}
.lang-card.on { border-color: var(--ink); transform: scale(1.02); }
.lang-card-flag { font-size: 30px; line-height: 1; }
.lang-card-text { flex: 1; display: flex; flex-direction: column; }
.lang-card-text b { font-size: 18px; font-weight: 800; }
.lang-card-text small { font-size: 13px; font-weight: 600; color: var(--body); }
.lang-card .check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ink); background: var(--white); }
.lang-card.on .check { background: var(--ink); box-shadow: inset 0 0 0 4px var(--white); }

/* Hints read as normal text, not code. */
.hint {
  font: 500 0.82rem/1.45 var(--font-body);
  color: var(--warm);
}

/* ---------- Onboarding: pick your areas / difficulties ---------- */
.area-pick { position: relative; gap: 0; }
.area-pick .ap-bg { position: absolute; right: -110px; top: -110px; width: 260px; height: 260px; border-radius: 50%; background: #f1e6fd; z-index: -1; }
.ap-head { display: flex; align-items: flex-start; gap: 12px; margin-top: 6px; }
.ap-head-text { flex: 1; min-width: 0; }
.ap-eyebrow { display: inline-flex; padding: 4px 10px; border-radius: 999px; background: var(--purple-soft); color: var(--purple-deep); font: 600 11px/1.3 var(--font-mono); letter-spacing: 1px; text-transform: uppercase; }
.ap-head .k-title { margin-top: 10px; font-size: 25px; line-height: 30px; }
.ap-face { width: 64px; height: 64px; flex-shrink: 0; border-radius: 50%; background: var(--purple); box-shadow: 0 3px 0 var(--purple-deep); overflow: hidden; display: flex; }
.ap-face .k-coach-art, .ap-face svg { display: block; }
.ap-sub { margin-top: 8px; font-size: 14px; line-height: 20px; color: var(--muted); font-weight: 600; }
.ap-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ap-grid.one { grid-template-columns: minmax(0, 1fr); }
.area-pick.list .ap-grid { gap: 7px; margin-top: 14px; }
.ap-card {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 76px; padding: 10px 12px;
  border-radius: 20px; border: 2px solid transparent; background: var(--white); box-shadow: 0 3px 0 var(--line);
  font: 800 14px/18px var(--font-body); color: var(--ink); text-align: left; cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.ap-grid.compact .ap-card, .ap-grid.one .ap-card { min-height: 64px; }
.area-pick.list .ap-card { min-height: 54px; padding: 6px 12px 6px 7px; border-radius: 18px; gap: 12px; font-size: 15px; line-height: 19px; }
.ap-card:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.ap-card.on { background: var(--purple-soft); border-color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.ap-label { min-width: 0; overflow: hidden; }
.ap-card .ap-tile { width: 40px; height: 40px; border-radius: 14px; flex-shrink: 0; box-shadow: none; }
.area-pick.list .ap-card .ap-tile { border-radius: 13px; }
.ap-check { position: absolute; right: -6px; top: -6px; width: 24px; height: 24px; border-radius: 50%; background: var(--lime); border: 2px solid var(--ink); box-sizing: border-box; display: none; }
.ap-check::after { content: ''; position: absolute; left: 6px; top: 3px; width: 6px; height: 10px; border: solid var(--ink); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.ap-card.on .ap-check { display: block; animation: apCheck 0.35s ease-out both; }
.ap-in { animation: apIn 0.4s cubic-bezier(0.2, 1.2, 0.4, 1) both; }
.ap-hop { animation: apHop 0.5s ease-out; }
.ap-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 12px; }
.ap-pips { display: flex; gap: 8px; }
.ap-pips i { width: 8px; height: 8px; border-radius: 4px; background: var(--line); transition: all 0.25s ease; }
.ap-pips i.on { width: 22px; background: var(--purple); }
.ap-count { margin-left: 4px; font: 600 12px var(--font-mono); color: var(--muted); }
@keyframes apIn { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes apHop { 0% { transform: none; } 35% { transform: translateY(-9px) rotate(-10deg) scale(1.15); } 65% { transform: rotate(6deg) scale(0.95); } 100% { transform: none; } }
@keyframes apCheck { 0% { transform: scale(0) rotate(-40deg); } 60% { transform: scale(1.25) rotate(8deg); } 100% { transform: none; } }

/* ---------- Onboarding end: recap, test take, building ---------- */
.ft-screen { gap: 0; }
.ft-hero { position: relative; height: 232px; flex-shrink: 0; border-radius: 32px; overflow: hidden; background: var(--purple); margin-top: 4px; }
.ft-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--purple-deep); }
.ft-hero.build { height: 296px; }
.ft-blob { position: absolute; border-radius: 50%; background: var(--purple-deep); }
.ft-blob.l { left: -60px; top: -50px; width: 190px; height: 220px; }
.ft-blob.r { right: -70px; top: 30px; width: 190px; height: 230px; }
.ft-dot { position: absolute; border-radius: 50%; animation: ftFloat 3s ease-in-out infinite; }
.ft-dot.lime { left: 40px; top: 46px; width: 14px; height: 14px; background: var(--lime); }
.ft-dot.mint { right: 50px; top: 40px; width: 16px; height: 16px; background: #8fd8c8; animation-delay: 0.8s; }
.ft-dot.coral { right: 34px; top: 132px; width: 11px; height: 11px; background: var(--coral); animation-delay: 1.4s; }
.ft-pill { position: absolute; left: 22px; top: 22px; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--white); box-shadow: 0 3px 0 rgba(26, 45, 9, 0.25); font-size: 12px; font-weight: 800; }
.ft-pill-mark { width: 22px; height: 22px; border-radius: 50%; background: var(--lime); display: flex; align-items: center; justify-content: center; }
.ft-rise { position: absolute; left: 50%; bottom: -8px; width: 190px; margin-left: -95px; animation: ftRise 0.6s cubic-bezier(0.2, 1.2, 0.4, 1) both; }
.ft-lead { margin-top: 18px; font-size: 25px; line-height: 30px; }
.ft-label { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.ft-chips { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 7px; }
.ft-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 6px; border-radius: 999px; font-size: 13px; font-weight: 700; box-shadow: 0 2px 0 rgba(26, 45, 9, 0.12); }
.ft-chip.pop { animation: ftPop 0.38s ease-out both; }
.ft-chip-icon { width: 22px; height: 22px; border-radius: 50%; background: var(--white); display: flex; align-items: center; justify-content: center; }
.ft-benefits { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.ft-benefit { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 16px; background: var(--white); box-shadow: 0 2px 0 var(--track); opacity: 0.55; font-size: 14px; line-height: 18px; font-weight: 700; transition: opacity 0.3s ease, box-shadow 0.3s ease; }
.ft-benefit-mark { position: relative; width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; background: #eef2ea; transition: background 0.25s ease; }
.ft-benefit.on { opacity: 1; box-shadow: 0 2px 0 #b9d99a; }
.ft-benefit.on .ft-benefit-mark { background: var(--lime); }
.ft-benefit.on .ft-benefit-mark::after, .ft-check-mark::after { content: ''; position: absolute; left: 8px; top: 4px; width: 6px; height: 11px; border: solid var(--ink); border-width: 0 3px 3px 0; transform: rotate(45deg); animation: ftTick 0.3s ease-out both; }
.btn.glow { animation: ftGlow 1.6s ease-in-out infinite; }
.ft-screen .btn { margin-top: 16px; }

.ft-coach.k-coach-card { min-height: 196px; }
.ft-coach.listening .k-coach-fig { animation: ftLean 1s ease-in-out infinite; }
.ft-row { margin-top: 18px; display: flex; align-items: center; gap: 8px; }
.ft-eyebrow { font: 600 12px var(--font-mono); letter-spacing: 1.5px; color: var(--purple-deep); text-transform: uppercase; }
.ft-target { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: var(--white); font-size: 12px; font-weight: 700; color: var(--muted); box-shadow: 0 2px 0 var(--track); }
.ft-prompt { margin-top: 8px; }
.ft-prompt-text { font-size: 20px; line-height: 27px; font-weight: 800; letter-spacing: -0.2px; }
.ft-tags { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.ft-tag { padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.ft-tag.purple { background: var(--purple-soft); color: #4a1a7a; }
.ft-tag.green { background: var(--lime-soft); color: #2c6322; }
.tt .k-wave { margin-top: 18px; }
.ft-clock { margin-top: 4px; text-align: center; font: 600 15px var(--font-mono); color: var(--muted); }
.ft-clock.live { color: var(--coral-deep); }
.tt .error { margin-bottom: 10px; }
.tt .btn.secondary { margin: 0 0 12px; }

.ft-center-fig { position: absolute; left: 50%; bottom: -8px; width: 212px; margin-left: -106px; animation: ftRise 0.6s cubic-bezier(0.2, 1.2, 0.4, 1) both; }
.ft-progress { position: absolute; left: 24px; right: 24px; bottom: 16px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.22); overflow: hidden; z-index: 2; }
.ft-progress i { display: block; height: 8px; width: 0; border-radius: 4px; background: var(--lime); transition: width 0.6s ease; }
.ft-orbit { position: absolute; left: 50%; top: 150px; width: 0; height: 0; animation: ftSpin 14s linear infinite; }
.ft-orbit > span { position: absolute; }
.ft-orbit > span .k-icon-tile { width: 40px; height: 40px; border-radius: 14px; box-shadow: none; animation: ftSpin 14s linear infinite reverse; }
.ft-orbit .o1 { left: -128px; top: -60px; }
.ft-orbit .o2 { left: 88px; top: -76px; }
.ft-orbit .o3 { left: -20px; top: 92px; }
.ft-typing { position: absolute; right: 58px; top: 70px; display: flex; gap: 5px; background: var(--white); border-radius: 14px 14px 14px 4px; padding: 9px 11px; box-shadow: 0 3px 0 rgba(26, 45, 9, 0.25); }
.ft-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--purple-deep); animation: ftDot 1s ease-in-out infinite; }
.ft-typing i:nth-child(2) { animation-delay: 0.2s; }
.ft-typing i:nth-child(3) { animation-delay: 0.4s; }
.ft-screen.done .ft-orbit, .ft-screen.done .ft-typing { display: none; }
.ft-confetti { position: absolute; left: 50%; top: 120px; width: 0; height: 0; }
.ft-confetti i { position: absolute; width: 9px; height: 9px; animation: ftBurst 0.9s ease-out both; }
.ft-coach-line { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--purple-deep); text-align: center; min-height: 18px; }
.ft-build-body { display: flex; flex-direction: column; flex: 1; }
.ft-build-body > .k-title { margin: 12px 0 14px; font-size: 24px; line-height: 30px; }
.ft-build-body > .ft-eyebrow { margin-top: 14px; }
.ft-build-body > .k-title.big { margin: 6px 0 0; font-size: 30px; line-height: 36px; }
.ft-steps { display: flex; flex-direction: column; gap: 6px; }
.ft-step { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 14px; font-size: 15px; line-height: 20px; color: var(--muted); font-weight: 600; transition: background 0.3s ease; }
.ft-step.active { background: var(--white); color: var(--ink); font-weight: 800; }
.ft-step.done { color: var(--ink); font-weight: 700; }
.ft-step-mark { position: relative; width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--line); box-sizing: border-box; }
.ft-step.active .ft-step-mark { border: 3px solid #e8dbff; border-top-color: var(--purple); animation: ftSpin 0.9s linear infinite; }
.ft-step.done .ft-step-mark { border: 0; background: var(--ink); animation: ftPop 0.3s ease-out both; }
.ft-step.done .ft-step-mark::after { content: ''; position: absolute; left: 8px; top: 4px; width: 6px; height: 11px; border: solid var(--lime); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.ft-checks { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ft-check { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 14px; background: var(--white); box-shadow: 0 2px 0 var(--line); font-size: 13px; line-height: 17px; font-weight: 700; }
.ft-check.pop { animation: ftPop 0.35s ease-out both; }
.ft-check-mark { position: relative; width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; background: var(--lime); }
@keyframes ftTick { 0% { transform: rotate(45deg) scale(0.3); opacity: 0; } 70% { transform: rotate(45deg) scale(1.15); opacity: 1; } 100% { transform: rotate(45deg); } }
@keyframes ftFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes ftRise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ftPop { 0% { transform: scale(0.4); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: none; } }
@keyframes ftGlow { 0%, 100% { box-shadow: 0 4px 0 var(--ink-deep), 0 0 0 0 rgba(194, 255, 96, 0); } 50% { box-shadow: 0 4px 0 var(--ink-deep), 0 0 0 8px rgba(194, 255, 96, 0.55); } }
@keyframes ftLean { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(3deg); } }
@keyframes ftSpin { to { transform: rotate(360deg); } }
@keyframes ftDot { 0%, 100% { transform: translateY(0); opacity: 0.4; } 50% { transform: translateY(-4px); opacity: 1; } }
@keyframes ftBurst { from { transform: translate(0, 0) scale(0.3); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(1); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .ap-in, .ap-hop, .ap-card.on .ap-check, .ft-dot, .ft-rise, .ft-center-fig, .ft-chip.pop, .btn.glow, .ft-coach.listening .k-coach-fig,
  .ft-orbit, .ft-orbit > span .k-icon-tile, .ft-typing i, .ft-confetti i, .ft-check.pop, .ft-step.done .ft-step-mark,
  .ft-benefit.on .ft-benefit-mark::after, .ft-check-mark::after { animation: none !important; }
  .ft-step.active .ft-step-mark { animation: none; border-top-color: #e8dbff; border-color: var(--purple); }
}
.ap-face.mic-face { width: 76px; height: 76px; }

/* The lilac corner circle is part of the phone layout only. */
@media (min-width: 480px) { .area-pick .ap-bg { display: none; } }

/* =====================================================================
 * Phase 3: Home, Library, theme page, coached tasks, results, breathing.
 * Design: practice/Home, ThemeFocus, TaskSession; exercises; new-training.
 * ===================================================================== */

/* ---------- Home ---------- */
.hm { position: relative; gap: 16px; padding-bottom: 24px; }
.hm-bg { position: absolute; right: -16px; top: -98px; width: 160px; height: 280px; border-radius: 140px 0 0 140px; background: #f1e6fd; z-index: -1; pointer-events: none; }
.hm-top { display: flex; align-items: center; gap: 12px; }
.hm-face { width: 46px; height: 46px; border-radius: 50%; background: #e8dbff; overflow: hidden; flex-shrink: 0; display: flex; align-items: flex-end; justify-content: center; }
.hm-top-text { flex: 1; min-width: 0; }
.hm-top-text h1 { margin: 0; font-size: 26px; line-height: 30px; font-weight: 900; letter-spacing: -0.6px; }
.hm-top-text p { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.hm-pill { display: inline-flex; align-items: center; gap: 4px; padding: 7px 11px; border-radius: 999px; background: var(--white); box-shadow: 0 2px 0 var(--line); font-size: 15px; font-weight: 800; white-space: nowrap; }
.hm-pill.dark { background: var(--ink); color: var(--lime); font-size: 13px; box-shadow: none; }
.hm-flame { display: inline-flex; animation: hmFlame 1.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes hmFlame { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.12) rotate(-4deg); } }

.hm-coach { position: relative; overflow: hidden; border-radius: 26px; background: var(--purple); padding: 16px 16px 16px 112px; min-height: 132px; box-shadow: 0 4px 0 var(--purple-deep); }
.hm-coach-blob { position: absolute; left: -40px; bottom: -60px; width: 170px; height: 150px; border-radius: 50%; background: var(--purple-deep); }
.hm-coach-fig { position: absolute; left: 6px; bottom: -4px; width: 104px; }
.hm-bubble { position: relative; margin: 0; background: var(--white); border-radius: 18px 18px 18px 6px; padding: 12px 13px; font-size: 14px; line-height: 19px; font-weight: 600; }
.hm-coach-actions { position: relative; margin-top: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hm-hear { border: 0; border-radius: 999px; background: var(--lime); color: var(--ink); padding: 8px 13px; font: 800 13px/1.2 var(--font-body); cursor: pointer; box-shadow: 0 2px 0 var(--lime-deep); }
.hm-link { border: 0; background: none; padding: 0; color: var(--white); font: 700 13px/1.2 var(--font-body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.hm-link:hover { color: var(--lime); }

.hm-today { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 22px; background: var(--white); box-shadow: 0 3px 0 var(--line); }
.hm-today-ring { flex-shrink: 0; display: flex; }
.hm-today-text { flex: 1; min-width: 0; }
.hm-today-title { margin: 0; font-size: 15px; font-weight: 800; }
.hm-today-sub { margin: 0; font-size: 13px; color: var(--muted); font-weight: 500; }
.hm-today-free { margin: 2px 0 0; font-size: 12px; color: var(--purple-deep); font-weight: 700; }
.hm-week { display: flex; gap: 4px; }
.hm-week i { width: 8px; height: 22px; border-radius: 4px; background: #e8dbff; }
.hm-week i.on { background: var(--purple); }

.hm-row-head { display: flex; align-items: center; gap: 8px; }
.hm-row-head h2, .lib-section h2 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -0.3px; }
.hm-from { margin-left: auto; padding: 5px 10px; border-radius: 999px; background: #e3f6f1; font-size: 12px; font-weight: 700; color: #0d3326; }
.hm-new { padding: 2px 8px; border-radius: 999px; background: var(--purple); color: var(--white); font: 600 10px/1.4 var(--font-mono); letter-spacing: 1px; text-transform: uppercase; }
.hm-see { margin-left: auto; border: 0; background: none; padding: 4px 0; font: 700 13px/1.2 var(--font-body); color: #2c6322; cursor: pointer; }
.hm-row-sub { margin: 2px 0 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.hm-row { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.hm-scroller { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
.hm-scroller::-webkit-scrollbar { display: none; }
.hm-card { flex-shrink: 0; display: flex; flex-direction: column; text-align: left; border: 0; padding: 0; border-radius: 22px; background: var(--white); overflow: hidden; box-shadow: 0 3px 0 var(--line); cursor: pointer; font: inherit; color: inherit; scroll-snap-align: start; transition: transform 0.08s ease; }
.hm-card:active { transform: translateY(3px); box-shadow: 0 0 0 var(--line); }
.hm-card-art { position: relative; height: 104px; display: flex; align-items: center; justify-content: center; }
.hm-card-text { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.hm-card-title { font-size: 15px; line-height: 19px; font-weight: 800; }
.hm-card-meta { font-size: 12px; font-weight: 600; color: var(--muted); }
.hm-lock { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); display: flex; align-items: center; justify-content: center; }

.hm-path { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.hm-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hm-step { display: flex; gap: 12px; align-items: stretch; position: relative; }
.hm-step::before { content: ''; position: absolute; left: 12px; top: 62px; bottom: -12px; border-left: 3px dotted var(--line); }
.hm-step:last-child::before { display: none; }
.hm-node { flex-shrink: 0; width: 26px; height: 26px; margin-top: 30px; border-radius: 50%; border: 3px solid var(--line); background: var(--white); color: var(--lime); font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.hm-step.done .hm-node { background: var(--ink); border-color: var(--ink); }
.hm-step.next .hm-node { background: var(--lime); border-color: var(--purple); animation: hmPulse 1.8s ease-in-out infinite; }
@keyframes hmPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(161, 43, 232, 0.45); } 50% { box-shadow: 0 0 0 8px rgba(161, 43, 232, 0); } }
.hm-step-card { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 12px; border: 0; border-radius: 22px; background: var(--white); box-shadow: 0 3px 0 var(--line); text-align: left; font: inherit; color: inherit; }
button.hm-step-card { cursor: pointer; }
button.hm-step-card:active { transform: translateY(3px); box-shadow: 0 0 0 var(--line); }
.hm-step.next .hm-step-card { box-shadow: 0 5px 0 #9fcb63; }
.hm-step.done .hm-step-card { opacity: 0.6; }
.hm-step-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.hm-next { margin-bottom: 4px; padding: 2px 8px; border-radius: 999px; background: var(--lime); font: 600 10px/1.4 var(--font-mono); letter-spacing: 1px; text-transform: uppercase; }
.hm-step-title { font-size: 16px; line-height: 20px; font-weight: 800; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hm-step-meta { margin-top: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.hm-start { margin-top: 10px; display: inline-block; border-radius: 999px; background: var(--ink); color: var(--white); padding: 9px 18px; font-size: 14px; font-weight: 700; box-shadow: 0 3px 0 #10200a; }
.hm-step-tile { position: relative; width: 84px; height: 84px; flex-shrink: 0; border-radius: 20px; display: flex; align-items: center; justify-content: center; }
.hm-step-tile .hm-lock { right: -6px; top: -6px; }
.hm-stage { display: flex; flex-direction: column; gap: 8px; }
.hm-stage-title { margin: 0; font-size: 19px; line-height: 24px; font-weight: 800; }
.k-card.dark { background: var(--ink); color: var(--white); box-shadow: 0 4px 0 var(--ink-deep); }
.k-card.dark .k-body { color: #dfe8d6; }
.k-eyebrow.lime { color: var(--lime); }
.hm-resume { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.hm-round { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Library ---------- */
.lib { gap: 12px; padding-bottom: 24px; }
.lib-section { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.lib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lib-card { width: auto; }
.lib-card .hm-card-art { height: 92px; }

/* ---------- Theme page ---------- */
.th-screen { gap: 12px; }
.th-hero { position: relative; overflow: hidden; border-radius: 26px; background: var(--purple); padding: 18px 120px 18px 18px; min-height: 132px; box-shadow: 0 4px 0 var(--purple-deep); color: var(--white); }
.th-blob { position: absolute; right: -40px; top: -40px; width: 190px; height: 190px; border-radius: 50%; background: var(--purple-deep); }
.th-tile { position: absolute; right: 18px; top: 22px; }
.th-tile .k-icon-tile { width: 92px; height: 92px; border-radius: 26px; box-shadow: 0 4px 0 rgba(26, 45, 9, 0.25); }
.th-eyebrow { position: relative; margin: 0; font: 600 11px/1.4 var(--font-mono); letter-spacing: 1.2px; text-transform: uppercase; color: var(--lime); }
.th-title { position: relative; margin: 0; font-size: 28px; line-height: 34px; font-weight: 900; letter-spacing: -0.6px; color: var(--white); }
.th-blurb { position: relative; margin: 4px 0 0; font-size: 14px; line-height: 19px; font-weight: 600; color: #f1e6fd; }
.th-pips { position: relative; margin-top: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.th-pips i { width: 22px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.3); }
.th-pips i.on { background: var(--lime); }
.th-pips span { margin-left: 4px; font-size: 12px; font-weight: 700; }
.th-reco { align-self: flex-start; }
.th-label { margin: 4px 0 0; font-size: 15px; font-weight: 800; color: var(--muted); }
.th-drill { position: relative; display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px; border: 0; border-radius: 22px; background: var(--white); box-shadow: 0 3px 0 var(--line); text-align: left; font: inherit; color: inherit; cursor: pointer; animation: thIn 0.42s ease both; }
.th-drill:active { transform: translateY(3px); box-shadow: 0 0 0 var(--line); }
.th-drill.next { box-shadow: 0 5px 0 #9fcb63; }
.th-drill.done { opacity: 0.72; }
.th-drill.off { opacity: 0.55; cursor: default; }
.th-drill .k-icon-tile { width: 60px; height: 60px; border-radius: 18px; flex-shrink: 0; }
.th-drill-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.th-drill-title { font-size: 17px; font-weight: 800; }
.th-drill-meta { margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; font-weight: 700; color: var(--muted); }
.th-kind { padding: 2px 8px; border-radius: 999px; background: var(--purple-soft); font-size: 11px; font-weight: 800; color: var(--purple-deep); }
.th-kind.lime { background: var(--lime-soft); color: #2c6322; }
.th-done { color: #2c6322; }
.th-drill-desc { margin-top: 5px; font-size: 13px; line-height: 17px; font-weight: 500; color: var(--muted); }
.tw-line { font-size: 15px; line-height: 20px; font-weight: 700; color: var(--ink); }
.th-start { margin-top: 9px; display: inline-block; padding: 8px 18px; border-radius: 999px; background: var(--ink); color: var(--white); font-size: 14px; font-weight: 700; box-shadow: 0 3px 0 var(--ink-deep); }
.th-lock { position: absolute; right: -6px; top: -6px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); display: flex; align-items: center; justify-content: center; }
@keyframes thIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Task screens ---------- */
.t-screen { padding-bottom: 12px; }
.t-coach { width: 100%; text-align: left; font: inherit; color: inherit; border: 0; cursor: pointer; }
.k-coach-card.listening .k-bubble { box-shadow: 0 0 0 3px var(--lime); }
.t-slot, .t-extra { display: flex; flex-direction: column; gap: 12px; }
.t-extra:empty { display: none; }
.t-track { height: 10px; border-radius: 5px; background: var(--track); overflow: hidden; }
.t-track i { display: block; height: 100%; width: 0; border-radius: 5px; background: var(--purple); transition: width 0.3s ease; }
.t-actions { display: flex; gap: 10px; }
.t-actions .k-btn { flex: 1; }
.t-recover { transition: background 0.4s ease; }
.t-recover .t-q { transition: filter 0.5s ease, opacity 0.5s ease; }
.t-recover.gone { background: #f6f1fb; }
.t-recover.gone .t-q { filter: blur(7px); opacity: 0.55; user-select: none; }
.t-recover.calm.gone .t-q { filter: none; opacity: 0; }
.t-bridges { display: flex; flex-direction: column; gap: 8px; }
.t-pick { margin: 0; font-size: 14px; font-weight: 800; }
.t-bridge { text-align: left; border: 2px solid var(--line); border-radius: 18px; padding: 12px 14px; background: var(--white); font: 700 15px/1.3 var(--font-body); color: var(--ink); cursor: pointer; animation: thIn 0.35s ease both; }
.t-bridge:nth-child(3) { animation-delay: 0.08s; }
.t-bridge:nth-child(4) { animation-delay: 0.16s; }
.t-bridge.on { border-color: var(--ink); background: var(--lime-soft); }
.t-finish { font-size: 19px; line-height: 30px; }
.t-finish .ending { text-decoration: underline; text-decoration-color: var(--purple); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.t-finish .bad, .t-finish .ending.bad { color: #d23b31; text-decoration-color: #d23b31; }
.t-score-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.t-score-row b { font-size: 24px; font-weight: 900; }
.t-score-row span { font-size: 13px; font-weight: 700; color: var(--muted); }
.t-finish-score { display: flex; flex-direction: column; gap: 10px; }
.t-room { display: flex; align-items: flex-end; justify-content: center; gap: 16px; padding: 16px; border-radius: 22px; background: #e3f6f1; }
.t-seat { width: 54px; height: 54px; border-radius: 50%; }
.t-seat.a { background: #8fd8c8; }
.t-seat.b { background: #ffe7a3; }
.t-seat.boss { width: 78px; height: 78px; background: #e8dbff; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; box-shadow: 0 0 0 4px var(--white); }
.t-feed { display: flex; flex-direction: column; gap: 8px; }
.t-line { max-width: 88%; padding: 10px 13px; border-radius: 18px; font-size: 15px; line-height: 20px; font-weight: 600; }
.t-line.tutor { align-self: flex-start; background: var(--white); border-radius: 18px 18px 18px 6px; box-shadow: 0 3px 0 var(--line); }
.t-line.user { align-self: flex-end; background: var(--ink); color: var(--white); border-radius: 18px 18px 6px 18px; font-size: 13px; }

/* ---------- Results ---------- */
.r-screen { padding-bottom: 12px; }
.r-score { display: flex; align-items: center; gap: 14px; }
.r-ring { position: relative; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.r-ring svg { position: absolute; inset: 0; }
.r-ring b { position: relative; font-size: 24px; font-weight: 900; }
.r-check { width: 84px; height: 84px; flex-shrink: 0; border-radius: 50%; background: var(--lime); border: 3px solid var(--ink); display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 900; }
.r-silence { width: 76px; height: 76px; flex-shrink: 0; border-radius: 50%; background: var(--lime); border: 3px solid var(--ink); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 900; }
.r-text { flex: 1; min-width: 0; }
.r-title { margin: 0; font-size: 19px; line-height: 24px; font-weight: 800; }
.r-quote { margin: 6px 0 0; font-size: 16px; line-height: 22px; font-weight: 700; }
.r-stats { display: flex; gap: 10px; }
.r-stat { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.r-stat b { font-size: 26px; font-weight: 900; }
.r-stat span { font-size: 12px; font-weight: 700; color: var(--muted); }
.r-note { margin: 0; padding: 14px; border-radius: 20px; font-size: 15px; line-height: 21px; font-weight: 600; }
.r-note p { margin: 0; }
.r-note.good { background: #eaf6dc; }
.r-note.try { background: #ffe9e5; }
.r-note-title { font-size: 13px !important; font-weight: 800; margin-bottom: 4px !important; }
.r-note.good .r-note-title { color: #2c6322; }
.r-note.try .r-note-title { color: var(--coral-deep); }
.r-note.locked { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.r-blur { filter: blur(4px); user-select: none; color: var(--muted); }
.r-told { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 6px 0; font-size: 15px; font-weight: 800; }
.r-told-value { color: var(--purple-deep); white-space: nowrap; }
.r-xprow { display: flex; align-items: center; gap: 10px; }
.r-xp { padding: 6px 12px; border-radius: 999px; background: var(--lime); font-size: 14px; font-weight: 900; box-shadow: 0 2px 0 var(--lime-deep); }
.r-level { flex: 1; height: 10px; border-radius: 5px; background: var(--track); overflow: hidden; }
.r-level i { display: block; height: 100%; width: 0; background: var(--purple); border-radius: 5px; }
.r-fly { animation: thIn 0.42s ease both; }

/* Voice test card */
.v-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 22px 18px; border-radius: 26px; background: var(--purple); color: var(--white); box-shadow: 0 4px 0 var(--purple-deep); }
.v-blob { position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: var(--purple-deep); }
.v-eyebrow { position: relative; margin: 0; font: 600 11px/1.4 var(--font-mono); letter-spacing: 1.2px; text-transform: uppercase; color: var(--lime); }
.v-tile { position: relative; width: 104px; height: 104px; border-radius: 28px; background: var(--white); display: flex; align-items: center; justify-content: center; margin: 6px 0; box-shadow: 0 4px 0 rgba(26, 45, 9, 0.25); }
.v-big { position: relative; margin: 0; font-size: 40px; line-height: 44px; font-weight: 900; color: var(--lime); }
.v-label { position: relative; margin: 0; font-size: 28px; line-height: 34px; font-weight: 900; }
.v-desc { position: relative; margin: 0; font-size: 15px; line-height: 21px; font-weight: 600; color: #f1e6fd; }
.v-chip { position: relative; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); font-size: 12px; font-weight: 800; }
.v-rings { position: relative; display: flex; gap: 14px; margin-top: 6px; }
.v-ring { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.v-ring .r-ring b { font-size: 17px; }
.v-wpm, .v-basis { position: relative; margin: 0; font-size: 13px; font-weight: 700; color: #f1e6fd; }

/* Nerves check */
.n-body { display: flex; flex-direction: column; gap: 12px; }
.n-rate { display: flex; flex-direction: column; gap: 12px; }
.n-faces { display: flex; justify-content: space-between; gap: 6px; }
.n-face { border: 0; background: none; padding: 4px; border-radius: 50%; cursor: pointer; transition: transform 0.1s ease; }
.n-face:hover { transform: scale(1.1); }
.n-ends { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--muted); }
.n-bar { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.n-bar-head { display: flex; justify-content: space-between; font-size: 14px; font-weight: 800; }
.n-track { height: 14px; border-radius: 7px; background: var(--track); overflow: hidden; }
.n-track i { display: block; height: 100%; border-radius: 7px; transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.n-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* ---------- Breathing ---------- */
.b-screen { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: calc(100dvh - 90px); margin: 0 -16px; padding: 14px 20px 22px; background: #3b0f63; color: var(--white); border-radius: 0 0 28px 28px; }
.b-blob { position: absolute; border-radius: 50%; pointer-events: none; }
.b-blob.a { left: -90px; top: -70px; width: 240px; height: 240px; background: #4f1784; }
.b-blob.b { right: -100px; bottom: 60px; width: 260px; height: 260px; background: #4a1580; }
.b-head { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; }
.b-head-text { flex: 1; min-width: 0; text-align: center; }
.b-title { margin: 0; font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-sub { margin: 2px 0 0; font: 600 12px/1.4 var(--font-mono); letter-spacing: 1px; color: var(--lime); }
.b-round { width: 44px; height: 44px; flex-shrink: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: var(--white); font-size: 24px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.b-stage { --dur: 4s; position: relative; width: min(330px, 82vw); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; margin-top: 6px; }
.b-dashed { position: absolute; inset: 0; border-radius: 50%; border: 3px dashed rgba(194, 255, 96, 0.45); animation: bSpin 40s linear infinite; }
.b-circle { position: absolute; border-radius: 50%; transition: transform var(--dur) ease-in-out, opacity 0.4s ease; transform: scale(0.62); }
.b-circle.outer { inset: 8%; background: rgba(72, 215, 189, 0.28); }
.b-circle.inner { inset: 20%; background: rgba(72, 215, 189, 0.55); }
.b-stage.full .b-circle { transform: scale(1); }
.b-coach { position: relative; width: 132px; height: 132px; border-radius: 50%; overflow: hidden; background: #e8dbff; display: flex; align-items: flex-end; justify-content: center; box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.2); transition: transform var(--dur) ease-in-out; }
.b-stage.full .b-coach { transform: translateY(-3px) scale(1.04); }
.b-stage.calm .b-circle { transition: opacity 0.4s ease; transform: none; opacity: 0.45; }
.b-stage.calm.full .b-circle { opacity: 1; }
.b-stage.calm .b-coach { transition: none; transform: none; }
.b-stage.calm .b-dashed { animation: none; }
.b-words { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 96px; text-align: center; }
.b-word { margin: 0; font-size: 18px; line-height: 24px; font-weight: 700; max-width: 320px; }
.b-word.big { font-size: 30px; line-height: 36px; font-weight: 900; }
.b-count { margin: 0; font-size: 44px; line-height: 48px; font-weight: 900; color: var(--lime); font-variant-numeric: tabular-nums; }
.b-pips { position: relative; display: flex; gap: 8px; width: 100%; }
.b-pip { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, 0.7); text-align: center; }
.b-pip i { width: 100%; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.22); }
.b-pip.on i { background: var(--lime); }
.b-pip.on { color: var(--white); }
.b-actions { position: relative; display: flex; gap: 10px; width: 100%; }
.b-actions .k-btn { flex: 1; }
.b-ghost { background: rgba(255, 255, 255, 0.14) !important; color: var(--white) !important; box-shadow: none !important; border: 0 !important; }
@keyframes bSpin { to { transform: rotate(360deg); } }
body:has(.b-screen) .topbar { background: #3b0f63; }

@media (prefers-reduced-motion: reduce) {
  .hm-flame, .hm-step.next .hm-node, .b-dashed { animation: none; }
  .th-drill, .t-bridge, .r-fly { animation: none; }
  .t-track i, .n-track i { transition: none; }
  .t-recover .t-q { transition: none; }
}

/* Four tabs (Home, Library, Progress, Settings): icon above the label, as in the Home design. */
.tabbar { grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 6px 8px; }
.tabbar .tab { flex-direction: column; gap: 2px; padding: 0.45rem 0.2rem; font-size: 11px; line-height: 1.2; white-space: nowrap; min-width: 0; }
.tabbar .tab > span:last-child { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tabbar .tab-icon { font-size: 18px; line-height: 1; }
.hm-row-head h2 { flex: 0 1 auto; min-width: 0; }
.hm-see { flex-shrink: 0; white-space: nowrap; }
.hm .locked::after, .lib .locked::after, .th-screen .locked::after { content: none; }

/* ================= Phase 4: Analysis and Progress ================= */
.an-view { display: flex; flex-direction: column; gap: 14px; }
.an-screen { position: relative; }
.an-grow { flex: 1; min-width: 0; display: block; }
.an-eyebrow, .an-kicker { margin: 0; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; font-weight: 600; letter-spacing: 1.2px; color: var(--muted); text-transform: uppercase; display: block; }
.an-kicker.lime { color: var(--lime); }
.an-h2 { margin: 6px 0 0; font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.an-body { margin: 0; font-size: 14px; line-height: 19px; font-weight: 500; color: var(--body); }
.an-meta { margin: 0; font-size: 12px; line-height: 17px; font-weight: 600; color: var(--muted); }
.an-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
button.an-card { width: 100%; text-align: left; border: 0; font: inherit; color: inherit; cursor: pointer; }
.an-card-title { margin: 0; font-size: 15px; font-weight: 800; color: var(--ink); }
.an-card-title.purple { color: var(--purple-deep); }
.an-lock-ic { display: inline-flex; vertical-align: -2px; }
.an-report-head h1 { margin: 4px 0 6px; font-size: 28px; line-height: 32px; font-weight: 900; letter-spacing: -0.6px; }

/* Hero */
.an-hero { position: relative; overflow: hidden; border-radius: 26px; background: var(--purple); padding: 18px; box-shadow: 0 4px 0 var(--purple-deep); color: var(--white); }
.an-hero-blob { position: absolute; right: -50px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: var(--purple-deep); }
.an-hero-top { position: relative; display: flex; align-items: center; gap: 16px; }
.an-ring { position: relative; flex-shrink: 0; display: inline-block; }
.an-ring svg { display: block; }
.an-ring-mid { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.an-hero-num { font-size: 38px; font-weight: 900; letter-spacing: -1px; color: var(--white); }
.an-hero-line { margin: 4px 0 0; font-size: 22px; line-height: 26px; font-weight: 800; }
.an-listen { margin-top: 10px; border: 0; border-radius: 999px; background: var(--lime); color: var(--ink); padding: 7px 12px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.an-hero-coach { position: relative; margin-top: 14px; display: flex; align-items: flex-end; gap: 10px; }
.an-face { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: #c77df2; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.an-bubble { flex: 1; margin: 0; background: var(--white); color: var(--ink); border-radius: 18px 18px 18px 6px; padding: 11px 13px; font-size: 14px; line-height: 19px; font-weight: 700; }

/* Skills */
.an-skill { display: flex; gap: 12px; align-items: center; padding: 12px; }
.an-skill.weak { box-shadow: 0 4px 0 #f3bdb5; }
.an-skill-tile { width: 54px; height: 54px; flex-shrink: 0; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.an-skill-head { display: flex; align-items: baseline; gap: 6px; }
.an-skill-name { font-size: 16px; font-weight: 800; }
.an-lv { padding: 1px 7px; border-radius: 999px; background: #eef2ea; font-size: 11px; font-weight: 700; color: var(--muted); }
.an-skill-val { margin-left: auto; font-size: 16px; font-weight: 900; }
.an-skill-val small { font-size: 11px; font-weight: 600; color: #8a9684; }
.an-bar { margin-top: 7px; height: 10px; border-radius: 5px; background: #eef2ea; overflow: hidden; }
.an-bar i { display: block; height: 10px; width: 0; border-radius: 5px; }
.an-skill-desc { margin: 6px 0 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.an-weak-tag { display: inline-block; margin-top: 7px; padding: 3px 9px; border-radius: 999px; background: var(--coral); color: var(--white); font-size: 11px; font-weight: 800; animation: anPop 0.4s ease-out both; }
@keyframes anPop { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* Numbers */
.an-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.an-metric { padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.an-metric b { font-size: 24px; font-weight: 900; line-height: 29px; }
.an-metric b.word { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.an-metric > span:last-child { font-size: 11px; font-weight: 700; color: var(--muted); }

.an-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.an-filler-chip { padding: 5px 10px; border-radius: 999px; background: #fff3d6; font-size: 13px; font-weight: 700; }
.an-soft { align-self: flex-start; border: 0; background: none; padding: 0; font: inherit; font-size: 13px; font-weight: 800; color: var(--purple-deep); cursor: pointer; }
.an-fix { padding-top: 8px; border-top: 1px solid #eef2ea; }
.an-fix-ctx { margin: 0; font-size: 13px; line-height: 18px; color: var(--body); }
.an-fix-ctx mark { background: #ffe9e5; color: #8e2f28; border-radius: 4px; padding: 0 2px; }
.an-fix-swap { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.an-fix-swap s { color: #8a9684; }
.an-fix-to { padding: 3px 10px; border-radius: 999px; background: var(--lime); }

/* What worked / To work on */
.an-row-card { display: flex; gap: 12px; padding: 14px; }
.an-row-card.good { background: #eef8de; box-shadow: 0 3px 0 #c5e09b; }
.an-row-card.good .an-body { color: #33421f; }
.an-row-card.bad { background: #ffe9e5; box-shadow: 0 3px 0 #f3bdb5; }
.an-row-card.bad .an-body { color: #5a2a24; }
.an-row-card.next { background: var(--purple-soft); box-shadow: 0 3px 0 #e2cff8; }
.an-row-card .an-body { margin-top: 3px; }
.an-check { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: var(--lime); border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 900; }
.an-row-ic { width: 34px; flex-shrink: 0; display: flex; justify-content: center; }
.an-theme-btn { margin-top: 9px; align-self: flex-start; border: 0; border-radius: 999px; background: var(--white); padding: 6px 12px; font: inherit; font-size: 12px; font-weight: 800; color: var(--ink); box-shadow: 0 2px 0 #f3bdb5; cursor: pointer; }
.an-locked-advice { border-radius: 20px; background: #ffe9e5; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.an-frost { display: flex; flex-direction: column; gap: 7px; padding: 2px 0; }
.an-frost i { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #dfe6da, #eef2ea); filter: blur(1.5px); }
.an-unlock { gap: 8px; }
.an-locked-advice .an-unlock { align-self: flex-start; }

/* Advice cards */
.an-adv { gap: 12px; }
.an-adv-head { display: flex; align-items: center; gap: 11px; }
.an-adv-tile { width: 42px; height: 42px; flex-shrink: 0; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.an-adv-title { margin: 0; font-size: 17px; font-weight: 800; }
.an-adv-sub { margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.an-premium-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: var(--purple-soft); color: var(--purple-deep); font-size: 11px; font-weight: 800; }
.an-lock-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; background: #f2f5f0; color: #8a9684; }
.an-lock-chip i { display: block; height: 8px; border-radius: 4px; background: #dfe6da; filter: blur(1px); }
.an-weak-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: #ffe9e5; font-size: 14px; font-weight: 800; color: #8e2f28; }
.an-weak-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.an-tips { display: flex; flex-direction: column; gap: 10px; }
.an-tip { display: flex; align-items: flex-start; gap: 11px; }
.an-tip-ic { width: 42px; height: 42px; flex-shrink: 0; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.an-tip-key { margin: 0 0 3px; font-size: 14px; font-weight: 800; }
.an-tip-val { margin: 0; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--body); }
.an-tip-lock { color: #8a9684; padding-top: 4px; }
.an-lock-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--purple-deep); }
.an-cta { margin-top: 2px; }

/* Next step */
.an-next { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 24px; background: var(--ink); padding: 16px; box-shadow: 0 4px 0 var(--ink-deep); text-align: left; font: inherit; color: var(--white); cursor: pointer; }
.an-next:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink-deep); }
.an-next-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; font-size: 17px; font-weight: 800; }
.an-next-meta { display: block; font-size: 12px; font-weight: 600; color: var(--line); }
.an-next-btn { flex-shrink: 0; padding: 11px 20px; border-radius: 999px; background: var(--lime); color: var(--ink); font-size: 15px; font-weight: 800; box-shadow: 0 3px 0 var(--lime-deep); }

/* Progress hub */
.pg-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 2px; }
.pg-seg { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--white); box-shadow: 0 3px 0 var(--line); }
.pg-seg button { flex: 1; border: 0; border-radius: 999px; background: transparent; padding: 10px 0; font: inherit; font-size: 14px; font-weight: 800; color: var(--muted); cursor: pointer; }
.pg-seg button.on { background: var(--ink); color: var(--lime); box-shadow: 0 3px 0 var(--ink-deep); }
.pg-ready-slot:empty { display: none; }
.pg-ready { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; padding: 14px; border-radius: 22px; background: #f1e2ff; box-shadow: 0 3px 0 #d9b8f5; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.pg-ready-tile { width: 56px; height: 56px; flex-shrink: 0; border-radius: 16px; background: var(--white); display: flex; align-items: center; justify-content: center; }
.pg-ready-title { display: block; font-size: 16px; font-weight: 800; }
.pg-ready-sub { display: block; margin-top: 2px; font-size: 13px; line-height: 17px; font-weight: 600; color: var(--muted); }
.pg-ready-cta { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--purple-deep); }
.pg-chev { font-size: 22px; font-weight: 700; color: var(--ink); }
.pg-headline { margin: 2px 0 0; font-size: 28px; line-height: 32px; font-weight: 900; letter-spacing: -0.6px; }
.pg-card-title { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.2px; }

/* Mastery */
.pg-level { position: relative; overflow: hidden; border-radius: 26px; background: var(--purple); padding: 18px; box-shadow: 0 4px 0 var(--purple-deep); color: var(--white); }
.pg-level-blob { position: absolute; left: -50px; bottom: -70px; width: 190px; height: 170px; border-radius: 50%; background: var(--purple-deep); }
.pg-level-top { position: relative; display: flex; align-items: center; gap: 14px; }
.pg-medal { width: 76px; height: 76px; flex-shrink: 0; border-radius: 22px; background: var(--white); display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 0 rgba(26, 45, 9, 0.25); }
.pg-level-title { margin: 0; font-size: 34px; line-height: 40px; font-weight: 900; letter-spacing: -0.8px; }
.pg-xp { position: relative; margin-top: 14px; height: 14px; border-radius: 7px; background: rgba(255, 255, 255, 0.25); overflow: hidden; }
.pg-xp i { display: block; height: 14px; width: 0; border-radius: 7px; background: var(--lime); }
.pg-xp-labels { position: relative; margin-top: 8px; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; }
.pg-xp-labels .soft { color: #e8dbff; text-align: right; }
.pg-rings { margin-top: 6px; display: flex; gap: 8px; }
.pg-ring-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.pg-ring-col > b { font-size: 20px; font-weight: 900; }
.pg-ring-col > span:last-child { font-size: 12px; line-height: 15px; font-weight: 700; color: var(--muted); }
.pg-rep { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.pg-tech-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pg-tech { position: relative; border: 0; border-radius: 22px; background: #f7f9f5; box-shadow: 0 3px 0 #e3e9df; padding: 14px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; font: inherit; color: var(--ink); animation: anIn 0.45s ease-out both; }
.pg-tech.on { background: var(--white); box-shadow: 0 3px 0 #9fcb63; cursor: pointer; }
.pg-tech:disabled { cursor: default; opacity: 1; }
.pg-badge { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.pg-tech:not(.on) .pg-badge { filter: grayscale(1); opacity: 0.5; }
.pg-tech-name { font-size: 14px; font-weight: 800; text-align: center; }
.pg-tech-chip { padding: 3px 9px; border-radius: 999px; background: #eef2ea; font-size: 11px; font-weight: 800; color: #8a9684; }
.pg-tech.on .pg-tech-chip { background: var(--lime); color: var(--ink); }
.pg-tech-lock { position: absolute; right: 10px; top: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--lime); display: flex; align-items: center; justify-content: center; }
.pg-tech-lock svg { width: 11px; height: 11px; }
.pg-tech-detail { align-items: flex-start; }
.pg-badge.on { width: 76px; height: 76px; }
.pg-evidence { width: 100%; box-sizing: border-box; border-radius: 16px; background: var(--lime-soft); padding: 10px 12px; }
@keyframes anIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Chart */
.pg-chart { position: relative; margin-top: 4px; }
.pg-chart svg { display: block; }
.pg-frost { position: absolute; inset: 0; background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); border-radius: 8px; }
.pg-dot { position: absolute; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--white); border: 3px solid; box-sizing: border-box; }
.pg-latest { position: absolute; right: 0; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--white); font-size: 11px; font-weight: 800; white-space: nowrap; }
.pg-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 4px; }
.pg-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.pg-legend-item i { width: 10px; height: 10px; border-radius: 50%; }
.pg-pair-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pg-bars { display: flex; align-items: flex-end; gap: 10px; height: 76px; margin-top: 6px; }
.pg-pair { display: flex; align-items: flex-end; gap: 3px; }
.pg-pair i { display: block; width: 10px; border-radius: 4px; }
.pg-take { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; padding: 12px 14px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.pg-take-date { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.pg-take-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; font-weight: 800; }
.pg-take-title.muted { color: #8a9684; }
.pg-take-score { font-size: 18px; font-weight: 900; }
.pg-take-lock { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: var(--purple-soft); color: var(--purple-deep); font-size: 11px; font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  .an-weak-tag, .pg-tech { animation: none; }
}
.pg-chart-body { display: flex; flex-direction: column; gap: 14px; }

/* ================= Phase 5: paywall and locks ================= */
.pw-overlay { position: fixed; inset: 0; z-index: 80; background: var(--page); overflow-y: auto; animation: pwIn 0.25s ease-out both; }
@keyframes pwIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.pw-sheet { box-sizing: border-box; width: min(var(--col), 100%); min-height: 100%; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 20px max(18px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.pw-sheet .grow { flex: 1; min-height: 4px; }
.pw-top { display: flex; align-items: center; }
.pw-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--white); box-shadow: 0 3px 0 var(--line); font: inherit; font-size: 20px; font-weight: 700; color: var(--ink); cursor: pointer; }
.pw-coach { position: relative; }
.pw-float { position: absolute; right: 16px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); animation: pwFloat 2s ease-in-out infinite alternate; }
@keyframes pwFloat { to { transform: translateY(-6px); } }
.pw-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--lime); border: 2px solid var(--ink); font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; font-weight: 600; letter-spacing: 1.2px; }
.pw-title { margin: 6px 0 0; font-size: 25px; line-height: 30px; font-weight: 900; letter-spacing: -0.5px; }
.pw-tag { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 999px; background: #ffe9e5; color: #b8423a; font-size: 12px; font-weight: 800; }
.pw-benefits { display: flex; flex-direction: column; gap: 7px; }
.pw-benefit { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 18px; font-weight: 700; animation: anIn 0.45s ease-out both; }
.pw-benefit-ic { width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.pw-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.pw-plans:empty { display: none; }
.pw-plan { position: relative; text-align: left; border: 2px solid transparent; border-radius: 20px; background: var(--white); padding: 14px 12px 12px; box-shadow: 0 3px 0 var(--line); font: inherit; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; }
.pw-plan.on { border-color: var(--ink); background: var(--purple-soft); box-shadow: 0 4px 0 var(--ink); }
.pw-best { position: absolute; left: 12px; top: -11px; padding: 2px 9px; border-radius: 999px; background: var(--purple); color: var(--white); font-size: 10px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; }
.pw-plan-name { font-size: 14px; font-weight: 800; }
.pw-plan-price { margin-top: 2px; font-size: 22px; font-weight: 900; letter-spacing: -0.4px; white-space: nowrap; }
.pw-plan-sub { font-size: 12px; font-weight: 600; color: var(--muted); }
.pw-check { position: absolute; right: -6px; top: -6px; width: 24px; height: 24px; border-radius: 50%; background: var(--lime); border: 2px solid var(--ink); box-sizing: border-box; display: none; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; }
.pw-plan.on .pw-check { display: flex; animation: anPop 0.4s ease-out both; }
.pw-cta { height: 56px; flex-shrink: 0; border: 0; border-radius: 999px; background: var(--ink); color: var(--white); font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 0 var(--ink-deep); }
.pw-cta:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink-deep); }
.pw-cta.glow { animation: pwGlow 1.8s ease-in-out infinite; }
@keyframes pwGlow { 0%, 100% { box-shadow: 0 4px 0 var(--ink-deep), 0 0 0 0 rgba(161, 43, 232, 0); } 50% { box-shadow: 0 4px 0 var(--ink-deep), 0 0 0 6px rgba(161, 43, 232, 0.22); } }
.pw-legal { margin: 0; font-size: 11px; line-height: 15px; font-weight: 500; color: var(--muted); text-align: center; }
.pw-legal:empty { display: none; }
.pw-legal a { color: var(--muted); text-decoration: underline; }
.pw-store { display: flex; flex-direction: column; gap: 8px; text-align: center; margin-top: 4px; }
.pw-store .an-body { font-size: 12px; line-height: 16px; color: var(--muted); }
.lk-coach { margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) {
  .pw-overlay, .pw-benefit, .pw-float, .pw-cta.glow, .pw-plan.on .pw-check { animation: none; }
}

/* ---------------- Settings & Profile (Phase 6) ---------------- */
.st { gap: 18px; }
.st-title { font-size: 30px; font-weight: 900; letter-spacing: -0.6px; margin: 4px 0 0; }
.st-profile { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px; border: 0; border-radius: 22px; background: var(--ink); color: var(--white); box-shadow: 0 4px 0 var(--ink-deep); font: inherit; text-align: left; cursor: pointer; }
div.st-profile { cursor: default; }
.st-blob { position: absolute; right: -40px; top: -50px; width: 150px; height: 150px; border-radius: 50%; background: var(--lime); opacity: 0.16; pointer-events: none; }
.st-avatar { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 24px; font-weight: 900; box-shadow: 0 3px 0 #8fbf3f; }
.st-profile .st-text { position: relative; }
.st-pc-title { font-size: 19px; font-weight: 900; }
.st-pc-rank { font-size: 14px; font-weight: 700; color: var(--lime); }
.st-pc-sub { font-size: 13px; color: rgba(255, 255, 255, 0.72); }
.st-edit { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--white); box-shadow: 0 3px 0 var(--line); }
.st-group { display: flex; flex-direction: column; gap: 8px; }
.st-label { margin: 0 4px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.st-card { display: flex; flex-direction: column; border-radius: 22px; background: var(--white); box-shadow: 0 4px 0 var(--line); overflow: hidden; }
.st-group.danger .st-card { box-shadow: 0 4px 0 #f3bdb5; }
.st-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; }
button.st-row { cursor: pointer; }
button.st-row:hover { background: #f7faf4; }
.st-row + .st-row, .st-card > * + .st-row { border-top: 1.5px solid #edf2e8; }
.st-tile { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.06); }
.st-ic-svg { display: grid; place-items: center; }
.st-coach-face { flex: none; width: 40px; height: 40px; border-radius: 13px; background: var(--purple-soft); overflow: hidden; display: grid; place-items: center; }
.st-coach-face svg { width: 40px; height: auto; }
.st-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-row-label { font-size: 16px; font-weight: 800; }
.st-row-label.danger { color: #b8423a; }
.st-row-sub { font-size: 13px; color: var(--muted); }
.st-value { flex: none; max-width: 44%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 12px; border-radius: 999px; background: #eef2ea; font-size: 13px; font-weight: 800; }
.st-value.purple { background: var(--purple-soft); color: var(--purple-deep); }
.st-chev { flex: none; font-size: 22px; font-weight: 900; color: var(--muted); }
.st-note { margin: 0; padding: 12px 16px; font-size: 13px; color: var(--muted); border-top: 1.5px solid #edf2e8; }
.st-pill-btn { flex: none; border: 0; border-radius: 999px; padding: 9px 14px; background: var(--purple); color: var(--white); font: inherit; font-size: 13px; font-weight: 900; box-shadow: 0 3px 0 var(--purple-deep); cursor: pointer; }
.st-pill-btn:active { transform: translateY(3px); box-shadow: none; }
.st-toggle { flex: none; position: relative; width: 56px; height: 34px; border: 0; border-radius: 999px; background: #dfe7d8; box-shadow: inset 0 -3px 0 #cfd8c9; cursor: pointer; transition: background 0.2s; }
.st-toggle i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--white); box-shadow: 0 2px 0 rgba(11, 22, 4, 0.25); transition: transform 0.2s; }
.st-toggle.on { background: var(--lime); box-shadow: inset 0 -3px 0 #8fbf3f; }
.st-toggle.on i { transform: translateX(22px); box-shadow: 0 2px 0 var(--ink-deep); }
.st-options { display: flex; flex-direction: column; gap: 10px; }
.st-option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 2px solid var(--line); border-radius: 18px; background: var(--white); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.st-option.on { border-color: var(--ink); background: #f4fde6; box-shadow: 0 3px 0 var(--ink); }
.st-check { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); font-size: 14px; font-weight: 900; }
.st-option.on .st-check { border-color: var(--ink); background: var(--ink); color: var(--lime); }
.st-flag { font-size: 24px; }
.st-coaches { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.st-coach { display: flex; flex-direction: column; gap: 8px; }
.st-coach-pick { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 12px; border: 2px solid var(--line); border-radius: 22px; background: var(--white); font: inherit; color: inherit; cursor: pointer; }
.st-coach.on .st-coach-pick { border-color: var(--purple); background: var(--purple-soft); box-shadow: 0 3px 0 var(--purple-deep); }
.st-coach-check { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--purple); color: var(--white); font-size: 13px; font-weight: 900; }
.st-coach-stage { display: grid; place-items: end center; height: 116px; }
.st-coach-name { font-size: 17px; font-weight: 900; }
.st-hear { border: 0; border-radius: 999px; padding: 9px 0; background: var(--ink); color: var(--lime); font: inherit; font-size: 13px; font-weight: 900; cursor: pointer; }
.st-email { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 18px; background: #eef2ea; font-weight: 800; overflow-wrap: anywhere; }
.st-copy { flex: none; border: 0; border-radius: 999px; padding: 8px 14px; background: var(--white); font: inherit; font-size: 13px; font-weight: 900; box-shadow: 0 3px 0 var(--line); cursor: pointer; }
.st-small { font-size: 13px; color: var(--muted); margin: 0; text-align: center; }
.st-mic-status { text-align: center; }
.st-mic-status.ok { color: #2f7a12; font-weight: 800; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.st-chip { border: 2px solid var(--line); border-radius: 999px; padding: 9px 14px; background: var(--white); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.st-chip.on { border-color: var(--ink); background: var(--lime); box-shadow: 0 3px 0 var(--ink); }
.st-textarea { width: 100%; min-height: 84px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 16px; font: inherit; resize: vertical; }
@media (prefers-reduced-motion: reduce) { .st-toggle, .st-toggle i { transition: none; } }

/* ---------------- Introvert / extrovert scene (mobile SocialStyleScene) ---------------- */
.ss-screen .grow { flex: 1; min-height: 16px; }
.ss-scene { display: flex; height: clamp(210px, calc(100vh - 470px), 292px); border-radius: 30px; overflow: hidden; margin-top: 4px; }
.ss-half { position: relative; flex: 1; height: 100%; overflow: hidden; transition: opacity 0.35s ease; }
.ss-in { background: #F3EAFE; }
.ss-ex { background: #1A2D09; }
.ss-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
div.ss-layer { pointer-events: none; }
.ss-fill { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Introvert side */
.ss-glow { position: absolute; left: 14px; top: 16px; width: 54px; height: 54px; border-radius: 50%; background: #FFE7A3; opacity: 0.35; transition: opacity 0.4s ease; }
.ss-lamp { position: absolute; left: 6px; top: 10px; }
.ss-plant { position: absolute; right: 8px; bottom: 54px; transform-origin: 50% 100%; animation: ss-sway 1.6s ease-in-out infinite alternate; }
.ss-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 46px; background: #E8DBFF; }
.ss-mug { position: absolute; left: 10px; bottom: 30px; width: 34px; height: 46px; }
.ss-mug svg { position: absolute; inset: 0; }
.ss-steam { opacity: 0; animation: ss-steam 2.4s ease-out infinite; }
.ss-steam.s2 { animation-delay: 0.8s; }
.ss-note { position: absolute; font-weight: 900; opacity: 0; pointer-events: none; }
.ss-note.n1 { left: 36px; top: 96px; font-size: 22px; color: #7B1FC2; }
.ss-note.n2 { left: 120px; top: 86px; font-size: 18px; color: #2C6322; }
.ss-note.n3 { left: 70px; top: 70px; font-size: 16px; color: #A12BE8; }
.ss-char { position: absolute; left: 50%; bottom: -4px; height: 176px; transform-origin: 50% 100%; transition: transform 0.35s ease; }
.ss-in-char { width: 160px; margin-left: -80px; }
.ss-ex-char { width: 168px; margin-left: -88px; }
.ss-bob { position: absolute; inset: 0; }
.ss-in-head { transform-origin: 50% 67%; transition: transform 0.4s ease; }
.ss-in-eyes { transform-origin: 50% 51%; animation: ss-blink 4.4s infinite; }
.ss-in-happy, .ss-in-grin, .ss-page { display: none; }
.ss-page { transform-origin: 50% 91%; }

/* Extrovert side */
.ss-spot { opacity: 0.1; transition: opacity 0.35s ease; }
.ss-twinkle { position: absolute; animation: ss-twinkle 0.7s ease-in-out infinite alternate; }
.ss-twinkle.t1 { left: 16px; top: 30px; }
.ss-twinkle.t2 { right: 20px; top: 56px; animation-delay: 0.5s; }
.ss-bubble { position: absolute; height: 30px; display: none; }
.ss-bubble .ss-pop { display: flex; align-items: center; justify-content: center; gap: 3px; width: 100%; height: 100%; border-radius: 12px; }
.b-heart { left: 12px; top: 74px; width: 38px; }
.b-heart .ss-pop { background: #FFFFFF; border-bottom-left-radius: 3px; }
.b-star { right: 10px; top: 96px; width: 38px; }
.b-star .ss-pop { background: #C2FF60; border-bottom-right-radius: 3px; }
.b-dots { left: 58px; top: 22px; width: 44px; }
.b-dots .ss-pop { background: #FFFFFF; border-bottom-left-radius: 3px; }
.b-dots i { width: 5px; height: 5px; border-radius: 50%; background: #A12BE8; }
.ss-ex-head { transform-origin: 47.6% 65.5%; transition: transform 0.4s ease; }
.ss-ex-eyes { transform-origin: 47.6% 49%; animation: ss-blink 5.1s 1.3s infinite; }
.ss-mouth { display: none; transform-origin: 46% 66%; }
.ss-mega { transform-origin: 63.5% 63.3%; transform: rotate(8deg); transition: transform 0.35s ease; }
.ss-wave { display: none; }
.ss-wave.wa { transform-origin: 89.7% 59.8%; }
.ss-wave.wb { transform-origin: 94.4% 59.8%; }

/* Picked states */
.ss-scene.is-extrovert .ss-in, .ss-scene.is-introvert .ss-ex { opacity: 0.45; }
.ss-scene.is-extrovert .ss-in-char, .ss-scene.is-introvert .ss-ex-char { transform: scale(0.94); }
.ss-scene.in-on .ss-in-char, .ss-scene.ex-on .ss-ex-char { transform: scale(1.06); }
.ss-scene.in-on .ss-in-char .ss-bob, .ss-scene.ex-on .ss-ex-char .ss-bob { animation: ss-bob 0.8s ease-in-out infinite alternate; }
.ss-scene.in-on .ss-glow { opacity: 0.95; }
.ss-scene.in-on .ss-in-head { transform: rotate(-3deg); }
.ss-scene.is-both .ss-in-head { transform: rotate(7deg); }
.ss-scene.in-on .ss-note { animation: ss-note 2.2s ease-out infinite; }
.ss-scene.in-on .ss-note.n2 { animation-delay: 0.7s; }
.ss-scene.in-on .ss-note.n3 { animation-delay: 1.4s; }
.ss-scene.in-on .ss-in-smile { display: none; }
.ss-scene.in-on .ss-in-grin { display: inline; }
.ss-scene.in-on .ss-page { display: block; animation: ss-flip 1.8s linear infinite; }
.ss-scene.is-introvert .ss-in-eyes { display: none; }
.ss-scene.is-introvert .ss-in-happy { display: block; }
.ss-scene.ex-on .ss-spot { opacity: 0.32; }
.ss-scene.ex-on .ss-ex-head { transform: rotate(4deg); }
.ss-scene.is-both .ss-ex-head { transform: rotate(-7deg); }
.ss-scene.ex-on .ss-ex-smile { display: none; }
.ss-scene.ex-on .ss-mouth { display: block; animation: ss-talk 0.3s linear infinite; }
.ss-scene.ex-on .ss-mega { transform: translate(2.7px, -5.3px) rotate(-14deg); }
.ss-scene.ex-on .ss-wave { display: block; animation: ss-wave 0.35s ease-in-out infinite alternate; }
.ss-scene.ex-on .ss-wave.wb { animation-delay: 0.15s; }
.ss-scene.ex-on .ss-bubble { display: block; animation: ss-float 1.7s ease-in-out infinite alternate; }
.ss-scene.ex-on .ss-bubble .ss-pop { animation: ss-pop 0.45s ease-out both; }
.ss-scene.ex-on .b-star { animation-delay: 0.6s; }
.ss-scene.ex-on .b-star .ss-pop { animation-delay: 0.2s; }
.ss-scene.ex-on .b-dots { animation-delay: 1.1s; }
.ss-scene.ex-on .b-dots .ss-pop { animation-delay: 0.35s; }

@keyframes ss-sway { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }
@keyframes ss-bob { from { transform: translateY(0); } to { transform: translateY(-5px); } }
@keyframes ss-blink { 0%, 92% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } 100% { transform: scaleY(1); } }
@keyframes ss-twinkle { from { opacity: 0.6; transform: scale(0.7) rotate(0deg); } to { opacity: 1; transform: scale(1.15) rotate(20deg); } }
@keyframes ss-steam { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 0.9; } 100% { opacity: 0; transform: translateY(-16px); } }
@keyframes ss-note { 0% { opacity: 0; transform: translate(0, 0) rotate(-10deg); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(14px, -58px) rotate(14deg); } }
@keyframes ss-flip { 0%, 35% { transform: scaleX(1); } 55%, 100% { transform: scaleX(-1); } }
@keyframes ss-talk { 0% { transform: scaleY(0.4); } 35% { transform: scaleY(1); } 70% { transform: scaleY(0.6); } 100% { transform: scaleY(0.4); } }
@keyframes ss-wave { from { opacity: 0.2; transform: scale(0.8); } to { opacity: 1; transform: scale(1.08); } }
@keyframes ss-float { from { transform: translateY(0); } to { transform: translateY(-6px); } }
@keyframes ss-pop { 0% { opacity: 0; transform: scale(0) translateY(10px); } 60% { opacity: 1; transform: scale(1.15) translateY(0); } 100% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .ss-scene *, .ss-scene { animation: none !important; transition: none !important; }
  .ss-note, .ss-steam { opacity: 0 !important; }
}

/* Option rows */
.ss-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.ss-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 2px solid transparent; border-radius: 18px; background: #FFFFFF; font: inherit; color: var(--ink); text-align: left; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.ss-row.on { border-color: var(--ink); background: #F3EAFE; }
.ss-tile { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; }
.ss-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ss-label { font-size: 16px; font-weight: 800; line-height: 20px; }
.ss-hint { font-size: 13px; font-weight: 600; line-height: 17px; color: var(--muted); }
.ss-box { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line); background: #FFFFFF; color: transparent; font-size: 13px; font-weight: 900; }
.ss-row.on .ss-box { border-color: var(--ink); background: var(--ink); color: var(--lime); }
.ss-screen .btn:disabled { background: var(--line); color: var(--muted); box-shadow: none; }
