:root {
  color-scheme: dark;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --ink: #f6f1e8;
  --muted: rgba(246, 241, 232, 0.66);
  --line: rgba(255, 255, 255, 0.15);
  --accent: #d6ff38;
  --bg-a: #242c3c;
  --bg-b: #0f131b;
  --glow: rgba(214, 124, 72, 0.18);
  background: #12151c;
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #171717; }
body { margin: 0; overflow-x: hidden; background: #171717; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.stage {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background: radial-gradient(70% 85% at 50% 38%, var(--glow), transparent 67%), linear-gradient(145deg, var(--bg-a), var(--bg-b) 70%);
  transition: background 900ms ease;
}
.collage-bg { position: absolute; z-index: 2; inset: -6%; background: url('/assets/collage-bg.png') center/cover no-repeat; opacity: .86; filter: none; transform: translate3d(0,0,0) scale(1.12); transform-origin: center; will-change: transform; pointer-events: none; -webkit-mask-image: radial-gradient(ellipse 39% 52% at 50% 43%, transparent 15%, rgba(0,0,0,.38) 45%, #000 78%); mask-image: radial-gradient(ellipse 39% 52% at 50% 43%, transparent 15%, rgba(0,0,0,.38) 45%, #000 78%); }
.screen-frame { position: fixed; z-index: 14; inset: 8px; border: 2px solid rgba(255,255,255,.12); border-radius: 28px; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.35); }
#scene { position: relative; z-index: 1; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
#scene:active { cursor: grabbing; }
.vignette, .grain { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.vignette { box-shadow: inset 0 0 180px rgba(0,0,0,.72); }
.grain {
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}
.site-header { display: none; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; pointer-events: auto; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #111; background: var(--accent); font-weight: 900; }
.brand-text, .header-note { font-size: 11px; letter-spacing: .18em; font-weight: 700; }
.header-note { color: var(--muted); }
.chapter-nav { position: fixed; z-index: 12; top: 50%; right: 30px; display: grid; gap: 13px; transform: translateY(-50%); }
.chapter-nav button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.34); cursor: pointer; transition: .25s ease; }
.chapter-nav button.active { background: var(--accent); box-shadow: 0 0 0 5px rgba(214,255,56,.13); }
#story { position: relative; z-index: 2; }
.story-section { position: relative; min-height: 115vh; display: flex; align-items: center; padding: 8vh clamp(24px, 7vw, 110px); pointer-events: none; }
.story-section > * { pointer-events: auto; }
.align-right { justify-content: flex-end; }
.align-left { justify-content: flex-start; }
.hero { min-height: 112vh; align-items: flex-end; justify-content: center; padding-bottom: 11vh; text-align: center; }
.hero-copy { width: min(520px, 88vw); max-width: 610px; padding: 34px 24px 22px; background: linear-gradient(180deg, rgba(29,18,15,0), rgba(29,18,15,.72)); text-shadow: 0 3px 16px rgba(0,0,0,.72); }
.eyebrow { margin: 0 0 16px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .22em; }
.hero h1 { margin: 0; font-size: clamp(30px, 5vw, 54px); line-height: 1.1; letter-spacing: -.035em; font-weight: 500; }
.accent { color: var(--accent); }
.hero-lead { margin: 14px 0 0; color: rgba(255,255,255,.84); font-size: clamp(13px, 1.2vw, 17px); line-height: 1.75; }
.scroll-cue { position: absolute; right: clamp(25px,7vw,110px); bottom: 12vh; display: grid; gap: 8px; justify-items: center; color: var(--muted); font-size: 10px; letter-spacing: .16em; }
.scroll-cue span { width: 1px; height: 54px; background: linear-gradient(var(--accent), transparent); animation: pulse 1.8s ease-in-out infinite; }
.glass-card { position: relative; width: min(520px, 44vw); padding: clamp(28px,4vw,48px); border: 0; border-radius: 0; text-align: center; background: linear-gradient(180deg, rgba(57,29,20,.38), rgba(63,31,20,.88)); box-shadow: 0 28px 80px rgba(0,0,0,.20); }
.contact-actions { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }
.contact-button { width: 42px; height: 42px; padding: 9px; border: 1px solid rgba(255,255,255,.42); border-radius: 50%; color: #fff; background: rgba(23,18,15,.28); cursor: pointer; transition: transform .2s ease, background .2s ease; }
.contact-button:hover { transform: translateY(-2px); background: rgba(255,255,255,.16); }
.contact-button img { display: block; width: 100%; height: 100%; object-fit: contain; }
.contact-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
#draw-layer { position: fixed; z-index: 13; inset: 0; width: 100%; height: 100%; pointer-events: none; touch-action: none; }
.draw-mode #draw-layer { pointer-events: auto; cursor: crosshair; }
.draw-tools { position: fixed; z-index: 22; right: 24px; bottom: 24px; display: flex; gap: 8px; }
.draw-tools button { width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; color: #fff; background: rgba(13,14,18,.76); box-shadow: 0 8px 22px rgba(0,0,0,.28); cursor: pointer; font-size: 19px; }
.draw-tools button[aria-pressed="true"] { color: #171717; background: var(--accent); border-color: var(--accent); }
.secret-keypad { position: fixed; z-index: 24; right: 24px; bottom: 76px; width: 238px; padding: 14px; border: 1px solid rgba(255,255,255,.2); border-radius: 20px; color: #fff; background: rgba(13,14,18,.94); box-shadow: 0 20px 55px rgba(0,0,0,.48); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(12px) scale(.96); transform-origin: right bottom; transition: opacity .2s ease, visibility .2s, transform .2s ease; backdrop-filter: blur(16px); }
.secret-keypad.open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.keypad-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; color: rgba(255,255,255,.58); font: 700 9px/1 monospace; letter-spacing: .18em; }
.keypad-close { width: 26px; height: 26px; padding: 0; border: 0; color: #fff; background: transparent; cursor: pointer; font-size: 20px; }
.code-display { display: block; height: 52px; margin-bottom: 10px; border: 1px solid rgba(214,255,56,.22); border-radius: 13px; color: var(--accent); background: rgba(255,255,255,.04); text-align: center; font: 700 24px/52px monospace; letter-spacing: .24em; }
.keypad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.keypad-grid button { height: 45px; border: 1px solid rgba(255,255,255,.13); border-radius: 12px; color: #fff; background: rgba(255,255,255,.07); cursor: pointer; font: 700 16px/1 monospace; transition: transform .12s ease, background .12s ease; }
.keypad-grid button:active { transform: scale(.94); background: rgba(255,255,255,.18); }
.keypad-grid .keypad-submit { color: #171717; border-color: var(--accent); background: var(--accent); }
.secret-keypad small { display: block; margin-top: 10px; color: rgba(255,255,255,.42); text-align: center; font-size: 10px; letter-spacing: .08em; }
.copy-toast { position: fixed; z-index: 40; left: 50%; bottom: 82px; max-width: calc(100vw - 40px); padding: 11px 17px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: #fff; background: rgba(15,16,20,.9); box-shadow: 0 12px 36px rgba(0,0,0,.35); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .25s ease, transform .25s ease; white-space: nowrap; font-size: 13px; }
.copy-toast.show { opacity: 1; transform: translate(-50%, 0); }
.section-image { width: 100%; max-height: 230px; margin: 0 0 24px; border-radius: 18px; object-fit: cover; box-shadow: 0 18px 45px rgba(0,0,0,.28); }
.section-image.is-icon { display: inline-block; width: 46px; height: 46px; margin: 0 10px 12px 0; border-radius: 9px; object-fit: contain; vertical-align: middle; box-shadow: none; }
.card-title-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 22px; }
.card-title-row .section-image.is-icon { flex: 0 0 auto; margin: 0; }
.card-title-row h2 { margin: 0; }
.glass-card .index { position: absolute; top: 22px; right: 26px; color: rgba(255,255,255,.18); font: 700 54px/1 Georgia,serif; }
.glass-card h2, .final-card h2 { margin: 0 0 24px; font-size: clamp(34px,4vw,64px); line-height: 1.08; letter-spacing: -.045em; }
.glass-card > p:last-child, .final-card > p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.9; }
.timeline { display: grid; gap: 18px; }
.timeline div { display: grid; grid-template-columns: 58px 1fr; gap: 15px; align-items: baseline; border-top: 1px solid var(--line); padding-top: 15px; }
.timeline b { color: var(--accent); font: 700 13px/1 monospace; }
.timeline span { color: var(--muted); font-size: 13px; }
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pill-list li { padding: 10px 13px; border: 1px solid var(--line); border-radius: 999px; color: rgba(255,255,255,.78); font-size: 10px; letter-spacing: .12em; }
.finale { min-height: 190vh; flex-direction: column; justify-content: center; gap: 13vh; text-align: center; }
.gallery-panel { width: min(1180px, 92vw); }
.gallery-panel h2 { margin: 0 0 38px; font-size: clamp(30px,4vw,58px); font-weight: 500; }
.personal-gallery { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(130px, 18vw); gap: 14px; }
.gallery-item { overflow: hidden; padding: 0; border: 1px solid rgba(255,255,255,.15); border-radius: 14px; background: #161616; cursor: zoom-in; opacity: .72; transition: opacity .35s ease, transform .35s ease; }
.gallery-item:hover { opacity: .98; transform: translateY(-4px); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item-1 { grid-column: span 4; grid-row: span 2; }
.gallery-item-2 { grid-column: span 8; }
.gallery-item-3 { grid-column: span 5; }
.gallery-item-4 { grid-column: span 3; }
.gallery-item-5 { grid-column: span 12; }
.image-viewer, .easter-egg, .model-easter { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(6,7,9,.9); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .35s ease, visibility .35s; }
.image-viewer.open, .easter-egg.open, .model-easter.open { opacity: 1; visibility: visible; pointer-events: auto; }
.image-viewer > button, .easter-close, .model-easter-close { position: absolute; top: 22px; right: 22px; z-index: 2; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; color: #fff; background: rgba(0,0,0,.4); cursor: pointer; font-size: 25px; }
.image-viewer > img { max-width: min(94vw, 1500px); max-height: 90vh; border-radius: 10px; box-shadow: 0 30px 90px rgba(0,0,0,.5); }
.easter-card { position: relative; width: min(1000px, 94vw); max-height: 92vh; overflow: auto; padding: 44px; border: 1px solid rgba(214,255,56,.34); border-radius: 24px; background: #11151b; text-align: center; }
.easter-card > p { margin: 0 0 8px; color: var(--accent); font: 800 11px/1 monospace; letter-spacing: .28em; }
.easter-card > h2 { margin: 0 0 28px; font-size: clamp(28px,5vw,58px); }
.easter-images { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.easter-images img { width: 100%; max-height: 62vh; object-fit: cover; border-radius: 14px; }
.model-easter-card { position: relative; width: min(1000px, 94vw); padding: 28px; border: 1px solid rgba(214,255,56,.34); border-radius: 24px; background: #0c1017; text-align: center; overflow: hidden; }
.model-easter-card > p { margin: 0 0 7px; color: var(--accent); font: 800 11px/1 monospace; letter-spacing: .28em; }
.model-easter-card > h2 { margin: 0 0 18px; font-size: clamp(25px,4vw,44px); }
.model-easter-stage { position: relative; height: min(66vh, 680px); min-height: 390px; overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 17px; background: radial-gradient(circle at 50% 40%, #283141, #090c12 70%); }
#secret-model-viewer { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#secret-model-viewer:active { cursor: grabbing; }
.model-easter-loading { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.68); letter-spacing: .08em; pointer-events: none; transition: opacity .3s ease; }
.model-easter-loading.done { opacity: 0; }
.model-easter-hint { display: block; margin-top: 14px; color: rgba(255,255,255,.58); font-size: 11px; letter-spacing: .16em; }
.final-card { padding: 50px; }
.final-card h2 { font-size: clamp(52px,8vw,112px); }
.cta { display: inline-flex; gap: 18px; margin-top: 30px; padding: 15px 22px; border-radius: 999px; color: #111; background: var(--accent); text-decoration: none; font-size: 13px; font-weight: 800; }
.finale footer { position: absolute; bottom: 28px; color: rgba(255,255,255,.35); font-size: 9px; letter-spacing: .18em; }
.reveal { opacity: 0; transform: translateY(42px) scale(.97); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.story-section.in-view .reveal { opacity: 1; transform: none; }
.loader { --load: 0%; position: fixed; z-index: 30; inset: 0; display: grid; place-content: center; justify-items: center; background: #24252a; transition: opacity .8s ease, visibility .8s; pointer-events: all; }
.loader.entering { opacity: 0; pointer-events: none; }
.loader.done { opacity: 0; visibility: hidden; }
.loader-status { display: grid; justify-items: center; gap: 28px; width: min(72vw, 520px); }
.loader-bubble { position: relative; min-width: 106px; padding: 16px 20px; border-radius: 9px; color: #17171a; background: #fff; text-align: center; transform: rotate(-4deg); box-shadow: 0 10px 28px rgba(0,0,0,.2); }
.loader-bubble::after { content: ''; position: absolute; left: 47%; bottom: -11px; border: 12px solid transparent; border-top-color: #fff; border-bottom: 0; }
.loader-progress { font: 800 30px/1 monospace; }
.loader-track { width: 100%; height: 30px; padding: 5px; border-radius: 99px; background: #575960; overflow: hidden; }
.loader-track i { display: block; width: var(--load); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7549ff, #9c5cff); box-shadow: 0 0 18px rgba(127,72,255,.6); transition: width .25s ease; }
.loader strong { color: rgba(255,255,255,.68); font-size: 20px; font-weight: 400; letter-spacing: .08em; }
.drag-tip { position: fixed; z-index: 8; left: 50%; bottom: 24px; transform: translateX(-50%); color: rgba(255,255,255,.4); font-size: 9px; letter-spacing: .14em; pointer-events: none; transition: opacity .5s; }
.drag-tip.hidden { opacity: 0; }
@keyframes pulse { 50% { opacity: .3; transform: scaleY(.72); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 720px) {
  .stage { inset: 4px; border-radius: 25px; }
  .screen-frame { inset: 4px; border-radius: 25px; border-width: 3px; }
  .chapter-nav { display: none; }
  .story-section { min-height: 100svh; padding: 5vh 22px 7vh; align-items: flex-end; justify-content: center; }
  .hero { min-height: 100svh; align-items: flex-end; padding-bottom: 12vh; }
  .hero-copy { width: calc(100% - 8px); padding: 38px 16px 14px; }
  .contact-actions { margin-top: 17px; }
  .contact-button { width: 38px; height: 38px; padding: 8px; }
  .hero .eyebrow { display: none; }
  .hero h1 { font-size: 29px; letter-spacing: -.02em; }
  .hero-lead { margin-top: 10px; font-size: 12px; line-height: 1.7; white-space: nowrap; }
  .scroll-cue { right: 50%; bottom: 4.5vh; transform: translateX(50%); font-size: 9px; }
  .scroll-cue span { height: 34px; }
  .glass-card { width: 100%; padding: 30px 22px 27px; border-radius: 0; }
  .glass-card .index { display: none; }
  .glass-card .eyebrow { margin-bottom: 17px; color: rgba(255,255,255,.7); font-size: 10px; line-height: 1.5; }
  .glass-card h2 { font-size: 19px; letter-spacing: -.01em; }
  .card-title-row { margin-bottom: 18px; }
  .card-title-row h2 { font-size: 18px; }
  .card-title-row .section-image.is-icon { width: 36px; height: 36px; border-radius: 6px; }
  .glass-card > p:last-child { font-size: 13px; line-height: 1.75; }
  .timeline { display: block; }
  .timeline div { display: block; border: 0; padding: 0; }
  .timeline b:empty { display: none; }
  .timeline span { font-size: 13px; line-height: 1.75; }
  .pill-list { display: grid; gap: 8px; }
  .pill-list li { padding: 0; border: 0; font-size: 12px; line-height: 1.75; letter-spacing: 0; }
  .pill-list li:first-child { font-size: 15px; font-weight: 700; }
  .finale { min-height: auto; gap: 90px; padding-top: 14vh; padding-bottom: 15vh; }
  .gallery-panel { width: 100%; }
  .gallery-panel h2 { margin-bottom: 24px; font-size: 28px; }
  .personal-gallery { display: flex; overflow-x: auto; gap: 12px; margin: 0 -22px; padding: 0 22px 14px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .personal-gallery::-webkit-scrollbar { display: none; }
  .gallery-item { flex: 0 0 78vw; height: 52vh; min-height: 360px; scroll-snap-align: center; opacity: .78; }
  .gallery-item img { object-position: center; }
  .final-card { padding: 24px 0; }
  .final-card h2 { font-size: 58px; }
  .drag-tip { bottom: 13px; }
  .drag-tip { display: none; }
  .draw-tools { right: 15px; bottom: 15px; }
  .draw-tools button { width: 38px; height: 38px; }
  .secret-keypad { right: 15px; bottom: 64px; width: 224px; padding: 12px; border-radius: 18px; }
  .keypad-grid button { height: 42px; }
  .copy-toast { bottom: 66px; font-size: 12px; }
  .collage-bg { inset: -6%; opacity: .84; background-position: center; -webkit-mask-image: radial-gradient(ellipse 54% 49% at 50% 43%, transparent 18%, rgba(0,0,0,.35) 53%, #000 88%); mask-image: radial-gradient(ellipse 54% 49% at 50% 43%, transparent 18%, rgba(0,0,0,.35) 53%, #000 88%); }
  .easter-card { padding: 42px 16px 18px; }
  .easter-images { grid-template-columns: 1fr; }
  .easter-images img { max-height: 54vh; }
  .model-easter { padding: 10px; }
  .model-easter-card { width: 100%; padding: 42px 10px 16px; border-radius: 20px; }
  .model-easter-card > h2 { margin-bottom: 12px; font-size: 25px; }
  .model-easter-stage { height: 65vh; min-height: 360px; border-radius: 14px; }
  .vignette { box-shadow: inset 0 0 90px rgba(0,0,0,.72); }
  .loader-status { width: 70vw; gap: 24px; }
  .loader-bubble { min-width: 88px; padding: 13px 17px; }
  .loader-progress { font-size: 26px; }
  .loader-track { height: 24px; padding: 4px; }
  .loader strong { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
