/* The 3.0 syllabus uses the exact Classic shell and Classic component dimensions.
   Only question content, word collections and paper formats differ. */
body.hsk3-unified {
  --surface:var(--card);--surface2:var(--soft);--teal:var(--brand);--teal-dark:var(--brand);--text:var(--ink);
  --r:20px;color:var(--ink);background:var(--bg);font:15px/1.5 ui-sans-serif,system-ui,-apple-system,"PingFang SC","Microsoft YaHei",Arial,sans-serif;
}
body.hsk3-unified.dark{--surface:var(--card);--surface2:var(--soft);--teal:var(--brand);--text:var(--ink)}
body.hsk3-unified .topbar{height:68px;background:var(--card);border-bottom:1px solid var(--line);padding:0 max(22px,calc((100vw - 1260px)/2));gap:14px;z-index:80}
body.hsk3-unified .brand{font-size:20px;gap:11px;letter-spacing:-.035em}
body.hsk3-unified .brand .logo{width:36px;height:36px;border-radius:12px;font-size:19px;background:linear-gradient(140deg,#3e52ca,#8097ff)}
body.hsk3-unified .topnav{display:flex;align-items:center;gap:5px;margin:auto}
body.hsk3-unified .topnav button{background:transparent;border:0;border-radius:10px;color:var(--muted);font-size:13px;font-weight:650;min-height:36px;padding:9px 12px}
body.hsk3-unified .topnav button.active{background:var(--soft);color:var(--brand)}
body.hsk3-unified .top-actions{display:flex;gap:7px;margin-left:0}
body.hsk3-unified .top-actions button{background:var(--soft);border:0;font-size:12px;border-radius:9px;min-width:37px;min-height:37px}
body.hsk3-unified .container{max-width:1160px;margin:0 auto;padding:23px 25px 105px;min-height:70vh}
body.hsk3-unified .hsk3-shell .card,
body.hsk3-unified .hsk3-shell .cardpanel{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:19px;box-shadow:var(--shadow);color:var(--ink)}
body.hsk3-unified .hsk3-shell .headline{display:flex;justify-content:space-between;align-items:center;margin:0 0 20px;gap:12px}
body.hsk3-unified .hsk3-shell .headline h1{font-size:clamp(22px,3.5vw,32px);letter-spacing:-.04em;line-height:1.15;margin:3px 0 4px}
body.hsk3-unified .hsk3-shell .headline p{margin:0;color:var(--muted);font-size:13px}
body.hsk3-unified .hsk3-shell .eyebrow{font-size:11px;color:var(--brand);font-weight:900;letter-spacing:.14em;text-transform:uppercase}
body.hsk3-unified .hsk3-shell .h1{font-size:clamp(22px,3vw,34px)}
body.hsk3-unified .hsk3-shell .h2{font-size:18px;letter-spacing:-.03em}
body.hsk3-unified .hsk3-shell .muted,body.hsk3-unified .hsk3-shell .small.muted{color:var(--muted)}
body.hsk3-unified .hsk3-shell .tag{background:var(--soft);color:var(--brand)}
body.hsk3-unified .hsk3-shell button{border:1px solid var(--line);color:var(--ink);background:var(--card);padding:10px 13px;border-radius:12px;font-weight:700}
body.hsk3-unified .hsk3-shell button.primary,
body.hsk3-unified .hsk3-shell .primary,
body.hsk3-unified .hsk3-shell .hsk-button.primary{background:#0e8079;color:white;border-color:#0e8079}
body.hsk3-unified .hsk3-shell button.secondary{background:var(--soft);border-color:var(--soft);color:var(--ink)}
body.hsk3-unified .hsk3-shell input,body.hsk3-unified .hsk3-shell textarea,body.hsk3-unified .hsk3-shell select{background:var(--card);border:1px solid var(--line);border-radius:11px;padding:10px 11px;color:var(--ink);min-width:0}
body.hsk3-unified .hsk3-shell .controls label{font-size:12px;color:var(--muted)}
body.hsk3-unified .hsk3-shell .smalllabel{font-size:12px;font-weight:700;color:var(--muted)}
body.hsk3-unified .hsk3-shell .grid2{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
body.hsk3-unified .hsk3-shell .grid3{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
body.hsk3-unified .hsk3-shell .stat-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
body.hsk3-unified .hsk3-shell .record-row{border-bottom:1px solid var(--line)}
body.hsk3-unified .hsk3-shell .progress-rail{background:var(--soft)}
body.hsk3-unified .hsk3-shell .progress-rail span{background:#0e8079}
body.hsk3-unified .hsk3-shell .answer-box{background:var(--soft);border-color:var(--line)}
body.hsk3-unified .hsk3-shell .grammar{background:var(--card);color:var(--ink)}
body.hsk3-unified .hsk3-shell .choice,body.hsk3-unified .hsk3-shell .quiz-option{background:var(--card);border-color:var(--line);color:var(--ink)}
body.hsk3-unified .hsk3-shell .choice.active,body.hsk3-unified .hsk3-shell .quiz-option.active{border-color:var(--brand);background:var(--soft)}
body.hsk3-unified .hsk3-shell .choice.correct{border-color:#40b698;background:color-mix(in srgb,#40b698 12%,var(--card))}
body.hsk3-unified .hsk3-shell .choice.wrong{border-color:#d76970;background:color-mix(in srgb,#d76970 10%,var(--card))}
body.hsk3-unified .hsk3-shell .word-cell{background:var(--card);border-color:var(--line)}
body.hsk3-unified .hsk3-shell .word-cell .meaning{color:var(--muted)}
body.hsk3-unified .hsk3-shell .word-cell .hanzi{color:var(--ink)}
body.hsk3-unified .hsk3-shell .listword{display:flex;align-items:center;justify-content:space-between;width:100%;gap:12px;text-align:left;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:12px 8px;background:var(--card)}
body.hsk3-unified .hsk3-shell .listword .cn{font-size:18px;font-weight:700}
body.hsk3-unified .hsk3-shell .library-scroll{max-height:560px;overflow:auto;scrollbar-gutter:stable}
body.hsk3-unified .hsk3-shell .quiz-library-link{margin-top:12px}
body.hsk3-unified .hsk3-shell .home-hero .hero-outline{background:var(--soft);color:var(--ink);border-color:var(--line);text-shadow:none}
body.hsk3-unified .hsk3-shell .home-hero .primary{background:#0e8079;border-color:#0e8079;color:white}
body.hsk3-unified .hsk3-shell .quick{display:flex;flex-direction:column;align-items:start;text-align:left;gap:8px;background:var(--card);min-height:130px}
body.hsk3-unified .hsk3-shell .quick strong{font-size:16px}
body.hsk3-unified .hsk3-shell .quick small{font-size:12px;color:var(--muted)}
body.hsk3-unified .hsk3-shell .hsk-button{display:inline-flex;align-items:center;text-decoration:none;padding:12px 18px;border-radius:12px;font-weight:850}
/* Full screen flashcard studio shares the Classic two-column layout. */
body.hsk3-unified .hsk3-shell .flash-full{display:grid;grid-template-columns:minmax(290px,34%) minmax(0,1fr);gap:18px;align-items:stretch;min-height:630px}
body.hsk3-unified .hsk3-shell .flash-head,body.hsk3-unified .hsk3-shell .flash-shell{min-width:0}
body.hsk3-unified .hsk3-shell .flash-full .flash-side-controls{min-width:0}
body.hsk3-unified .hsk3-shell .flash-full .flash-stage{min-height:290px}
body.hsk3-unified .hsk3-shell .flash-full .study-card{height:100%;min-height:270px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;cursor:pointer}
body.hsk3-unified .hsk3-shell .hsk3-flash-content{width:100%;padding:28px 10px}
body.hsk3-unified .hsk3-shell .hsk3-flash-content .front-main,body.hsk3-unified .hsk3-shell .hsk3-flash-content .back-main{font-size:clamp(48px,6vw,80px);font-weight:820;line-height:1.2;color:var(--ink)}
body.hsk3-unified .hsk3-shell .hsk3-flash-content .front-py,body.hsk3-unified .hsk3-shell .hsk3-flash-content .back-py{font-size:20px;color:var(--muted);margin-top:10px}
body.hsk3-unified .hsk3-shell .hsk3-flash-content .back-meaning{font-size:19px;font-weight:750;max-width:680px;margin:18px auto;color:var(--ink)}
body.hsk3-unified .hsk3-shell .hsk3-flash-content .flip-hint{color:var(--muted);font-size:12px;margin-top:16px}
body.hsk3-unified .hsk3-shell .flash-btns{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
body.hsk3-unified .hsk3-shell .flash-btns button{min-height:58px;display:flex;align-items:center;justify-content:center;gap:7px}
body.hsk3-unified .hsk3-shell .flash-btns button small{color:var(--muted);font-size:10px}
body.hsk3-unified .hsk3-shell .flash-btns button.primary small{color:#ddfff8}
body.hsk3-unified .hsk3-shell .chiprow{display:flex;gap:5px;flex-wrap:wrap;margin-top:10px}
body.hsk3-unified .hsk3-shell .chiprow button.chip{border-radius:100px;font-size:11px;padding:6px 10px;min-height:34px}
body.hsk3-unified .hsk3-shell .chiprow button.chip.selected{background:var(--soft);color:var(--brand);border-color:var(--brand)}
body.hsk3-unified .hsk3-shell .flash-side-footer{margin-top:auto}
/* Quiz parity: same Classic configuration panel and response navigator proportions. */
body.hsk3-unified .hsk3-shell .quiz-studio-hero{margin:0 0 16px}
body.hsk3-unified .hsk3-shell .quiz-studio-layout{display:grid;grid-template-columns:1fr minmax(270px, .76fr);gap:16px}
body.hsk3-unified .hsk3-shell .quiz-config,body.hsk3-unified .hsk3-shell .quiz-stage{background:var(--card);border:1px solid var(--line);border-radius:20px;padding:22px;box-shadow:var(--shadow)}
body.hsk3-unified .hsk3-shell .quiz-config-header{display:flex;align-items:center;gap:13px;margin-bottom:18px}
body.hsk3-unified .hsk3-shell .quiz-config-header h2{margin:0;font-size:20px}
body.hsk3-unified .hsk3-shell .quiz-config-header p{margin:2px 0 0;color:var(--muted);font-size:12px}
body.hsk3-unified .hsk3-shell .quiz-config-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
body.hsk3-unified .hsk3-shell .vqs-segment{display:flex;flex-wrap:wrap;gap:5px;margin:8px 0 16px}
body.hsk3-unified .hsk3-shell .vqs-segment button{flex:1;min-width:100px;font-size:12px;padding:12px 9px}
body.hsk3-unified .hsk3-shell .vqs-segment button.active{background:var(--soft);color:var(--brand);border-color:var(--brand)}
body.hsk3-unified .hsk3-shell .vqs-segment button small{display:block;font-size:10px;font-weight:500;margin-top:5px;opacity:.8}
body.hsk3-unified .hsk3-shell .quiz-field-heading{margin:18px 0 6px;font-size:11px;color:var(--muted);font-weight:900;letter-spacing:.1em}
body.hsk3-unified .hsk3-shell .vqs-count-options{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}
body.hsk3-unified .hsk3-shell .vqs-count-options label{display:flex;gap:8px;border:1px solid var(--line);padding:12px;border-radius:12px;cursor:pointer;align-items:start}
body.hsk3-unified .hsk3-shell .vqs-count-options small{display:block;color:var(--muted);font-size:11px}
body.hsk3-unified .hsk3-shell .vqs-start-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-top:15px}
body.hsk3-unified .hsk3-shell .quiz-preview{display:flex;flex-direction:column;align-items:center;text-align:center;justify-content:center;min-height:380px;color:var(--ink)}
body.hsk3-unified .hsk3-shell .quiz-preview-symbol{font-size:90px;font-weight:800;line-height:1.2;color:var(--brand);opacity:.25}
body.hsk3-unified .hsk3-shell .quiz-preview-tags{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}
body.hsk3-unified .hsk3-shell .quiz-preview-tags span{padding:7px 9px;border-radius:20px;background:var(--soft);color:var(--brand);font-size:11px}
body.hsk3-unified .hsk3-shell .quiz-studio-hero{background:var(--card);color:var(--ink);border:1px solid var(--line)}
body.hsk3-unified .hsk3-shell .quiz-studio-hero h1,body.hsk3-unified .hsk3-shell .quiz-studio-hero p{color:var(--ink)}
body.hsk3-unified .hsk3-shell .quiz-studio-emblem{color:var(--brand)}
/* Reading/Writing full paper cards in same fluid Classic column sizing. */
body.hsk3-unified .hsk3-shell .paper-stepper{background:var(--card);border:1px solid var(--line);border-radius:15px;box-shadow:var(--shadow)}
body.hsk3-unified .hsk3-shell .paper-stepper>button{background:var(--soft);color:var(--brand)}
body.hsk3-unified .hsk3-shell .paper-stepper .center{color:var(--ink)}
body.hsk3-unified .hsk3-shell .passage,body.hsk3-unified .hsk3-shell .notice{background:var(--soft);border-color:var(--line);color:var(--ink)}
body.hsk3-unified .hsk3-shell .writing-pic{max-width:100%;object-fit:contain;border-radius:12px}
body.hsk3-unified .hsk3-shell .test-layout{grid-template-columns:minmax(0,1fr) 255px;gap:15px}
body.hsk3-unified .hsk3-shell .question-nav{display:flex;flex-wrap:wrap;gap:5px}
body.hsk3-unified .hsk3-shell .question-nav button.current{background:var(--brand);color:#fff}
body.hsk3-unified .hsk3-shell .question-nav button.done{background:var(--soft);color:var(--brand)}
/* Mobile Classic: same bottom navigation, same header heights and content widths. */
@media(max-width:1100px){body.hsk3-unified .topnav button{padding:8px;font-size:12px}}
@media(max-width:900px){body.hsk3-unified .topnav button{padding:7px 6px;font-size:11px}}
@media(max-width:700px){
 body.hsk3-unified .topbar{height:59px;padding:0 14px}
 body.hsk3-unified .brand{font-size:17px}body.hsk3-unified .brand .logo{width:32px;height:32px}
 body.hsk3-unified .topnav{display:none}
 body.hsk3-unified .top-actions{margin-left:auto}
 body.hsk3-unified .container{padding:17px 14px calc(88px + env(safe-area-inset-bottom,0px))}
 body.hsk3-unified .mobile-nav{display:grid;z-index:70}
 body.hsk3-unified .hsk3-shell .grid3,body.hsk3-unified .hsk3-shell .grid2,body.hsk3-unified .hsk3-shell .stat-grid,body.hsk3-unified .hsk3-shell .quiz-studio-layout,body.hsk3-unified .hsk3-shell .flash-full,body.hsk3-unified .hsk3-shell .test-layout{grid-template-columns:1fr}
 body.hsk3-unified .hsk3-shell .flash-full{min-height:0}
 body.hsk3-unified .hsk3-shell .flash-side-footer{display:none}
 body.hsk3-unified .hsk3-shell .flash-full .flash-stage{min-height:265px}
 body.hsk3-unified .hsk3-shell .flash-full .study-card{min-height:240px}
 body.hsk3-unified .hsk3-shell .quiz-config-grid{grid-template-columns:1fr}
 body.hsk3-unified .hsk3-shell .vqs-count-options{grid-template-columns:1fr}
 body.hsk3-unified .hsk3-shell .flash-btns button{flex-direction:column;gap:3px;font-size:12px}
 body.hsk3-unified .hsk3-shell .widegrid{grid-template-columns:repeat(2, minmax(0,1fr))}
 body.hsk3-unified .hsk3-shell .home-hero-art{min-height:180px}
}
.hsk-more-menu{position:fixed;bottom:calc(75px + env(safe-area-inset-bottom,0px));left:10px;right:10px;display:grid;grid-template-columns:repeat(2,1fr);gap:9px;z-index:100;padding:14px}
.hsk-more-menu button{padding:12px;font-size:13px}
@media(min-width:701px){.hsk-more-menu{left:auto;right:20px;bottom:20px;width:420px}}

body.hsk3-unified .top-actions .account-icon{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;width:20px;height:20px}
body.hsk3-unified .top-actions .mini{display:inline-flex;align-items:center;justify-content:center;gap:7px}

body.hsk3-unified .hsk3-shell .quiz-studio-hero em{color:#128e80;font-style:normal}body.dark.hsk3-unified .hsk3-shell .quiz-studio-hero em{color:#7fdbc6}
/* Dark theme parity: Classic dark mode must cover all 3.0 controls too. */
body.dark.hsk3-unified .hsk3-shell .flash-btns button:not(.primary),
body.dark.hsk3-unified .hsk3-shell .flash-foot button,
body.dark.hsk3-unified .hsk3-shell .chiprow .chip:not(.selected),
body.dark.hsk3-unified .hsk3-shell .flash-full .audio-in-card,
body.dark.hsk3-unified .hsk3-shell .flash-side-controls .secondary,
body.dark.hsk3-unified .hsk3-shell .quiz-config button:not(.primary):not(.active),
body.dark.hsk3-unified .hsk3-shell .vqs-count-options label,
body.dark.hsk3-unified .hsk3-shell .quiz-stage,
body.dark.hsk3-unified .hsk3-shell .quiz-preview-tags span {
  background:#213943;color:#e1f6f4;border-color:#34535d;
}
body.dark.hsk3-unified .hsk3-shell .chiprow .chip.selected,
body.dark.hsk3-unified .hsk3-shell .vqs-segment button.active {
  background:#1d675f;color:#d4fff2;border-color:#5cbaa9;
}
body.dark.hsk3-unified .hsk3-shell .flash-btns button.primary,
body.dark.hsk3-unified .hsk3-shell button.primary {background:#0a8f83;color:#fff;border-color:#0a8f83;}
body.dark.hsk3-unified .hsk3-shell .flash-btns button small,
body.dark.hsk3-unified .hsk3-shell .flash-foot button small {color:#c2d5da;}
body.dark.hsk3-unified .hsk3-shell .quiz-studio-hero,
body.dark.hsk3-unified .hsk3-shell .quiz-config,
body.dark.hsk3-unified .hsk3-shell .paper-stepper,
body.dark.hsk3-unified .hsk3-shell .word-cell {background:var(--card);color:var(--ink)}
body.dark.hsk3-unified .hsk3-shell .quiz-studio-emblem{background:#233d44;color:#9ce7dc}
body.dark.hsk3-unified .hsk3-shell .vqs-radio input{accent-color:#32c4af}
body.dark.hsk3-unified .hsk3-shell .quiz-preview-symbol{color:#7ddfd0}
body.dark.hsk3-unified .hsk3-shell .listword:hover{background:var(--soft)}
body.dark.hsk3-unified .hsk3-shell .record-row.missed{border-left:3px solid #e58e92}
body.dark.hsk3-unified #app .flash-btns button:not(.primary),
body.dark.hsk3-unified #app .flash-foot button,
body.dark.hsk3-unified #app .chiprow .chip:not(.selected),
body.dark.hsk3-unified #app .flash-full .audio-in-card,
body.dark.hsk3-unified #app .flash-side-controls .secondary {
 background:#1c3943!important;color:#e3fbf6!important;border:1px solid #38636a!important;
}
body.dark.hsk3-unified #app .flash-btns button:not(.primary) small{color:#b9d6d4!important}
body.dark.hsk3-unified #app .flash-btns button.primary{color:#fff!important;background:#0d897c!important}
body.dark.hsk3-unified #app .flash-side-controls select {background:#192c35!important;color:#effaf9!important;border:1px solid #38606c!important;min-height:44px;line-height:normal!important;}
body.dark.hsk3-unified #app .flash-side-controls .chip.selected{background:#176c64!important;color:white!important}
