/* Interactive world — Hanjing Shi
   Illustrated ink-wash (水墨) world with a vermilion seal accent,
   day and night themes. World art colors are the --w-* tokens. */

:root {
  --bar-h: 56px;
  --font-display: "Fraunces", "Songti SC", "Noto Serif SC", "STSong", Georgia, serif;
  --font-body: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --bg: #f3efe6;
  --bg-rgb: 243, 239, 230;
  --card: #fbf8f2;
  --card-rgb: 251, 248, 242;
  --card-2: #f1ebe0;
  --ink: #1f1c19;
  --ink-2: #4a443d;
  --muted: #6e675d;
  --line: rgba(31, 28, 25, .13);
  --line-2: rgba(31, 28, 25, .24);
  --accent: #b8322a;
  --accent-ink: #fff;
  --accent-soft: rgba(184, 50, 42, .09);
  --focus: #b8322a;
  --shadow: 0 22px 44px -22px rgba(40, 30, 20, .42), 0 2px 6px rgba(40, 30, 20, .08);

  --w-sky-1: #f7f3ea; --w-sky-2: #e7dfcf;
  --w-disc: #fcf9f2; --w-disc-shade: #eee1c5; --w-disc-line: rgba(31, 28, 25, .16); --w-crater: transparent; --w-star: #f7eed6;
  --w-far: #9da99d; --w-mid: #778578; --w-near: #535f50; --w-mist: #eee7da;
  --w-circuit: rgba(31, 28, 25, .26);
  --w-ground-1: #e3d9c7; --w-ground-2: #efe8dc; --w-edge: #1f1c19;
  --w-water-bank: #7f8c70; --w-water-sky: #b7c7ba; --w-water: #8ca99b; --w-water-deep: #67897e; --w-water-line: #dce4cf;
  --w-leaf-light: #8ca784; --w-leaf-dark: #416e5c;
  --w-petal-light: #f6e3d8; --w-petal: #deb0ad; --w-petal-dark: #bd7f83;
  --w-metal-light: #aaa99b; --w-metal: #62665e; --w-metal-dark: #303b37;
  --w-leather-light: #a27654; --w-leather: #795239; --w-leather-dark: #473629;
  --w-ink: #1f1c19; --w-ink-fill: #37322e;
  --w-line: #38352c; --w-line-soft: #686050;
  --w-fill: #f8f4ec; --w-note: #fcf8ef; --w-interior: #e2d7c3;
  --w-stone: #d8cfbf; --w-stone-dark: #4a4540; --w-rock: #cdc3b1;
  --w-wood: #4a3a2e; --w-wood-2: #6b5443;
  --w-roof: #515348; --w-column: #9a4938;
  --campus-granite-light: #cfcec3; --campus-granite: #aaa99c; --campus-granite-shade: #777e78;
  --campus-sand-light: #c8a57c; --campus-sand: #a17b56; --campus-sand-shade: #705541;
  --campus-slate-light: #777e7b; --campus-slate-shade: #3c4646;
  --campus-glass-light: #8a9c96; --campus-glass-shade: #283c3b;
  --campus-paint-light: #f2f0e5; --campus-paint: #d5d9cc; --campus-paint-shade: #87998f;
  --w-plaque: #2b2825; --w-plaque-text: #f3e9d6;
  --w-machine: #242221; --w-machine-2: #4a4541; --w-key: #efe8da;
  --w-dougong: #8e4a34; --w-accent: #b8322a; --w-accent-deep: #8a241d; --w-accent-soft: #e2b8ad; --w-jade: #5f8a78; --w-gold: #c9a24a; --w-pot: #7b6a5a;
  --w-halo: #2b2724;
  --w-glow: rgba(255, 190, 110, 0); --w-lamp: #efe3c8; --w-beam: rgba(255, 236, 196, .5); --w-screen: #fcf9f2;
  --w-hill: rgba(58, 52, 46, .08);
  --c-glow: rgba(255, 196, 120, 0);
}

[data-theme="dark"] {
  --bg: #0f1318;
  --bg-rgb: 15, 19, 24;
  --card: #171c23;
  --card-rgb: 23, 28, 35;
  --card-2: #1f252e;
  --ink: #ece6da;
  --ink-2: #cfc7b9;
  --muted: #9d968a;
  --line: rgba(236, 230, 218, .12);
  --line-2: rgba(236, 230, 218, .23);
  --accent: #e0654f;
  --accent-ink: #1a0f0c;
  --accent-soft: rgba(224, 101, 79, .13);
  --focus: #f08a74;
  --shadow: 0 22px 44px -22px rgba(0, 0, 0, .8), 0 2px 6px rgba(0, 0, 0, .4);

  --w-sky-1: #0b0f15; --w-sky-2: #1c2633;
  --w-disc: #efe7d2; --w-disc-shade: #bfb59a; --w-disc-line: rgba(239, 231, 210, .14); --w-crater: rgba(150, 140, 120, .25); --w-star: #f3e9cf;
  --w-far: #354356; --w-mid: #232e3c; --w-near: #131a23; --w-mist: #1c2633;
  --w-circuit: rgba(214, 200, 170, .2);
  --w-ground-1: #161d27; --w-ground-2: #0d1218; --w-edge: #3c4859;
  --w-water-bank: #182c30; --w-water-sky: #293b47; --w-water: #20333d; --w-water-deep: #14252e; --w-water-line: #8eaaa8;
  --w-leaf-light: #607f70; --w-leaf-dark: #243e38;
  --w-petal-light: #c5a4a8; --w-petal: #9b737e; --w-petal-dark: #614651;
  --w-metal-light: #7a827f; --w-metal: #3c4947; --w-metal-dark: #152222;
  --w-leather-light: #735843; --w-leather: #463528; --w-leather-dark: #241f1b;
  --w-ink: #080b0f; --w-ink-fill: #0c1015;
  --w-line: #99998d; --w-line-soft: #858579;
  --w-fill: #1c232d; --w-note: #2a313b; --w-interior: #11171f;
  --w-stone: #2a323d; --w-stone-dark: #151a21; --w-rock: #1f2630;
  --w-wood: #2e2520; --w-wood-2: #3d3129;
  --w-roof: #0a0d11; --w-column: #8a3426;
  --campus-granite-light: #697775; --campus-granite: #434f51; --campus-granite-shade: #222c34;
  --campus-sand-light: #8a735b; --campus-sand: #5c4b3d; --campus-sand-shade: #302a28;
  --campus-slate-light: #4d6064; --campus-slate-shade: #16232d;
  --campus-glass-light: #ffdb9b; --campus-glass-shade: #9c692f;
  --campus-paint-light: #a1b6b4; --campus-paint: #687f80; --campus-paint-shade: #354b56;
  --w-plaque: #0e1116; --w-plaque-text: #e8dcc2;
  --w-machine: #0b0e12; --w-machine-2: #39414c; --w-key: #2c333d;
  --w-dougong: #5c3326; --w-accent: #d4574a; --w-accent-deep: #9c392f; --w-accent-soft: #6b3c38; --w-jade: #4d7466; --w-gold: #b89040; --w-pot: #4a4036;
  --w-halo: #06080b;
  --w-glow: rgba(255, 180, 90, .55); --w-lamp: #ffcf7a; --w-beam: rgba(255, 220, 150, .2); --w-screen: #252d38;
  --w-hill: rgba(0, 0, 0, .25);
  --c-glow: rgba(255, 196, 120, .3);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--card); color: var(--ink); padding: 8px 14px; border-radius: 10px; box-shadow: var(--shadow); }
.skip-link:focus { top: 10px; }
.noscript { position: fixed; inset: auto 16px 16px 16px; z-index: 90; background: var(--card); padding: 14px 18px; border-radius: 12px; box-shadow: var(--shadow); }

.seal {
  display: inline-grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 7px;
  background: var(--accent); color: #fff7f2;
  font: 600 13px/1 var(--font-display); letter-spacing: .04em;
  transform: rotate(-4deg);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .32);
}
.seal-lg { width: 62px; height: 62px; font-size: 23px; border-radius: 12px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; min-width: 36px; padding: 0 8px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--card); color: var(--ink); cursor: pointer;
}
.icon-btn:hover { border-color: var(--ink-2); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--bar-h); z-index: 30;
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: rgba(var(--bg-rgb), .9);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font: 600 17px/1.1 var(--font-display); }
.brand-sub { font-size: 12px; color: var(--muted); }
.places { position: relative; margin: 0 auto; }
.places-btn { display: none; }
.nav { display: flex; gap: 2px; }
.nav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 11px; border: 0; border-radius: 999px;
  background: none; color: var(--ink-2); font-size: 14px; font-weight: 500; cursor: pointer;
}
.nav-btn:hover { background: var(--accent-soft); color: var(--ink); }
.nav-num { font: 500 11px/1 var(--font-display); color: var(--muted); }
.nav-btn.is-here { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 -2px var(--accent); border-radius: 3px; }
.nav-btn.is-here .nav-num { color: inherit; opacity: .7; }
.top-actions { display: flex; align-items: center; gap: 8px; }
#theme-btn .i-sun { display: none; }
[data-theme="dark"] #theme-btn .i-sun { display: block; }
[data-theme="dark"] #theme-btn .i-moon { display: none; }
.view-switch {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--card);
  color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.view-switch:hover { border-color: var(--accent); color: var(--accent); }
.view-switch svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }

/* ---------- world ---------- */
.world {
  position: fixed; top: var(--bar-h); left: 0; right: 0; bottom: 0;
  /* The camera moves the scenery; focusing a prop must not scroll the stage. */
  overflow: hidden; overflow: clip; touch-action: none; user-select: none; -webkit-user-select: none;
  cursor: default;
}
.sky { position: absolute; inset: 0; background: linear-gradient(var(--w-sky-1), var(--w-sky-2) 78%); }
.stars { position: absolute; left: 0; top: 0; width: 100%; height: 60%; fill: var(--w-star); opacity: 0; transition: opacity .8s; }
[data-theme="dark"] .stars { opacity: .9; }
.twinkle circle { animation: twinkle 3.4s ease-in-out infinite; }
.twinkle circle:nth-child(2) { animation-delay: -1.2s; }
.twinkle circle:nth-child(3) { animation-delay: -2.1s; }
@keyframes twinkle { 50% { opacity: .2; } }
.sun {
  position: absolute; top: 7%; right: 12%;
  width: clamp(90px, 13vw, 180px); aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer;
}
.sun svg { width: 100%; height: 100%; overflow: visible; }
.sun-disc { fill: url(#solar-wash); transition: fill .8s; }
.celestial-halo { fill: url(#celestial-halo); animation: celestialBreath 12s ease-in-out infinite; }
.celestial-trace { fill: none; stroke: #ae946e; stroke-width: .55; opacity: .2; }
.solar-scumble { fill: none; stroke: #ba9667; stroke-width: .8; opacity: .28; }
.solar-scumble .sun-wash-patch { fill: #b79161; stroke: none; opacity: .12; }
.disc-texture { fill: url(#gLimestone); opacity: .13; pointer-events: none; }
.solar-grain { fill: #ccb58a; filter: url(#solar-grain); opacity: .7; pointer-events: none; }
[data-theme="dark"] .solar-grain { opacity: .15; }
.lunar-terrain { display: none; }
.moon-grain { fill: #9b9d90; filter: url(#lunar-grain); opacity: .85; }
.lunar-sea { fill: #6b776f; opacity: .16; filter: blur(.6px); }
.lunar-shadow { fill: #58625e; opacity: .15; filter: blur(1px); }
.celestial-clouds { fill: var(--w-sky-1); pointer-events: none; filter: blur(.7px); animation: celestialCloud 38s ease-in-out infinite; }
@keyframes celestialBreath { 0%, 100% { opacity: .65; transform: scale(.98); } 50% { opacity: .9; transform: scale(1.02); } }
@keyframes celestialCloud { 0%, 100% { transform: translateX(-16px); opacity: .2; } 50% { transform: translateX(18px); opacity: .58; } }
[data-theme="dark"] .sun-disc { fill: url(#celestial-wash); }
[data-theme="dark"] .solar-scumble { display: none; }
[data-theme="dark"] .lunar-terrain { display: inline; }
[data-theme="dark"] .celestial-trace { stroke: #cecbb6; opacity: .12; }
[data-theme="dark"] .disc-texture { opacity: .2; }
.lunar-rim { fill: none; stroke: #f8f0db; stroke-width: 1.1; opacity: .65; }
:root:not([data-theme="dark"]) .lunar-rim { display: none; }
[data-theme="dark"] .sun-disc { filter: drop-shadow(0 0 18px rgba(255, 236, 190, .35)); }
.sun-ring { fill: none; stroke: var(--w-disc-line); stroke-width: .75; }
.moon-craters { fill: var(--w-crater); }
.birds { position: absolute; inset: 0; pointer-events: none; transition: opacity .8s; }
[data-theme="dark"] .birds { opacity: 0; }
.bird {
  position: absolute; top: 18%; left: -40px; width: 18px; height: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 8'%3E%3Cpath d='M1 6Q5 1 9 5Q13 1 17 6' fill='none' stroke='%232b2724' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
  animation: fly 46s linear infinite;
}
.bird.b2 { top: 22%; width: 13px; animation-duration: 52s; animation-delay: -18s; }
.bird.b3 { top: 15%; width: 11px; animation-duration: 58s; animation-delay: -33s; }
@keyframes fly { from { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(55vw, -18px, 0); } to { transform: translate3d(112vw, 6px, 0); } }

.layers { position: absolute; inset: 0; pointer-events: none; }
.grain, .vignette { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.grain {
  opacity: .22;
  background-size: 260px 260px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .24 0 0 0 0 .15 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette { background: radial-gradient(125% 105% at 50% 42%, transparent 58%, rgba(52, 36, 20, .2) 100%); }
[data-theme="dark"] .grain { opacity: .35; }
[data-theme="dark"] .vignette { background: radial-gradient(125% 105% at 50% 42%, transparent 50%, rgba(0, 0, 0, .42) 100%); }
.layer { position: absolute; left: 0; bottom: var(--scene-bottom, 0px); will-change: transform; pointer-events: none; }
.layer svg.scene { display: block; width: 100%; height: 100%; overflow: visible; }
.under { position: absolute; left: 0; right: 0; bottom: 0; height: var(--scene-bottom, 0px); background: var(--w-water-deep); }

/* sky layer */
.circuit { fill: none; stroke: var(--w-circuit); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.circuit-dot { fill: var(--w-circuit); }
/* ---------- Tang architecture ---------- */
.terrace { fill: url(#gStone); stroke: var(--w-line); stroke-width: 1.5; }
.terrace-edge { fill: none; stroke: var(--w-line); stroke-width: 1; opacity: .4; }
.t-step { fill: url(#gStone); stroke: var(--w-line); stroke-width: 1.1; }
.col { fill: var(--w-column); stroke: var(--w-line); stroke-width: 1.3; }
.col-base { fill: var(--w-stone); stroke: var(--w-line); stroke-width: 1.1; }
.lane { fill: var(--w-column); stroke: var(--w-line); stroke-width: 1.2; }
.lane-white { fill: var(--w-fill); opacity: .9; }
.dougong { fill: var(--w-dougong); stroke: var(--w-line); stroke-width: .9; }
.t-wall { fill: url(#gWall); stroke: var(--w-line); stroke-width: 1.4; }
.win-frame { fill: var(--w-interior); stroke: var(--w-line); stroke-width: 1.3; }
.win-bars { fill: none; stroke: var(--w-wood-2); stroke-width: 2.6; }
.eave-board { fill: var(--w-wood); stroke: var(--w-line); stroke-width: 1; }
.tile-end circle { fill: var(--w-roof); stroke: var(--w-fill); stroke-width: .7; }
.roof-ridge { fill: var(--w-roof); stroke: var(--w-line); stroke-width: 1.3; }
.roof-hip { fill: none; stroke: var(--w-fill); stroke-width: 1.5; opacity: .3; }
.chiwei { fill: var(--w-roof); stroke: var(--w-line); stroke-width: 1.2; }
.chiwei-fin { fill: none; stroke: var(--w-fill); stroke-width: 1; opacity: .5; }
.door-leaf { fill: url(#gRed); stroke: var(--w-line); stroke-width: 1.3; }
.door-stud circle { fill: var(--w-gold); }
.sill { fill: var(--w-stone-dark); }
.pf-frame { fill: url(#gWood); stroke: var(--w-wood); stroke-width: 1; }
.pf-panel { fill: var(--w-note); stroke: var(--w-wood); stroke-width: 1.3; }
.pf-bevel { fill: none; stroke: #b0956a; stroke-width: .75; opacity: .55; }
.pf-carving { fill: none; stroke: #b0956a; stroke-width: .6; opacity: .8; }
.pf-land { fill: var(--w-jade); opacity: .25; }
.pf-seal { fill: var(--w-accent); opacity: .7; }
.pingfeng .material-cloth { opacity: .32; }
.pf-ink { fill: none; stroke: var(--w-line-soft); stroke-width: 1.6; opacity: .55; }
.pf-sun { fill: var(--w-accent-soft); }
/* distant architecture: single-colour silhouettes with a few light details */
.bg-arch { color: var(--w-far); opacity: .5; }
.bg-arch.far-soft { opacity: .38; filter: blur(.5px); }
.bg-arch.mid { color: var(--w-mid); opacity: .55; }
.bg-arch.near { color: var(--w-near); opacity: .65; }
.bg-arch .sil { fill: currentColor; }
.bg-arch .det { fill: none; stroke: var(--w-line-soft); stroke-width: .8; opacity: .52; }
.bg-arch .win-light { fill: var(--w-wood-2); opacity: .4; transition: opacity .8s; }
.bg-material { fill: url(#gLimestone); opacity: .17; }
.bg-roof-wash { fill: var(--w-roof); opacity: .24; }
.bg-eave-shade { fill: var(--w-wood); opacity: .2; }
.foothill { fill: var(--w-mid); opacity: .12; }
.foothill-grain { fill: url(#gMineral); opacity: .18; }
.foothill-mark { fill: none; stroke: var(--w-mid); stroke-width: .7; opacity: .22; }
.bg-ground-tree { opacity: .18; filter: blur(.3px); }
.bg-site.far-soft { opacity: .8; }
.bg-arch .window-shadow { fill: none; stroke: currentColor; stroke-width: .65; }
.window-halo { fill: #efbb66; opacity: 0; filter: blur(4px); transition: opacity .8s; }
[data-theme="dark"] .bg-arch { opacity: .68; }
[data-theme="dark"] .bg-arch .win-light { fill: var(--w-lamp); opacity: 1; }
[data-theme="dark"] .window-halo { opacity: .65; }
.xiangyun { opacity: .42; }
.xiangyun path { fill: none; stroke: var(--w-far); stroke-width: 1.1; opacity: .4; }
.xiangyun .yun-fill { fill: var(--w-sky-1); opacity: .5; }
.willow .trunk { fill: none; stroke: currentColor; stroke-width: 3; }
.willow .fronds { fill: none; stroke: currentColor; stroke-width: 1.3; opacity: .8; }
.mid-willow { color: var(--w-mid); opacity: .18; filter: blur(1px); }
.near-willow { color: var(--w-near); opacity: .25; filter: blur(.8px); }
.cun { fill: none; stroke-width: 1.4; stroke-linecap: round; }
.layer-mid .cun { stroke: var(--w-mid); opacity: .25; }
.layer-near .cun { stroke: var(--w-near); opacity: .3; }
.pine .trunk { stroke: currentColor; }
.pine .needles { fill: currentColor; }
.mid-pine { color: var(--w-mid); opacity: .18; filter: blur(1px); }
.near-pine { color: var(--w-near); opacity: .27; filter: blur(.7px); }
.ground-pine { color: var(--w-near); }
.ground-willow { opacity: .86; }
.mid-pine .tree-root-shadow, .near-pine .tree-root-shadow, .mid-willow .tree-root-shadow, .near-willow .tree-root-shadow { display: none; }
.pine-bark { fill: currentColor; }
.pine-detail { fill: none; stroke: var(--w-fill); stroke-width: .6; opacity: .45; }
.vegetation-image { pointer-events: none; filter: saturate(.45) contrast(.88); }
.tree-soil, .tree-root-cover { fill: var(--w-ground-1); }
.tree-root-shadow { fill: var(--w-near); opacity: .2; }
.tree-contact { fill: var(--w-line); opacity: .22; }
.tree-soil-grain { fill: none; stroke: var(--w-line-soft); stroke-width: .65; opacity: .45; }
[data-theme="dark"] .vegetation-image { filter: brightness(.3) saturate(.3); }
.rock-shadow { fill: var(--w-stone-dark); opacity: .18; }
.rock-fissure { fill: none; stroke: var(--w-line-soft); stroke-width: .6; opacity: .5; }
.landscape-wash { opacity: .44; }
[data-theme="dark"] .landscape-wash { opacity: .48; filter: brightness(.52) saturate(.45); }
.mineral-flecks { fill: none; stroke: var(--w-line-soft); stroke-width: .7; opacity: .18; }
.mineral-wash { fill: var(--w-rock); opacity: .2; }
.plaster-grain { fill: url(#gPlaster); opacity: .55; pointer-events: none; }
.stone-grain { fill: url(#gLimestone); opacity: .34; pointer-events: none; }
.material { pointer-events: none; stroke: none; }
.material-plaster { fill: url(#gPlaster); opacity: .5; }
.material-stone { fill: url(#gLimestone); opacity: .32; }
.material-wood { fill: url(#gTimber); opacity: .38; }
.material-paint { fill: url(#gVermilion); opacity: .24; }
.material-cloth { fill: url(#gLinen); opacity: .13; }
.material-gabardine { fill: url(#gGabardine); opacity: .62; }
.material-silk { fill: url(#gSilkWeave); opacity: .65; }
.material-leather { fill: url(#gLeatherGrain); opacity: .55; }
[data-theme="dark"] .material-image { filter: brightness(.3) saturate(.5); }
.object-shade, .roof-shade, .shelf-shadow, .alcove-shadow, .cloth-shadow, .slot-shadow { fill: var(--w-ink-fill); pointer-events: none; }
.object-shade { opacity: .22; }
.roof-shade { opacity: .22; }
.shelf-shadow { opacity: .2; }
.alcove-shadow { opacity: .15; }
.cloth-shadow { opacity: .25; }
.slot-shadow { opacity: .55; }
.object-edge, .metal-highlight { fill: none; stroke: var(--w-note); stroke-width: .8; opacity: .4; pointer-events: none; }
.metal-highlight { stroke-width: 1; opacity: .36; }
.metal-wear, .leather-wear { fill: none; stroke: var(--w-stone); stroke-width: .7; opacity: .6; }
.paper-fold { fill: var(--w-stone); opacity: .45; pointer-events: none; }
.paper-crease { fill: none; stroke: var(--w-rock); stroke-width: .5; opacity: .65; }
.fabric-seam, .case-seam { fill: none; stroke: var(--w-note); stroke-width: .6; stroke-dasharray: 2 2; opacity: .35; }
.case-buckles { fill: none; stroke: var(--w-gold); stroke-width: 1; }
.screen-hinge { fill: none; stroke: var(--w-wood); stroke-width: 2; }
.mail-rivets { fill: var(--w-stone); opacity: .65; }
.pot-handle { fill: none; stroke: var(--w-line); stroke-width: 2.4; }
.lantern-ribs { fill: none; stroke: var(--w-accent-deep); stroke-width: .6; opacity: .7; }
.lantern-tassel { fill: none; stroke: var(--w-accent); stroke-width: 1; }
.path-grain { opacity: .4; }
.eave-shadow { fill: var(--w-wood); opacity: .16; }
.plaster-crack, .stone-joint { fill: none; stroke: var(--w-line-soft); stroke-width: .65; opacity: .45; }
.timber-shade { fill: var(--w-wood); opacity: .3; }
.timber-grain { fill: none; stroke: var(--w-wood); stroke-width: .65; opacity: .65; }
.paint-wear { fill: var(--w-stone); opacity: .5; }
.window-recess { fill: none; stroke: var(--w-wood); stroke-width: 3; opacity: .28; }
.window-sill { fill: none; stroke: var(--w-wood-2); stroke-width: 2; }
.clay-grain { fill: none; stroke: var(--w-fill); stroke-width: .8; opacity: .15; }
.roof-patina { fill: url(#gSlate); opacity: .23; pointer-events: none; }
.roof-joints { fill: none; stroke: var(--w-fill); stroke-width: .65; opacity: .23; }

/* ground layer */
.ground-edge { fill: none; stroke: var(--w-edge); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .48; }
.ground-strokes { fill: none; stroke: var(--w-edge); stroke-width: 1.3; opacity: .22; stroke-linecap: round; }
.grass-blade { fill: url(#gLeaf); stroke: var(--w-leaf-dark); stroke-width: .2; }
.grass-rib { fill: none; stroke: var(--w-leaf-light); stroke-width: .35; opacity: .65; }
.grass-root { fill: var(--w-near); opacity: .12; }
.paving-slab { fill: var(--w-stone-dark); }
.paving-grain { fill: url(#gLimestone); opacity: .3; pointer-events: none; }
.paving-bevel { fill: none; stroke: var(--w-fill); stroke-width: .65; opacity: .55; }
.paving-wear { fill: none; stroke: var(--w-line-soft); stroke-width: .6; opacity: .32; }
.rock { fill: var(--w-rock); stroke: var(--w-line); stroke-width: 1.5; }
.stone-lantern .ink-fill { fill: var(--w-ink-fill); }
.stone-lantern .paper-fill { fill: var(--w-fill); stroke: var(--w-line); stroke-width: 1.2; }
.lantern-light { fill: var(--w-lamp); }
.lantern-glow { fill: url(#gGlow); opacity: 0; transition: opacity .8s; }
[data-theme="dark"] .lantern-glow { opacity: 1; animation: flicker 3.6s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { opacity: .95; } 40% { opacity: .78; } 55% { opacity: 1; } 70% { opacity: .85; } }

/* front layer */
.reeds { fill: none; stroke: var(--w-leaf-light); stroke-width: .9; stroke-linecap: round; opacity: .8; }
.reed-blades { fill: var(--w-leaf-dark); opacity: .8; }
.reed-head { fill: none; stroke: var(--w-pot); stroke-width: 3.5; }
.paving { fill: none; stroke: var(--w-edge); stroke-width: 1; opacity: .12; }
.lotus-pond { pointer-events: auto; cursor: pointer; }
.pond { fill: url(#gPond); }
.pond-bank { fill: url(#gStone); pointer-events: none; }
.bank-grain { fill: url(#gLimestone); opacity: .25; pointer-events: none; }
.bank-grass { fill: none; stroke: var(--w-near); stroke-width: .8; opacity: .55; pointer-events: none; }
.pond-shallows { fill: url(#gShallows); pointer-events: none; }
.pond-edge { fill: none; stroke: var(--w-water-bank); stroke-width: 2; opacity: .7; pointer-events: none; }
.shore-waterline { fill: none; stroke: var(--w-water-line); stroke-width: .8; opacity: .55; }
.submerged-stems { fill: none; stroke: var(--w-leaf-dark); stroke-width: 1; opacity: .18; }
.water-line { fill: none; stroke: var(--w-water-line); stroke-width: .65; }
.water-light { pointer-events: none; }
.water-sparkle { fill: none; stroke: var(--w-disc); stroke-width: 1.1; opacity: .38; animation: waterShimmer 7s ease-in-out infinite; }
[data-theme="dark"] .water-sparkle { opacity: .72; stroke-width: .9; }
@keyframes waterShimmer { 50% { opacity: .22; } }
.flower-reflection { fill: none; stroke: var(--w-petal); stroke-width: 1.3; opacity: .32; }
.pond-ring { fill: none; stroke: var(--w-disc); stroke-width: .8; opacity: 0; transform-box: fill-box; transform-origin: center; }
.lotus-pond.is-stirred .pond-ring { animation: pondRipple 1.8s ease-out; }
.pond-koi { opacity: 0; transition: opacity .5s; }
.lotus-pond.is-stirred .pond-koi { opacity: .7; }
.pond-koi path { fill: #e6dfce; }
.pond-koi .koi-mark { fill: #b76344; }
@keyframes pondRipple { 0% { opacity: .7; transform: scale(.5); } 100% { opacity: 0; transform: scale(3.8); } }
.ripple { fill: none; stroke: var(--w-fill); stroke-width: 1.4; opacity: .6; }
.lotus-leaf .leaf-shadow { fill: var(--w-leaf-dark); opacity: .22; }
.leaf-pad { fill: url(#gLeaf); stroke: var(--w-leaf-dark); stroke-width: .5; }
.lotus-leaf .leaf-vein { fill: none; stroke: var(--w-leaf-light); stroke-width: .45; opacity: .8; }
.leaf-rim { fill: none; stroke: var(--w-leaf-dark); stroke-width: .7; opacity: .7; }
.leaf-dew { fill: var(--w-water-line); opacity: .8; }
.lotus-stem { fill: none; stroke: var(--w-leaf-dark); stroke-width: 1.7; }
.stem-light { fill: none; stroke: var(--w-leaf-light); stroke-width: .55; }
.lotus-petal { fill: url(#gPetal); stroke: var(--w-petal-dark); stroke-width: .45; }
.petal-vein { fill: none; stroke: var(--w-petal-dark); stroke-width: .3; opacity: .55; }
.lotus-calyx { fill: var(--w-jade); }
.lotus-stamen { fill: none; stroke: var(--w-gold); stroke-width: .7; }
.leaf-wax { fill: none; stroke: var(--w-water-line); stroke-width: .7; opacity: .28; }
.leaf-patina { fill: var(--w-leaf-dark); opacity: .2; }
.lily-petal-fan { transform: rotate(var(--bloom-angle)) scaleY(var(--petal-length)); transform-origin: 0 0; transition: transform 1.6s cubic-bezier(.4,0,.2,1); }
[data-theme="dark"] .lily-petal-fan { transform: rotate(var(--bud-angle)) scaleY(.88) scaleX(.95); }
.lily-tier-0 .lotus-petal { fill: var(--w-petal-dark); }
.lily-tier-2 .lotus-petal { fill: var(--w-petal-light); }
.petal-light-edge { fill: none; stroke: var(--w-petal-light); stroke-width: .5; opacity: .6; }
.lily-water-shadow { fill: var(--w-leaf-dark); opacity: .2; transform-box: fill-box; transform-origin: center; transition: transform 1.6s; }
[data-theme="dark"] .lily-water-shadow { transform: scaleX(.4); }
.lily-heart { opacity: 1; transition: opacity .8s; }
[data-theme="dark"] .lily-heart { opacity: 0; }
.lily-pollen { fill: var(--w-gold); stroke: var(--w-petal-dark); stroke-width: .4; }
.lily-pollen-tips { fill: none; stroke: var(--w-gold); stroke-width: 1; }
.lily-sepals { transform: scaleY(.24); transform-origin: 0 3px; transition: transform 1.6s; }
[data-theme="dark"] .lily-sepals { transform: scaleY(1); }
[data-theme="dark"] .stem-lotus .lily-petal-fan { transform: rotate(calc(var(--bud-angle) * 1.6)) scaleY(.98) scaleX(.98); }
[data-theme="dark"] .stem-lotus .lily-sepals { transform: scaleY(.6); }
[data-theme="dark"] .stem-lotus .lily-heart { opacity: .2; }
.sepal-vein { fill: none; stroke: var(--w-leaf-light); stroke-width: .4; }
.lily-water-contact { fill: none; stroke: var(--w-water-line); stroke-width: .55; opacity: .45; }
.flower-reflection { transform-box: fill-box; transform-origin: center; transition: transform 1.6s, opacity 1s; }
[data-theme="dark"] .flower-reflection { transform: scaleX(.35); opacity: .18; }
.ink-dots { fill: var(--w-edge); opacity: .4; }

/* ---------- stations ---------- */
.layer-ground svg.scene { pointer-events: none; }
.layer-ground .st { pointer-events: auto; cursor: pointer; }
.st .hit { fill: transparent; pointer-events: all; }
.st text { font-family: var(--font-display); }

.wall { fill: url(#gWall); stroke: var(--w-line); stroke-width: 2; }
.wall-shade { fill: var(--w-line); opacity: .07; }
.gate-ring { fill: none; stroke: var(--w-line); stroke-width: 3.5; }
.roof { fill: var(--w-roof); stroke: var(--w-line); stroke-width: 1.4; stroke-linejoin: round; }
.roof-tiles, .roof-lines { fill: none; stroke: var(--w-fill); stroke-width: .8; opacity: .3; }
.plaque rect { fill: var(--w-plaque); stroke: var(--w-accent); stroke-width: 1.6; transition: stroke-width .2s; }
.plaque text { fill: var(--w-plaque-text); font-size: 14px; letter-spacing: .14em; }
.hanging-lantern .rope, .hanging-lantern .lantern-rim { stroke: var(--w-line); stroke-width: 1.6; fill: none; }
.lantern-body { fill: var(--w-accent); stroke: var(--w-line); stroke-width: 1.4; }
.post { stroke: var(--w-wood); stroke-width: 7; stroke-linecap: round; fill: none; }
.board-face { fill: url(#gWood); stroke: var(--w-line); stroke-width: 1.5; }
.board-title { fill: var(--w-plaque-text); font-size: 11px; letter-spacing: .3em; }
.notes rect { fill: var(--w-note); stroke: var(--w-line); stroke-width: .8; }
.pins circle { fill: var(--w-accent); }
.note-lines { stroke: var(--w-line); stroke-width: 1.2; opacity: .35; }

.step { fill: url(#gStone); stroke: var(--w-line); stroke-width: 1.5; }
.step-line { stroke: var(--w-line); stroke-width: 1; opacity: .35; }
.interior { fill: var(--w-interior); }
.shelf { fill: url(#gWood); stroke: var(--w-line); stroke-width: .8; }
.book { cursor: pointer; }
.book-in { transition: transform .18s ease; }
.book rect { fill: var(--bc); stroke: var(--w-line); stroke-width: 1.1; }
.book path { stroke: rgba(255, 250, 240, .6); stroke-width: 1.2; }
.book .book-spine { fill: none; stroke: rgba(25, 20, 15, .32); stroke-width: 1.4; }
.book .book-leaf { fill: none; stroke-width: .7; }
.book .book-cloth { fill: url(#gLinen); stroke: none; opacity: .18; pointer-events: none; }
.book .book-shade { fill: #241b16; stroke: none; opacity: .24; }
.book .book-ridge { fill: none; stroke: #f5ead8; stroke-width: .6; opacity: .5; }
.book .book-title { fill: none; stroke: var(--w-gold); stroke-width: .65; opacity: .85; }
.book:hover .book-in { transform: translateY(-6px); }
.vase path:first-child { fill: var(--w-accent); opacity: .85; }
.twig { fill: none; stroke: var(--w-line); stroke-width: 1.4; }
.scrolls rect { fill: var(--w-note); stroke: var(--w-line); stroke-width: 1.1; }
.scrolls circle { fill: var(--w-wood); }
.plant path:first-child { fill: var(--w-pot); }
.plant .leaf { fill: var(--w-jade); }
.small-contact { fill: var(--w-ink); opacity: .17; }
.vase .vase-body { fill: url(#gCeramic); stroke: var(--w-accent-deep); stroke-width: .6; opacity: 1; }
.ceramic-speckle { fill: url(#gMineral); stroke: none; opacity: .22; pointer-events: none; }
.vase-mouth { fill: var(--w-accent-deep); stroke: var(--w-accent-soft); stroke-width: .6; }
.ceramic-glint { fill: none; stroke: var(--w-note); stroke-width: 1; opacity: .55; }
.vase-band { fill: none; stroke: var(--w-gold); stroke-width: .4; opacity: .65; }
.vase-buds { fill: var(--w-petal); stroke: var(--w-petal-dark); stroke-width: .4; }
.scrolls rect { fill: url(#gPaper); stroke-width: .6; }
.scroll-rings { fill: none; stroke: var(--w-note); stroke-width: .5; }
.scroll-thread { fill: none; stroke: var(--w-accent-deep); stroke-width: .8; }
.plant .planter-body { fill: url(#gTerracotta); stroke: var(--w-leather-dark); stroke-width: .6; }
.planter-rim { fill: var(--w-pot); stroke: var(--w-leather-light); stroke-width: .6; }
.pot-soil { fill: var(--w-wood); }
.plant .leaf { fill: url(#gLeaf); stroke: var(--w-leaf-dark); stroke-width: .4; }
.plant-veins { fill: none; stroke: var(--w-leaf-light); stroke-width: .45; }
.planter-wear { fill: none; stroke: var(--w-stone); stroke-width: .5; opacity: .5; }
.columns rect { fill: var(--w-column); stroke: var(--w-line); stroke-width: 1.4; }
.beam { fill: url(#gWood); stroke: var(--w-line); stroke-width: 1.2; }
.wall-upper { fill: url(#gWall); stroke: var(--w-line); stroke-width: 1.6; }
.ridge { fill: none; stroke: var(--w-line); stroke-width: 3; stroke-linecap: round; }

.campus-keepsake { cursor: pointer; }
.campus-contact { fill: var(--w-ink-fill); opacity: .18; }
.campus-riser, .campus-top { fill: url(#gStone); stroke: var(--w-line-soft); stroke-width: .75; }
.campus-side { fill: var(--w-rock); stroke: var(--w-line-soft); stroke-width: .65; }
.campus-bevel { fill: none; stroke: var(--w-note); stroke-width: .85; opacity: .65; }
.campus-joints, .campus-step { fill: none; stroke: var(--w-line-soft); stroke-width: .65; opacity: .6; }
.campus-masonry { fill: url(#gCampusGranite); stroke: var(--w-line); stroke-width: .7; }
.campus-sandstone { fill: url(#gCampusSandstone); }
.campus-georgetown { --campus-stone-light: var(--campus-granite-light); --campus-stone-shade: var(--campus-granite-shade); }
.campus-lehigh { --campus-stone-light: var(--campus-sand-light); --campus-stone-shade: var(--campus-sand-shade); }
.campus-ashlar { pointer-events: none; }
.campus-block-light { fill: var(--campus-stone-light); }
.campus-block-dark { fill: var(--campus-stone-shade); }
.campus-mortar { fill: none; stroke: var(--campus-stone-shade); stroke-width: .36; opacity: .5; }
.campus-stone-edge { fill: none; stroke: var(--campus-stone-light); stroke-width: .4; opacity: .65; }
.campus-pitting { fill: var(--campus-stone-shade); opacity: .26; }
.campus-masonry-shade { fill: var(--campus-granite-shade); opacity: .36; }
.campus-eaves-shadow { fill: var(--campus-stone-shade); opacity: .55; }
.campus-cornice { fill: none; stroke: var(--campus-stone-light); stroke-width: 1.1; }
.campus-roof { fill: url(#gCampusRoof); stroke: var(--w-line); stroke-width: .7; }
.campus-roof-shade { fill: var(--campus-slate-shade); opacity: .52; }
.campus-roof-glint { fill: none; stroke: var(--campus-slate-light); stroke-width: .55; opacity: .75; }
.campus-roof-line, .campus-course { fill: none; stroke: var(--w-line-soft); stroke-width: .65; }
.campus-course { opacity: .3; }
.campus-window, .campus-rose-window { fill: url(#gCampusGlass); stroke: var(--campus-stone-shade); stroke-width: 1.3; }
.campus-door { fill: url(#gWood); stroke: var(--campus-stone-shade); stroke-width: 1.5; }
.campus-window-sill { fill: var(--campus-stone-light); stroke: var(--campus-stone-shade); stroke-width: .4; }
.campus-window-reveal { fill: none; stroke: var(--campus-stone-shade); stroke-width: 1; opacity: .85; }
.campus-glass-sheen { fill: var(--campus-glass-light); opacity: .27; }
.campus-window-light, .campus-door-line, .campus-rose-lines { fill: none; stroke: var(--w-lamp); stroke-width: .65; opacity: .5; }
[data-theme="dark"] .campus-window, [data-theme="dark"] .campus-rose-window { fill: url(#gCampusGlass); opacity: .9; }
[data-theme="dark"] .campus-window-light, [data-theme="dark"] .campus-rose-lines { stroke: var(--w-wood); opacity: .75; }
.campus-clock-rim, .campus-rose-frame { fill: var(--w-rock); stroke: var(--w-line); stroke-width: .75; }
.campus-clock { fill: var(--w-note); stroke: var(--w-line-soft); stroke-width: .5; }
.campus-clock-hands { fill: none; stroke: var(--w-line); stroke-width: .8; }
.campus-library-steps { fill: var(--w-rock); stroke: var(--w-line-soft); stroke-width: .7; }
.campus-pole { fill: none; stroke: var(--w-metal); stroke-width: 1.3; }
.campus-finial { fill: var(--w-gold); stroke: var(--w-line-soft); stroke-width: .4; }
.campus-flag { fill: var(--campus-color); stroke: var(--w-line-soft); stroke-width: .6; }
.campus-flag-fold { fill: none; stroke: var(--w-note); stroke-width: .55; opacity: .35; }
.campus-plaque { fill: url(#gWood); stroke: var(--w-wood); stroke-width: .75; transition: stroke .2s; }
.campus-plaque-side { fill: var(--w-wood); }
.campus-plaque-edge { fill: none; stroke: var(--w-gold); stroke-width: .5; opacity: .6; }
.campus-degree, .campus-school { fill: var(--w-plaque-text); font: 600 12px var(--font-display); }
.campus-school { font: 11.5px var(--font-body); }
.campus-pin { fill: var(--w-gold); }
.campus-progress { fill: var(--w-line-soft); font: italic 8.5px var(--font-body); }
.campus-keepsake:hover .campus-plaque { stroke: var(--w-accent); stroke-width: 1.5; }
.water-support { fill: none; stroke: var(--w-metal); stroke-width: 1.35; }
.water-tank { fill: url(#gCampusPaint); stroke: var(--w-metal); stroke-width: .7; }
.water-tank-top { fill: var(--campus-paint-light); stroke: var(--w-metal); stroke-width: .6; }
.water-tank-seam { fill: none; stroke: var(--w-metal-light); stroke-width: .5; }
.water-tank-label { fill: var(--w-line); font: 600 7px var(--font-body); }
.bike-tire { fill: none; stroke: var(--w-metal-dark); stroke-width: 2.2; }
.bike-rim, .bike-spokes, .bike-chain { fill: none; stroke: var(--w-metal); stroke-width: .65; }
.bike-spokes { opacity: .55; }
.bike-frame { fill: none; stroke: var(--w-accent-deep); stroke-width: 2; }
.bike-seat { fill: none; stroke: var(--w-metal-dark); stroke-width: 2.4; }
.bike-hub { fill: var(--w-metal); stroke: var(--w-metal-light); stroke-width: .6; }
.campus-slate { fill: url(#gSlate); opacity: .23; pointer-events: none; }
.campus-arch-trim { fill: none; stroke: var(--campus-stone-light); stroke-width: 2.4; }
.campus-turret { fill: url(#gCampusGranite); stroke: var(--w-line); stroke-width: .7; }
.campus-belfry { fill: var(--w-wood); stroke: var(--w-line-soft); stroke-width: .45; }
.campus-apse { fill: url(#gCampusRoundStone); stroke: var(--w-line); stroke-width: .7; }
.campus-apse-shade { fill: var(--campus-sand-shade); opacity: .17; }
.campus-apse-courses { fill: none; stroke: var(--w-line-soft); stroke-width: .5; opacity: .5; }
.campus-door-handle { fill: none; stroke: var(--w-gold); stroke-width: .8; }
.water-tank-shade { fill: var(--w-metal); opacity: .16; }
.water-tank-highlight { fill: none; stroke: var(--w-note); stroke-width: 1.2; opacity: .75; }
.water-tank-rivet { fill: var(--campus-paint-shade); stroke: var(--campus-paint-light); stroke-width: .3; }
.water-support-glint { fill: none; stroke: var(--campus-paint-light); stroke-width: .45; opacity: .7; }
.water-paint-wear { fill: none; stroke: var(--campus-paint-shade); stroke-width: .45; opacity: .5; }
.bike-cable { fill: none; stroke: var(--w-metal); stroke-width: .65; }
.bike-basket { fill: var(--w-leather-light); stroke: var(--w-wood); stroke-width: .7; }
.bike-basket-weave { fill: none; stroke: var(--w-wood); stroke-width: .5; opacity: .55; }
.bike-fender { fill: none; stroke: var(--w-metal-light); stroke-width: 1.1; }
.sign-rope { stroke: var(--w-line); stroke-width: 1.5; }
.sign-board { fill: var(--w-wood-2); stroke: var(--w-line); stroke-width: 1.5; transition: stroke-width .2s; }
.sign-text { fill: var(--w-plaque-text); font-size: 14px; letter-spacing: .1em; }
.sign-post { stroke: var(--w-wood); stroke-width: 6; stroke-linecap: round; }
.sign-support { fill: url(#gWood); stroke: var(--w-wood); stroke-width: .8; }
.st:hover .sign-board, .st.is-near .sign-board, .st:hover .plaque rect, .st.is-near .plaque rect { stroke: var(--w-accent); stroke-width: 3; }

.branch { fill: none; stroke: var(--w-wood); stroke-width: 5; stroke-linecap: round; }
.leafs { fill: var(--w-jade); }
.paper-ornament { cursor: pointer; }
.crane-thread { fill: none; stroke: var(--w-line-soft); stroke-width: .65; opacity: .6; }
.crane-knot { fill: var(--w-gold); }
.crane-bob { animation: bob 5.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 0; }
.crane-body, .crane-tail, .crane-neck { fill: url(#gPaper); stroke: var(--w-line-soft); stroke-width: .65; stroke-linejoin: round; }
.crane-far-wing { fill: var(--crane-tint); stroke: var(--w-line-soft); stroke-width: .65; opacity: .75; }
.crane-wing { fill: url(#gPaper); stroke: var(--w-line-soft); stroke-width: .75; }
.crane-grain, .scroll-grain { fill: url(#gLinen); opacity: .18; pointer-events: none; }
.crane-wing-shade { fill: var(--crane-tint); opacity: .25; }
.crane-belly { fill: var(--w-wood); opacity: .17; }
.crane-crease, .crane-fold { fill: none; stroke: var(--w-line-soft); stroke-width: .5; opacity: .65; }
.crane-edge { fill: none; stroke: var(--w-note); stroke-width: .6; opacity: .8; }
.crane:hover .crane-wing { stroke: var(--w-accent); }
.crane-near-wing { transform-box: fill-box; transform-origin: 48% 94%; }
.crane.is-fluttering .crane-near-wing { animation: paperWing .6s ease-in-out 4; }
.crane.is-fluttering .crane-bob { animation: paperSwing 2.4s ease-in-out; }
@keyframes bob { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes paperWing { 35% { transform: scaleX(.7) rotate(-7deg); } 70% { transform: scaleX(1.04) rotate(3deg); } }
@keyframes paperSwing { 20% { transform: rotate(-10deg); } 45% { transform: rotate(8deg); } 70% { transform: rotate(-4deg); } }
.paper-star-body { fill: url(#gPaper); stroke: var(--w-line-soft); stroke-width: .65; }
.star-tint { fill: var(--star-tint); opacity: .38; }
.star-fold-shade { fill: var(--w-wood); opacity: .13; }
.star-fold-light { fill: var(--w-note); opacity: .4; }
.star-fold-lines { fill: none; stroke: var(--w-line-soft); stroke-width: .4; opacity: .4; }
.star-soft-edge { fill: none; stroke: var(--w-note); stroke-width: .8; opacity: .65; }
.star-bob { animation: starDrift 6.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 0; }
.star-glimmer { fill: none; stroke: var(--w-gold); stroke-width: .85; opacity: 0; }
.paper-star.is-fluttering .star-bob { animation: starTurn 2.4s ease-in-out; }
.paper-star.is-fluttering .star-glimmer { animation: starGlint 2.4s ease-in-out; }
.paper-star:hover .paper-star-body { stroke: var(--w-accent); }
@keyframes starDrift { 0%, 100% { transform: rotate(4deg); } 50% { transform: rotate(-4deg); } }
@keyframes starTurn { 20% { transform: rotate(-14deg) scaleX(.82); } 50% { transform: rotate(12deg) scaleX(1); } 75% { transform: rotate(-5deg) scaleX(.94); } }
@keyframes starGlint { 25%, 55% { opacity: .85; } }
.tutorial-scroll { cursor: pointer; }
.scroll-rest-shadow { fill: var(--w-ink-fill); opacity: .2; }
.tutorial-paper { fill: url(#gPaper); stroke: var(--w-line-soft); stroke-width: .6; }
.scroll-paper-edge { fill: none; stroke: var(--w-note); stroke-width: .75; opacity: .7; }
.scroll-roller, .scroll-end { fill: url(#gWood); stroke: var(--w-wood); stroke-width: .6; }
.scroll-end-ring { fill: none; stroke: var(--w-gold); stroke-width: .55; opacity: .6; }
.scroll-tie { fill: none; stroke: var(--w-accent-deep); stroke-width: .9; }
.tutorial-scroll-label { fill: var(--w-line); font: 600 10.5px var(--font-display); }
.scroll-shelf { fill: url(#gWood); stroke: var(--w-wood); stroke-width: .6; }
.scroll-rack-label { fill: var(--w-line-soft); font: 9px var(--font-body); letter-spacing: .1em; }
.tutorial-scroll:hover .tutorial-paper { stroke: var(--w-accent); stroke-width: 1.2; }
.scroll-brocade { fill: var(--w-leather-light); stroke: var(--w-line-soft); stroke-width: .65; }
.scroll-brocade-motif { fill: none; stroke: var(--w-gold); stroke-width: .5; opacity: .65; }
.scroll-hem-shadow, .scroll-wrap-shadow { fill: var(--w-wood); opacity: .15; }
.scroll-end-grain { fill: var(--w-wood-2); stroke: var(--w-gold); stroke-width: .5; }
.scroll-tie-shadow { fill: none; stroke: var(--w-wood); stroke-width: 1.4; opacity: .15; }
.scroll-ink-note { fill: none; stroke: var(--w-line-soft); stroke-width: .4; opacity: .55; }
.scroll-seal { fill: var(--w-accent-deep); opacity: .7; }
.scroll-open-tail { fill: url(#gPaper); stroke: var(--w-line-soft); stroke-width: .45; transform: scaleY(0); transform-box: fill-box; transform-origin: 50% 0; }
.tutorial-scroll.is-unrolling .scroll-open-tail { animation: scrollPeek 1.5s ease-in-out; }
@keyframes scrollPeek { 30%, 65% { transform: scaleY(1); } }
.davis-flag-gold { fill: none; stroke: var(--w-gold); stroke-width: .85; }
.davis-flag-monogram { fill: var(--w-gold); font: 600 6px var(--font-body); }
.screen-painting { cursor: pointer; }
.screen-pigment { transition: filter .6s; }
.screen-painting.is-stirred .screen-pigment { filter: brightness(1.28); }
.screen-plum-branch { fill: none; stroke: var(--w-wood); stroke-width: 1.65; opacity: .84; }
[data-theme="dark"] .screen-plum-branch { stroke: var(--w-line-soft); opacity: .8; }
.screen-bark-edge { fill: none; stroke: var(--w-stone); stroke-width: .5; opacity: .65; }
.screen-petal { stroke: var(--w-petal-dark); stroke-width: .35; }
.plum-petal { fill: var(--w-petal-light); }
.plum-bud { fill: var(--w-petal); stroke: var(--w-petal-dark); stroke-width: .4; }
.screen-flower-heart { fill: var(--w-gold); }
.screen-stamens { fill: none; stroke: var(--w-wood-2); stroke-width: .35; }
.screen-bud-stalk { fill: none; stroke: var(--w-jade); stroke-width: .55; }
.screen-orchid-leaf, .screen-chrys-leaf { fill: var(--w-jade); stroke: var(--w-leaf-dark); stroke-width: .25; opacity: .74; }
.screen-leaf-vein { fill: none; stroke: var(--w-leaf-light); stroke-width: .4; opacity: .75; }
.orchid-petal { fill: var(--w-petal-light); stroke: var(--w-gold); }
.screen-orchid-lip { fill: var(--w-accent-soft); stroke: var(--w-petal-dark); stroke-width: .4; }
.screen-fine-stem { fill: none; stroke: var(--w-leaf-dark); stroke-width: .6; opacity: .8; }
.screen-bamboo-culm { fill: var(--w-jade); stroke: var(--w-leaf-dark); stroke-width: .3; opacity: .82; }
.screen-bamboo-nodes { fill: none; stroke: var(--w-leaf-dark); stroke-width: .8; }
.screen-bamboo-light { fill: none; stroke: var(--w-leaf-light); stroke-width: .45; }
.screen-bamboo-leaf { fill: var(--w-leaf-dark); opacity: .72; }
.chrysanthemum-petal { fill: var(--w-note); stroke: var(--w-gold); stroke-width: .35; }
.chrys-bud { fill: var(--w-petal-light); stroke: var(--w-gold); stroke-width: .5; }
.screen-ground-wash { fill: var(--w-jade); opacity: .06; }
.paper-control { position: absolute; padding: 0; border: 0; background: transparent; pointer-events: auto; cursor: pointer; z-index: 1; }
.writing-index { display: flex; gap: 12px; align-items: center; margin: 16px 0 0; color: var(--muted); }
.writing-index .link-btn { padding: 3px 0; border: 0; border-radius: 0; background: transparent; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.desk { fill: url(#gWood); stroke: var(--w-line); stroke-width: 1.4; }
.desk-top { fill: var(--w-wood-2); stroke: var(--w-wood); stroke-width: .7; }
.desk-carving { fill: none; stroke: var(--w-stone); stroke-width: .7; opacity: .55; }
.desk-joints { fill: none; stroke: var(--w-wood); stroke-width: .6; }
.scroll rect { fill: var(--w-note); stroke: var(--w-line); stroke-width: 1.2; }
.scroll-ink { stroke: var(--w-line); stroke-width: 3; stroke-linecap: round; opacity: .75; }
.inkstone { cursor: pointer; }
.inkstone rect { fill: var(--w-ink-fill); stroke: var(--w-line); stroke-width: .8; }
.inkstone-rim { fill: #393e38; stroke: #78796d; stroke-width: .5; }
.ink-pool { fill: #141c19; }
.ink-glint { fill: none; stroke: #a4b3a1; stroke-width: .5; opacity: .6; }
.inkstone.is-grinding .ink-glint { animation: inkStir .8s ease-in-out 4; transform-box: fill-box; transform-origin: center; }
@keyframes inkStir { 50% { transform: translateX(2px) scaleX(.5); opacity: .2; } }
.brush-cup { fill: url(#gMetal); stroke: var(--w-metal-dark); stroke-width: .8; }
.brush-cup-rim { fill: var(--w-metal-dark); stroke: var(--w-metal-light); stroke-width: .5; }
.brushes path { stroke: var(--w-wood-2); stroke-width: 3; stroke-linecap: round; }
.brushes .brush-tip { fill: var(--w-edge); stroke: none; }
.brushes .brush-grain { fill: none; stroke: #ccb38c; stroke-width: .45; }
.brushes .brush-fibres { fill: none; stroke: var(--w-line-soft); stroke-width: .3; }
.lamp path { fill: var(--w-machine); }
.lamp .flame { fill: #f2b14a; animation: flame 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.lamp-glow { fill: url(#gGlow); opacity: 0; transition: opacity .8s; }
[data-theme="dark"] .lamp-glow { opacity: 1; }
@keyframes flame { 50% { transform: scale(.9, 1.1); } }
.cushion { fill: var(--w-accent-soft); stroke: var(--w-line); stroke-width: 1.3; }

.life-item { cursor: pointer; }
.case { fill: url(#gLeather); stroke: var(--w-leather-dark); stroke-width: 1.2; }
.case-side { fill: var(--w-leather-dark); }
.case-corners { fill: none; stroke: var(--w-leather-dark); stroke-width: 3; }
.case-stitch { fill: none; stroke: #d6b088; stroke-width: .5; stroke-dasharray: 1 1.5; opacity: .75; }
.sticker-ink { fill: none; stroke: var(--w-leather); stroke-width: .6; }
.case-handle { fill: none; stroke: var(--w-line); stroke-width: 3; }
.case-strap { stroke: var(--w-leather-dark); stroke-width: 4; }
.sticker.s1 { fill: var(--w-note); } .sticker.s2 { fill: var(--w-jade); } .sticker.s3 { fill: var(--w-gold); }
.steam path { fill: none; stroke: var(--w-line); stroke-width: 2; stroke-linecap: round; opacity: .35; animation: steam 3s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.steam path:nth-child(2) { animation-delay: -1s; }
.steam path:nth-child(3) { animation-delay: -2s; }
@keyframes steam { 0% { transform: translateY(6px) scaleY(.8); opacity: 0; } 40% { opacity: .4; } 100% { transform: translateY(-10px) scaleY(1.1); opacity: 0; } }
.stove-body { fill: url(#gMachine); stroke: var(--w-line); stroke-width: 1.4; }
.stove-fire { fill: #df6f3e; }
.pot { fill: url(#gMetal); stroke: var(--w-metal-dark); stroke-width: 1; }
.pot-lid { fill: url(#gMetal); stroke: var(--w-metal-dark); stroke-width: .7; stroke-linecap: round; }
.pot-rim { fill: none; stroke: var(--w-metal-light); stroke-width: .7; opacity: .8; }
.pot-brushing { fill: none; stroke: var(--w-metal-light); stroke-width: .3; opacity: .3; }
.lid-knob { fill: var(--w-wood); stroke: var(--w-metal-dark); stroke-width: .6; }
.stove-details { fill: none; stroke: var(--w-metal-light); stroke-width: .6; opacity: .6; }
.stove-knob { fill: var(--w-metal-dark); stroke: var(--w-metal-light); stroke-width: .5; }
.cushion-piping { fill: none; stroke: var(--w-petal-dark); stroke-width: .8; }
.pouf-shadow { fill: var(--w-line); opacity: .16; }
.pouf-side { fill: var(--w-stone); stroke: var(--w-line-soft); stroke-width: .7; }
.pouf-top { fill: url(#gPouf); stroke: var(--w-line-soft); stroke-width: .7; }
.pouf-weave { fill: none; stroke: var(--w-wood-2); stroke-width: .5; opacity: .18; }
.pouf-pleats { fill: none; stroke: var(--w-line-soft); stroke-width: .55; opacity: .35; }
.pouf-indent { fill: var(--w-line); opacity: .065; }
.pouf-piping { fill: none; stroke: var(--w-wood-2); stroke-width: 1.1; transition: stroke .2s, stroke-width .2s; }
.pouf-stitches { fill: none; stroke: var(--w-note); stroke-width: .5; stroke-dasharray: 1.2 2; }
.nap:hover .pouf-piping, .nap.is-touched .pouf-piping, .layer-ground:has(#xiaohei-control:hover) .pouf-piping, .layer-ground:has(#xiaohei-control:focus-visible) .pouf-piping { stroke: var(--w-accent); stroke-width: 1.8; }
.zzz text { animation: zzz 3s ease-in-out infinite; opacity: 0; }
.zzz text:nth-child(2) { animation-delay: .5s; }
.zzz text:nth-child(3) { animation-delay: 1s; }
@keyframes zzz { 20%, 60% { opacity: .75; } 100% { opacity: 0; } }
.beam-light { fill: var(--w-beam); }
.pole { stroke: var(--w-wood); stroke-width: 4; stroke-linecap: round; }
.screen { fill: var(--w-screen); stroke: var(--w-line); stroke-width: 1.6; }
.screen-moon { fill: var(--w-line); opacity: .45; }
.screen-hill { fill: var(--w-line); opacity: .3; }
.tripod { stroke: var(--w-line); stroke-width: 2.4; stroke-linecap: round; }
.projector { fill: url(#gMetal); stroke: var(--w-metal-dark); stroke-width: 1; }
.projector-side, .lens-barrel { fill: var(--w-metal-dark); stroke: var(--w-metal); stroke-width: .7; }
.projector-bevel { fill: none; stroke: var(--w-metal-light); stroke-width: .7; opacity: .7; }
.projector-grille { fill: none; stroke: var(--w-metal-dark); stroke-width: 1.3; }
.projector-lens { fill: #304e50; stroke: var(--w-metal-light); stroke-width: .6; }
.lens-glint { fill: none; stroke: #d5e1ce; stroke-width: .7; }
.projector-switch { fill: var(--w-gold); stroke: var(--w-metal-dark); stroke-width: .6; }
.reel { fill: url(#gMetal); stroke: var(--w-metal-light); stroke-width: .8; }
.reel-spokes { fill: var(--w-metal-dark); transform-box: fill-box; transform-origin: center; animation: reelSpin 8s linear infinite; }
.reel-hub { fill: var(--w-gold); }
.film-belt { fill: none; stroke: var(--w-metal-dark); stroke-width: .8; }
@keyframes reelSpin { to { transform: rotate(360deg); } }
.cinema.is-projecting .reel-spokes { animation-duration: 1.2s; }
.cinema.is-projecting .beam-light { animation: projectionFlicker 1.8s ease-in-out infinite; }
@keyframes projectionFlicker { 50% { opacity: .55; } }
.stove.is-simmering .pot-lid-group { animation: lidRattle .28s ease-in-out 10; transform-box: fill-box; transform-origin: center; }
.stove.is-simmering .steam path { animation-duration: 1.4s; }
@keyframes lidRattle { 50% { transform: translateY(-.7px) rotate(.8deg); } }
.tree-body { fill: url(#gWood); stroke: var(--w-wood); stroke-width: 1; }
.bark-line { fill: none; stroke: var(--w-stone); stroke-width: .65; opacity: .5; }
.branch-twig { fill: none; stroke: var(--w-wood); stroke-width: 2; }
.cap-tassel { transform-origin: 60px 17.4px; }
.act-toss .cap-tassel { animation: tasselSwing .5s ease-in-out 5; }
@keyframes tasselSwing { 50% { transform: rotate(15deg); } }
.life-item:hover .case, .life-item:hover .pot, .life-item:hover .screen { stroke: var(--w-accent); stroke-width: 2.6; }

.box { fill: url(#gRed); stroke: var(--w-line); stroke-width: 2; }
.slot { stroke: var(--w-line); stroke-width: 3; stroke-linecap: round; }
.arrow path { fill: var(--w-wood-2); stroke: var(--w-line); stroke-width: 1.3; }
.arrow text { fill: var(--w-plaque-text); font: 500 12px var(--font-body) !important; letter-spacing: .04em; }
.more { fill: var(--w-line); opacity: .45; font-size: 17px; font-style: italic; }

/* ---------- actors: avatar + cat ---------- */
.actor { position: absolute; left: 0; will-change: transform; pointer-events: none; cursor: pointer; }
.actor svg { display: block; width: 100%; height: 100%; overflow: visible; }
.actor > svg { pointer-events: none; }
.actor .c-root, .actor .c-back, .actor .c-crouch, .actor .cat-flip { pointer-events: visiblePainted; }
.sleeper-control { position: absolute; bottom: calc(var(--s) * 245px); width: calc(var(--s) * 84px); height: calc(var(--s) * 52px); padding: 0; border: 0; border-radius: 40%; background: transparent; pointer-events: auto; cursor: pointer; z-index: 1; }
.sleeper-control:focus-visible { outline: none; }
/* Clean ink: every line joins and ends round, drawn with geometric precision. */
.scene, .actor svg, .guide-portrait svg, .guide-fab-face svg { shape-rendering: geometricPrecision; }
.scene *, .actor svg *, .guide-portrait svg *, .guide-fab-face svg * { stroke-linejoin: round; stroke-linecap: round; }
.char { width: calc(var(--s) * 105px); height: calc(var(--s) * 175px); bottom: calc(var(--s) * 233.35px); z-index: 2; }
.cat { width: calc(var(--s) * 66px); height: calc(var(--s) * 53px); bottom: calc(var(--s) * 238.2px); z-index: 1; }

.c-glow { opacity: 0; transition: opacity .8s; }
[data-theme="dark"] .c-glow { opacity: 1; }
/* day outfit (trench coat, hair down) vs night outfit (qipao, updo) */
.o-night, .h-up { display: none; }
[data-theme="dark"] .o-night, [data-theme="dark"] .h-up { display: inline; }
[data-theme="dark"] .o-day, [data-theme="dark"] .h-down { display: none; }
.c-lantern-glow { animation: flicker 3s ease-in-out infinite; }
.c-shadow, .cat-shadow { fill: rgba(20, 16, 12, .2); }
[data-theme="dark"] .c-shadow, [data-theme="dark"] .cat-shadow { fill: rgba(0, 0, 0, .45); }
.face-left .c-flip { transform: scaleX(-1); transform-origin: 60px 0; }
.c-root { animation: breathe 3.6s ease-in-out infinite; }
.c-head { animation: tilt 7s ease-in-out infinite; transform-origin: 60px 58px; }
.c-eyes { animation: blink 5.3s infinite; transform-origin: 60px 40.6px; }
.c-hairback { animation: sway 4.6s ease-in-out infinite; transform-origin: 60px 28px; }
.c-mouth-open { opacity: 0; transform-origin: 60px 50.8px; }
@keyframes breathe { 50% { transform: translateY(.8px); } }
@keyframes tilt { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1deg); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96.5% { transform: scaleY(.08); } }
@keyframes sway { 0%, 100% { transform: rotate(-1deg); } 50% { transform: rotate(1.3deg); } }

.is-walking .c-leg-f { animation: legF .56s linear infinite; transform-origin: 65px 110px; }
.is-walking .c-leg-b { animation: legB .56s linear infinite; transform-origin: 55px 110px; }
.is-walking .c-arm-f { animation: armF .56s ease-in-out infinite; }
.is-walking .c-arm-b { animation: armB .56s ease-in-out infinite; }
.is-walking .c-root { animation: bobWalk .28s ease-in-out infinite alternate; }
.is-running .c-leg-f, .is-running .c-leg-b, .is-running .c-arm-f, .is-running .c-arm-b { animation-duration: .34s; }
.is-running .c-root { animation-duration: .17s; }
@keyframes legF { 0%, 100% { transform: rotate(11deg); } 50% { transform: rotate(-11deg); } }
@keyframes legB { 0%, 100% { transform: rotate(-11deg); } 50% { transform: rotate(11deg); } }
@keyframes armF { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(9deg); } }
@keyframes armB { 0%, 100% { transform: rotate(10deg); } 50% { transform: rotate(-9deg); } }
@keyframes bobWalk { to { transform: translateY(-3px); } }

.is-talking .c-mouth { opacity: 0; }
.is-talking .c-mouth-open { animation: talk .24s steps(2, end) infinite; }
@keyframes talk { 0% { opacity: 1; transform: scaleY(1); } 100% { opacity: 1; transform: scaleY(.35); } }
.is-waving .c-arm-f { animation: wave 1.4s ease-in-out; }
@keyframes wave { 0% { transform: none; } 18% { transform: rotate(-138deg); } 32% { transform: rotate(-118deg); } 46% { transform: rotate(-140deg); } 60% { transform: rotate(-118deg); } 76% { transform: rotate(-136deg); } 100% { transform: none; } }
.is-jumping .c-root { animation: jump .75s cubic-bezier(.3, .7, .4, 1); }
@keyframes jump { 0% { transform: none; } 15% { transform: translateY(3px) scaleY(.95); } 45% { transform: translateY(-30px); } 80% { transform: translateY(0); } 90% { transform: translateY(2px) scaleY(.97); } 100% { transform: none; } }

.cat-walk { display: none; }
.cat.is-walking .cat-walk { display: inline; }
.cat.is-walking .cat-sit { display: none; }
.face-left .cat-flip { transform: scaleX(-1); transform-origin: 45px 0; }
.cat-tail-sit { animation: tail 3s ease-in-out infinite; transform-box: fill-box; transform-origin: 100% 100%; }
.cat-tail-walk { animation: tail 1s ease-in-out infinite; transform-box: fill-box; transform-origin: 100% 100%; }
.cat-torso { transform: translateY(var(--cat-body-lift, 0px)); }
.cat-far-leg { opacity: .83; }
.cat .cat-sit { animation: catSit .24s ease-out; transform-origin: 45px 68px; }
@keyframes catSit { from { opacity: .75; transform: translateY(-1px); } to { opacity: 1; transform: none; } }
.cat-eyes { animation: blink 6s infinite; transform-box: fill-box; transform-origin: center; }
.heart { position: absolute; bottom: 70%; color: #e0654f; font-size: calc(var(--s, 1) * 18px); pointer-events: none; animation: heart 1.3s ease-out forwards; }
@keyframes heart { from { transform: translateY(0) scale(.6); opacity: 0; } 20% { opacity: 1; } to { transform: translateY(-60px) scale(1.1); opacity: 0; } }
.screen-cat { fill: var(--w-line); stroke: var(--w-line); opacity: .45; }
.screen-cat path:nth-child(2) { fill: none; }
.screen-label { fill: var(--w-line); font-size: 11px !important; letter-spacing: .25em; opacity: .7; }
.cat.is-happy > .hj-cat-svg { animation: hop .6s ease; }
.cat-butterfly { position: absolute; bottom: calc(var(--s) * 276px - 22px); width: 44px; height: 44px; padding: 9px; border: 0; background: none; cursor: pointer; pointer-events: auto; z-index: 3; animation: butterflyArrive 1.8s ease-out both; }
.cat-butterfly svg { width: 100%; height: 100%; }
.bf-flight { transform-origin: 12px 12px; animation: butterflyDrift 1.6s ease-in-out infinite alternate; }
.cat-butterfly .bf-wing { fill: #c29c67; stroke: #7b6348; stroke-width: .7; transform-origin: 12px 12px; animation: butterflyWing .45s ease-in-out infinite alternate; }
.cat-butterfly .bf-body { fill: none; stroke: #5c503e; stroke-width: .8; }
[data-theme="dark"] .cat-butterfly { display: none; }
.cat.is-pouncing > .hj-cat-svg { animation: catPounce 1.65s ease-in-out; }
.cat.is-pouncing .cat-sit { display: none; }
.cat.is-pouncing .cat-walk { display: inline; }
.cat.is-pouncing .cat-fore-leg .cat-limb-pose { transform-origin: 0 0; animation: catReach 1.65s ease-in-out; }
.cat-butterfly.is-escaping { animation: butterflyEscape 2.8s ease-in both; }
.cat.is-tail-playing .cat-sit { transform-box: fill-box; transform-origin: 50% 100%; animation: catTailPlay 2.1s ease-in-out; }
.cat.is-tail-playing .cat-tail-sit { animation: tailCatch .35s ease-in-out 6 alternate; }
.cat.is-tail-playing .cat-head { transform-box: fill-box; transform-origin: 50% 80%; animation: catLookBack 2.1s ease-in-out; }
@keyframes butterflyDrift { from { transform: translate(0, 0) rotate(-10deg); } to { transform: translate(-3px, -4px) rotate(14deg); } }
@keyframes butterflyArrive { from { opacity: 0; transform: translate(calc(var(--butterfly-facing) * 95px), -38px); } 45% { opacity: .9; } to { opacity: .9; transform: none; } }
@keyframes butterflyWing { to { transform: scaleX(.35); } }
@keyframes butterflyEscape { 0% { opacity: .9; transform: none; } 35% { opacity: .9; transform: translate(calc(var(--butterfly-facing) * 28px), -26px); } 65% { opacity: .8; transform: translate(calc(var(--butterfly-facing) * 10px), -42px); } 100% { opacity: 0; transform: translate(calc(var(--butterfly-facing) * 110px), -76px); } }
@keyframes catPounce { 14% { transform: translateY(2px) scaleY(.96); } 38% { transform: translate(calc(var(--cat-facing) * 17px), -12px) rotate(calc(var(--cat-facing) * -5deg)); } 60% { transform: translate(calc(var(--cat-facing) * 20px), 0); } 80% { transform: translate(calc(var(--cat-facing) * 9px), -5px); } 100% { transform: none; } }
@keyframes catReach { 14% { transform: rotate(9deg); } 38% { transform: rotate(-34deg); } 60% { transform: none; } 80% { transform: rotate(14deg); } 100% { transform: none; } }
@keyframes catTailPlay { 20%, 65% { transform: skewX(-8deg) scaleX(.9); } 42%, 82% { transform: skewX(7deg); } }
@keyframes catLookBack { 20%, 65% { transform: rotate(-20deg) translateX(-5px); } 42%, 82% { transform: rotate(12deg); } }
@keyframes tailCatch { to { transform: rotate(30deg) translate(2px, -4px); } }
@keyframes tail { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(8deg); } }
@keyframes hop { 40% { transform: translateY(-8px); } }

.bubble {
  position: absolute; left: 50%; bottom: calc(100% + 6px);
  transform: translate(-50%, 4px); opacity: 0; pointer-events: none;
  max-width: 220px; width: max-content;
  background: var(--card); color: var(--ink); border: 1px solid var(--line-2);
  padding: 6px 11px; border-radius: 12px; font-size: 13px; line-height: 1.35;
  box-shadow: var(--shadow); transition: opacity .2s, transform .2s;
}
.bubble.show { opacity: 1; transform: translate(-50%, 0); }
.face-left .bubble { transform: translate(-50%, 4px); }

/* ---------- HUD ---------- */
.hud {
  position: absolute; top: 14px; left: 50%; transform: translate(-50%, -6px); opacity: 0; pointer-events: none;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; box-shadow: var(--shadow); transition: opacity .25s, transform .25s; white-space: nowrap;
}
.hud.show { opacity: 1; transform: translate(-50%, 0); }
.hud, .hint { z-index: 4; }
.hint { position: absolute; right: 18px; bottom: 14px; margin: 0; font-size: 12px; color: var(--muted); pointer-events: none; }
.hint kbd { font: 11px var(--font-mono); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 4px; }
.panel-open .hint { display: none; }

/* ---------- guide (dialogue box) ---------- */
.guide {
  position: fixed; left: 16px; bottom: 16px; z-index: 20;
  width: min(420px, calc(100vw - 32px)); max-height: min(54vh, 480px);
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 5px; box-shadow: 0 8px 24px -16px rgba(40, 30, 20, .45);
}
.panel-open .guide { width: min(420px, calc(100vw - 468px)); }
.guide-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 9px; border-bottom: 1px solid var(--line); }
.guide-portrait { width: 44px; height: 44px; flex: none; border-radius: 50%; overflow: hidden; background: #e9dcc6; border: 1.5px solid var(--line-2); }
[data-theme="dark"] .guide-portrait { background: #2a303a; }
.guide-portrait svg { width: 100%; height: 100%; display: block; }
.guide-portrait .c-glow, .guide-portrait .c-shadow { display: none; }
.guide-who { flex: 1; min-width: 0; }
.guide-name { margin: 0; font: 600 16px/1.2 var(--font-display); }
.guide-note { margin: 1px 0 0; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guide-toggle { height: 32px; min-width: 32px; padding: 0; }

/* Folded chat: a small "Ask me" button in the corner, so nothing covers the scene. */
.guide-fab {
  position: fixed; left: 16px; bottom: 16px; z-index: 20;
  display: inline-flex; align-items: center; gap: 9px;
  padding: 5px 16px 5px 5px; border-radius: 999px; cursor: pointer;
  background: var(--card); color: var(--ink); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  font: 600 14px/1 var(--font-body); transition: transform .15s;
}
.guide-fab:hover { transform: translateY(-2px); }
.guide-fab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.guide-fab-face { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; background: #e9dcc6; border: 1.5px solid var(--line-2); }
[data-theme="dark"] .guide-fab-face { background: #2a303a; }
.guide-fab-face svg { width: 100%; height: 100%; display: block; }
.guide-fab-face .c-glow, .guide-fab-face .c-shadow { display: none; }
.guide-fab-dot { position: absolute; top: 3px; left: 35px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); border: 2px solid var(--card); display: none; }
.guide-fab.has-news .guide-fab-dot { display: block; }
.title-open .guide-fab, .theater-open .guide-fab { visibility: hidden; }
.char .bubble { max-width: 260px; }

.guide-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 14px 4px; }
.msg { margin: 0 0 12px; }
.msg-text { margin: 0; white-space: pre-wrap; }
.msg-user { text-align: right; }
.msg-user .msg-text { display: inline-block; max-width: 86%; text-align: left; background: var(--ink); color: var(--bg); padding: 7px 12px; border-radius: 14px 14px 4px 14px; }
.msg-guide .msg-text { color: var(--ink); }
.msg-extra:empty { display: none; }
.msg-extra { margin-top: 8px; display: grid; gap: 8px; }

.g-card { border: 1px solid var(--line-2); border-left: 4px solid var(--tc, var(--accent)); border-radius: 12px; padding: 10px 12px; background: var(--bg); }
.g-kicker { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.g-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tc, var(--accent)); }
.g-title { display: block; margin-top: 3px; font: 600 15px/1.35 var(--font-display); color: var(--ink); text-decoration: none; }
.g-title:hover { color: var(--accent); text-decoration: underline; }
.g-authors { font-size: 13px; color: var(--muted); margin-top: 3px; }
.g-text { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); }
.g-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.g-btn, .g-link, .g-inline {
  font-size: 12.5px; font-weight: 500; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none;
}
.g-btn:hover, .g-link:hover, .g-inline:hover { border-color: var(--accent); color: var(--accent); }
.g-inline { padding: 1px 8px; }
.g-block { font-size: 14px; }
.g-block p { margin: 2px 0 0; color: var(--ink-2); }
.g-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 4px; }
.g-note { margin: 0; font-size: 12.5px; color: var(--muted); font-style: italic; }
.g-muted { color: var(--muted); font-size: 13px; }
.g-list, .g-news, .g-timeline { margin: 0; padding-left: 18px; font-size: 14px; }
.g-list li, .g-news li, .g-timeline li { margin: 4px 0; }
.g-news { list-style: none; padding: 0; }
.g-date { font: 500 12px var(--font-mono); color: var(--accent); margin-right: 4px; }
.g-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.g-theme { text-align: left; border: 1px solid var(--line-2); border-left: 4px solid var(--tc); border-radius: 10px; padding: 8px 10px; background: var(--bg); cursor: pointer; }
.g-theme:hover { border-color: var(--tc); }
.g-theme-title { display: block; font: 600 14px/1.3 var(--font-display); }
.g-theme-n { font-size: 12px; color: var(--muted); }

.guide-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 14px 10px; }
.chip {
  font-size: 13px; font-weight: 500; line-height: 1; padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.guide-form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.guide-form input {
  flex: 1; min-width: 0; font: 15px var(--font-body); color: var(--ink);
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg);
}
.guide-form input:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.send { flex: none; width: 44px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); cursor: pointer; display: grid; place-items: center; }
.send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- station panel ---------- */
.panel {
  position: fixed; top: calc(var(--bar-h) + 12px); right: 12px; bottom: 12px; z-index: 25;
  width: min(420px, calc(100vw - 24px));
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 5px; box-shadow: -12px 6px 30px -24px rgba(40, 30, 20, .5);
  opacity: 0; transform: translateX(24px); transition: opacity .26s ease, transform .26s ease;
}
.panel.open { opacity: 1; transform: none; }
.panel-close { position: absolute; top: 12px; right: 12px; z-index: 3; }
.panel-body { overflow-y: auto; overscroll-behavior: contain; padding: 22px 22px 30px; scroll-padding-top: 12px; }
.panel-body h2 { font: 600 28px/1.15 var(--font-display); margin: 0 44px 8px 0; }
.panel-body h2:focus { outline: none; }
.panel-body h3 { font: 600 17px/1.3 var(--font-display); margin: 22px 0 8px; }
.panel-body p { margin: 0 0 10px; }
.p-lede { color: var(--ink-2); font-size: 15.5px; }
.p-muted { color: var(--muted); font-size: 14px; }
.p-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.p-hero img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; border: 3px solid var(--card-2); box-shadow: 0 0 0 1px var(--line-2); }
.p-hero h2 { margin-right: 0; }
.p-role { color: var(--muted); font-size: 14px; margin: 0 !important; }
.p-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.p-links a, .link-btn {
  font-size: 13px; font-weight: 500; padding: 5px 8px; border-radius: 2px;
  border: 1px solid var(--line); background: transparent; color: var(--ink); text-decoration: none; cursor: pointer;
}
.p-links a:hover, .link-btn:hover { border-color: var(--accent); color: var(--accent); }
.p-links-row { margin-bottom: 8px; }
.p-news { list-style: none; margin: 0; padding: 0; }
.p-news li { display: grid; grid-template-columns: 64px 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.p-date { font: 500 12.5px/1.8 var(--font-mono); color: var(--accent); }
.p-news .link-btn { padding: 1px 8px; margin-left: 4px; }
.p-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; position: sticky; top: -22px; background: var(--card); padding: 8px 44px 8px 0; z-index: 2; }
.p-paper, .p-theme, .p-card, .p-list li, #news { scroll-margin-top: 120px; }
.filter { font-size: 13px; font-weight: 500; padding: 7px 9px; border-radius: 0; border: 0; border-bottom: 2px solid transparent; background: transparent; cursor: pointer; }
.filter span { color: var(--muted); margin-left: 2px; }
.filter[aria-pressed="true"] { background: transparent; color: var(--accent); border-color: var(--accent); }
.filter[aria-pressed="true"] span { color: inherit; opacity: .7; }
.p-theme h3 { display: flex; align-items: center; gap: 8px; }
.p-theme .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--tc); flex: none; transform: rotate(45deg); }
.p-papers { list-style: none; margin: 0; padding: 0; }
.p-paper { padding: 12px 0; border-top: 1px solid var(--line); }
.p-paper-title { font: 600 15.5px/1.35 var(--font-display); color: var(--ink); text-decoration: none; }
.p-paper-title:hover { color: var(--accent); text-decoration: underline; }
.p-authors { font-size: 13px; color: var(--muted); margin-top: 3px; }
.p-authors b { color: var(--ink); font-weight: 600; }
.p-venue { font-size: 13px; margin-top: 4px; color: var(--ink-2); }
.badge { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; margin-right: 4px; }
.badge-proceedings { background: var(--accent); color: var(--accent-ink); }
.badge-workshop { background: var(--card-2); color: var(--ink); border: 1px solid var(--line-2); }
.badge-poster { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent); }
.badge-preprint { background: transparent; color: var(--muted); border: 1px dashed var(--line-2); }
.p-paper details { margin-top: 6px; font-size: 14px; }
.p-paper summary { cursor: pointer; color: var(--accent); font-weight: 500; font-size: 13px; }
.p-paper details p { margin: 6px 0 0; color: var(--ink-2); }
.p-venue-full { font-size: 12.5px; color: var(--muted) !important; }
.p-foot { margin-top: 18px; }
.p-talks ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.p-timeline { list-style: none; margin: 8px 0 0; padding: 0 0 0 18px; border-left: 2px solid var(--line-2); }
.p-timeline li { position: relative; padding: 0 0 16px 6px; }
.p-timeline li::before { content: ""; position: absolute; left: -25px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); }
.p-timeline h3 { margin: 0 0 2px; font-size: 16px; }
.p-timeline p { margin: 0; }
.p-timeline .p-honor { margin-top: 6px; font-size: 14px; }
.p-timeline .p-along { margin-top: 10px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.p-exp { margin: 4px 0 0; padding-left: 16px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.p-timeline .p-exp li { padding: 3px 0; }
.p-timeline .p-exp li::before { content: none; }
.p-exp b { color: var(--ink); }
.p-when { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.p-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.p-tags li { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--card-2); }
.p-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.p-card { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 16px 0; background: transparent; }
.p-card h3 { margin: 0 0 4px; font-size: 16px; }
.p-card h3 a { color: var(--ink); }
.p-card p { margin: 0; font-size: 14px; color: var(--ink-2); }
.p-card-tag { float: right; font: 600 12px var(--font-mono); color: var(--accent); }
.p-now { margin: 14px 0 6px; }
.p-now .p-card .link-btn { margin-top: 6px; }
.p-list { padding-left: 18px; margin: 0; }
.p-list li { margin: 6px 0; font-size: 14px; }
.p-contact { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.p-contact a { display: block; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); color: var(--ink); text-decoration: none; font-weight: 500; }
.p-contact a:hover { border-color: var(--accent); color: var(--accent); }
.flash { animation: flashbg 1.6s ease; border-radius: 10px; }
@keyframes flashbg { 0%, 40% { background: var(--accent-soft); box-shadow: 0 0 0 6px var(--accent-soft); } 100% { background: transparent; box-shadow: 0 0 0 6px transparent; } }

/* ---------- Life widgets ---------- */
.life-sec { padding-top: 6px; }
.life-sec + .life-sec { border-top: 1px solid var(--line); margin-top: 18px; }
.cat-line { list-style: none; margin: 14px 0 6px; padding: 18px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px;
  background: linear-gradient(var(--line-2), var(--line-2)) 0 6px / 100% 1.5px no-repeat; }
.cat-card { transform: rotate(var(--r)); transition: transform .2s ease; position: relative; }
.cat-card::before { content: ""; position: absolute; top: -12px; left: 50%; width: 8px; height: 14px; margin-left: -4px; border-radius: 2px; background: var(--accent); opacity: .85; z-index: 1; }
.cat-card:hover, .cat-card:focus-within { transform: rotate(0) translateY(-3px); }
.cat-open { display: block; width: 100%; padding: 6px 6px 8px; border: 0; background: #fbf8f2; border-radius: 4px; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .45); cursor: pointer; color: #2a2522; }
.cat-photo { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 2px; background: #efe6d6; }
.cat-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-photo.is-art svg { width: 100%; height: 100%; display: block; }
.cat-photo .cat-walk { display: none; }
.cat-name { display: block; margin-top: 6px; font: 600 13px/1.2 var(--font-display); }
.mystery-cat { fill: #cfc3b0; stroke: #cfc3b0; }
.mystery-cat text { fill: #fbf8f2; stroke: none; font: 700 18px var(--font-display); }
.roadtrip { --route-north: #a34635; --route-south: #42796d; margin-top: 14px; padding: 18px 14px 12px; background: var(--card); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
[data-theme="dark"] .roadtrip { --route-north: #eda18b; --route-south: #8fc4b6; }
.rt-heading { margin: 0 0 4px; font: 600 19px var(--font-display); }
.roadmap { display: block; width: 100%; height: auto; overflow: visible; }
.us-land-shadow { fill: var(--ink); opacity: .08; }
.us-land { fill: url(#gPaper); stroke: var(--ink-2); stroke-width: 1.1; stroke-linejoin: round; }
.us-paper { fill: url(#gLimestone); opacity: .24; }
.us-fold { fill: none; stroke: var(--ink-2); stroke-width: .6; opacity: .12; }
.us-relief { fill: none; stroke: var(--ink-2); stroke-width: .8; opacity: .15; stroke-linecap: round; }
.us-lake { fill: var(--w-water); opacity: .4; }
.us-route-0 { color: var(--route-north); }
.us-route-1 { color: var(--route-south); }
.us-route, .us-route-base { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
.us-route { stroke-dasharray: 1000; stroke-dashoffset: 0; }
.us-route-base { opacity: .16; stroke-width: 5; }
.us-direction { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.us-year { fill: currentColor; font: 600 15px var(--font-body); }
.us-pin circle, .us-stop circle { fill: var(--ink-2); stroke: var(--card); stroke-width: 2; }
.us-pin text, .us-stop text { font: 500 14px var(--font-body); fill: var(--ink); paint-order: stroke; stroke: var(--card); stroke-width: 3px; stroke-linejoin: round; }
.us-stop text { font-size: 13px; }
.us-label-leader { fill: none; stroke: var(--ink-2); stroke-width: .65; }
.us-car-body { fill: var(--accent); stroke: var(--ink); stroke-width: 1; stroke-linejoin: round; }
.us-car-window { fill: var(--card); }
.us-car-trim { fill: none; stroke: var(--card); stroke-width: 1; }
.us-car circle { fill: var(--ink); stroke: var(--card); stroke-width: 1; }
.rt-legend { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; gap: 12px; }
.rt-legend li { display: flex; gap: 12px; align-items: baseline; }
.rt-year { font: 600 17px var(--font-display); border-bottom: 2px solid currentColor; padding-bottom: 2px; }
.rt-north { color: var(--route-north); } .rt-south { color: var(--route-south); }
.rt-legend b { display: block; font-size: 13px; font-weight: 500; }
.rt-legend small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.rt-note { color: var(--muted); font-size: 11px; margin: 12px 0; }
.rt-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 0; margin: 12px 0 6px; border-top: 1px solid var(--line); text-align: center; }
.rt-stats b { display: block; font: 600 25px/1.1 var(--font-display); color: var(--ink-2); }
.rt-stats span { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.rt-controls { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.rt-controls button:disabled { opacity: .6; cursor: default; }
.rt-status { font-size: 11px; color: var(--muted); min-height: 1.5em; }
.food { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; margin-top: 8px; }
.wheel { width: 100%; height: auto; display: block; }
.wheel-spin { transform-origin: 0 0; transition: transform 3.2s cubic-bezier(.17, .67, .16, 1); }
.slice { stroke: var(--card); stroke-width: 1.5; }
.slice.s0 { fill: #e8dcc6; } .slice.s1 { fill: #d6c3a3; } .slice.s2 { fill: #c9a882; }
[data-theme="dark"] .slice.s0 { fill: #3a3129; } [data-theme="dark"] .slice.s1 { fill: #4a3d31; } [data-theme="dark"] .slice.s2 { fill: #5c4a38; }
.wheel text { font: 600 11px var(--font-body); fill: var(--ink); }
.wheel .hub { fill: var(--accent); stroke: var(--card); stroke-width: 3; }
.wheel .pointer { fill: var(--accent); stroke: var(--card); stroke-width: 1.5; }
.btn-spin { height: auto; padding: 10px 14px; font-size: 14px; line-height: 1.3; white-space: normal; text-align: left; }
.food-result { margin: 10px 0 0 !important; font-weight: 600; color: var(--ink); min-height: 2.6em; }
.cat-box { text-align: center; position: relative; }
.cat-box img { max-width: 100%; max-height: 62vh; border-radius: 12px; display: block; margin: 0 auto; }
.cat-illo { width: min(320px, 70vw); margin: 0 auto; }
.cat-illo svg { width: 100%; height: auto; display: block; }
.cat-illo .cat-walk { display: none; }
.cat-meta { margin: 10px 0 6px; color: var(--ink-2); }
.cat-actions { display: flex; gap: 10px; justify-content: center; align-items: center; }
.cat-actions .link-btn { font-size: 18px; padding: 4px 14px; }
.pet-btn { height: 40px; font-size: 14px; }
.cat-count { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.cat-box .heart { bottom: 40%; font-size: 26px; }

/* ---------- title screen ---------- */
.title {
  position: fixed; inset: var(--bar-h) 0 0; z-index: 50; display: flex; align-items: flex-start; padding: clamp(32px, 8vh, 90px) 5vw;
  background: linear-gradient(90deg, rgba(var(--bg-rgb), .95), rgba(var(--bg-rgb), .75) 24%, transparent 56%);
  transition: opacity .7s ease;
}
.title.leaving { opacity: 0; pointer-events: none; }
.title-card {
  width: min(465px, 100%); text-align: left; padding: 8px 0 0 22px;
  background: transparent; border: 0; border-left: 2px solid var(--accent); border-radius: 0; box-shadow: none;
}
.title-kicker { margin: 16px 0 6px; font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.title h1 { margin: 0; font: 600 clamp(34px, 6vw, 54px)/1.05 var(--font-display); letter-spacing: -.01em; }
.title-zh { margin: 8px 0 0; font: 400 19px/1.4 "Songti SC", "Noto Serif SC", "STSong", serif; letter-spacing: .35em; color: var(--ink-2); }
.title-sub { margin: 16px 0 0; max-width: 36ch; color: var(--ink-2); }
.title-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 10px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 12px; font-size: 15.5px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border: 0; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-2); }
.title-hint { margin: 18px 0 0; font-size: 12.5px; color: var(--muted); }
.title-open .guide, .title-open .hud, .title-open .hint { visibility: hidden; }

/* ---------- video modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(10, 10, 12, .6); }
.modal[hidden] { display: none; }
.modal-card { width: min(900px, 100%); background: var(--card); border-radius: 16px; padding: 12px 14px 16px; box-shadow: var(--shadow); }
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.modal-head h2 { flex: 1; margin: 0; font: 600 17px/1.3 var(--font-display); }
.modal-body video, .modal-body iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; background: #000; }
.modal-body iframe.li-embed { aspect-ratio: auto; height: min(72vh, 680px); background: #fff; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .places-btn { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
    flex-direction: column; gap: 2px; min-width: 200px; padding: 6px;
    background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow);
  }
  .places.open .nav { display: flex; }
  .nav-btn { justify-content: flex-start; border-radius: 10px; height: 40px; }
}

@media (max-width: 699px) {
  :root { --bar-h: 52px; }
  .topbar { padding: 0 10px; gap: 8px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 15px; }
  .seal { width: 30px; height: 30px; font-size: 12px; }
  .places-btn span { display: none; }
  .view-switch { padding: 0 10px; }
  .view-switch span { font-size: 13px; }
  .hint { display: none; }
  .hud { top: 10px; }
  .sun { top: 5%; right: 8%; width: 84px; }

  .guide {
    left: 0; right: 0; bottom: 0; width: auto; max-height: 74dvh;
    border-radius: 18px 18px 0 0; border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .panel-open .guide, .panel-open .guide-fab { display: none; }
  .guide-fab { left: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .guide-note { display: none; }
  .guide-head { padding: 8px 10px; }
  .guide-portrait { width: 36px; height: 36px; }
  .guide-form { padding: 8px 10px 10px; }
  .guide-form input { font-size: 16px; }

  .panel {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 78dvh;
    border-radius: 18px 18px 0 0; border-bottom: 0; transform: translateY(40px);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .panel-body { padding: 18px 16px 28px; }
  .panel-body h2 { font-size: 24px; }
  .title { padding: 24px 22px; background: linear-gradient(rgba(var(--bg-rgb), .97), rgba(var(--bg-rgb), .87) 42%, transparent 76%); }
  .title-card { padding: 0 0 12px 16px; width: 100%; }
  .title h1 { font-size: 36px; max-width: 10ch; }
  .title-card .seal-lg { width: 34px; height: 34px; font-size: 14px; border-radius: 4px; }
  .title-sub { font-size: 14px; }
  .title-hint { font-size: 12px; max-width: 30ch; }
}

/* ---------- red circles: what she does at each place ---------- */
.spot { fill: rgba(184, 50, 42, .07); stroke: var(--w-accent); stroke-width: 2; stroke-dasharray: 6 4; stroke-linecap: round; opacity: .75; }
.st.is-near .spot, .st-writing.is-near .cushion { animation: spotPulse 1.8s ease-in-out infinite; }
.st.is-acting .spot { stroke-dasharray: none; opacity: .95; animation: none; }
.st-writing.is-acting .cushion { animation: none; }
@keyframes spotPulse { 50% { opacity: .35; } }

/* props and alternate views stay hidden until an action needs them */
.p-book, .p-letter, .p-cap, .c-back, .c-crouch, .c-arms-read, .c-arms-type, .c-eyes-shut, .sc-eyes-happy, .sc-eyes-open, .sc-groom-paw, .sc-tongue, .sc-purr { display: none; }
.c-arm-f { transform-origin: 74px 70px; }
.c-arm-b { transform-origin: 46px 70px; }
/* by day her left arm hugs a book; actions that need both hands swap in the free arm */
.c-arm-b .arm-free { display: none; }
.hands-free .c-arm-b .arm-free { display: inline; }
.hands-free .c-hug, .hands-free .c-lantern { display: none; }

/* Welcome: a wave, then a little bow */
.is-bowing .c-upper { animation: bowUpper 1.1s ease-in-out; transform-origin: 60px 110px; }
.is-bowing .c-head { animation: bowHead 1.1s ease-in-out; }
.is-bowing .c-arm-f { animation: bowArmF 1.1s ease-in-out; }
.is-bowing .c-arm-b { animation: bowArmB 1.1s ease-in-out; }
.is-bowing .c-eyes { animation: none; opacity: 0; }
.is-bowing .c-eyes-shut { display: inline; }
@keyframes bowUpper { 35%, 65% { transform: translateY(6px) scaleY(.9); } }
@keyframes bowHead { 35%, 65% { transform: translateY(9px) scale(.97, .88); } }
@keyframes bowArmF { 35%, 65% { transform: rotate(14deg); } }
@keyframes bowArmB { 35%, 65% { transform: rotate(-14deg); } }

/* Research: reach up, take a book, read it */
.act-reach .c-arm-f { animation: reachUp .55s ease forwards; }
@keyframes reachUp { to { transform: rotate(-160deg); } }
.has-book .p-book { display: inline; }
.act-read .c-arm { display: none; }
.act-read .c-arms-read { display: inline; }
.act-read .c-head { animation: readNod 3.2s ease-in-out infinite; }
@keyframes readNod { 0%, 100% { transform: rotate(3deg); } 50% { transform: rotate(5deg) translateY(1px); } }
.page-flip { transform-box: fill-box; transform-origin: 0 50%; animation: pageFlip 3.4s ease-in-out infinite; }
@keyframes pageFlip { 0%, 55% { transform: scaleX(1); opacity: 1; } 80% { transform: scaleX(-1); opacity: 1; } 100% { transform: scaleX(-1); opacity: 0; } }
.book.is-taken .book-in { transform-box: fill-box; transform-origin: 50% 100%; transform: scale(1.08); opacity: 0; transition: transform .3s ease, opacity .3s ease .08s; }

/* Talks: point at the slides */
.act-point .c-arm-f { animation: point 2.6s ease both; }
@keyframes point { 18%, 80% { transform: rotate(-95deg); } 45% { transform: rotate(-102deg); } 100% { transform: none; } }
.st-talks.is-acting .screen-frame { stroke: var(--w-gold); stroke-width: 4; }

/* Education: toss the cap */
.has-cap .p-cap { display: inline; }
.act-toss .p-cap-in { transform-box: fill-box; transform-origin: 50% 50%; animation: capToss 2.4s both; }
@keyframes capToss {
  0%, 10% { transform: none; animation-timing-function: cubic-bezier(.2, .75, .45, 1); }
  48% { transform: translateY(-260px) rotate(540deg); animation-timing-function: cubic-bezier(.55, 0, .8, .45); }
  88% { transform: translateY(0) rotate(720deg); }
  94% { transform: translateY(-5px) rotate(720deg); }
  100% { transform: translateY(0) rotate(720deg); }
}
.act-toss .c-arm-f { animation: cheerF 2.4s ease both; }
.act-toss .c-arm-b { animation: cheerB 2.4s ease both; }
@keyframes cheerF { 8% { transform: rotate(-25deg); } 18%, 78% { transform: rotate(-150deg); } 100% { transform: none; } }
@keyframes cheerB { 18%, 78% { transform: rotate(150deg); } 100% { transform: none; } }
.sparkle { position: absolute; color: var(--w-gold); font-size: calc(var(--s, 1) * 16px); pointer-events: none; animation: sparkle 1.3s ease-out forwards; }
@keyframes sparkle { 0% { opacity: 0; transform: scale(.4); } 25% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0; transform: translateY(-14px) scale(.8) rotate(40deg); } }

/* Tutorials: type away */
.act-type .c-arm { display: none; }
.act-type .c-arms-type { display: inline; }
.type-hand { animation: tap .22s ease-in-out infinite alternate; }
.type-hand-b { animation-delay: .11s; }
@keyframes tap { to { transform: translateY(2.2px); } }
.act-type .c-head { animation: none; transform: rotate(4deg); }
.st-tutorials.is-acting .tw-key { animation: keyTap .6s steps(1) infinite; }
.st-tutorials.is-acting .tw-key:nth-child(3n) { animation-delay: .2s; }
.st-tutorials.is-acting .tw-key:nth-child(3n+1) { animation-delay: .4s; }
@keyframes keyTap { 0% { transform: translateY(2.5px); } 30% { transform: none; } }
.st-tutorials.is-acting .tw-carriage, .st-tutorials.is-acting .sheet, .st-tutorials.is-acting .tw-knob { animation: carriage 4s linear infinite; }
@keyframes carriage { 0% { transform: translateX(22px); } 92% { transform: translateX(-22px); } 100% { transform: translateX(22px); } }
.sheet-lines { stroke-dasharray: 1 2; }
.st-tutorials.is-acting .sheet-lines { animation: typeLines 4s linear infinite; }
@keyframes typeLines { from { stroke-dashoffset: 1.05; } to { stroke-dashoffset: 0; } }

/* Writing: turn around, sit on the cushion and write */
.act-write .c-root { display: none; }
.act-write .c-back { display: inline; }
.cb-arm { transform-box: fill-box; transform-origin: 20% 10%; animation: writeArm 1s ease-in-out infinite; }
@keyframes writeArm { 0%, 100% { transform: none; } 30% { transform: rotate(-7deg) translateX(1px); } 60% { transform: rotate(4deg); } }
.hello-text { font: 600 12.5px "Caveat", "Segoe Script", "Bradley Hand", cursive !important; fill: var(--w-ink-fill); opacity: 0; }
[data-theme="dark"] .hello-text { fill: var(--w-line); }
.hello-cover { fill: var(--w-note); transform-box: fill-box; transform-origin: 100% 50%; }
.st-writing.is-acting .hello-text { opacity: 1; animation: helloFade 7s linear infinite; }
.st-writing.is-acting .hello-cover { animation: helloWrite 7s linear infinite; }
@keyframes helloWrite { 0% { transform: scaleX(1); } 50%, 100% { transform: scaleX(0); } }
@keyframes helloFade { 0%, 88% { opacity: 1; } 96%, 100% { opacity: 0; } }

/* Life: crouch down and pet XiaoHei */
.act-pet .c-root { display: none; }
.act-pet .c-crouch { display: inline; }
.cr-arm { transform-origin: 72px 114px; animation: pet 1.1s ease-in-out infinite; }
@keyframes pet { 0%, 100% { transform: none; } 50% { transform: rotate(-6deg) translateY(-1px); } }
.sc-body { transform-box: fill-box; transform-origin: 50% 100%; animation: catBreathe 3.2s ease-in-out infinite; }
@keyframes catBreathe { 50% { transform: scaleY(1.035); } }
.st-life.is-acting .sc-eyes-sleep, .st-life.is-acting .zzz { display: none; }
.st-life.is-acting .sc-eyes-happy { display: inline; }
.st-life.is-acting .sc-purr { display: inline; animation: purr 2.2s ease-in-out infinite; }
@keyframes purr { 0% { opacity: 0; transform: translateY(4px); } 30%, 70% { opacity: .85; } 100% { opacity: 0; transform: translateY(-8px); } }
.st-life.is-acting .sc-head { transform-box: fill-box; transform-origin: 85% 90%; animation: nuzzle 1.1s ease-in-out infinite; }
@keyframes nuzzle { 50% { transform: rotate(-5deg); } }
.st-life.is-acting .sc-ear-l { transform-box: fill-box; transform-origin: 60% 100%; animation: earFlick 2.2s ease-in-out infinite; }
@keyframes earFlick { 0%, 80%, 100% { transform: none; } 88% { transform: rotate(-14deg); } }
.sleep-cat { cursor: pointer; }
.sleep-cat.is-grooming .sc-eyes-open, .sleep-cat.is-grooming .sc-eyes-happy, .sleep-cat.is-grooming .sc-rest-paw, .sleep-cat.is-grooming .zzz, .sleep-cat.is-grooming .sc-purr { display: none; }
.sleep-cat.is-grooming .sc-eyes-sleep, .sleep-cat.is-grooming .sc-groom-paw, .sleep-cat.is-grooming .sc-tongue { display: inline; }
.sleep-cat.is-grooming .sc-head { transform-box: view-box; transform-origin: -11px -2px; animation: groomHead 3.6s ease-in-out; }
.sc-groom-paw { transform-box: view-box; transform-origin: -11px 4px; }
.sleep-cat.is-grooming .sc-groom-paw { animation: groomPaw 3.6s ease-in-out; }
.sleep-cat.is-grooming .sc-tongue { transform-box: fill-box; transform-origin: 50% 0; animation: groomLick 3.6s linear; }
@keyframes groomHead { 0%, 100% { transform: none; } 18%, 44% { transform: rotate(3deg); } 24%, 32%, 40% { transform: rotate(5deg); } 54%, 74% { transform: rotate(-3deg); } 64%, 82% { transform: rotate(1deg); } }
@keyframes groomPaw { 0%, 100% { transform: rotate(-90deg); opacity: 0; } 8% { opacity: 1; } 18%, 44% { transform: rotate(0); opacity: 1; } 54%, 74% { transform: rotate(44deg); opacity: 1; } 64%, 82% { transform: rotate(22deg); opacity: 1; } 90% { transform: rotate(-25deg); opacity: 1; } }
@keyframes groomLick { 0%, 16%, 44%, 100% { transform: scaleY(.1); opacity: 0; } 20%, 28%, 36% { transform: scaleY(1); opacity: 1; } 24%, 32%, 40% { transform: scaleY(.15); opacity: .2; } }
@keyframes lick { 50% { transform: scaleY(.15); } }

/* Contact: post a letter */
.has-letter .p-letter { display: inline; }
.act-mail .c-arm-f { animation: mailArm 2.6s ease both; }
@keyframes mailArm { 28%, 58% { transform: rotate(-92deg); } 42% { transform: rotate(-97deg); } 100% { transform: none; } }
.post-letter { opacity: 0; fill: var(--w-fill); stroke: var(--w-line); stroke-width: 1.1; stroke-linejoin: round; }
.post-letter path { fill: none; }
.mailbox.is-mailed .post-letter { animation: postIn .7s ease-in forwards; }
@keyframes postIn { 0% { opacity: 1; transform: translate(-14px, 10px) rotate(-12deg); } 60% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(10px) scale(.6, .3); } }
.flag-arm { stroke: var(--w-line); stroke-width: 3; }
.flag-plate { fill: var(--w-gold); stroke: var(--w-line); stroke-width: 1.2; }
.flag-pin { fill: var(--w-line); }
.mailbox .flag { transform-origin: 30px 452px; transform: rotate(90deg); transition: transform .4s cubic-bezier(.3, 1.5, .5, 1); }
.mailbox.is-mailed .flag { transform: none; transition-delay: .5s; }
/* soft contact shadows and the Life cinema slideshow */
.gshadow { fill: rgba(31, 28, 25, .1); }
[data-theme="dark"] .gshadow { fill: rgba(0, 0, 0, .32); }
.cat-slide { opacity: 0; animation-name: catSlides; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
@keyframes catSlides { 0% { opacity: 0; } 4%, 15% { opacity: 1; } 19%, 100% { opacity: 0; } }
.screen-edge { fill: none; stroke: var(--w-line); stroke-width: 1.2; }
.mailbox.is-mailed .box { transform-box: fill-box; transform-origin: 50% 100%; animation: boxBump .45s ease .5s; }
@keyframes boxBump { 40% { transform: scale(1.06, .94); } 70% { transform: scale(.97, 1.03); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .bird { display: none; }
  .cat-slide { animation: none !important; }
  .cat-slide:first-of-type { opacity: 1; }
}

/* ---------- Talks & Posters: the lecture stage ---------- */
.hall-wall { fill: var(--w-interior); }
.stage { fill: url(#gWood); stroke: var(--w-line); stroke-width: 1.4; }
.stage-edge { stroke: var(--w-gold); stroke-width: 2; }
.screen-talk { cursor: pointer; }
.screen-frame { fill: #111; stroke: var(--w-line); stroke-width: 2; }
.slide { opacity: 0; animation: slides 12s infinite; }
.slide-0 { opacity: 1; }
@keyframes slides { 0%, 30% { opacity: 1; } 34%, 96% { opacity: 0; } 100% { opacity: 1; } }
.screen-glare { fill: rgba(255, 255, 255, .08); }
.screen-talk:hover .screen-frame { stroke: var(--w-accent); stroke-width: 4; }
.beam { fill: var(--w-beam); }
.podium-body, .podium-top { fill: var(--w-wood-2); stroke: var(--w-line); stroke-width: 1.4; }
.podium-badge { fill: var(--w-accent); }
.mic { fill: none; stroke: var(--w-line); stroke-width: 2; }
.mic-head { fill: var(--w-line); }
.curtain { fill: var(--w-column); stroke: var(--w-line); stroke-width: 1.2; }
.curtain-folds { stroke: rgba(0, 0, 0, .25); stroke-width: 2; }
.valance { fill: var(--w-column); stroke: var(--w-line); stroke-width: 1.2; }
.seat { fill: var(--w-wood); stroke: var(--w-line); stroke-width: 1; opacity: .9; }
.audience { fill: var(--w-ink-fill); opacity: .65; filter: blur(.35px); }
.seat-seam { fill: none; stroke: var(--w-line-soft); stroke-width: .6; opacity: .5; }
.material-audience { fill: url(#gLinen); opacity: .07; }
.listener-nape { fill: var(--w-line-soft); opacity: .5; }
.listener-hair { fill: url(#gMachine); }
.listener-folds { fill: none; stroke: var(--w-line-soft); stroke-width: .65; opacity: .4; }
.listener-rim { fill: none; stroke: var(--w-stone); stroke-width: .8; opacity: .35; }
.listener-strands { fill: none; stroke: var(--w-line-soft); stroke-width: .6; opacity: .45; }
.th-audience .listener-hair { fill: #0c0b0b; }
.th-audience .listener-nape { fill: #393029; opacity: .5; }
.th-audience .listener-folds, .th-audience .listener-strands { stroke: #786852; opacity: .15; }
.th-audience .listener-rim { stroke: #b49a6f; opacity: .18; }
.th-audience .material-audience { opacity: .025; }
.easel { cursor: pointer; }
.easel-legs { stroke: var(--w-wood); stroke-width: 4; stroke-linecap: round; fill: none; }
.easel-board { fill: var(--w-note); stroke: var(--w-line); stroke-width: 1.4; }
.easel-ledge { fill: var(--w-wood); }
.easel:hover .easel-board { stroke: var(--w-accent); stroke-width: 3; }

/* talks panel */
.talk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.talk-card { display: grid; grid-template-columns: 132px 1fr; grid-template-rows: auto 1fr; column-gap: 12px; width: 100%; text-align: left; padding: 8px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); cursor: pointer; color: var(--ink); }
.talk-card:hover { border-color: var(--accent); }
.talk-thumb { grid-row: 1 / 3; position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 9; background: #111; }
.talk-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.talk-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 22px; background: rgba(0, 0, 0, .25); }
.talk-venue { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); font-weight: 600; }
.talk-title { font: 600 14px/1.3 var(--font-display); }
.poster-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.poster-card { width: 100%; padding: 6px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); cursor: pointer; text-align: left; color: var(--ink); }
.poster-card:hover { border-color: var(--accent); }
.poster-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border-radius: 6px; display: block; background: #fff; }
.poster-venue { display: block; margin-top: 6px; font-size: 11px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .03em; }
.poster-title { display: block; font-size: 12.5px; line-height: 1.3; }
.photo-wall { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 8px; }
.photo-wall li { transform: rotate(var(--r)); transition: transform .2s; }
.photo-wall li:hover { transform: rotate(0) scale(1.04); }
.photo-card { display: block; width: 100%; padding: 5px 5px 16px; border: 0; background: #fbf8f2; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .5); cursor: pointer; }
.photo-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }

/* photo booth (welcome panel) */
.booth { position: relative; flex: none; padding: 5px 5px 18px; border: 0; background: #fbf8f2; box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .55); transform: rotate(-3deg); cursor: pointer; }
.booth img { width: 100px; height: 124px; object-fit: cover; object-position: 50% 25%; display: block; }
.booth-hint { position: absolute; left: 0; right: 0; bottom: 2px; font-size: 10.5px; color: #8a8175; text-align: center; }
.booth.snap { animation: snap .45s ease; }
@keyframes snap { 0% { filter: brightness(2.2); } 100% { filter: none; } }

/* galleries (cats, photos, posters) */
.gal-box { text-align: center; position: relative; }
.gal-box img { max-width: 100%; max-height: 64vh; border-radius: 10px; display: block; margin: 0 auto; }
.gal-cap { margin: 10px 0 6px; color: var(--ink-2); }
.gal-actions { display: flex; gap: 10px; justify-content: center; align-items: center; }
.gal-actions .link-btn { font-size: 18px; padding: 4px 14px; }
.gal-count { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.gal-box .heart { bottom: 40%; font-size: 26px; }
.cat-photo { position: relative; }
.cat-badge { position: absolute; right: -6px; bottom: -8px; width: 46px; height: 37px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }
.cat-badge svg { width: 100%; height: 100%; display: block; }
.cat-badge .cat-walk { display: none; }
.cat-about { display: block; font-size: 11px; color: #8a8175; }

/* the lecture hall (theater mode) */
.theater { position: fixed; inset: 0; z-index: 70; overflow-y: auto; color: #f3ead9;
  background: radial-gradient(ellipse at 45% 32%, #3b2a20 0%, #1a130f 55%, #0b0907 100%); }
.theater::before, .theater::after { content: ""; position: fixed; top: 0; bottom: 0; width: 7vw; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, #6d1f18 0 14px, #8a2a21 14px 24px, #5a1913 24px 32px); box-shadow: inset 0 0 40px rgba(0, 0, 0, .6); }
.theater::before { left: 0; } .theater::after { right: 0; }
.th-hall { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 18px 9vw 0; min-height: 100%; display: flex; flex-direction: column; }
.th-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.th-marquee { margin: 0; font: 600 12.5px/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: #f0c98a; }
.th-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #e0654f; margin-right: 8px; box-shadow: 0 0 10px #e0654f; animation: flicker 1.8s infinite; }
.th-close { background: rgba(255, 255, 255, .08); color: #f3ead9; border-color: rgba(255, 255, 255, .25); }
.theater h2 { margin: 12px 0 2px; font: 600 clamp(20px, 2.6vw, 30px)/1.2 var(--font-display); max-width: 30ch; }
.th-venue { margin: 0 0 14px; color: #cdbb9f; font-size: 14px; }
.th-stage { position: relative; display: grid; grid-template-columns: 1fr 150px; align-items: end; gap: 10px; }
.th-screen { position: relative; aspect-ratio: 16 / 9; background: #000; border: 6px solid #2a211b; border-radius: 6px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 0 80px rgba(255, 220, 160, .18); transition: box-shadow .8s; }
.theater.is-playing .th-screen { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 0 140px rgba(255, 230, 180, .35); }
.th-screen img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; }
.th-screen iframe, .th-screen video { width: 100%; height: 100%; border: 0; display: block; }
.th-start { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; gap: 10px; align-items: center;
  padding: 14px 22px; border: 0; border-radius: 999px; background: #b8322a; color: #fff7f2; font: 600 16px var(--font-body); cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.th-start:hover { background: #cf3c32; }
.th-speaker { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.th-avatar { width: 128px; height: 213px; margin-bottom: 18px; }
.th-avatar svg { width: 100%; height: 100%; overflow: visible; display: block; }
.th-avatar .c-glow { opacity: .6; }
.th-podium { position: absolute; bottom: 0; left: 50%; width: 96px; transform: translateX(-38%); fill: #5a4638; stroke: #1f1712; stroke-width: 1.5; overflow: visible; }
.th-podium rect { fill: #b8322a; }
.th-audience { display: block; width: calc(100% + 18vw); margin: -60px -9vw 0; height: 140px; fill: #070504; position: relative; z-index: 2; pointer-events: none; }
.th-program { position: relative; z-index: 3; margin: -18px 0 0; padding: 14px 0 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.th-program-h { grid-column: 1 / -1; margin: 0; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #cdbb9f; }
.th-item { text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); color: #f3ead9; cursor: pointer; font: 600 13.5px/1.35 var(--font-display); }
.th-item:hover, .th-item[aria-current="true"] { border-color: #f0c98a; background: rgba(240, 201, 138, .12); }
.th-item-venue { display: block; font: 600 11px var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: #f0c98a; margin-bottom: 3px; }
.theater-open .guide, .theater-open .panel { visibility: hidden; }
@media (max-width: 699px) {
  .th-hall { padding: 12px 16px 0; }
  .theater::before, .theater::after { width: 10px; }
  .th-stage { grid-template-columns: 1fr; }
  .th-speaker { display: none; }
  .th-audience { width: calc(100% + 32px); margin: -40px -16px 0; height: 90px; }
}
