/* 大熊猫儿·胡 — Chengdu afternoon. Local, editable, no remote assets. */
:root {
  --paper: #faf7ef;
  --card: #fffdf7;
  --white: #fffefb;
  --ink: #263f36;
  --muted: #737b6d;
  --soft-ink: #5c6f5e;
  --line: #e4e2d5;
  --orange: #315f4d;
  --orange-dark: #264d3d;
  --orange-wash: #e9eedf;
  --green-wash: #e9eedf;
  --ginkgo: #e5af42;
  --terracotta: #ba6145;
  --hibiscus: #b96779;
  --mountain: #8ca9b8;
}
body { background-color: var(--paper); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline-color: #a66f22; }
.sidebar { background: #f3f2e6; border-right-color: #dfdfce; }
.brand { gap: 10px; padding-left: 1px; }
.brand-panda { width: 42px; height: 46px; flex: 0 0 auto; }
.brand strong { font-size: 20px; letter-spacing: -.6px; white-space: nowrap; }
.brand-dot { color: var(--terracotta); letter-spacing: -1px; }
.brand small { font-size: 8px; letter-spacing: .1px; color: #5c7260; margin-top: 7px; }
.sidebar-caption { padding-top: 40px; color: #6a7962; font-size: 11px; }
.sidebar-caption span { font-size: 7px; }
.nav-item { border-radius: 8px; }
.nav-item.active { background: #315f4d; color: #fffdf1; box-shadow: 0 3px 0 #284a3b0c; }
.nav-item.active .nav-indicator { background: var(--ginkgo); }
.nav-item:hover:not(.active) { background: #e7ebdc; }
.nav-count { color: #5a6a50; background: #e1e7d5; }
.sidebar-note { padding-top: 34px; margin-left: 13px; margin-right: 5px; }
.sidebar-note p { color: #526c52; font-size: 18px; }
.sidebar-note > span:not(.note-seal) { color: #6d7f62; }
.sidebar-note small { color: #737e66; font-size: 7px; letter-spacing: .4px; }
.teahouse-drawing { position: relative; width: 151px; height: 78px; margin-bottom: 18px; }
.teahouse-drawing .tea-bowl { position: absolute; left: 2px; top: 27px; width: 67px; height: 49px; color: #7e8f69; stroke-width: 1; }
.teahouse-drawing .tea-leaf { position: absolute; left: 98px; top: 0; width: 37px; height: 40px; color: #b8913d; transform: rotate(30deg); stroke-width: 1; }
.mahjong-seal { position: absolute; top: 36px; left: 83px; width: 31px; height: 39px; display: grid; place-items: center; border: 1px solid #c0c8b1; border-bottom: 4px solid #76947a; border-radius: 5px; background: #fffef5; font: 21px/1 var(--serif); color: #b46348; transform: rotate(12deg); }
.sidebar-foot { color: #697b60; }
.topbar { background: #fffdf73d; }
.mobile-brand { display: none; }
.avatar { background: #e9eedf; border-color: #dbe2cf; color: #315f4d; }
.page-content { padding-top: 20px; }
.hero { grid-template-columns: minmax(0, .95fr) minmax(0,1.05fr); gap: 0; min-height: 352px; margin-bottom: 24px; }
.hero-copy { position: relative; z-index: 1; padding: 12px 0 20px; }
.hero .eyebrow { color: #817347; font-size: 8px; letter-spacing: 1.2px; gap: 8px; }
.hero .eyebrow svg { width: 21px; height: 21px; color: #bd8b27; stroke-width: 1.4; }
.hero h1 { font-size: clamp(30px, 3.15vw, 46px); font-family: var(--serif); line-height: 1.5; letter-spacing: -1.2px; margin-top: 18px; white-space: normal; }
.hero h1 > span { color: #315f4d; position: relative; }
.hero h1 > span::after { content: ""; position: absolute; left: 0; bottom: 0; width: 95%; height: 6px; background: #e4b34647; z-index: -1; border-radius: 50%; transform: rotate(-1.5deg); }
.hero-copy > p { margin-top: 16px; font-size: 13px; color: #637563; line-height: 1.9; }
.hero-copy > p span { display: inline-block; margin-top: 4px; max-width: 310px; font-size: 11px; line-height: 1.8; color: #7b826f; }
.hero-actions { display: flex; gap: 20px; align-items: center; margin-top: 24px; }
.start-button { min-height: 45px; border-radius: 7px; padding: 12px 20px; font-size: 12px; letter-spacing: .5px; box-shadow: 0 3px 0 #25443514; }
.primary-button:hover { background: #234d3c; border-color: #234d3c; }
.hello-button { display: inline-flex; gap: 10px; align-items: center; min-height: 45px; padding: 4px 12px 4px 3px; color: #5d725d; }
.hello-button svg { width: 20px; height: 20px; }
.hello-button > span { font-family: var(--serif); font-size: 17px; line-height: 1.35; letter-spacing: 1px; }
.hello-button small { display: block; font-family: var(--sans); font-size: 10px; letter-spacing: .6px; color: #877b5c; }
.hello-button:hover { color: #b26042; }
.hero-footnote { display: flex; align-items: center; gap: 7px; font-size: 10px; margin-top: 19px; color: #8a8d79; }
.hero-footnote > span { display: inline-block; width: 4px; height: 4px; background: #bfa254; border-radius: 50%; }
.chengdu-illustration { position: relative; margin: 0; padding: 0 0 7px; min-width: 0; }
.chengdu-scene { display: block; width: 100%; height: auto; max-height: 390px; object-fit: contain; }
.chengdu-illustration figcaption { display: flex; align-items: center; justify-content: center; gap: 11px; color: #7f8c76; font-family: var(--serif); font-size: 10px; letter-spacing: 2px; margin-top: -1px; }
.chengdu-illustration figcaption span[lang] { border-left: 1px solid #d9d8c4; padding-left: 11px; font-family: var(--sans); font-size: 7px; letter-spacing: 1.5px; }
.progress-strip { background: #eef0e2; border-color: #dfe5cf; border-radius: 10px; padding-top: 17px; padding-bottom: 17px; }
.progress-icon { background: #e7dbad; color: #92722e; }
.progress-copy strong { color: #4d6246; }
.progress-copy > span { color: #738267; }
.progress-caption { color: #6f7f64; }
.progress-caption strong { color: #365e46; }
.meter-track { background: #d8dfc8; }
.meter-track span { background: #678858; }
.eyebrow.muted { color: #879175; }
.topic-card { border-color: #e2e2d3; border-radius: 10px; box-shadow: 0 3px 0 #eae6d71f; }
.topic-card:hover { border-color: #a9b998; }
.topic-card.active, .topic-card[aria-selected="true"] { background: #edf2e4; border-color: #8da77a; box-shadow: inset 0 0 0 1px #8da77a20; }
.topic-card .topic-icon { color: #56764d; }
.topic-card:nth-child(2) .topic-icon { color: #a56671; }
.topic-card:nth-child(3) .topic-icon { color: #a27b33; }
.topic-card:nth-child(4) .topic-icon { color: #698594; }
.topic-meta, .topic-en { color: #7c866f; }
.sentence-panel, .word-panel { border-color: #e2e3d4; border-radius: 11px; }
.lesson-label { background: #e9eedf; color: #4b6c42; }
.sentence-translation { color: #77846c; }
.primary-button { color: #fffdf1; }
.secondary-button { background: #faf8ef; border-color: #dedfcd; color: #667455; }
.secondary-button:hover { background: #eef1e3; border-color: #aebc97; }
.icon-button:hover { color: #315f4d; background: #edf3e5; border-color: #b7c6a4; }
.icon-button.is-saved, .save-main.is-saved { color: #b56878 !important; background: #f6e9e8; border-color: #e6c6ca; }
.mini-icon { color: #88783e; background: #f1e7c8; }
.reading-controls { background: #f5f6eb; border-color: #e4e7d5; }
.mode-option input:checked + span { color: #315f4d; }
.mode-option input:focus-visible + span { outline-color: #a98737; }
.character-token:hover { background: #f7f1dc; border-color: #ddd0a3; }
.character-token.is-selected, .character-token[aria-pressed="true"] { color: #315f4d; background: #f6ecd0; border-color: #bea35d; box-shadow: 0 2px 5px #9f7f2b0f; }
.character-token.is-playing { background: #e7eedb; border-color: #82a06c; }
.character-token:focus-visible { outline-color: #a98737; }
.character-token.is-selected .character-tone, .character-token[aria-pressed="true"] .character-tone { color: #8b6c22; }
.character-inspector { background: #faf3df; border-color: #e7dbb9; }
.character-inspector-copy #inspector-pinyin { color: #537047; }
.selection-tools button { color: #6f7447; }
.sentence-note { background: #f9f1df; border-color: #eadfbe; }
.phrase-row.is-current { background: #edf2e6; border-color: #c2d2b0; }
.word-card { background: #fffdf7; }
.word-card-pinyin, .word-pinyin, .phrase-pinyin { color: #74865f; }
.word-card-footer .text-button { color: #446b45; }
.footer-brand { display: grid; grid-template-columns: 24px auto; column-gap: 8px; align-items: center; font-size: 14px !important; color: #59704e !important; white-space: nowrap; }
.footer-brand > svg { color: #bf7d8d; width: 24px; height: 24px; grid-row: span 2; stroke-width: 1; }
.footer-brand small { display: block; font: 7px/1.7 var(--sans); letter-spacing: .1px; margin-top: 2px; }
.page-footer > p { color: #7a826e; }
.page-footer > button { color: #687c5a; }
.playback-bar { background: #315f4d; }
.playback-wave i { background: #e5bd67; }
.mobile-nav { background: #fffdf7f5; border-top-color: #dce3cd; }
.mobile-nav button { color: #657e58; }
.mobile-nav button.active { color: #315f4d; background: #e9efdc; }
.dialog-note { background: #edf1e3; }
@media (min-width: 1650px) {
  .page-content { padding-top: 28px; }
  .hero { min-height: 397px; }
  .hero h1 { font-size: 48px; }
}
@media (max-width: 1180px) and (min-width: 761px) {
  .brand { gap: 7px; }
  .brand-panda { width: 35px; height: 40px; }
  .brand strong { font-size: 19px; }
  .brand small { font-size: 7px; letter-spacing: 0; }
  .hero { min-height: 315px; }
  .hero h1 { font-size: 33px; letter-spacing: -1px; }
  .hero .eyebrow { font-size: 6.5px; letter-spacing: .6px; }
  .hero-copy > p { font-size: 12px; }
  .hero-copy > p span { font-size: 10px; }
  .hero-actions { gap: 14px; margin-top: 20px; }
  .hero-footnote { font-size: 9px; }
}
@media (max-width: 980px) and (min-width: 761px) {
  .brand { padding-left: 0; gap: 6px; }
  .brand-panda { width: 31px; height: 36px; }
  .brand strong { font-size: 18px; letter-spacing: -.8px; }
  .brand small { font-size: 6.5px; letter-spacing: 0; }
  .sidebar-caption { font-size: 10px; }
  .sidebar-caption span { font-size: 6px; }
  .sidebar-note { margin-left: 7px; }
  .sidebar-note p { font-size: 16px; }
  .sidebar-note small { font-size: 6px; }
  .hero { grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); min-height: 300px; }
  .hero h1 { font-size: 28px; }
  .hero .eyebrow { font-size: 6px; letter-spacing: 0; gap: 5px; }
  .hero .eyebrow svg { width: 16px; height: 16px; }
  .hero-copy > p { font-size: 11px; }
  .hero-copy > p span { font-size: 9px; max-width: 230px; }
  .start-button { padding: 11px 14px; font-size: 11px; }
  .hero-actions { gap: 10px; }
  .hero-footnote { font-size: 8px; }
  .chengdu-illustration figcaption { font-size: 9px; gap: 6px; letter-spacing: 1px; }
  .chengdu-illustration figcaption span[lang] { font-size: 5px; padding-left: 6px; letter-spacing: .7px; }
}
@media (max-width: 760px) {
  .mobile-brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
  .mobile-brand > span { font: 600 17px/1.3 var(--serif); letter-spacing: -.5px; white-space: nowrap; }
  .mobile-brand small { display: block; font: 7px/1.4 var(--sans); letter-spacing: .1px; margin-top: 3px; color: #6c7f60; }
  .topbar { min-height: 70px; background: #f3f2e6; }
  .topbar .breadcrumb { display: none; }
  .topbar-actions { gap: 11px; }
  .page-content { padding-top: 18px; }
  .hero { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); min-height: 295px; gap: 0; margin-bottom: 20px; }
  .hero h1 { font-size: 31px; letter-spacing: -1px; }
  .hero .eyebrow { font-size: 6.5px; letter-spacing: .6px; }
  .hero .eyebrow svg { width: 17px; height: 17px; }
  .hero-copy > p { font-size: 12px; }
  .hero-copy > p span { font-size: 10px; }
  .hero-actions { margin-top: 19px; gap: 14px; }
  .hero-footnote { font-size: 9px; margin-top: 14px; }
  .chengdu-scene { max-height: 300px; }
  .chengdu-illustration figcaption { font-size: 9px; letter-spacing: 1px; }
  .chengdu-illustration figcaption span[lang] { font-size: 6px; letter-spacing: .7px; }
  .progress-copy strong { font-size: 11px; }
  .progress-strip { margin-bottom: 27px; }
}
@media (max-width: 580px) {
  .hero { grid-template-columns: 1fr; gap: 0; min-height: 0; }
  .hero-copy { padding: 9px 0 0; }
  .hero .eyebrow { font-size: 8px; letter-spacing: .8px; }
  .hero h1 { font-size: 35px; margin-top: 13px; line-height: 1.45; white-space: normal; }
  .hero-copy > p { font-size: 12px; margin-top: 12px; }
  .hero-copy > p span { max-width: 100%; font-size: 10px; margin-top: 2px; }
  .hero-actions { margin-top: 17px; gap: 20px; }
  .hero-footnote { display: none; }
  .chengdu-illustration { max-width: 390px; width: 100%; justify-self: center; padding: 0; margin-top: 6px; }
  .chengdu-scene { max-height: 245px; }
  .chengdu-illustration figcaption { margin-top: -1px; font-size: 9px; }
  .progress-strip { gap: 10px; padding: 14px; }
  .progress-copy { min-width: 0; }
  .progress-copy strong { font-size: 10px; }
  .progress-copy > span { font-size: 7px; }
  .progress-meter { min-width: 75px; width: 28%; }
  .language-badge { display: none; }
  .footer-brand { font-size: 13px !important; }
  .page-footer { row-gap: 13px; }
}
@media (max-width: 359px) {
  .mobile-brand > span { font-size: 16px; }
  .hero .eyebrow { font-size: 7px; letter-spacing: .4px; }
  .hero h1 { font-size: 31px; }
  .hero-copy > p span { max-width: 245px; }
  .chengdu-scene { max-height: 205px; }
  .progress-copy strong { font-size: 10px; }
  .progress-meter { width: 31%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
