@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400&display=swap');

/* Resource search stays quiet beside the primary lesson actions. */
#bili-player { width:100%; height:220px; border:0; display:block; background:#191a16; }
#bili-player[hidden], #yt-host[hidden] { display:none; }
.lesson-video-search { margin:0 0 18px; padding:14px; border:1px solid var(--border); border-radius:14px; }
.lesson-video-search label { display:block; font-size:12px; font-weight:600; margin-bottom:10px; }
.video-search-row { display:flex; gap:8px; }
.video-search-row input { min-width:0; flex:1; width:100%; padding:10px; font:inherit; font-size:12px; color:var(--text); background:rgba(255,255,250,.26); border:1px solid var(--border); border-radius:10px; }
.video-search-row button { padding:0 14px; color:var(--text); font:inherit; font-size:12px; font-weight:600; background:var(--bg); border:1px solid var(--border); border-radius:10px; cursor:pointer; }
.video-search-row button:disabled { opacity:.55; cursor:wait; }
#lesson-video-search-status { margin:9px 0 0; font-size:11px; line-height:1.65; color:var(--sub); }
.video-search-result { display:block; width:100%; text-align:left; background:transparent; color:var(--text); border:0; border-top:1px solid var(--border); border-radius:0; padding:12px 0; font:inherit; cursor:pointer; }
.video-search-result span { display:block; font-size:12px; line-height:1.65; }
.video-search-result small { display:block; margin-top:5px; font-size:10px; color:var(--sub); }
.video-search-result em { display:block; margin-top:6px; font-size:11px; color:var(--accent); font-style:normal; }
.plat-bili { background:rgba(235,133,158,.92); color:#3c2830; }
.vid-card:focus-visible,.video-search-result:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
/* SkillPath × Figma RT / Soft ABS. Keep the established mobile layout. */
:root {
  color-scheme: light;
  --bg: #d8d5c5;
  --card: #dedbce;
  --card2: #cfccbc;
  --border: #c4c2b3;
  --accent: #ac4e28;
  --a-light: #e0d1bd;
  --green: #65745a;
  --pink: #8a7464;
  --amber: #94713d;
  --text: #55584e;
  --sub: #737568;
  --font: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --r: 14px;
}
html, body { background: #b9b7a8; }
body { padding: 20px; }
button, input, textarea, select { font: inherit; }
button:focus-visible, [tabindex]:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button:disabled { cursor: not-allowed !important; }
::selection { background: #bcb9a6; color: #55584e; }
.phone {
  /* Keep the phone's proportions when the preview window is short. */
  width: min(370px, calc((100dvh - 40px) / 2.2), calc(100vw - 40px));
  height: auto; aspect-ratio: 5 / 11;
  flex-shrink: 0; background: var(--bg); border: none; border-radius: 36px;
  box-shadow: 0 0 0 5px #c3c0b0, 0 0 0 6px #e9e6d8, 0 24px 60px #595c4f33;
}
.status-bar { height: 50px; padding: 0 26px 10px; align-items: flex-end; background: var(--bg); border: 0; color: var(--text); }
#status-time { font-variant-numeric: tabular-nums; font-size: 12px; }
.notch { display: block; width: 104px; height: 25px; background: #b9b7a8; border-radius: 0 0 16px 16px; }
.status-icons { gap: 5px; align-items: center; }
.liquid-layer { display: none; }
.screen { background: var(--bg); }
/* The canvas is not a scroll container. Only the active screen/sheet scrolls.
   Unlike hidden, clip prevents focus/scrollIntoView from shifting this ancestor. */
.app-body { min-height: 0; overflow: clip; }
.ob-hero-full { display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.ob-hero-top { height: 164px; flex-shrink: 0; padding: 12px 20px 24px; align-items: center; justify-content: center; background: var(--bg); border: 0; }
.ob-hero-top::before { display: none; }
.app-logo { width: 40px; height: 40px; display: grid; place-items: center; color: #fffffa; background: #55584e; border-radius: 12px; margin-bottom: 12px; }
.app-logo svg { width: 25px; height: 25px; }
.ob-wordmark { font-size: 29px; font-weight: 700; letter-spacing: -1.2px; line-height: 1.2; }
.ob-tagline { margin-top: 7px; font-size: 11px; color: var(--sub); }
.ob-sheet { flex: 1; min-height: 0; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 22px 18px 24px; background: var(--card); border-top: 1px solid var(--border); }
.ob-sheet-handle { display: none; }
.picker-step { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; color: var(--sub); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.step-track { display: flex; gap: 4px; }
.step-track i { width: 20px; height: 3px; border-radius: 3px; background: var(--border); }
.step-track i:first-child { background: var(--accent); }
.picker-title { font-family: var(--font); font-size: 22px; font-weight: 600; letter-spacing: -.7px; line-height: 1.3; margin-bottom: 9px; }
.picker-desc { color: var(--sub); font-size: 12px; line-height: 1.7; margin-bottom: 24px; }
.ob-section-lbl, .field-lbl { font-size: 10px; letter-spacing: .08em; font-weight: 600; color: var(--sub); }
.skill-grid { gap: 9px; margin-bottom: 18px; }
.skill-tile {
  font-family: var(--font); color: var(--text); padding: 13px 4px 12px; min-height: 76px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg);
  gap: 10px; transition: background .18s, border-color .18s, transform .18s;
}
.skill-tile::before { display: none; }
.skill-tile:hover { border-color: #b9b4a1; background: #dedbce; }
.skill-tile.selected { background: var(--a-light); border-color: var(--accent); box-shadow: inset 0 0 0 .5px var(--accent); }
.skill-tile.selected::after { content: '✓'; position: absolute; top: 5px; right: 7px; color: var(--accent); font-size: 11px; }
.st-emoji { color: #626458; font-size: 23px; display: flex; }
.st-emoji svg { width: 24px; height: 24px; }
.st-name { color: #626458; font-size: 11px; font-weight: 500; }
.skill-tile.selected .st-name { color: var(--accent); }
.skill-tile.other-tile { border-style: dashed; }
.qm-bar { background: #d8d5c5; border: 1px solid #c4c2b3; border-radius: 10px; padding: 13px; margin-bottom: 18px; gap: 11px; }
.qm-bar { text-align: left; color: var(--text); }
.qm-bar-icon { color: #737568; background: transparent; width: 23px; height: 28px; }
.qm-bar-icon svg { width: 22px; height: 22px; }
.qm-bar-title { font-size: 12px; font-weight: 500; }
.qm-bar-sub { font-size: 10px; margin-top: 4px; }
.qm-bar-mic { color: #737568; font-size: 19px; opacity: 1; }
.btn-cta, .sp-save-btn, .done-btn { background: var(--accent); border-radius: 10px; font-size: 13px; font-weight: 500; padding: 15px 18px; color: #fffffa; letter-spacing: 0; box-shadow: none; animation: none; }
.btn-cta::after { display: none; }
.btn-cta:hover:not(:disabled), .sp-save-btn:hover, .done-btn:hover:not(.completed) { background: #94462c; }
#ob0-continue { display: flex; justify-content: space-between; align-items: center; }
.picker-note { font-size: 10px; color: var(--sub); text-align: center; margin-top: 13px; line-height: 1.6; }
.btn-back { border-radius: 10px; padding: 15px 18px; font-size: 13px; }
.discovery-sheet { background: var(--bg); border-radius: 0; padding: 28px max(24px, calc((100% - 600px)/2)) 40px; }
.ob-hero-full:has(.ds-open) { overflow: hidden; }
.ds-handle, .sp-handle, .fs-handle, .qm-sheet-handle { background: var(--border); }
.ds-question { font-family: var(--font); font-size: 23px; font-weight: 600; letter-spacing: -.6px; }
.ds-sub { line-height: 1.8; margin-bottom: 24px; }
.ds-skill-badge { background: var(--a-light); border-color: var(--border); border-radius: 8px; }
.ds-badge-name { font-size: 13px; font-weight: 500; }
.direction-item { background: var(--card); border: 1px solid var(--border); border-radius: 10px; text-align: left; width: 100%; color: var(--text); font: inherit; }
.direction-item:hover { background: var(--card2); }
.direction-item.selected { border-color: var(--accent); background: var(--a-light); }
.di-icon { color: var(--accent); }
.di-title { font-size: 13px; font-weight: 500; }
.field-input, .qm-textarea { background: #fffffa; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; line-height: 1.5; }
.field-input:focus, .qm-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #ac4e2810; }
select.field-input option { background: var(--card); color: var(--text); }
.chip { background: transparent; border: 1px solid var(--border); border-radius: 7px; padding: 9px 13px; font-size: 12px; }
.chip.on { background: var(--a-light); border-color: var(--accent); color: var(--accent); }
.home-header, .cal-header, .plan-header { background: var(--bg); padding: 20px 22px 12px; }
.home-greeting, .cal-title-h, .plan-header-title, .l-title { font-family: var(--font); font-size: 24px; font-weight: 600; letter-spacing: -.7px; }
.home-date, .plan-header-sub { margin-top: 6px; }
.home-header-inner { align-items: center; margin-bottom: 24px; }
.avatar { background: #cfccbc; color: var(--accent); font-size: 14px; font-weight: 600; box-shadow: none; }
.progress-strip { border: 1px solid var(--border); border-radius: 12px; padding: 20px; background: #d1cebd; }
.prog-text { flex: 1; min-width: 0; }
.prog-title { font-weight: 500; font-size: 15px; }
.prog-bar-thin-fill, .load-bar, .stb-fill, .vc-bar-fill { background: var(--accent); }
.section-head, .week-label, .l-section-lbl { color: var(--sub); font-weight: 500; letter-spacing: .1em; }
.section-head { padding: 0 22px; margin-top: 20px; }
.today-card { margin: 0 22px 12px; background: #dedbce; border: 1px solid #c4c2b3; border-radius: 12px; padding: 26px; }
.today-card::before { display: none; }
.tc-badge { border-radius: 5px; background: #d1c9b4; font-weight: 500; font-size: 9px; }
.tc-title { font-family: var(--font); font-size: 19px; font-weight: 600; max-width: calc(100% - 24px); }
.tc-meta { margin-top: 12px; line-height: 1.8; }
.tc-arrow { opacity: 1; }
.upcoming-item { border-bottom: 1px solid var(--border); border-radius: 0; margin: 0 22px; padding: 16px 0; }
.upcoming-item:last-child { border-bottom: none; }
.upcoming-item:hover { background: var(--card2); }
.up-date-box, .pr-date { background: var(--card2); border-radius: 7px; padding: 10px 7px; }
.up-num, .pr-num { font-family: var(--font); font-weight: 400; margin-top: 4px; }
.up-title, .pr-title { font-weight: 500; }
.cal-nav-btn { border-radius: 8px; width: 40px; height: 40px; background: var(--card); }
.cal-grid { padding: 0 14px; gap: 3px; }
.cal-cell { aspect-ratio: auto; min-height: 48px; justify-content: center; }
.cal-cell:hover { background: var(--card2); }
.cal-cell.is-today .cal-cell-num { background: var(--accent); box-shadow: none; }
.cal-cell.drag-over { background: var(--a-light) !important; outline-color: var(--accent); }
.day-lessons-panel { margin: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.dlp-header, .dlp-item { border-bottom-color: var(--border); }
.plan-row { background: var(--card); border: 1px solid var(--border); border-radius: 10px; margin: 0 22px 8px; padding: 16px; }
.week-label { padding: 18px 22px 10px; }
.pr-check { border-width: 1px; border-radius: 50%; }
.pr-check.ck { color: #fffffa; }
.lesson-header { background: var(--bg); padding: 20px 22px; border-bottom: 1px solid var(--border); }
.lesson-body { padding: 0 22px 24px; }
.lesson-footer { background: var(--bg); border-top-color: var(--border); padding: 12px 16px; }
.vid-card { background: var(--card); border-radius: 10px; }
.vid-card.playing { border-color: var(--accent); }
.yt-player-wrap { border-radius: 10px; }
.yt-player-info { background: var(--card); }
.tip-box { background: #d3d0c0; border-color: var(--border); border-radius: 10px; }
.bottom-nav { height: calc(70px + var(--safe-b)); padding: 10px 8px var(--safe-b); background: var(--bg); border-top: 1px solid var(--border); gap: 2px; backdrop-filter: none; }
.nav-tab { background: none; border: none; color: var(--sub); opacity: 1; padding: 8px 4px; border-radius: 8px; gap: 6px; font-family: var(--font); }
.nav-tab.active { background: var(--a-light); color: var(--accent); }
.nav-tab:hover { background: var(--card2); }
.nav-icon { display: flex; }
.nav-icon svg { width: 20px; height: 20px; }
.nav-tab .nav-label { font-size: 10px; font-weight: 500; letter-spacing: 0; }
.nav-dot, .nav-liquid { display: none; }
.settings-gear-btn { background: transparent; border: 1px solid var(--border); color: var(--text); border-radius: 8px; }
.settings-gear-btn svg { width: 18px; height: 18px; }
.focus-badge { background: var(--a-light); border-color: #c4c2b3; color: var(--accent); font-weight: 500; font-size: 10px; }
.focus-badge.off { background: var(--card2); border-color: var(--border); }
.settings-panel, .focus-settings, .qm-sheet { background: var(--bg); border: 1px solid var(--border); border-bottom: none; border-radius: 18px 18px 0 0; padding: 24px max(24px, calc((100% - 560px)/2)) 36px; max-height: 90%; overflow-y: auto; }
/* Closed sheets must not receive focus or scroll the phone canvas into view. */
.settings-panel, .focus-settings, .qm-sheet, .discovery-sheet, .focus-bubble { visibility: hidden; pointer-events: none; }
.settings-panel.open, .focus-settings.open, .qm-sheet.open, .discovery-sheet.ds-open, .focus-bubble.visible { visibility: visible; pointer-events: auto; }
.focus-settings, .qm-sheet { padding-bottom: calc(36px + var(--safe-b)); }
.sp-title, .fs-title, .qm-title { font-family: var(--font); font-size: 22px; font-weight: 600; }
.sp-sub, .fs-sub, .qm-sub { line-height: 1.8; }
.settings-overlay-bg, .focus-overlay-bg { background: #55584e55; backdrop-filter: none; }
.qm-overlay { background: #55584e55; }
.qm-mic-btn { background: var(--accent); }
.focus-bubble, .vid-countdown { background: var(--card); border-color: var(--border); border-radius: 12px; box-shadow: 0 12px 36px #171c281a; }
.vid-countdown { position: absolute; bottom: 80px; right: 16px; }
.vc-header { background: var(--card2); }
.vc-label { color: var(--accent); }
.vc-ring-bg { stroke: var(--border); }
.vc-bar-wrap { background: var(--border); }
.vc-btn-add, .vc-ctrl-btn, .fb-btn-ghost { background: var(--card2); border-color: var(--border); color: var(--sub); }
.vc-btn-done { color: #fffffa; font-weight: 500; }
.distraction-overlay { background: var(--bg); }
.do-title { font-family: var(--font); font-weight: 400; font-size: 30px; }
.toast { max-width: calc(100% - 32px); white-space: normal; text-align: center; background: var(--card); color: var(--accent); border-color: var(--border); box-shadow: 0 4px 24px #171c2814; }
.debug-panel { background: var(--card2); }
.debug-error { color: #ac4e28; }
.debug-panel-lbl { color: #ac4e28; }
.load-orb { width: 56px; height: 56px; background: transparent; border: 2px solid var(--border); border-top-color: var(--accent); animation: spin-orb 1s linear infinite; }
.load-orb::before, .load-orb::after { display: none; }
.load-title { font-family: var(--font); font-size: 24px; font-weight: 600; }

/* These rules depend on the phone canvas, not the desktop viewport width. */
.picker-step { font-size: 9px; margin-bottom: 14px; }
.picker-desc { font-size: 11px; margin-bottom: 22px; }
.skill-tile { background: var(--card); }
.st-emoji { color: #626458; }
.st-name { color: #626458; }
.qm-bar { margin-bottom: 16px; }
.home-header-inner { gap: 10px; align-items: center; }
.home-header-inner .avatar { display: none; }
.progress-strip { padding: 16px; }
.today-card { padding: 20px; }
.focus-badge { padding: 6px 8px; }
.plan-row { margin-left: 16px; margin-right: 16px; }
.pr-title { font-size: 12px; }
.cal-day-labels { font-size: 10px; }
.lesson-body { padding-left: 16px; padding-right: 16px; }
.settings-gear-btn { width: 34px; height: 34px; }
.distraction-overlay .do-title { font-family: var(--font); font-weight: 600; }
@media (max-width: 420px) {
  html, body { background: var(--bg); }
  body { padding: 0; }
  .phone { width: 100%; height: 100dvh; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
  .status-bar { padding-top: env(safe-area-inset-top, 0px); height: calc(44px + env(safe-area-inset-top, 0px)); }
  .notch { display: none; }
}
@media (max-height: 720px) {
  .ob-hero-top { height: 138px; padding-bottom: 18px; }
  .app-logo { width: 34px; height: 34px; margin-bottom: 9px; }
  .ob-wordmark { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* A real phone uses the viewport instead of the desktop phone mockup. */
@media (max-width: 600px), (display-mode: standalone) {
  html, body { background: var(--bg); }
  body { padding: 0; }
  .phone { width: 100%; height: 100vh; height: 100dvh; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
  .status-bar { height: env(safe-area-inset-top, 0px); padding: 0; }
  .status-bar > * { display: none; }
  input, textarea, select { font-size: 16px !important; }
}
#yt-player-container { min-height: 220px; }
#yt-external { display: inline-block; margin-top: 10px; color: var(--accent); font-size: 12px; }
#yt-external[hidden] { display: none; }
.web-plan-notice { margin: 12px 18px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 12px; color: var(--sub); line-height: 1.8; }
.web-verification { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 16px; background: #55584e88; }
.web-verification[hidden] { display: none; }
.web-verification-card { width: min(100%, 360px); padding: 24px; border-radius: 18px; background: var(--card); color: var(--text); }
.web-verification-card h2 { margin: 0 0 12px; font-size: 20px; }
.web-verification-card p { margin-bottom: 16px; font-size: 14px; }
.web-verification-card button { margin-top: 16px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--card2); color: var(--text); }

/* Material tokens from Figma 229:135, RT / Button (Secondary). */
:root {
  --rt-surface: #d8d5c5;
  --rt-raised: -2px -2px 5px #fffffa94, 2px 3px 6px #595c4f38,
    inset .7px .8px 1.8px #fffffa73, inset -.5px -.7px 1.8px #595c4f17;
  --rt-inset: inset 2.5px 3px 6px #595c4f47, inset -2.5px -2.5px 6px #fffffab2;
  --rt-edge: inset .7px .8px 1.8px #fffffa73, inset -.5px -.7px 1.8px #595c4f17;
}
button { touch-action: manipulation; }
.ob-hero-top { background: var(--rt-surface); }
.app-logo { background: var(--rt-surface); color: var(--accent); box-shadow: var(--rt-raised); border-radius: 16px; }
.ob-wordmark { font-weight: 500; letter-spacing: -1.3px; }
.ob-sheet { background: var(--rt-surface); border: none; border-radius: 0; }
.skill-grid { gap: 12px; padding: 3px; }
.skill-tile { background: var(--rt-surface); border: 1px solid transparent; border-radius: 16px; box-shadow: var(--rt-raised); }
.skill-tile:hover { background: var(--rt-surface); border-color: #fffffa55; transform: translateY(-1px); }
.skill-tile.selected { background: var(--rt-surface); border-color: #ac4e2855; box-shadow: var(--rt-inset); transform: none; }
.skill-tile.other-tile { border-style: solid; }
.skill-tile.selected .st-emoji, .skill-tile.selected .st-name { color: var(--accent); }
.qm-bar { background: var(--rt-surface); border: none; border-radius: 16px; box-shadow: var(--rt-raised); margin: 2px 3px 18px; }
.btn-cta, .sp-save-btn, .done-btn, .do-btn, .vc-btn-done, .fb-btn-primary {
  border: 1px solid #fffffa22; border-radius: 16px; min-height: 44px;
  background: var(--accent); color: #fffffa; font-weight: 500;
  box-shadow: -2px -2px 5px #fffffa70, 2px 3px 6px #595c4f38, inset .7px .8px 1.8px #fffffa55, inset -.5px -.7px 1.8px #595c4f25;
  transition: box-shadow .14s, transform .14s, background .14s;
}
.btn-cta:hover:not(:disabled), .sp-save-btn:hover, .done-btn:hover:not(.completed) { background: #ac4e28; transform: translateY(-1px); }
.btn-cta:active:not(:disabled), .sp-save-btn:active, .done-btn:active, .do-btn:active, .vc-btn-done:active, .fb-btn-primary:active { box-shadow: inset 2px 3px 5px #59332244, inset -1px -1px 3px #fffffa44; transform: translateY(1px); }
button:disabled { transform: none; box-shadow: var(--rt-edge); }
.rt-arrow { display: block; flex: 0 0 20px; }
#ob0-continue { flex-direction: row; justify-content: center; gap: 8px; background: var(--rt-surface); color: var(--text); box-shadow: var(--rt-raised); }
#ob0-continue:active:not(:disabled) { box-shadow: var(--rt-inset); }
.direction-item { background: var(--rt-surface); border: 1px solid transparent; border-radius: 16px; box-shadow: var(--rt-raised); margin-bottom: 3px; }
.direction-item:hover { background: var(--rt-surface); }
.direction-item.selected { background: var(--rt-surface); border-color: #ac4e2855; box-shadow: var(--rt-inset); }
.di-check { border-color: #aaa994; }
.field-input, .qm-textarea { background: var(--rt-surface); border: 1px solid transparent; border-radius: 16px; box-shadow: var(--rt-inset); color: var(--text); }
.field-input:focus, .qm-textarea:focus { border-color: var(--accent); box-shadow: var(--rt-inset); }
.field-input::placeholder, .qm-textarea::placeholder { color: #808173; }
.chip { background: var(--rt-surface); border: 1px solid transparent; border-radius: 12px; box-shadow: var(--rt-raised); }
.chip.on { background: var(--rt-surface); border-color: #ac4e2855; box-shadow: var(--rt-inset); font-weight: 600; }
.chip:active, .direction-item:active, .qm-bar:active, .skill-tile:active { box-shadow: var(--rt-inset); transform: translateY(1px); }
.progress-strip { background: none; border: none; border-radius: 0; padding: 8px 0 14px; }
.prog-bar-thin { background: #c8c5b3; box-shadow: inset 1px 1px 2px #595c4f25, inset -1px -1px 2px #fffffa66; }
.prog-ring .pr-bg { stroke: #c6c3b1; }
.prog-ring .pr-fill { stroke: var(--accent); }
.today-card { background: var(--rt-surface); border: 1px solid #fffffa40; border-radius: 20px; box-shadow: var(--rt-raised); }
.today-card:active { box-shadow: var(--rt-inset); }
.tc-badge { background: transparent; color: var(--accent); padding-left: 0; letter-spacing: .05em; }
.tc-title { font-weight: 500; }
.tc-arrow { color: var(--accent); }
.up-date-box, .pr-date { background: transparent; border-radius: 0; border-right: 1px solid var(--border); }
.plan-row { background: var(--rt-surface); border-color: #fffffa40; border-radius: 16px; box-shadow: var(--rt-edge); }
.plan-row:hover { background: #dedbce; }
.pr-check { background: var(--rt-surface); box-shadow: var(--rt-inset); border-color: transparent; }
.pr-check.ck { background: var(--accent); box-shadow: var(--rt-edge); }
.cal-nav-btn, .settings-gear-btn { background: var(--rt-surface); border: none; border-radius: 12px; box-shadow: var(--rt-raised); color: var(--text); }
.cal-nav-btn:active, .settings-gear-btn:active { box-shadow: var(--rt-inset); }
.cal-cell.is-today .cal-cell-num { background: var(--accent); }
.day-lessons-panel, .tip-box { background: var(--rt-surface); border-color: #c4c2b3; border-radius: 16px; }
.bottom-nav { background: var(--rt-surface); border-top-color: #c0bdac; padding-top: 12px; }
.nav-tab { border-radius: 14px; padding: 8px 3px; }
.nav-tab.active { color: var(--accent); background: var(--rt-surface); box-shadow: var(--rt-inset); }
.nav-tab:hover:not(.active) { background: var(--rt-surface); box-shadow: var(--rt-edge); }
.focus-badge, .focus-badge.off { background: none; border: none; color: var(--sub); }
.focus-badge.on::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-right: 5px; }
.settings-panel, .focus-settings, .qm-sheet { background: var(--rt-surface); border-color: #fffffa60; border-radius: 24px 24px 0 0; box-shadow: 0 -5px 20px #595c4f20, var(--rt-edge); }
.settings-panel .chip-row { gap: 9px; }
.toggle { background: #c4c1af; box-shadow: var(--rt-inset); }
.toggle.on { background: var(--accent); }
.toggle::after { background: #e7e3d5; box-shadow: 1px 2px 3px #595c4f35, inset .5px .5px 1px #fffffa; }
.vid-card, .yt-player-wrap { border-radius: 16px; background: var(--rt-surface); border-color: var(--border); }
.yt-player-info { background: var(--rt-surface); }
.vid-card.playing { border-color: var(--accent); }
.focus-bubble, .vid-countdown, .toast, .web-verification-card { background: var(--rt-surface); box-shadow: var(--rt-raised); border-color: #fffffa55; }
.vc-header { background: #d0cdbc; }
.vc-label { color: var(--text); }
.vc-ring-fill { stroke: var(--accent); }
.vc-btn-add, .vc-ctrl-btn, .fb-btn-ghost, .web-verification-card button { background: var(--rt-surface); color: var(--text); box-shadow: var(--rt-raised); border-color: transparent; }
.done-btn.completed { background: #747962; }
#review-summary-wrap > div { background: var(--rt-surface); }
@media (prefers-reduced-motion: reduce) { button { transform: none !important; } }

/* RT / TextField and RT / Tabs, translated from their Figma geometry. */
.field-input { border-radius: 999px; min-height: 44px; }
.qm-textarea { border-radius: 16px; }
.nav-tab.active { box-shadow: -1px -1px 2.5px #fffffa7a, 1px 1.8px 3px #595c4f38, inset .5px .6px 1.4px #fffffa80, inset -.5px -.6px 1.5px #595c4f14; }
.rt-primary-label { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-cta, .sp-save-btn, .done-btn { padding: 10px 16px; font-size: 14px; line-height: 22px; }
.home-header-inner > div:first-child { min-width: 0; }
.home-header-inner > div:last-child { flex-shrink: 0; gap: 7px !important; }
.home-date { font-size: 10px; white-space: nowrap; }
.focus-badge { white-space: nowrap; padding: 4px 0; font-size: 9px; }
.progress-strip { margin-bottom: 0; }
.home-header { padding-bottom: 0; }
.pr-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.6; font-size: 13px; }

/* Component hierarchy: RT / Progress stays flat; raised keys signal actions. */
.progress-strip { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px 0 16px; }
.prog-text { display: contents; }
.prog-title { grid-column: 1; grid-row: 1; margin: 0; font-size: 14px; line-height: 22px; }
.prog-sub { grid-column: 1 / -1; grid-row: 2; font-size: 11px; }
.prog-ring-wrap { grid-column: 2; grid-row: 1; align-self: center; }
.prog-ring { display: none; }
.prog-pct { position: static; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; font-weight: 400; color: var(--text); }
.prog-bar-thin { grid-column: 1 / -1; grid-row: 3; height: 8px; margin: 4px 0 0; background: #c8c5b9; border-radius: 999px; box-shadow: none; }
.prog-bar-thin-fill { background: #a96744; border-radius: inherit; }
/* Lesson information is a quiet panel; the small key holds the action affordance. */
.today-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: none; padding: 20px; }
.today-card:active { background: #d4d0c0; box-shadow: none; }
.tc-title { padding-right: 24px; max-width: 100%; font-size: 18px; line-height: 1.5; }
.tc-arrow { right: 16px; width: 28px; height: 32px; display: grid; place-items: center; background: var(--rt-surface); border-radius: 9px; box-shadow: var(--rt-raised); font-size: 21px; }
.tc-meta { font-size: 10px; gap: 6px 10px; }
/* Plan and notes use readable rows rather than a bank of oversized keycaps. */
.plan-row { background: transparent; box-shadow: none; border: none; border-bottom: 1px solid var(--border); border-radius: 0; margin: 0 22px; padding: 18px 0; }
.plan-row:last-child { border-bottom: none; }
.plan-row:hover { background: #dedbce66; }
.pr-date { border-right: 0; padding-left: 0; }
.pr-check { flex-shrink: 0; box-shadow: none; border: 1px solid #aaa994; }
.pr-check.ck { background: var(--accent); border-color: var(--accent); }
.week-label { margin-top: 4px; padding-bottom: 4px; color: var(--accent); font-size: 10px; }
.day-lessons-panel, .tip-box { box-shadow: none; background: var(--card); }
.web-plan-notice { border: none; border-left: 2px solid var(--border); border-radius: 0; padding: 3px 10px; font-size: 10px; }
.web-plan-notice .text-button { border: 0; background: transparent; color: var(--accent); font: inherit; font-weight: 600; padding: 8px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.web-plan-notice .text-button:disabled { cursor: wait; opacity: .6; text-decoration: none; }
.qm-bar { box-shadow: none; background: transparent; border: 1px solid var(--border); }
.skill-tile { box-shadow: var(--rt-edge), 1px 2px 4px #595c4f22; }
.skill-tile.selected { box-shadow: var(--rt-inset); }

.video-search-help { font-size:10px; line-height:1.65; color:var(--sub); margin:9px 0 6px; }
#bili-search-external { font-size:11px; line-height:1.65; color:var(--accent); text-decoration:underline; text-underline-offset:3px; }
