/* Definite chart cells prevent SVG intrinsic size from pushing through the text. */
.deck-stage{inset:14px 48px 80px 28px}
.deck-stage>.page{height:100%;min-height:0;gap:9px}
.deck-stage .deck-heading,.deck-stage .chapter-intro{flex:0 0 auto;margin:0}
.deck-stage .chapter-intro>div:first-child{padding:9px 14px}
.deck-stage .chapter-intro h1,.deck-stage .deck-heading h1{font-size:30px;margin:4px 0}
.deck-stage .chapter-intro p,.deck-stage .deck-heading p{font-size:15px;line-height:1.35;margin:4px 0}
.deck-stage .chapter-intro .eyebrow{font-size:11px}
.deck-stage .segmented{flex:0 0 auto;margin:0;gap:10px}
.deck-stage .segmented button{padding:7px 15px;font-size:17px}
.deck-stage .exhibit,.deck-stage .section>.exhibit{flex:1 1 0;min-height:0;height:auto;max-height:none;display:grid;grid-template-columns:minmax(0,1fr) 335px;grid-template-rows:minmax(0,1fr);padding:12px;gap:18px;margin:0;overflow:hidden}
.deck-stage .visual-board,.deck-stage .visual-board.tall{position:relative;display:block;align-self:stretch;width:100%;height:auto;min-width:0;min-height:0;max-height:none;aspect-ratio:auto;overflow:hidden}
.deck-stage .visual-board>svg{position:absolute;inset:0;width:100%;height:100%;max-height:none}
.deck-stage #starBoard>.zoom-stage{position:absolute;top:0;left:0;max-width:none;max-height:none}
.deck-stage #starBoard>.zoom-stage>svg{width:100%;height:100%;max-height:none}
.deck-stage .exhibit-aside{box-sizing:border-box;min-width:0;min-height:0;display:flex;flex-direction:column;gap:7px;padding:12px!important;align-self:stretch}
.deck-stage .exhibit-aside h2{font-size:24px;line-height:1.2;margin:0}
.deck-stage .exhibit-aside p{font-size:15px;line-height:1.4;margin:0}
.deck-stage .exhibit-aside .kicker{font-size:14px;line-height:1.3}
.deck-stage .exhibit-aside .data-pair{margin:0;gap:8px}
.deck-stage .exhibit-aside .data-pair strong{font-size:32px}
.deck-stage .exhibit-aside .data-pair span{font-size:14px}
.deck-stage .exhibit-aside .term-tooltip,.deck-stage .exhibit-aside .quote{padding:7px;font-size:14px;line-height:1.35;margin:0}
.deck-stage .exhibit-aside .controls{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:0;padding:7px;flex:0 0 auto}
.deck-stage .exhibit-aside .controls input[type=range]{grid-column:1/-1;grid-row:1;width:100%;min-width:0;margin:6px 0}
.deck-stage .exhibit-aside .controls button,.deck-stage .exhibit-aside .controls label{font-size:14px;padding:5px;min-width:0}
.deck-stage .exhibit-aside .controls label{grid-column:1/-1;display:flex;align-items:center;gap:8px}
.deck-stage .exhibit-aside .controls select{font-size:14px;padding:2px 8px}
.deck-stage .exhibit-aside .panel-heading{display:block;margin:0;padding:0}
.deck-stage .exhibit-aside .panel-heading h2{font-size:19px;margin-bottom:6px}
.deck-stage .exhibit-aside .tool-row{display:flex;flex-wrap:wrap;gap:5px}
.deck-stage .exhibit-aside .tool-row label{width:100%;font-size:14px}
.deck-stage .exhibit-aside .tool-row button{padding:4px 9px;font-size:14px}
.deck-stage .exhibit-aside .source-note,.deck-stage .exhibit-aside .control-note{font-size:12px;line-height:1.35;padding:5px 7px;margin:0}
.deck-stage .section:has(>.exhibit){display:flex;flex-direction:column;flex:1;min-height:0;margin:0}
.deck-stage .section:has(>.exhibit) .section-head{flex:0 0 auto;margin:0 0 6px}
.deck-stage .section:has(>.exhibit) .section-head h2{font-size:21px}
.deck-stage .section:has(>.exhibit) .section-head p{font-size:14px}
.deck-stage .hero{height:100%;grid-template-columns:390px minmax(0,1fr);gap:22px}
.deck-stage .hero-art{min-height:0;min-width:0;position:relative}
.deck-stage .home-ring{position:absolute;inset:0 0 42px;height:auto;width:auto;max-height:none}
.deck-stage .home-ring>svg{width:100%;height:100%}
.deck-stage .hero-tip{position:absolute;bottom:0;left:0;right:0;margin:0}
.deck-stage .deck-objects .hand-icon{width:160px;height:160px}

/* Fit only the two land atlases into their existing single-screen area. */
[data-deck-page="land"] .deck-stage .deck-objects{display:grid;flex:1 1 0;min-height:0;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:repeat(var(--atlas-rows,2),minmax(0,1fr));gap:12px;margin:0}
[data-deck-page="land"] .deck-stage .deck-objects .object-card{box-sizing:border-box;display:flex;flex-direction:column;min-width:0;min-height:0;height:100%;padding:10px 14px;gap:6px;justify-content:center}
[data-deck-page="land"] .deck-stage .deck-objects .hand-icon{flex:1 1 0;min-height:0;max-height:120px;width:120px;height:auto;margin:0 auto;overflow:visible}
[data-deck-page="land"] .deck-stage .deck-objects strong,[data-deck-page="land"] .deck-stage .deck-objects small{box-sizing:border-box;flex:0 0 auto;line-height:1.2;margin:0;padding:4px 8px}

.beijing-time{display:flex;flex-wrap:wrap;gap:5px 10px;border:1px solid #b6a78c80;background:#faf6edfa;padding:8px 10px;margin:12px 0 0;font-size:15px}.beijing-time time{font-variant-numeric:tabular-nums}.beijing-time button{width:100%;font-size:16px;text-align:left;padding:3px 0;border:0;background:transparent;color:var(--accent)}.deck-stage .hero-copy .home-date{margin-top:12px}.deck-stage .hero-copy h1{font-size:62px!important;margin:12px 0!important}.deck-stage .hero-copy p{font-size:17px!important;line-height:1.5;margin:12px 0}.deck-stage .hero-copy .actions{margin-top:14px}
/* Quiz and certificate fit the available page; actions always retain their own row. */
[data-deck-page="quiz"] .deck-stage .quiz-shell{box-sizing:border-box;display:flex;flex-direction:column;flex:1 1 0;width:920px;max-width:100%;height:auto;min-height:0;max-height:none;padding:14px 24px;margin:0 auto;gap:10px}
[data-deck-page="quiz"] .quiz-shell>.eyebrow{flex:0 0 auto;font-size:14px;line-height:1.3}
[data-deck-page="quiz"] .quiz-shell .question{flex:0 0 auto;font-size:25px!important;line-height:1.35;margin:0;padding:10px 12px}
[data-deck-page="quiz"] .quiz-shell .option-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));flex:1 1 0;min-height:115px;max-height:160px;gap:9px;margin:0}
[data-deck-page="quiz"] .quiz-shell .option-grid button{box-sizing:border-box;min-height:0;padding:8px 14px;font-size:20px!important;line-height:1.35}
[data-deck-page="quiz"] .quiz-shell .quiz-feedback{flex:0 0 auto;min-height:0;font-size:16px!important;line-height:1.4;padding:8px 10px;margin:0}
[data-deck-page="quiz"] .quiz-shell .actions{flex:0 0 auto;display:flex;flex-wrap:wrap;margin:0;gap:10px}
[data-deck-page="quiz"] .quiz-shell .actions button{padding:8px 15px;font-size:17px!important;line-height:1.3}
[data-deck-page="quiz"] .quiz-shell:has(.certificate){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto;gap:10px 20px}
[data-deck-page="quiz"] .quiz-shell .certificate{grid-column:1;grid-row:1/4;width:100%;height:100%;min-height:0;max-height:none;margin:0;display:flex;align-items:center}
[data-deck-page="quiz"] .quiz-shell .certificate>svg{width:100%;height:100%;max-height:none;object-fit:contain}
[data-deck-page="quiz"] .quiz-shell:has(.certificate)>.data-pair{grid-column:2;grid-row:1;margin:0}
[data-deck-page="quiz"] .quiz-shell:has(.certificate)>.data-pair strong{font-size:32px}
[data-deck-page="quiz"] .quiz-shell:has(.certificate)>.name-field{grid-column:2;grid-row:2;align-content:center;align-items:center;display:flex;flex-wrap:wrap;gap:8px;margin:0;min-width:0}
[data-deck-page="quiz"] .quiz-shell .name-field input{box-sizing:border-box;width:100%;max-width:100%;min-width:0}
[data-deck-page="quiz"] .quiz-shell:has(.certificate)>.actions{grid-column:2;grid-row:3}
[data-deck-page="quiz"] .quiz-shell:has(.certificate)>.source-note{grid-column:1/-1;grid-row:4;margin:0;font-size:12px!important;line-height:1.35}
/* Homepage outer text sheet: pale xuan paper with a torn perimeter. */
body:not(.dark) [data-deck-page="home"] .hero-copy{border:0;background:transparent;isolation:isolate;box-shadow:none;overflow:visible}
body:not(.dark) [data-deck-page="home"] .hero-copy::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background-color:#fffdf8;background-image:repeating-linear-gradient(7deg,transparent 0 5px,#c9c0ad08 5px 6px,transparent 6px 11px),repeating-linear-gradient(93deg,transparent 0 8px,#bfb6a409 8px 9px,transparent 9px 17px),radial-gradient(ellipse at 25% 18%,#ffffffb3,transparent 72%);clip-path:polygon(0.6% 0.5%,6% 0.2%,12% 0.7%,20% 0.1%,28% 0.6%,37% 0.2%,45% 0.8%,54% 0.2%,63% 0.5%,72% 0%,81% 0.6%,90% 0.2%,99.3% 0.5%,99.7% 7%,99.2% 15%,99.8% 24%,99.3% 33%,100% 42%,99.4% 51%,99.8% 61%,99.2% 71%,99.7% 80%,99.3% 91%,99.7% 99.4%,91% 99.8%,82% 99.2%,74% 99.8%,64% 99.4%,55% 100%,46% 99.3%,36% 99.8%,27% 99.2%,18% 99.8%,9% 99.4%,0.4% 99.7%,0.8% 91%,0.2% 82%,0.7% 73%,0% 63%,0.6% 54%,0.2% 45%,0.8% 35%,0.1% 26%,0.6% 17%,0.2% 8%)}

/* Unified pale xuan-paper panels; edge layer never clips text or intercepts input. */
body .hero-copy,
body .deck-heading,
body .chapter-intro>div:first-child,
body .exhibit,
body .exhibit-aside,
body .info-box,
body .quiz-shell,
body .object-card,
body .deck-chapter,
body .poster-card,
body .section-head,
body .source-note,
body .control-note,
body .term-tooltip,
body .quote,
body .beijing-time,
body .hero-tip,
body .deck-footer,
body .ink-title>div,
body .ink-panel-heading,
body .ink-sheet,
body .ink-human>div:last-child,
body .ink-detail-row>div:first-child,
body .ink-hou>div,
body .ink-gua,
body .title-copy,
body .dialog-content{position:relative;isolation:isolate;background:transparent!important;border-color:transparent!important;outline-color:transparent!important;box-shadow:none!important;border-radius:0!important}
body .hero-copy::before,
body .deck-heading::before,
body .chapter-intro>div:first-child::before,
body .exhibit::before,
body .exhibit-aside::before,
body .info-box::before,
body .quiz-shell::before,
body .object-card::before,
body .deck-chapter::before,
body .poster-card::before,
body .section-head::before,
body .source-note::before,
body .control-note::before,
body .term-tooltip::before,
body .quote::before,
body .beijing-time::before,
body .hero-tip::before,
body .deck-footer::before,
body .ink-title>div::before,
body .ink-panel-heading::before,
body .ink-sheet::before,
body .ink-human>div:last-child::before,
body .ink-detail-row>div:first-child::before,
body .ink-hou>div::before,
body .ink-gua::before,
body .title-copy::before,
body .dialog-content::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;border:0;background-color:#fffdf8;background-image:repeating-linear-gradient(7deg,transparent 0 5px,#c9c0ad08 5px 6px,transparent 6px 11px),repeating-linear-gradient(93deg,transparent 0 8px,#bfb6a409 8px 9px,transparent 9px 17px),radial-gradient(ellipse at 25% 18%,#ffffffb3,transparent 72%);clip-path:polygon(0.6% 0.5%,6% 0.2%,12% 0.7%,20% 0.1%,28% 0.6%,37% 0.2%,45% 0.8%,54% 0.2%,63% 0.5%,72% 0%,81% 0.6%,90% 0.2%,99.3% 0.5%,99.7% 7%,99.2% 15%,99.8% 24%,99.3% 33%,100% 42%,99.4% 51%,99.8% 61%,99.2% 71%,99.7% 80%,99.3% 91%,99.7% 99.4%,91% 99.8%,82% 99.2%,74% 99.8%,64% 99.4%,55% 100%,46% 99.3%,36% 99.8%,27% 99.2%,18% 99.8%,9% 99.4%,0.4% 99.7%,0.8% 91%,0.2% 82%,0.7% 73%,0% 63%,0.6% 54%,0.2% 45%,0.8% 35%,0.1% 26%,0.6% 17%,0.2% 8%)}
body .deck-footer{position:absolute}body .title-copy{padding:28px 35px}body.dark .deck-stage,body.dark .title-copy,body.dark .dialog-content,body.dark .ink-sheet{color:#48483f}body.dark .deck-heading p,body.dark .exhibit-aside,body.dark .object-card,body.dark .source-note,body.dark .control-note{color:#48483f}body .exhibit{outline:0;box-shadow:none!important}
.seasonal-fall{position:absolute;inset:0;overflow:hidden;z-index:0;pointer-events:none}
.seasonal-fall>span{position:absolute;top:-45px;left:var(--fall-x);width:var(--fall-size);height:var(--fall-size);opacity:0;animation:seasonal-descent var(--fall-duration) linear var(--fall-delay) infinite;will-change:transform}
.seasonal-fall svg{display:block;width:100%;height:100%}
@keyframes seasonal-descent{0%{opacity:0;transform:translate(0,-25px) rotate(-15deg)}12%{opacity:.32}45%{transform:translate(var(--fall-drift),335px) rotate(70deg)}85%{opacity:.3}100%{opacity:0;transform:translate(0,800px) rotate(160deg)}}
.ink-still .seasonal-fall>span{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.seasonal-fall{display:none}}
/* Archive cards reserve a separate caption row below the complete poster. */
[data-deck-page="gallery"] .posters-grid{display:grid;flex:1 1 0;min-height:0;grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-template-rows:minmax(0,1fr);gap:18px;margin:0;padding:8px 0}
[data-deck-page="gallery"] .poster-card{box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;align-items:stretch;min-width:0;min-height:0;height:100%;padding:12px 9px;gap:10px;overflow:hidden}
[data-deck-page="gallery"] .poster-card img{display:block;width:100%;height:100%;min-height:0;max-height:100%;object-fit:contain;object-position:center}
[data-deck-page="gallery"] .poster-card span{box-sizing:border-box;display:block;width:100%;min-height:42px;padding:6px 2px;margin:0;font-size:15px!important;line-height:1.4;overflow-wrap:anywhere;text-align:center}
