/* Bilingual copy wraps naturally; Part I's English loader is intentionally untouched. */
.screen, #hud, #dash, #story, #card, #caption, #count, #hint, #tooltip, #markers {
  font-family: 'Rajdhani', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  overflow-wrap: anywhere;
}
.screen { overflow: auto; padding: 32px 20px; }
.sc-inner { margin: auto; width: min(980px,100%); }
.sc-title { font-size: clamp(26px,3.7vw,50px); line-height: 1.3; letter-spacing: .025em; }
.sc-kicker, .sc-sub { letter-spacing: .07em; line-height: 1.75; }
.sc-actions { margin-top: 26px; gap: 12px; }
.cta { max-width: 100%; padding: 14px 22px; font-size: 13px; line-height: 1.65; letter-spacing: .035em; }
.cta > span:not(.cta-ico) { min-width: 0; }
.cta small { font-size: 12px; line-height: 1.65; letter-spacing: .025em; }
.sc-hints { letter-spacing: .02em; line-height: 1.7; flex-wrap: wrap; }
.sc-back { line-height: 1.6; letter-spacing: .03em; }
.btn, .sb, .mb, .db, .seg3 button { white-space: normal; letter-spacing: .025em; line-height: 1.45; }
#hint, #tooltip { white-space: normal; letter-spacing: .035em; line-height: 1.6; max-width: min(520px,90vw); }
#caption, #st-sub { letter-spacing: .02em; line-height: 1.65; }
#caption .c-kicker, #caption .c-sub { letter-spacing: .035em; line-height: 1.6; }
#caption .c-title { letter-spacing: .03em; line-height: 1.4; }
/* Part I: stack the taller bilingual panels into two independently scrollable columns. */
body[data-part='1'] #title-block { max-width: min(630px,65vw); }
body[data-part='1'] .t-kicker, body[data-part='1'] .t-sub { letter-spacing: .035em; line-height: 1.6; }
body[data-part='1'] .t-title { font-size: clamp(17px,1.9vw,26px); letter-spacing: .02em; line-height: 1.4; }
body[data-part='1'] .t-clock { margin-top: 6px; line-height: 1.6; flex-wrap: wrap; }
body[data-part='1'] #hud-toggle-wrap { left: auto; right: 20px; transform: none; }
.zh-panels { position: absolute; top: 164px; bottom: 182px; width: clamp(270px,24vw,350px); overflow: auto; scrollbar-width: thin; pointer-events: auto; padding: 1px; }
.zh-left { left: 20px; } .zh-right { right: 20px; }
body[data-part='1'] .zh-panels .panel { position: relative; inset: auto; width: 100%; transform: none; margin-bottom: 12px; padding: 12px; }
body[data-part='1'] .p-head { letter-spacing: .03em; line-height: 1.6; font-size: 11px; }
body[data-part='1'] .row { display: grid; grid-template-columns: 1fr 1.1fr; gap: 8px; font-size: 12px; line-height: 1.55; letter-spacing: .02em; }
body[data-part='1'] .row span:last-child { white-space: normal; line-height: 1.55; font-size: 11px; text-align: right; }
body[data-part='1'] .sector { grid-template-columns: 108px 1fr 35px; line-height: 1.4; letter-spacing: 0; }
body[data-part='1'] #dock { max-width: min(940px,calc(100vw - 40px)); width: 100%; gap: 6px; bottom: 14px; }
body[data-part='1'] #dock .marks { max-height: 92px; overflow: auto; }
body[data-part='1'] .btn { padding: 7px 9px; font-size: 11px; }
body[data-part='1'] .modes { flex-wrap: wrap; justify-content: center; }
body[data-part='1'] #caption { width: min(600px,44vw); bottom: 190px; }
body[data-part='1'] .mk-l { white-space: normal; width: 200px; letter-spacing: .015em; line-height: 1.6; }
body[data-part='1'] #st-card { max-width: 88vw; bottom: calc(11vh + 150px); }
body[data-part='1'] .stc-title { font-size: clamp(24px,3vw,42px); line-height: 1.4; letter-spacing: .03em; }
body[data-part='1'] .stc-num, body[data-part='1'] .stc-year, body[data-part='1'] .stt-k, body[data-part='1'] .stt-s { letter-spacing: .04em; line-height: 1.6; }
body[data-part='1'] .stt-t { letter-spacing: .025em; line-height: 1.4; font-size: clamp(26px,4vw,52px); }
body[data-part='1'] #st-bar { flex-wrap: wrap; }
body[data-part='1'] #sb-track { min-width: 80px; }
body[data-part='1'].story .zh-panels { display: none; }
/* Part II: retain the science-fiction consoles with readable bilingual rows. */
body[data-part='2'] { --dside: clamp(260px,23vw,350px); }
body[data-part='2'] #loader .ld-inner { width: min(720px,88vw); }
body[data-part='2'] #loader .ld-title { font-size: clamp(26px,4vw,48px); line-height: 1.4; letter-spacing: .03em; }
body[data-part='2'] #loader .ld-kicker, body[data-part='2'] #loader .ld-status { line-height: 1.7; letter-spacing: .04em; }
body[data-part='2'] #brand { max-width: 30vw; }
body[data-part='2'] .br-t { line-height: 1.5; letter-spacing: .04em; font-size: 11px; }
body[data-part='2'] .br-s { line-height: 1.5; letter-spacing: .025em; font-size: 10px; }
body[data-part='2'] .sc-tele { letter-spacing: .015em; line-height: 1.6; gap: 14px; flex-wrap: wrap; }
body[data-part='2'] .cd-t { white-space: normal; font-size: clamp(24px,3.3vw,46px); line-height: 1.4; letter-spacing: .025em; }
body[data-part='2'] .cd-t span { white-space: pre-wrap; }
body[data-part='2'] #card { width: min(1000px,85vw); }
body[data-part='2'] .cd-n, body[data-part='2'] .cd-k { letter-spacing: .06em; line-height: 1.65; }
body[data-part='2'] #card.on .cd-t span { animation-delay: calc(var(--i) * 20ms + 80ms), calc(var(--i) * 25ms + 900ms); }
body[data-part='2'] .ct-k, body[data-part='2'] .ct-s { line-height: 1.6; letter-spacing: .04em; }
body[data-part='2'] .ct-n.word { font-size: clamp(26px,3.5vw,48px); letter-spacing: .025em; }
body[data-part='2'] .dp { overflow: auto; scrollbar-width: thin; pointer-events: auto; gap: 12px; }
body[data-part='2'] .dp > * { flex-shrink: 0; }
body[data-part='2'] #dash { --top0: calc(var(--bar) + 38px); --bot0: calc(var(--bar) + 105px); }
body[data-part='2'].free #dash { --top0: 112px; --bot0: 230px; }
body[data-part='2'] .dp-hd { flex-wrap: wrap; gap: 6px; line-height: 1.5; letter-spacing: .02em; white-space: normal; }
body[data-part='2'] .dp-hd b { overflow: visible; font-size: 12px; }
body[data-part='2'] .dp-st { white-space: normal; font-size: 10px; line-height: 1.5; letter-spacing: .025em; }
body[data-part='2'] .dm label { white-space: normal; flex-wrap: wrap; font-size: 11px; line-height: 1.55; letter-spacing: .025em; }
body[data-part='2'] .dm label span { overflow: visible; letter-spacing: .015em; }
body[data-part='2'] .sub, body[data-part='2'] .v { white-space: normal; font-size: 11px; line-height: 1.6; letter-spacing: .01em; }
body[data-part='2'] .big { flex-wrap: wrap; gap: 6px; }
body[data-part='2'] .big small { font-size: 11px; line-height: 1.6; letter-spacing: .02em; }
body[data-part='2'] .dr { display: grid; grid-template-columns: .9fr 1.1fr; gap: 8px; font-size: 11px; line-height: 1.6; letter-spacing: .02em; white-space: normal; }
body[data-part='2'] .dr b { overflow: visible; font-size: 12px; line-height: 1.6; text-align: right; letter-spacing: .015em; }
body[data-part='2'] .dl-mk { gap: 6px; line-height: 1.5; letter-spacing: 0; }
body[data-part='2'] .dm-log li { font-size: 11px; line-height: 1.6; letter-spacing: .015em; }
body[data-part='2'] .dh { width: 38vw; max-width: 38vw; gap: 12px; white-space: normal; }
body[data-part='2'] .dh-c { min-width: 0; padding-left: 10px; }
body[data-part='2'] .dh-l, body[data-part='2'] .dh-c b { letter-spacing: .025em; line-height: 1.5; font-size: 10px; }
body[data-part='2'] .dh-ticks i { width: 14px; }
body[data-part='2'] .dh-link { display: none; }
body[data-part='2'] #modes { max-width: 40vw; }
body[data-part='2'] .mb { height: auto; min-height: 34px; padding: 6px 10px; font-size: 11px; }
body[data-part='2'] #dock { width: min(1180px,calc(100vw - 32px)); }
body[data-part='2'] #segs { min-width: 0; overflow: auto; align-items: stretch; }
body[data-part='2'] .seg { height: auto; min-height: 52px; min-width: 110px; }
body[data-part='2'] .seg span { white-space: normal; overflow: visible; font-size: 10px; line-height: 1.55; letter-spacing: .015em; }
body[data-part='2'] #caption { bottom: calc(var(--bar) + 120px); font-size: clamp(14px,1.3vw,18px); }
body[data-part='2'] #dest { font-size: 12px; }
body[data-part='2'].free.dash-on #dest { top: 112px; bottom: 230px; }
body[data-part='2'] .g-head, body[data-part='2'] .d-grp { line-height: 1.6; letter-spacing: .035em; }
body[data-part='2'] .d-nm { white-space: normal; overflow: visible; line-height: 1.6; letter-spacing: .02em; }
body[data-part='2'] .d-nm small { white-space: normal; line-height: 1.55; letter-spacing: .02em; }
body[data-part='2'] .d-ds { white-space: normal; max-width: 65px; font-size: 9px; line-height: 1.5; }
body[data-part='2'] .hs { max-width: 190px; }
body[data-part='2'] .hs b, body[data-part='2'] .hs small { white-space: normal; line-height: 1.6; letter-spacing: .02em; }
body[data-part='2'].free.dash-on #info, body[data-part='2'] #info { width: min(490px,43vw); max-height: 55vh; overflow: auto; bottom: 230px; }
body[data-part='2'] .i-k, body[data-part='2'] .i-t, body[data-part='2'] .i-d { line-height: 1.6; letter-spacing: .025em; }
body[data-part='2'] #info p { font-size: 14px; line-height: 1.8; letter-spacing: .01em; }
body[data-part='2'] #xdock { bottom: 16px; padding: 10px 16px; }
body[data-part='2'] .x-row { gap: 10px; align-items: center; }
body[data-part='2'] .x-l { width: 85px; flex: 0 0 85px; font-size: 10px; line-height: 1.5; letter-spacing: .025em; }
body[data-part='2'] .seg3 { flex-wrap: wrap; }
body[data-part='2'] .seg3 button { padding: 4px 8px; font-size: 10px; }
body[data-part='2'] .r-mk span { white-space: normal; width: 85px; font-size: 8px; line-height: 1.4; letter-spacing: 0; }
body[data-part='2'] .x-hint { line-height: 1.6; letter-spacing: .02em; font-size: 10px; }
@media (max-width: 860px) {
  .sc-actions { flex-direction: column; align-items: stretch; }
  .cta { width: 100%; justify-content: center; }
  .sc-inner { width: min(660px,100%); }
  body[data-part='1'] .zh-panels { display: none; }
  body[data-part='1'] #title-block { max-width: 65vw; }
  body[data-part='1'] #caption { width: 90vw; bottom: 240px; }
  body[data-part='1'] #st-card { bottom: calc(11vh + 190px); }
  body[data-part='2'] #modes { max-width: 95vw; }
  body[data-part='2'] #caption { width: 90vw; bottom: 155px; }
  body[data-part='2'].free.dash-on #dest { top: 90px; bottom: 210px; width: min(310px,42vw); }
  body[data-part='2'].free.dash-on #info, body[data-part='2'] #info { width: min(490px,90vw); left: 5vw; right: auto; bottom: 210px; }
}
@media (max-width: 520px) {
  .screen { padding: 24px 16px 90px; }
  .sc-title { font-size: 26px; }
  .sc-kicker, .sc-sub { font-size: 11px; }
  .sc-tele { display: none; }
  .sc-hints { margin-top: 16px; gap: 8px; }
  body[data-part='1'] #title-block { display: none; }
  body[data-part='1'] #dock .marks { max-height: 120px; }
  body[data-part='1'] #hint { font-size: 10px; }
  body[data-part='1'] #st-sub { bottom: 105px; font-size: 14px; }
  body[data-part='1'] #st-bar { bottom: 8px; gap: 4px; }
  body[data-part='1'] .sb { padding: 7px; font-size: 9px; }
  body[data-part='2'] .seg { min-width: 100px; }
  body[data-part='2'] .seg span { display: block; font-size: 9px; }
  body[data-part='2'] #dock { width: calc(100vw - 12px); bottom: 8px; }
  body[data-part='2'] #card { width: 92vw; }
  body[data-part='2'] .cd-t { font-size: 25px; }
  body[data-part='2'] .cd-k { font-size: 10px; }
  body[data-part='2'].free.dash-on #dest { left: 10px; right: 10px; top: auto; bottom: 212px; width: auto; max-height: 31vh; }
  body[data-part='2'] #xdock { width: calc(100vw - 20px); padding: 9px; }
  body[data-part='2'] .x-l { width: 65px; flex-basis: 65px; }
  body[data-part='2'] #voyage-y { font-size: 9px; max-width: 80px; white-space: normal; }
}
/* Allow the top clock and chapter to share the available band without colliding with controls. */
body[data-part='2'] .dh { left: 31%; width: 34%; max-width: 34%; transform: translate(0,-10px); display: grid; grid-template-columns: 1fr 1fr; }
body[data-part='2'].dash-on .dh { transform: none; }
body[data-part='2'] .dh-c b { overflow-wrap: anywhere; }
.zh-panels::-webkit-scrollbar, .dp::-webkit-scrollbar, #dest::-webkit-scrollbar, #info::-webkit-scrollbar { width: 4px; }
.zh-panels::-webkit-scrollbar-thumb, .dp::-webkit-scrollbar-thumb, #dest::-webkit-scrollbar-thumb, #info::-webkit-scrollbar-thumb { background: rgba(159,216,255,.3); border-radius: 4px; }
body[data-part='2'] .dp { scrollbar-color: rgba(159,216,255,.3) transparent; }
@media (max-width: 1000px) { body[data-part='2'] .dh { display: none; } }
body[data-part='2'] #ruler { height: 70px; margin-bottom: 8px; }
body[data-part='2'] .seg3 button { height: auto; min-height: 24px; }
body[data-part='2'] .x-hint { margin-top: 6px; }
@media (max-width: 520px) {
  body[data-part='2'] #ruler { height: 94px; }
  body[data-part='2'] .r-mk span { width: 42px; }
  body[data-part='2'].free.dash-on #dest { bottom: 280px; }
  body[data-part='2'].free.dash-on #info { bottom: 280px; max-height: 45vh; }
}
body[data-part='1'] .zh-panels { top: 190px; }
body[data-part='1'] .zh-panels > :is(#engine-panel,#system-panel,#orbit-panel,#elevator-panel,#cam-panel) {
  position: relative; inset: auto; width: 100%; transform: none; margin-bottom: 12px; padding: 12px;
}
body[data-part='2'] .dladder { overflow: hidden; }
body[data-part='2'] .dp { overflow-x: hidden; }
body[data-part='2'] .dp > *, body[data-part='2'] .dm-2 > div { min-width: 0; }
