/* Shared presentation layer, 2026-10-12. Remove this link to restore the archived styling. */
:root {
  --site-reading: Georgia, 'Songti SC', 'Noto Serif CJK SC', serif;
  --site-interface: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
  --site-heading: 'Cormorant Garamond', 'Songti SC', Georgia, serif;
  --site-border: rgba(201, 169, 97, .28);
}
body { -webkit-font-smoothing: antialiased; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid #e1c485; outline-offset: 4px;
}
body .lang-opt, body .cat-btn, body .filter-btn,
body .cave-ctl-btn, body .panel-close, body .restart-btn {
  font-family: var(--site-interface); letter-spacing: .025em;
}
body .lang-opt { padding: 7px 9px; font-size: 11px; }
body .cat-btn { min-height: 36px; padding-inline: 19px; border-color: var(--site-border); }
body .cat-btn.active { background: rgba(201,169,97,.16); }
body .bar-chapter-badge { letter-spacing: .025em; }
body .chapter-nav, body .gold-chain { opacity: .72; }
body .chapter-nav:hover, body .gold-chain:hover { opacity: 1; }
body .page-title-main, body .page-title-sub,
body [data-role='chapter-title'], body [data-role='screen-title'],
body .main-title .en { letter-spacing: .025em; }
html[lang='en'] .page-title-main { font-family: var(--site-heading); font-size: 34px; }
body .page-title-sub, body [data-role='screen-subtitle'] {
  font-family: var(--site-interface); font-size: 12px; line-height: 1.65;
  color: rgba(231,216,188,.8); letter-spacing: .035em;
}
body .page-header { margin-bottom: 30px; }
body .buddha-card { border-radius: 10px; border-color: var(--site-border); }
body .buddha-card-name-en { font-family: var(--site-heading); letter-spacing: .02em; }
html[lang='en'] .buddha-card-name-en { display: none; }
html[lang='en'] .buddha-card-name-zh { font-family: var(--site-heading); font-size: 22px; font-weight: 500; }
body .buddha-card-quote p { font-size: 12px; line-height: 1.65; }
body .buddha-card-desc { font: 13px/1.7 var(--site-reading); }
body .detail-panel, body .food-panel {
  border-color: var(--site-border); box-shadow: -12px 0 40px rgba(0,0,0,.22);
}
body .panel-desc, body .detail-desc, body .detail-description {
  font-family: var(--site-reading); font-size: 16px; line-height: 1.85; letter-spacing: .01em;
}
/* Long-form chapters share a reading rhythm, while keeping their own imagery. */
body .sutra-stage { max-width: 960px; padding-inline: 44px; }
body .sutra-header { margin-bottom: 64px; padding-bottom: 34px; }
body .sutra-title { letter-spacing: .035em; line-height: 1.2; }
body .sutra-title .en { font-size: clamp(32px, 3.5vw, 46px); font-style: normal; letter-spacing: .01em; }
body .sutra-subtitle { font-family: var(--site-interface); font-size: 12px; line-height: 1.7; letter-spacing: .035em; }
body .sutra-subtitle .en { font-family: inherit; letter-spacing: inherit; }
body .sutra-section { grid-template-columns: 60px minmax(0,1fr); gap: 30px; margin-bottom: 72px; }
body .sutra-section-title { margin-bottom: 22px; padding-bottom: 14px; letter-spacing: .04em; }
body .sutra-section-title .en { font-size: 28px; font-style: normal; letter-spacing: .01em; }
body .sutra-paragraphs p { font-size: 17px; line-height: 1.85; letter-spacing: .01em; }
body .sutra-paragraphs .en { font-family: var(--site-reading); letter-spacing: 0; text-indent: 0; }
html[lang='en'] .sutra-paragraphs p { text-indent: 0; max-width: 72ch; }
body .sutra-part-cn { color: #c6ac76; font-size: 26px; }
body .color-stage { max-width: 1080px; }
body .color-title, body .color-act-title { letter-spacing: .04em; }
body .color-title .en, body .color-act-title .en { font-style: normal; letter-spacing: .015em; }
body .color-act-body { font-family: var(--site-reading); font-size: 17px; line-height: 1.85; }
body .color-fig-caption { font-family: var(--site-interface); line-height: 1.65; letter-spacing: .01em; }
body .acks-content { font-family: var(--site-reading); line-height: 1.85; }
body[data-site-screen='references'] { max-width: 820px; font: 17px/1.85 var(--site-reading); padding: 54px 32px 80px; }
body[data-site-screen='references'] h1 { font: 46px/1.15 var(--site-heading); }
body[data-site-screen='references'] h2 { margin-top: 44px; }
/* Panoramic viewing: readable labels and quieter controls. */
body[data-site-screen='chapter-02'] .top-info {
  padding: 14px 24px 18px; width: max-content; max-width: calc(100vw - 180px);
  border-radius: 0 0 16px 16px;
  background: linear-gradient(180deg,rgba(16,14,12,.77),rgba(16,14,12,.32));
}
body[data-site-screen='chapter-02'] .top-info .main-title {
  font-family: var(--site-heading); font-size: 29px; letter-spacing: .045em; line-height: 1.2;
}
body[data-site-screen='chapter-02'] .top-info .sub-title {
  font-family: var(--site-interface); font-size: 11px; letter-spacing: .035em; line-height: 1.6; color: #d8c7a8;
}
body[data-site-screen='chapter-02'] #filterPanel {
  width: 216px; padding: 12px; border-radius: 12px; box-shadow: 0 8px 24px #0003;
  background: rgba(24,21,17,.88);
}
body[data-site-screen='chapter-02'] #filterPanel .cave-ctl-btn { font: 12px/1.4 var(--site-interface); }
body[data-site-screen='chapter-02'] .repair-level, body[data-site-screen='chapter-02'] #repairStatus {
  font-family: var(--site-interface); font-size: 11px; letter-spacing: .01em;
}
body[data-site-screen='chapter-02'] .cave-controls { background: rgba(24,21,17,.88); border-color: var(--site-border); }
body[data-site-screen='chapter-02'] .bottom-hint { font-family: var(--site-interface); letter-spacing: .01em; }
/* The notebook chapters retain their paper and handwriting. */
body[data-site-screen='chapter-01'] .body-text { line-height: 1.8; letter-spacing: .015em; }
body[data-site-screen='prologue'] .cover-sub { line-height: 1.65; letter-spacing: .035em; }
@media(max-width:768px) {
  body .sutra-stage { padding: calc(8vh + 40px) 24px calc(8vh + 72px); }
  body .sutra-section { grid-template-columns: 34px minmax(0,1fr); gap: 16px; }
  body .sutra-paragraphs p, body .color-act-body { font-size: 16px; line-height: 1.8; }
  body .sutra-header { margin-bottom: 44px; }
  body .sutra-section-title .en { font-size: 24px; }
  body .page-title-main { font-size: 28px; }
  body[data-site-screen='chapter-02'] .top-info { max-width: calc(100vw - 130px); width: auto; padding: 12px 14px; }
  body[data-site-screen='chapter-02'] .top-info .main-title { font-size: 20px; }
  body[data-site-screen='chapter-02'] .top-info .sub-title { font-size: 10px; }
  body[data-site-screen='chapter-02'] #filterPanel { width: 200px; }
}
@media(prefers-reduced-motion:reduce) {
  body .chapter-nav, body .gold-chain, body button { transition: none; }
}

/* Compact restoration control and forgiving pointer targets. */
body[data-site-screen='chapter-02'] #filterPanel{width:148px;padding:8px;gap:4px;bottom:100px;border-radius:10px}
body[data-site-screen='chapter-02'] .repair-options{padding:0;background:transparent}
body[data-site-screen='chapter-02'] #originalMuralBtn{display:none}
body[data-site-screen='chapter-02'] #restoreMuralBtn{padding:8px 10px;min-height:34px;white-space:nowrap}
body[data-site-screen='chapter-02'] #repairStatus{display:none}
body[data-site-screen='chapter-02'] .repair-notice #repairStatus{display:block;padding:4px}
#repairAdjust summary{font:10px/1.6 var(--site-interface);color:#cdbb98;cursor:pointer;padding:3px 5px}
#repairAdjust[open]{padding-bottom:4px}
#repairAdjust .repair-level{margin:6px 0}
#repairAdjust .repair-level label{font-size:10px}
.hotspot-dot::after{content:'';position:absolute;width:34px;height:34px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:50%}
.food-label{pointer-events:auto;cursor:pointer}
.food-dot.pointer-near{r:.56;stroke:#f0d78a;stroke-width:.08;animation:none}
.food-dot:focus-visible{stroke:#fff0c4;stroke-width:.15;outline:none}
@media(pointer:coarse){.hotspot-dot::after{width:44px;height:44px}}
@media(max-width:640px){body[data-site-screen='chapter-02'] #filterPanel{width:140px;bottom:128px;padding:7px}}

html[lang='en'] #panelNameEn{display:none}

/* Keep the dining heading, navigation and illustrated cards in separate areas. */
body[data-site-screen='chapter-4-1'] .page-header{position:relative;top:auto;padding:72px 40px 24px 96px;margin:0;min-height:190px;box-sizing:border-box}
body[data-site-screen='chapter-4-1'] .page-content{position:relative;top:auto;bottom:auto;height:calc(100dvh - 260px);overflow:auto}
body[data-site-screen='chapter-4-1'] .cards-scroll{position:relative;inset:auto;min-height:100%;box-sizing:border-box;padding:12px 40px 24px 96px;justify-content:flex-start;overflow:auto}
body[data-site-screen='chapter-4-1'] .cards-row{gap:16px;margin:auto}
body[data-site-screen='chapter-4-1'] .scene-card{height:auto;min-height:360px}
body[data-site-screen='chapter-4-1'] .card-title{overflow-wrap:break-word}
body[data-site-screen='chapter-4-1'] .detail-panel{max-height:calc(100dvh - 100px);overflow-y:auto}
@media(min-width:1100px){
 body[data-site-screen='chapter-4-1'] .cards-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));width:100%}
 body[data-site-screen='chapter-4-1'] .scene-card{width:auto;min-width:0}
 body[data-site-screen='chapter-4-1'] .card-poster-wrap{height:170px}
 body[data-site-screen='chapter-4-1'] .card-body{padding:16px 14px}
}
@media(max-width:640px){
 body[data-site-screen='chapter-4-1'] .page-header{padding:70px 20px 24px 72px;min-height:190px}
 body[data-site-screen='chapter-4-1'] [data-role='chapter-title']{font-size:24px;line-height:1.25;text-align:center}
 body[data-site-screen='chapter-4-1'] [data-role='screen-title']{font-size:19px;text-align:center}
 body[data-site-screen='chapter-4-1'] [data-role='screen-subtitle']{line-height:1.5;text-align:center}
 body[data-site-screen='chapter-4-1'] .cards-scroll{padding:12px 20px 24px 72px}
 body[data-site-screen='chapter-4-1'] .detail-panel{width:calc(100vw - 32px)}
}
body[data-site-screen='chapter-4-1']{display:flex;flex-direction:column;height:calc(100dvh - 70px)}
body[data-site-screen='chapter-4-1'] .page-header{flex:0 0 auto}
body[data-site-screen='chapter-4-1'] .page-content{flex:1 1 auto;min-height:0;height:auto}
body[data-site-screen='chapter-4-1'] .cards-scroll{padding-bottom:56px}
body[data-site-screen='chapter-4-1'] .attr-badge{bottom:70px;right:40px}
@media(max-width:640px){body[data-site-screen='chapter-4-1'] .attr-badge{right:20px}}
/* Reserve a real row for attribution even in short windows. */
body[data-site-screen='chapter-4-1'] .cards-scroll{padding-bottom:24px}
body[data-site-screen='chapter-4-1'] .attr-badge{position:relative;bottom:auto;right:auto;align-self:flex-end;flex:0 0 auto;margin:4px 40px 8px}
@media(max-width:640px){body[data-site-screen='chapter-4-1'] .attr-badge{right:auto;margin-right:20px}}
