:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --ink: #f7f0df; --gold: #e4c28c; --muted: #b0c1bd;
  --edge: rgba(195,209,189,.2); --gutter: clamp(20px,4.4vw,84px);
  --header-h: 72px; --footer-h: 39px;
  color: var(--ink); background: #091a1d;
}
* { box-sizing: border-box }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column }
#views { flex: 1; display: flex; flex-direction: column; min-width: 0 }
button { color: inherit; font: inherit; cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent }
button:focus-visible, a:focus-visible { outline: 2px solid #ffdfa6; outline-offset: 4px }
[hidden], .symbols { display: none !important }
.topbar, .footbar { position: relative; z-index: 4; display: flex; align-items: center; padding-inline: var(--gutter); flex: none; background: #09191c }
.topbar { min-height: var(--header-h); justify-content: space-between; border-bottom: 1px solid var(--edge) }
.wordmark { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 11px }
.wordmark > svg { width: 26px; height: 26px; fill: var(--gold) }
.wordmark > span:first-of-type { font: italic 32px/1 Georgia,"Times New Roman",serif; letter-spacing: -.04em }
.wordmark i { height: 16px; width: 1px; margin: 0 5px; background: var(--edge) }
.wordmark-cn { color: #ced6cc; font-size: 14px; letter-spacing: .15em }
.top-actions { display: flex; align-items: center; gap: 17px }
.top-actions svg,.enter-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round }
.camera-btn { display: flex; gap: 8px; align-items: center; justify-content: center; border: 1px solid #536563; border-radius: 24px; min-height: 36px; padding: 0 15px; font-size: 14px }
.camera-btn:hover,.camera-btn[aria-pressed="true"] { border-color: var(--gold); color: var(--gold) }
.camera-btn svg { width: 17px }
.help-btn { display: grid; place-items: center; width: 34px; height: 38px; color: #c6cfc8 }
.help-btn:hover { color: var(--gold) }
.guide { position: absolute; z-index: 12; top: calc(100% - 5px); right: var(--gutter); width: min(355px,calc(100vw - 32px)); border: 1px solid #495b54; background: #102725; border-radius: 14px; box-shadow: 0 16px 55px #0008; padding: 21px 23px }
.guide h2 { font-size: 18px; margin: 0; color: var(--gold) }
.guide dl { display: grid; grid-template-columns: auto 1fr; gap: 12px 13px; margin: 19px 0; font-size: 13px; line-height: 1.55 }
.guide dt { font-weight: 650 } .guide dd { margin: 0; color: #d2dbd0 }
.guide p { margin: 0; padding-top: 12px; border-top: 1px solid var(--edge); font-size: 13px; line-height: 1.75; color: var(--muted) }
.tree-screen { position: relative; flex: 1; isolation: isolate; min-height: max(465px,calc(100svh - var(--header-h) - var(--footer-h))); display: flex; align-items: center; overflow: hidden; background: #0b252e }
.landscape { pointer-events: none; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,#021118ac,#071d2140 44%,transparent 68%),url("./assets/winter-clearing.webp") center 65%/cover no-repeat; transition: opacity .55s }
.tree-stage { position: absolute; inset: 0 1% 0 34%; z-index: 1; touch-action: pan-y; }
#tree { display: block; width: 100%; height: 100% }
.tree-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; transition: transform .65s, opacity .65s }
.opening .tree-poster { transform: scale(1.08); opacity: 0 }
#tree[data-ready] + .tree-poster { visibility: hidden }
.hero-copy { position: relative; z-index: 2; margin-left: max(6.9vw,var(--gutter)); width: min(43vw,630px); padding-block: 25px 45px; pointer-events: none; transition: opacity .38s ease, transform .5s ease }
.hero-copy button { pointer-events: auto }
.flourish { display: flex; width: 100px; align-items: center; gap: 9px; margin: 0 0 21px 4px; color: var(--gold) }
.flourish i { height: 1px; width: 37px; background: currentColor; opacity: .65 }
.flourish svg { width: 14px; height: 14px; flex: none; fill: currentColor }
.hero-copy h1 { margin: 0 0 0 -.04em; font: normal clamp(76px,7.9vw,150px)/.91 Georgia,"Times New Roman",serif; letter-spacing: -.076em; color: #fbf2dc; text-shadow: 0 2px 28px #001e2470 }
.hero-copy h1 em { display: block; color: #ebcd9a; font-weight: 400; line-height: 1.08; letter-spacing: -.08em; }
.hero-copy > p { margin: 22px 0 24px; color: #d4ded7; font-size: clamp(15px,1.12vw,18px); letter-spacing: .08em; line-height: 1.85 }
.enter-btn { min-height: 47px; padding: 0 23px; background: #e5c38a; color: #17251d; border: 1px solid #f3d9ac; border-radius: 30px; font-size: 15px; font-weight: 600; letter-spacing: .065em; display: inline-flex; align-items: center; justify-content: center; gap: 11px; box-shadow: 0 3px 22px #07151360; transition: background .18s, transform .18s }
.enter-btn:hover { background: #f6dba9; transform: translateY(-1px) }
.enter-btn:active { transform: translateY(1px) }
.tree-screen.opening .hero-copy { opacity: 0; transform: translateY(-8px) }
.tree-screen.opening .landscape { opacity: .67 }
.footbar { min-height: var(--footer-h); padding-block: 7px; gap: 10px; border-top: 1px solid var(--edge); color: #b6c5bd; font-size: 13px; line-height: 1.6 }
.footbar p { margin: 0; overflow-wrap: anywhere }
.status-lamp { width: 5px; height: 5px; flex: none; background: #bea372; transform: rotate(45deg) }
body.tracking .status-lamp { background: #f6ce83; box-shadow: 0 0 8px #f8d18b }
@media (min-width:1700px) { .tree-stage { inset-inline: 35% 3% } }
@media (max-width:740px) {
  :root { --header-h: 57px; --footer-h: 38px }
  .wordmark { gap: 8px } .wordmark > svg { width: 20px; height: 20px }
  .wordmark > span:first-of-type { font-size: 26px } .wordmark-cn { font-size: 12px }
  .top-actions { gap: 4px } .camera-btn { padding: 0 10px; min-height: 33px; font-size: 13px; gap: 5px }
  .help-btn { width: 31px }
  .tree-screen { flex-direction: column; align-items: stretch; min-height: max(510px,calc(100svh - var(--header-h) - var(--footer-h))) }
  .landscape { background-position: 60% bottom; background-image: linear-gradient(180deg,#04171c55,transparent 55%,#05191c11),url("./assets/winter-clearing.webp") }
  .hero-copy { width: 100%; margin: 0; padding: clamp(14px,2.5svh,28px) 15px 0; text-align: center }
  .flourish { margin: 0 auto 7px; width: 66px; gap: 6px }
  .flourish i { width: 22px } .flourish svg { width: 11px; height: 11px }
  .hero-copy h1 { font-size: clamp(38px,9.5vw,67px); line-height: 1.1; margin: 0; white-space: nowrap }
  .hero-copy h1 em { display: inline; line-height: inherit }
  .hero-copy > p { font-size: 13px; letter-spacing: .025em; margin: 6px 0 12px; line-height: 1.75 }
  .hero-copy > p br { display: none }
  .enter-btn { min-height: 37px; padding: 0 16px; font-size: 13px; gap: 7px }
  .enter-btn svg { width: 16px; height: 16px }
  .tree-stage { position: relative; inset: auto; width: 100%; flex: 1 0 308px; min-height: 308px }
  #tree { position: absolute; inset: 0 }
  .footbar { font-size: 12px }
}
@media (max-height:530px) and (min-width:741px) {
  :root { --header-h: 48px; --footer-h: 31px }
  .tree-screen { min-height: 340px } .hero-copy h1 { font-size: 72px }
  .flourish { margin-bottom: 12px } .hero-copy > p { margin: 11px 0 }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important }
}
