/* Whole-page references generated before code: design/v3-product/{home,sudoku,xiangqi,go,story}.png. */
:root {
  color-scheme: light;
  --canvas: #f5f6fa;
  --ink: #151827;
  --paper: #151827;
  --muted: #566078;
  --accent: #635bff;
  --accent-dark: #493ed6;
  --accent-soft: #efedff;
  --line: #dce1ec;
  --board-line: #252c3e;
  --radius: 14px;
  --max: 1180px;
  --sidebar: 208px;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; padding-left: var(--sidebar); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: var(--ink); }
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 1px solid var(--line); border-radius: 9px; background: white; }
button:disabled { cursor: not-allowed; opacity: .48; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
input, select { border: 1px solid var(--line); background: white; border-radius: 9px; min-height: 46px; padding: 10px 12px; max-width: 100%; }
select { width: 100%; }
input { width: 100px; }
img { display: block; width: 100%; max-width: 100%; object-fit: cover; }
p { color: var(--muted); line-height: 1.7; margin: 12px 0; }
h1, h2, h3 { font-family: inherit; font-weight: 750; line-height: 1.2; letter-spacing: -.025em; margin: 0; }
h1 { font-size: clamp(30px, 3vw, 44px); text-wrap: balance; }
h2 { font-size: 26px; }
h3 { font-size: 23px; }
small { font-size: 12px; }
em { font-style: normal; color: var(--accent); }
main { padding: 0 28px; max-width: calc(var(--max) + 56px); margin: auto; min-height: 68vh; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: -80px; left: calc(var(--sidebar) + 20px); z-index: 100; background: var(--accent); color: white; padding: 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.site-header { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar); padding: 28px 14px 18px; background: #202331; color: #eef0ff; display: flex; flex-direction: column; gap: 38px; z-index: 40; overflow-y: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 18px; font-weight: 750; letter-spacing: -.6px; }
.site-header .brand { margin-left: 3px; }
.brand-mark { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 26px; height: 26px; flex-shrink: 0; }
.brand-mark i { background: #a6a2ff; border-radius: 4px; }
.brand-wordmark { display: grid; gap: 4px; min-width: 0; }
.brand-wordmark strong { font-size: 16px; line-height: 1.15; letter-spacing: -.4px; }
.brand-wordmark small { font-size: 10px; font-weight: 500; letter-spacing: .15px; opacity: .8; }
.hero-brand { margin-bottom: 9px; }
.site-header nav { display: grid; gap: 9px; }
.site-header nav a { display: flex; align-items: center; gap: 14px; padding: 14px 13px; font-size: 14px; border-radius: 10px; color: #d0d5e7; min-height: 48px; }
.site-header nav a:hover { background: #323648; color: white; }
.site-header nav a[aria-current] { background: var(--accent); color: white; box-shadow: 0 4px 16px #0c102128; }
.site-header nav svg { width: 23px; height: 23px; stroke: currentColor; stroke-width: 1.5; fill: none; flex-shrink: 0; }
.site-header .sidebar-bottom { margin-top: auto; padding-top: 24px; gap: 0; }
.sidebar-bottom a { font-size: 12px !important; }
.topbar { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 28px; background: #ffffffed; border-bottom: 1px solid #e7eaf1; position: sticky; top: 0; z-index: 30; backdrop-filter: blur(12px); }
.topbar-path { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.topbar-path a:hover { color: var(--accent); }
.language-switch { display: flex; gap: 3px; border-radius: 10px; background: #f2f3f9; padding: 3px; }
.language-switch a { padding: 7px 13px; font-size: 12px; border-radius: 8px; min-width: 44px; text-align: center; }
.language-switch a[aria-current] { background: var(--accent); color: white; }
.eyebrow { font-size: 10px; letter-spacing: 1.3px; font-weight: 700; color: var(--accent-dark); line-height: 1.6; display: block; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px 0 22px; }
.hero-copy { min-width: 0; }
.hero h1 { font-size: clamp(30px, 3.2vw, 45px); }
.hero p { font-size: 15px; margin: 10px 0; }
.hero-details { display: flex; gap: 22px; font-size: 11px; color: var(--muted); }
.welcome-tokens { display: flex; align-items: center; gap: 13px; padding-right: 10px; height: 110px; flex-shrink: 0; }
.welcome-number { width: 66px; height: 66px; border-radius: 16px; background: linear-gradient(145deg,#f2efff,#d9d5ff); display: grid; place-items: center; font-size: 44px; font-weight: 800; color: var(--accent); box-shadow: 0 6px 0 #c4bff0, 0 13px 18px #36357b16; transform: rotate(-12deg); }
.welcome-piece { width: 78px; height: 78px; display: grid; place-items: center; border-radius: 50%; border: 5px double #cf655e; color: #b63035; background: #fff1d9; font: bold 42px STSong, serif; box-shadow: 0 6px 0 #d9c4a3, 0 13px 20px #3530551a; }
.welcome-stone { width: 58px; height: 58px; border-radius: 50%; background: radial-gradient(circle at 30% 20%,#737683,#262938 46%,#0b0e18); box-shadow: 0 10px 15px #28243126; transform: translateY(18px); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 12px 18px; border: 1px solid var(--accent); background: var(--accent); color: white; font-size: 13px; font-weight: 650; border-radius: 9px; transition: background .15s, transform .15s; }
.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-1px); }
.button span { margin-left: auto; }
.button.secondary { background: white; color: var(--accent-dark); border-color: #ccc8ff; }
.button.secondary:hover { background: var(--accent-soft); }
.section { padding: 24px 0; }
.game-portals { padding-top: 0; }
.three-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.panel { background: white; border: 1px solid #e5e8f1; border-radius: var(--radius); box-shadow: 0 3px 12px #1c245705; overflow: hidden; }
.game-card { display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s; }
.game-card:hover { border-color: #beb8ff; box-shadow: 0 8px 20px #44427012; }
.game-image { position: relative; }
.game-image img { height: 190px; }
.card-number { position: absolute; top: 12px; left: 12px; padding: 5px 8px; font-size: 9px; letter-spacing: 1px; color: #393156; background: #ffffffc9; border-radius: 6px; }
.card-copy { padding: 20px; display: flex; flex: 1; flex-direction: column; }
.game-card h2 { font-size: 27px; }
.card-deck { font-size: 14px; margin: 8px 0; }
.game-description { font-size: 11px; line-height: 1.65; min-height: 38px; margin: 4px 0 18px; }
.card-actions { display: grid; gap: 9px; margin-top: auto; }
.card-actions .button { width: 100%; padding: 11px 15px; font-size: 12px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.section-heading h2 { font-size: 25px; }
.text-link { color: var(--accent-dark); font-size: 12px; line-height: 1.8; }
.text-link:hover { text-decoration: underline; }
.chip { border: 1px solid #e0ddff; border-radius: 8px; background: #f1efff; color: #4b42a6; padding: 6px 10px; font-size: 11px; line-height: 1.4; white-space: nowrap; }
.home-workbench { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding: 24px; }
.mini-board { width: 100%; max-width: 240px; align-self: center; justify-self: center; pointer-events: none; }
.mini-board button { pointer-events: none; }
.workbench-copy { align-self: center; }
.workbench-copy h3 { margin: 9px 0 12px; font-size: 27px; }
.workbench-copy p { font-size: 13px; }
.workbench-copy ol { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; list-style: none; padding: 0; counter-reset: steps; margin: 18px 0; }
.workbench-copy li { counter-increment: steps; font-size: 11px; color: var(--muted); line-height: 1.7; }
.workbench-copy li:before { content: counter(steps); width: 25px; height: 25px; display: grid; place-items: center; color: var(--accent-dark); background: var(--accent-soft); font-weight: 700; border-radius: 50%; margin-bottom: 5px; }
.preview-label { display: block; font-size: 9px; text-align: center; margin-top: 9px; color: var(--muted); }
.subtle { font-size: 11px; color: var(--muted); line-height: 1.7; }
.story-card { display: grid; grid-template-columns: 100px minmax(0,1fr); align-items: stretch; }
.story-card img { height: 100%; min-height: 160px; object-position: center; }
.story-card>div { padding: 15px; }
.story-card h3 { font-size: 16px; line-height: 1.4; margin-top: 6px; }
.story-card p { font-size: 11px; line-height: 1.7; margin: 8px 0; }
.story-card .eyebrow { font-size: 8px; letter-spacing: .8px; }
.story-card:hover { border-color: #c4bdff; }
.page-banner { max-width: 1000px; margin: auto; padding: 25px 0 20px; background: none; }
.page-banner h1 { font-size: 34px; }
.page-banner p { font-size: 14px; max-width: 740px; margin: 8px 0 0; }
.workspace { max-width: 1000px; margin: auto; display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,.9fr); gap: 22px; align-items: start; padding: 0 0 10px; }
.board-panel { padding: 22px; min-width: 0; }
.board-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 20px; }
.board-help { font-size: 11px; text-align: center; margin: 16px 0 0; }
/* Keep every rank visible on ordinary desktop-height windows. Mobile boards remain full width. */
@media (min-width: 681px) {
  .board-panel #board { max-width: clamp(360px, calc(100svh - 285px), 620px); margin: auto; }
  .board-panel:has(.xiangqi-board) #board { max-width: clamp(330px, calc((100svh - 285px) * .86), 540px); }
}
.studio-sidebar { display: grid; gap: 16px; min-width: 0; }
.control-panel, .insight { padding: 22px; }
.control-panel label, .insight label { display: block; margin-bottom: 10px; font-size: 12px; color: #424b62; }
.control-panel h2, .insight h2 { font-size: 23px; margin: 20px 0 14px; }
.insight { background: #f3f1ff; border-color: #e6e1ff; box-shadow: none; }
.insight h2 { margin-top: 7px; }
.insight p { font-size: 12px; }
.number-pad { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 16px 0; }
.number-pad button { min-height: 49px; font-size: 24px; font-weight: 600; background: #fafbff; }
.number-pad button:hover { background: var(--accent-soft); }
.number-pad button:last-child { grid-column: 1/-1; min-height: 40px; font-size: 12px; }
.toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px; margin-top: 15px; font-size: 12px; background: transparent; }
.toggle span { font-size: 9px; padding: 4px 8px; border-radius: 8px; background: #eef0f7; }
.toggle[aria-pressed=true] { background: var(--accent-soft); border-color: #bab3ff; color: var(--accent-dark); }
.toggle[aria-pressed=true] span { background: var(--accent); color: white; }
.control-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 10px; }
.control-row .button { flex: 1; min-width: 85px; padding: 11px; font-size: 12px; }
.control-row #pass:disabled + #hint:not(:disabled) { background: var(--accent); border-color: var(--accent); color: white; }
.text-button { border: 0; background: transparent; padding: 10px 0; font-size: 12px; color: var(--accent-dark); }
.status { border-top: 1px solid var(--line); padding-top: 14px; min-height: 50px; font-size: 12px; color: #49516b; }
.status.success { color: #087b50; }
.status.error { color: #b42c3b; }
.mode-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 20px; border-radius: 10px; background: #f1f2f8; }
.mode-tabs button { flex: 1; padding: 11px 5px; min-height: 43px; font-size: 11px; border-color: transparent; background: transparent; }
.mode-tabs button[aria-pressed=true] { background: var(--accent); color: white; }
.objective { border: 1px solid #e0dcff; border-radius: 10px; background: #f0edff; padding: 14px; }
.objective p { font-size: 12px; color: #423b77; margin-bottom: 0; }
.move-log { font-size: 12px; color: var(--muted); padding-left: 24px; line-height: 2; max-height: 160px; overflow: auto; }
.insight .button { margin-top: 12px; }
.page-intro { padding: 36px 0 8px; }
.page-intro h1 { margin: 12px 0; }
.page-intro p { max-width: 780px; font-size: 14px; }

.sudoku-board { display: grid; grid-template-columns: repeat(var(--n),minmax(0,1fr)); aspect-ratio: 1; border: 2px solid var(--board-line); border-radius: 3px; overflow: hidden; background: white; }
.sudoku-cell { border: 0; border-radius: 0; border-right: 1px solid #c5cbd8; border-bottom: 1px solid #c5cbd8; padding: 0; min-width: 0; background: white; color: var(--accent-dark); font-size: clamp(20px,2.4vw,34px); aspect-ratio: 1; display: grid; place-items: center; position: relative; font-variant-numeric: tabular-nums; }
.sudoku-cell.given { color: #171c2b; }
.sudoku-cell.peer { background: #f1f5ff; }
.sudoku-cell.selected { background: #dfe9ff; box-shadow: inset 0 0 0 2px #4b88f6; z-index: 1; }
.sudoku-cell.conflict { background: #ffeaed; color: #ae233a; }
.pencil-notes { position: absolute; inset: 5px; display: grid; grid-template-columns: repeat(var(--box),1fr); align-items: center; line-height: 1; color: #647087; }
.pencil-notes small { font-size: 9px; }
.wood-board { position: relative; container-type: inline-size; padding: 7% 6% 8%; background: #f3dfb6; border: 1px solid #dbc59e; border-radius: 10px; color: #735c3a; box-shadow: 0 3px 9px #684d1912; }
.board-inner { width: 100%; position: relative; }
.board-inner>svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.point { position: absolute; width: calc(90% / (var(--cols) - 1)); height: calc(90% / (var(--rows) - 1)); transform: translate(-50%,-50%); padding: 0; border: 0; border-radius: 50%; background: transparent; z-index: 2; display: grid; place-items: center; }
.point.selected { outline: 3px solid var(--accent); outline-offset: 2px; }
.point.legal { background: #635bff14; }
.legal-dot { position: absolute; width: 24%; height: 24%; border-radius: 50%; background: var(--accent); border: 2px solid #f4f0ff; z-index: 4; }
.point:has(.chess-piece) .legal-dot { width: 100%; height: 100%; background: transparent; border: 3px solid var(--accent); }
.chess-piece { width: 92%; height: 92%; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; background: linear-gradient(145deg,#fff9ee,#f9e5c3); color: #b63439; border: 2px solid #c26157; box-shadow: 0 3px 0 #c9ae81,0 5px 5px #4f361725; font: bold clamp(16px,6.5cqw,35px) STSong, "Songti SC", serif; }
.chess-piece.black { color: #282d3b; border-color: #73716e; }
.chess-piece small { position: absolute; bottom: 0; font: 7px system-ui; opacity: .75; }
.file-labels { display: flex; justify-content: space-between; position: absolute; left: 5.5%; right: 5.5%; bottom: 2%; font-size: 10px; opacity: .8; }
.rank-labels { position: absolute; left: -5%; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: space-between; font-size: 10px; line-height: 1; opacity: .8; pointer-events: none; }
.rank-labels span { transform: translateY(-50%); }
.stone { display: block; width: 94%; height: 94%; border-radius: 50%; background: radial-gradient(circle at 30% 20%,#6c7280,#20232c 40%,#06080e 85%); box-shadow: 0 4px 5px #47311566; }
.stone.white { background: radial-gradient(circle at 30% 22%,#fff,#f2f3f6 55%,#b7bcc6); box-shadow: 0 4px 5px #4731154d; }
.point.dead .stone { opacity: .35; }
.point.dead:after { content: '×'; color: #b22b3b; font-size: 30px; position: absolute; }
.go-board { margin: auto; max-width: 560px; }
.go-board .point { width: calc(92% / (var(--cols) - 1)); height: calc(92% / (var(--rows) - 1)); }
.mini-board .chess-piece { font-size: 18px; border-width: 1px; }
.mini-board .chess-piece small { display: none; }
.mini-board .file-labels, .mini-board .rank-labels { font-size: 7px; }

.article-layout { display: grid; grid-template-columns: minmax(0,1fr) 250px; align-items: start; gap: 24px; max-width: 1100px; margin: 30px auto; }
.article { padding: 30px; min-width: 0; }
.article h1 { font-size: clamp(30px,2.9vw,43px); line-height: 1.22; margin: 15px 0 18px; }
.article-deck { font-size: 16px !important; line-height: 1.75 !important; }
.byline { font-size: 10px !important; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 20px; }
.breadcrumb { display: block; margin-bottom: 18px; font-size: 11px; color: var(--muted); }
.article-illustration { aspect-ratio: 2.6; height: auto; border-radius: 10px; }
.article section { padding-top: 25px; scroll-margin-top: 90px; }
.article h2 { font-size: 26px; margin: 8px 0 14px; line-height: 1.35; }
.article p { font-size: 15px; line-height: 1.95; }
.teaching-diagram { margin: 24px 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fafbff; }
.diagram-frame { max-width: 330px; margin: auto; }
.diagram-frame .compact-preview { width: 100%; aspect-ratio: auto; padding: 8px; }
.teaching-diagram figcaption { margin-top: 16px; }
.teaching-diagram figcaption p { font-size: 12px; overflow-wrap: anywhere; }
.article-self-check { margin-top: 24px; border-top: 1px solid var(--line); }
.article details summary { cursor: pointer; color: var(--accent); font-weight: 650; padding: 12px 0; }
.section-number { color: var(--accent-dark); font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.article-toc { position: sticky; top: 88px; padding: 22px; display: grid; gap: 18px; font-size: 12px; }
.article-toc a:not(.button) { line-height: 1.7; border-left: 2px solid var(--line); padding-left: 12px; color: var(--muted); }
.article-toc a:hover { color: var(--accent-dark); border-color: var(--accent); }
.article-toc .button { font-size: 12px; padding: 12px; }
.mobile-toc { display: none; }
.practice-callout { display: flex; gap: 15px; border: 1px solid #e2ddff; background: var(--accent-soft); border-radius: 12px; padding: 20px; margin-top: 25px; }
.practice-callout>span { color: var(--accent); font-size: 32px; }
.practice-callout strong { font-size: 19px; }
.practice-callout p { font-size: 12px; margin: 8px 0 15px; }
.sources { margin-top: 30px; border-top: 1px solid var(--line); }
.sources h2 { font-size: 21px; }
.sources p, .sources li { font-size: 11px; line-height: 1.8; }
.sources ul { padding-left: 20px; display: grid; gap: 10px; }
.sources a { color: var(--accent-dark); overflow-wrap: anywhere; }
.info-article { max-width: 800px; padding: 30px; margin: 32px auto; background: white; border: 1px solid #e5e8f1; border-radius: 14px; }
.site-footer { max-width: var(--max); margin: 30px auto 0; padding: 28px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: start; gap: 25px; }
.site-footer .brand { font-size: 17px; }
.site-footer .brand-mark i { background: var(--accent); }
.site-footer p { font-size: 11px; }
.site-footer nav { max-width: 330px; display: flex; flex-wrap: wrap; gap: 16px; padding-top: 5px; font-size: 11px; }
.site-footer>small { font-size: 10px; color: var(--muted); line-height: 1.8; text-align: right; }

@media (max-width: 1200px) {
  :root { --sidebar: 184px; }
  .site-header { padding-left: 12px; padding-right: 12px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand-mark { width: 23px; height: 23px; }
  .welcome-tokens { gap: 8px; }
  .welcome-number { width: 48px; height: 48px; font-size: 33px; }
  .welcome-piece { width: 60px; height: 60px; font-size: 33px; }
  .welcome-stone { width: 43px; height: 43px; }
  .game-image img { height: 165px; }
  .card-copy { padding: 17px; }
  .workspace { grid-template-columns: minmax(0,1.15fr) minmax(0,.95fr); gap: 18px; }
  .board-panel, .control-panel, .insight { padding: 18px; }
  .story-card { display: block; }
  .story-card img { height: 125px; min-height: 0; }
}
@media (max-width: 960px) {
  :root { --sidebar: 0px; }
  .site-header { position: relative; width: 100%; padding: 15px 22px; flex-direction: row; align-items: center; gap: 24px; overflow: visible; }
  .site-header .brand { font-size: 18px; margin: 0; }
  .site-header nav { display: flex; gap: 4px; margin-left: auto; }
  .site-header nav a { font-size: 11px; padding: 11px 12px; gap: 7px; }
  .site-header nav svg { width: 18px; height: 18px; }
  .site-header .sidebar-bottom { display: none; }
  .hero h1 { font-size: 36px; }
  .welcome-tokens { display: none; }
  .topbar { min-height: 53px; padding: 8px 22px; }
  .home-workbench { grid-template-columns: 190px 1fr; gap: 24px; }
  .workbench-copy h3 { font-size: 23px; }
  .workbench-copy ol { gap: 10px; }
  .article-layout { grid-template-columns: minmax(0,1fr) 210px; gap: 18px; }
}
@media (max-width: 680px) {
  main { padding: 0 16px; }
  .site-header { padding: 15px 16px 10px; flex-wrap: wrap; gap: 13px; }
  .site-header nav { flex-basis: 100%; width: 100%; justify-content: space-between; margin: 0; }
  .site-header nav a { flex: 1; justify-content: center; padding: 10px 5px; gap: 5px; font-size: 11px; min-height: 40px; }
  .site-header nav svg { width: 16px; height: 16px; }
  .topbar { padding: 7px 16px; min-height: 47px; }
  .topbar-path { font-size: 10px; gap: 9px; }
  .language-switch a { padding: 6px 9px; font-size: 11px; }
  .hero { padding: 26px 0 21px; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 13px; }
  .hero-details { font-size: 10px; gap: 16px; }
  .three-grid { grid-template-columns: 1fr; gap: 16px; }
  .section { padding: 20px 0; }
  .game-portals { padding-top: 0; }
  .game-image img { height: 180px; }
  .card-copy { padding: 19px; }
  .game-description { min-height: 0; }
  .card-actions { grid-template-columns: 1fr 1fr; }
  .card-actions .button { font-size: 11px; padding: 11px 9px; }
  .card-actions>.button:only-child { grid-column: 1/-1; }
  .section-heading { align-items: start; gap: 12px; margin-bottom: 14px; }
  .section-heading h2 { font-size: 22px; }
  .section-heading .text-link { font-size: 10px; white-space: nowrap; }
  .section-heading .chip { display: none; }
  .home-workbench { grid-template-columns: 1fr; padding: 20px; gap: 22px; }
  .mini-board { max-width: 220px; }
  .workbench-copy ol { grid-template-columns: 1fr; }
  .workbench-copy li { display: flex; gap: 10px; align-items: center; }
  .workbench-copy li:before { margin: 0; flex-shrink: 0; }
  .story-card { display: grid; grid-template-columns: 95px minmax(0,1fr); }
  .story-card img { height: 100%; min-height: 150px; }
  .story-card h3 { font-size: 17px; }
  .page-banner { padding: 23px 0 18px; }
  .page-banner h1 { font-size: 31px; }
  .page-banner p { font-size: 12px; }
  .workspace { grid-template-columns: 1fr; gap: 16px; }
  .board-panel { padding: 18px; }
  .board-top .eyebrow { font-size: 9px; }
  .board-help { font-size: 10px; }
  .control-panel, .insight { padding: 20px; }
  .sudoku-cell { font-size: 27px; }
  .pencil-notes { inset: 3px; }
  .pencil-notes small { font-size: 8px; }
  .chess-piece { font-size: clamp(18px,6vw,32px); }
  .mini-board .chess-piece { font-size: 18px; }
  .article-layout { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
  .article { padding: 22px; width: 100%; }
  .article h1 { font-size: 32px; }
  .article h2 { font-size: 23px; }
  .article p { font-size: 14px; }
  .article-toc { display: none; }
  .mobile-toc { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #fafaff; margin-bottom: 18px; font-size: 12px; }
  .mobile-toc summary { cursor: pointer; color: var(--accent-dark); font-weight: 650; }
  .mobile-toc nav { display: grid; gap: 12px; padding-top: 15px; color: var(--muted); line-height: 1.7; }
  .info-article { margin: 24px auto; padding: 22px; }
  .page-intro { padding-top: 28px; }
  .page-intro h1 { font-size: 33px; }
  .site-footer { display: grid; gap: 16px; padding: 24px 16px; }
  .site-footer>small { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { transition: none !important; }
}
@media print {
  body { padding: 0; background: white; }
  .site-header, .topbar, .site-footer, .page-banner, .studio-sidebar, .section, .board-help, .skip-link { display: none !important; }
  main { padding: 0; }
  .workspace { display: block; padding: 0; margin: 0; }
  .board-panel { border: 0; box-shadow: none; max-width: 550px; margin: auto; }
  .sudoku-cell, .sudoku-cell.given, .sudoku-cell.peer, .sudoku-cell.selected { background: white; color: black; box-shadow: none; }
}
/* New complete references: design/v4-learning/hub.png and studio.png. */
progress { display: block; width: 100%; height: 10px; border: 0; border-radius: 8px; overflow: hidden; background: #e5e8f1; accent-color: var(--accent); }
progress::-webkit-progress-bar { background: #e5e8f1; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 8px; }
.learning-cards { margin: 0 0 26px; }
.course-card { overflow: hidden; }
.course-card img { width: 100%; height: clamp(150px,15vw,205px); aspect-ratio: 16/9; object-fit: cover; }
.course-card>div { padding: 24px; }
.course-card h2 { font-size: 25px; }
.course-card p { font-size: 13px; }
.course-card .button { margin-top: 22px; width: 100%; }
.route-preview { padding: 28px; margin-bottom: 28px; }
.route-preview ol { padding: 0; display: flex; list-style: none; gap: 15px; margin: 30px 0; }
.route-preview li { flex: 1; display: grid; justify-items: center; gap: 14px; position: relative; }
.route-preview li:after { content: ''; position: absolute; top: 21px; left: 65%; width: 75%; border-top: 3px solid #e0ddff; }
.route-preview li:last-child:after { display: none; }
.route-preview li span { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); width: 44px; height: 44px; border-radius: 50%; font-size: 22px; }
.route-preview li strong { font-size: 13px; text-align: center; }
.course-heading { padding: 25px 0; }
.course-heading h1 { font-size: clamp(25px,2.5vw,38px); margin-top: 16px; }
.course-practice-link { display: inline-block; margin-top: 12px; font-size: 12px; }
.course-reading li { color: var(--muted); line-height: 1.7; padding: 5px 0; }
.course-progress-line { display: flex; align-items: center; gap: 18px; }
.course-progress-line span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.journey-layout { display: grid; grid-template-columns: 215px minmax(0,1fr); gap: 18px; align-items: start; }
.course-outline { padding: 20px 12px; max-height: calc(100svh - 110px); overflow: auto; position: sticky; top: 84px; }
.course-outline h2 { font-size: 18px; padding: 0 8px; }
.course-outline .subtle { padding: 0 8px; }
.course-outline h3 { font-size: 13px; margin: 20px 8px 8px; }
.course-outline ol { margin: 0; padding: 0; list-style: none; }
.course-outline button[data-step] { display: flex; gap: 8px; text-align: left; align-items: center; width: 100%; border: 0; font-size: 12px; line-height: 1.5; min-height: 46px; padding: 8px; }
.course-outline button[aria-current=step] { background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }
.step-dot { border: 1px solid var(--line); border-radius: 50%; height: 22px; min-width: 22px; display: grid; place-items: center; font-size: 10px; }
.step-completed .step-dot { background: var(--accent); color: white; border-color: var(--accent); }
.step-reviewed .step-dot { background: #fff2d9; color: #754c00; border-color: #e1bd7d; }
.lesson-workspace { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(260px,.9fr); gap: 16px; align-items: start; }
.lesson-board-panel { padding: 22px; }
.lesson-board { max-width: 460px; margin: auto; }
.lesson-board .wood-board { margin: 0 auto; }
.lesson-instruction { padding: 25px; min-width: 0; }
.lesson-instruction h2 { font-size: 23px; margin-top: 12px; }
.lesson-instruction>p { font-size: 14px; }
.xiangqi-piece-guide { margin-top: 18px; }
.xiangqi-piece-guide table { width: 100%; border-collapse: collapse; font-size: 13px; }
.xiangqi-piece-guide caption { text-align: left; font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.xiangqi-piece-guide th, .xiangqi-piece-guide td { padding: 8px 5px; border-bottom: 1px solid var(--line); text-align: center; }
.xiangqi-piece-guide th:first-child { text-align: left; }
.xiangqi-piece-guide thead th { font-size: 12px; }
.xiangqi-piece-guide p { font-size: 12px; margin-bottom: 0; }
.piece-guide-symbol { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid currentColor; background: #fff7e8; font: 700 20px STSong, "Songti SC", serif; }
.piece-guide-symbol.red { color: #b63439; }
.piece-guide-symbol.black { color: #282d3b; }
.lesson-instruction #lesson-action { display: grid; gap: 10px; margin-top: 20px; }
.quiz-option { text-align: left; padding: 12px 15px; min-height: 48px; line-height: 1.6; }
.quiz-option:hover { background: var(--accent-soft); border-color: var(--accent); }
.lesson-feedback { margin-top: 20px; line-height: 1.6; font-size: 14px; border-radius: 10px; }
.lesson-feedback:empty { display: none; }
.lesson-feedback.success { padding: 15px; background: #e9f8ef; color: #185d36; }
.lesson-feedback.error { padding: 15px; background: #fff0ef; color: #943526; }
.lesson-tools { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--line); }
.lesson-tools .button { font-size: 12px; padding: 10px; }
.auto-next { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; min-height: 44px; }
.auto-next input { width: 18px; min-height: 18px; height: 18px; accent-color: var(--accent); }
.journey-navigation { grid-column: 1/-1; display: flex; gap: 16px; justify-content: space-between; align-items: end; padding: 20px; }
.journey-navigation label { max-width: 340px; flex: 1; font-size: 12px; color: var(--muted); }
.journey-navigation select { margin-top: 8px; }
.journey-navigation .button { font-size: 12px; white-space: nowrap; }
.lesson-number-pad { grid-template-columns: repeat(4,1fr); margin-top: 18px; }
.course-finish { grid-column: 1/-1; padding: 24px; }
.course-finish[hidden] { display: none; }
.course-finish .text-link { margin-left: 15px; }
.course-reading { padding: 22px; margin: 24px 0; }
.course-reading summary { color: var(--accent-dark); cursor: pointer; }
.course-reading section { padding: 24px 0 0; }
.course-reading h2 { font-size: 19px; }
.practice-route-link { margin-top: 20px; }
@media (min-width:1201px) {
 .lesson-board { max-width: clamp(280px,calc(100svh - 410px),460px); }
 .lesson-board:has(.xiangqi-board) { max-width: clamp(260px,calc((100svh - 410px)*.8),400px); }
}
@media (max-width:1200px) {
 .journey-layout { grid-template-columns: 185px minmax(0,1fr); gap: 12px; }
 .lesson-workspace { grid-template-columns: minmax(0,1fr); }
 .lesson-instruction { padding: 22px; }
 .lesson-board { max-width: 380px; }
}
@media (max-width:680px) {
 .site-header nav { flex-wrap: wrap; }
 .site-header nav a { flex: 1 0 28%; }
 .journey-layout { display: flex; flex-direction: column; }
 .course-outline { position: static; max-height: 210px; width: 100%; order: 2; }
 .lesson-workspace { width: 100%; display: flex; flex-direction: column; }
 .lesson-instruction { order: 0; width: 100%; }
 .lesson-board-panel { order: 1; width: 100%; }
 .journey-navigation { order: 2; width: 100%; }
 .course-finish { order: 3; width: 100%; }
 .lesson-board-panel { padding: 20px; }
 .lesson-instruction h2 { font-size: 22px; }
 .journey-navigation { flex-wrap: wrap; padding: 16px; }
 .journey-navigation label { order: 3; flex-basis: 100%; max-width: none; }
 .course-heading p { font-size: 13px; }
 .course-card>div { padding: 20px; }
 .route-preview { padding: 22px; }
 .route-preview ol { gap: 5px; }
 .route-preview li strong { font-size: 10px; }
 .route-preview li:after { width: 60%; left: 75%; }
}
