@font-face { font-family: 'Cormorant'; src: url(fonts/CormorantGaramond.ttf) format('truetype'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url(fonts/CormorantGaramond-Italic.ttf) format('truetype'); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url(fonts/Cinzel.ttf) format('truetype'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'NotoSerifSC'; src: url(fonts/NotoSerifSC-sub.woff2) format('woff2'); font-weight: 200 900; font-display: swap; }

:root {
  --gold: #d8b46a; --gold2: #a9813f; --cream: #f1e7d0; --ink: #050403; --red: #8f1218;
  --zh: 'NotoSerifSC', 'Songti SC', 'STSong', serif;
  --en: 'Cormorant', 'Cormorant Garamond', Georgia, serif;
  --cap: 'Cinzel', 'Trajan Pro', serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--ink); color: var(--cream); }
body { font-family: var(--en); -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; cursor: default; }
canvas#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }

/* bilingual spans */
.zh { font-family: var(--zh); }
.en { font-family: var(--en); }
body[data-lang="both"] .zh + .en { display: block; }

/* top bar */
#top { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 22px 30px; z-index: 20; pointer-events: none; transition: opacity 1.2s; }
#top > * { pointer-events: auto; }
.mark { display: flex; align-items: baseline; gap: 12px; text-decoration: none; }
.mark b { font-family: var(--cap); font-weight: 500; font-size: 13px; letter-spacing: .42em; color: var(--gold); }
.mark span { font-family: var(--zh); font-size: 12px; letter-spacing: .35em; color: rgba(241, 231, 208, .55); }
#top nav { display: flex; align-items: center; gap: 22px; }
.lang { display: flex; gap: 2px; border: 1px solid rgba(216, 180, 106, .28); border-radius: 20px; padding: 2px; }
.lang button { font-family: var(--zh); font-size: 11px; width: 30px; height: 22px; border-radius: 12px; color: rgba(241, 231, 208, .55); transition: .3s; }
.lang button[data-setlang="en"] { font-family: var(--cap); font-size: 10px; letter-spacing: .05em; }
.lang button.on { background: rgba(216, 180, 106, .18); color: var(--gold); }
#snd { display: flex; gap: 2px; align-items: flex-end; height: 16px; padding: 0 4px; }
#snd i { display: block; width: 2px; background: var(--gold); height: 6px; animation: eq 1.1s ease-in-out infinite; }
#snd i:nth-child(2) { animation-delay: -.3s; } #snd i:nth-child(3) { animation-delay: -.6s; } #snd i:nth-child(4) { animation-delay: -.85s; }
#snd.off i { animation: none; height: 2px; opacity: .5; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }
#progBtn { font-family: var(--cap); font-size: 11px; letter-spacing: .3em; color: var(--gold); padding: 6px 0; border-bottom: 1px solid rgba(216, 180, 106, .35); }
#progBtn .zh { font-family: var(--zh); letter-spacing: .2em; }
body[data-lang="both"] #progBtn .en { display: none; }

#where { position: fixed; left: 30px; bottom: 26px; z-index: 15; font-size: 13px; color: rgba(241, 231, 208, .55); display: flex; gap: 10px; align-items: baseline; pointer-events: none; }
#where i { font-family: var(--cap); font-style: normal; font-size: 10px; letter-spacing: .32em; color: var(--gold2); }
#where .zh { font-size: 12px; letter-spacing: .2em; }
#where .en { font-style: italic; font-size: 14px; }
body[data-lang="both"] #where .zh + .en { display: inline; margin-left: 10px; }

/* chapter card */
#chapter { position: fixed; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; z-index: 12; pointer-events: none; opacity: 0; transition: opacity 1.6s ease, letter-spacing 4s ease; letter-spacing: .02em; }
#chapter.on { opacity: 1; letter-spacing: .06em; }
#chapter .act { font-family: var(--cap); font-size: 12px; letter-spacing: .6em; color: var(--gold); margin-bottom: 22px; }
#chapter .act .zh { font-family: var(--zh); letter-spacing: .5em; font-size: 12px; }
#chapter .act .en { display: inline !important; margin-left: 14px; }
#chapter .ttl .zh { font-size: 40px; font-weight: 500; letter-spacing: .3em; text-shadow: 0 0 30px rgba(0, 0, 0, .8); }
#chapter .ttl .en { font-style: italic; font-size: 30px; font-weight: 400; color: rgba(241, 231, 208, .8); margin-top: 8px; text-shadow: 0 0 30px rgba(0, 0, 0, .8); }
body[data-lang="en"] #chapter .ttl .en { font-size: 46px; font-style: italic; }
#chapter .whr { margin-top: 26px; font-size: 13px; color: rgba(241, 231, 208, .5); letter-spacing: .2em; }
#chapter .whr .en { font-family: var(--cap); font-size: 10px; letter-spacing: .4em; margin-top: 6px; }

/* subtitles */
#sub { position: fixed; left: 50%; bottom: 9.5vh; transform: translate(-50%, 8px); width: min(980px, 88vw); text-align: center; z-index: 14; pointer-events: none; opacity: 0; transition: opacity .9s ease, transform .9s ease; }
#sub.on { opacity: 1; transform: translate(-50%, 0); }
#sub .zh { font-size: clamp(16px, 1.55vw, 22px); letter-spacing: .14em; line-height: 1.7; color: var(--cream); text-shadow: 0 1px 14px rgba(0, 0, 0, .95), 0 0 2px rgba(0, 0, 0, .9); }
#sub .en { font-style: italic; font-size: clamp(16px, 1.45vw, 21px); line-height: 1.45; color: rgba(236, 214, 170, .88); margin-top: 4px; text-shadow: 0 1px 12px rgba(0, 0, 0, .95); }
body[data-lang="en"] #sub .en { font-size: clamp(18px, 1.7vw, 25px); color: var(--cream); }
#sub q { quotes: none; }

#hint { position: fixed; left: 50%; top: 13vh; transform: translateX(-50%); z-index: 14; pointer-events: none; opacity: 0; transition: opacity .8s; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
#hint.on { opacity: 1; animation: breathe 3.2s ease-in-out infinite; }
#hint .zh { font-size: 13px; letter-spacing: .3em; color: var(--gold); }
#hint .en { font-family: var(--cap); font-size: 10px; letter-spacing: .38em; color: rgba(216, 180, 106, .75); }
body[data-lang="en"] #hint .en { font-size: 11px; color: var(--gold); }
@keyframes breathe { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

#next { position: fixed; right: 30px; bottom: 22px; z-index: 15; display: flex; align-items: center; gap: 14px; color: var(--gold); opacity: 0; pointer-events: none; transition: opacity 1s, transform .4s; font-size: 14px; }
#next.on { opacity: 1; pointer-events: auto; }
#next:hover { transform: translateX(4px); }
#next svg { width: 40px; height: 12px; }
#next .zh { font-size: 13px; letter-spacing: .3em; }
#next .en { font-family: var(--cap); font-size: 10px; letter-spacing: .3em; }
body[data-lang="both"] #next .zh + .en { display: inline; margin-left: 10px; }

/* hotspots */
#hots { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.hot { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; align-items: center; gap: 12px; opacity: 0; transition: opacity 1s; padding: 6px; margin: -17px 0 0 -17px; }
.hot.on { opacity: 1; }
.hot.off { opacity: 0 !important; pointer-events: none; }
.hot .dot { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(216, 180, 106, .85); position: relative; flex: none; box-shadow: 0 0 12px rgba(216, 180, 106, .35); }
.hot .dot::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.hot .dot::after { content: ''; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid var(--gold); animation: ping 2.6s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(2.4); opacity: 0; } }
.hot .lab { white-space: nowrap; text-align: left; opacity: 0; transform: translateX(-6px); transition: .45s; text-shadow: 0 0 12px #000, 0 0 3px #000; }
.hot:hover .lab, .hot.always .lab { opacity: 1; transform: none; }
.hot .lab .zh { font-size: 13px; letter-spacing: .18em; color: var(--cream); }
.hot .lab .en { font-family: var(--cap); font-size: 9px; letter-spacing: .3em; color: var(--gold); margin-top: 2px; }
.hot.left { flex-direction: row-reverse; }
.hot.left .lab { text-align: right; transform: translateX(6px); }
.hot.left:hover .lab { transform: none; }

/* hold ring */
#ring { position: fixed; left: -30px; top: -30px; width: 60px; height: 60px; z-index: 16; pointer-events: none; opacity: 0; transition: opacity .3s; }
#ring.on { opacity: 1; }
#ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
#ring circle { fill: none; stroke: rgba(216, 180, 106, .25); stroke-width: 1; }
#ring circle.p { stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 163.4; stroke-dashoffset: calc(163.4 * (1 - var(--p, 0))); filter: drop-shadow(0 0 4px var(--gold)); }

/* knowledge card */
#card { position: fixed; inset: 0; z-index: 30; display: flex; justify-content: flex-end; pointer-events: none; background: rgba(3, 2, 1, 0); transition: background .8s; }
#card.open { pointer-events: auto; background: rgba(3, 2, 1, .45); }
#card .inner { position: relative; width: min(480px, 92vw); height: 100%; overflow-y: auto; padding: 64px 44px 48px; background: linear-gradient(180deg, rgba(20, 13, 8, .94), rgba(9, 6, 4, .97)); border-left: 1px solid rgba(216, 180, 106, .22); transform: translateX(100%); transition: transform .9s cubic-bezier(.2, .8, .2, 1); scrollbar-width: thin; scrollbar-color: rgba(216, 180, 106, .3) transparent; user-select: text; -webkit-user-select: text; }
#card.open .inner { transform: none; }
#card .inner::before { content: ''; position: absolute; inset: 14px; border: 1px solid rgba(216, 180, 106, .12); pointer-events: none; }
#card .x { position: absolute; top: 22px; right: 26px; font-size: 26px; color: var(--gold); line-height: 1; font-family: var(--en); z-index: 2; }
#card figure { margin: 0 0 26px; }
#card figure img { width: 100%; display: block; max-height: 340px; object-fit: contain; background: #000; filter: sepia(.15) contrast(1.02); border: 1px solid rgba(216, 180, 106, .18); }
#card figcaption { font-size: 11px; line-height: 1.5; color: rgba(241, 231, 208, .42); margin-top: 8px; font-style: italic; }
#card .kick { font-family: var(--cap); font-size: 10px; letter-spacing: .4em; color: var(--gold2); margin-bottom: 12px; }
#card .kick .zh { font-family: var(--zh); letter-spacing: .3em; font-size: 11px; }
#card .kick .en { display: inline !important; margin-left: 12px; }
#card h2 { font-weight: 400; margin-bottom: 22px; }
#card h2 .zh { font-size: 28px; letter-spacing: .12em; font-weight: 500; color: var(--cream); }
#card h2 .en { font-style: italic; font-size: 24px; color: var(--gold); margin-top: 4px; }
body[data-lang="en"] #card h2 .en { font-size: 32px; }
#card .facts { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 0 0 26px; padding: 18px 0; border-top: 1px solid rgba(216, 180, 106, .18); border-bottom: 1px solid rgba(216, 180, 106, .18); }
#card .facts li b { display: block; font-family: var(--en); font-weight: 500; font-size: 26px; color: var(--gold); line-height: 1.1; }
#card .facts li .zh { font-size: 11px; color: rgba(241, 231, 208, .6); letter-spacing: .1em; }
#card .facts li .en { font-size: 12px; color: rgba(241, 231, 208, .5); font-style: italic; }
#card .body p { margin-bottom: 16px; }
#card .body p.zh { font-size: 14.5px; line-height: 2; letter-spacing: .04em; color: rgba(241, 231, 208, .88); text-align: justify; }
#card .body p.en { font-size: 16.5px; line-height: 1.6; color: rgba(236, 220, 190, .72); }
body[data-lang="en"] #card .body p.en { font-size: 18px; color: rgba(241, 231, 208, .88); }
#card .src { margin-top: 18px; font-size: 11px; line-height: 1.6; color: rgba(241, 231, 208, .35); font-style: italic; }

/* programme */
#prog { position: fixed; inset: 0; z-index: 28; display: flex; align-items: center; justify-content: center; background: rgba(4, 3, 2, .82); opacity: 0; pointer-events: none; transition: opacity .7s; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#prog.open { opacity: 1; pointer-events: auto; }
#prog .pin { position: relative; width: min(560px, 90vw); padding: 56px 56px 40px; border: 1px solid rgba(216, 180, 106, .3); outline: 1px solid rgba(216, 180, 106, .12); outline-offset: 6px; text-align: center; }
#prog .x { position: absolute; top: 14px; right: 20px; font-size: 26px; color: var(--gold); }
#prog .ph { font-family: var(--cap); letter-spacing: .5em; font-size: 11px; color: var(--gold); }
#prog .ph .en { display: inline !important; margin-left: 12px; } #prog .ph .zh { letter-spacing: .4em; }
#prog .pt { font-family: var(--en); font-style: italic; font-size: 30px; margin: 14px 0 26px; color: var(--cream); }
#prog ol { list-style: none; text-align: left; }
#prog li { display: flex; align-items: baseline; gap: 16px; padding: 10px 6px; border-bottom: 1px solid rgba(216, 180, 106, .1); cursor: pointer; transition: .3s; color: rgba(241, 231, 208, .7); }
#prog li:hover, #prog li.on { color: var(--cream); background: rgba(216, 180, 106, .06); }
#prog li b { font-family: var(--cap); font-weight: 400; font-size: 10px; letter-spacing: .2em; color: var(--gold2); width: 54px; flex: none; }
#prog li .zh { font-size: 14px; letter-spacing: .15em; }
#prog li .en { font-style: italic; font-size: 15px; color: rgba(241, 231, 208, .5); }
body[data-lang="both"] #prog li .zh + .en { display: inline; margin-left: 12px; }
#prog .pf { margin-top: 28px; font-size: 11px; color: rgba(241, 231, 208, .32); letter-spacing: .1em; }
#prog .pf a { text-decoration: none; border-bottom: 1px solid rgba(241, 231, 208, .2); }
#prog .pf .en { display: inline !important; }

/* gate */
#gate { position: fixed; inset: 0; z-index: 25; display: flex; align-items: center; justify-content: center; text-align: center; transition: opacity 2.4s ease; }
#gate.gone { opacity: 0; pointer-events: none; }
#gate .gwrap { display: flex; flex-direction: column; align-items: center; }
#gate .pre { font-family: var(--cap); font-size: 11px; letter-spacing: .55em; color: var(--gold); margin-bottom: 34px; opacity: 0; animation: up 2s 1.2s ease forwards; }
#gate .pre .zh { font-family: var(--zh); letter-spacing: .45em; font-size: 12px; }
#gate .pre .en { display: inline !important; margin-left: 16px; }
#gate h1 { font-family: var(--en); font-weight: 300; line-height: .95; color: var(--cream); opacity: 0; animation: up 3s 1.6s ease forwards; }
#gate h1 span { display: block; }
#gate h1 .l1 { font-size: clamp(46px, 7.4vw, 112px); font-style: italic; letter-spacing: -.01em; }
#gate h1 .l2 { font-family: var(--cap); font-size: clamp(14px, 1.5vw, 22px); letter-spacing: .7em; margin-top: 18px; color: var(--gold); font-weight: 400; padding-left: .7em; }
#gate .zhT { font-family: var(--zh); font-size: clamp(15px, 1.4vw, 20px); letter-spacing: .9em; padding-left: .9em; margin-top: 26px; color: rgba(241, 231, 208, .7); opacity: 0; animation: up 3s 2.2s ease forwards; }
#gate .rule { width: 1px; height: 54px; background: linear-gradient(var(--gold), transparent); margin: 34px 0 26px; opacity: 0; animation: up 2s 2.8s ease forwards; }
#gate .tag { font-size: 15px; color: rgba(241, 231, 208, .62); line-height: 1.8; max-width: 520px; opacity: 0; animation: up 2s 3.1s ease forwards; }
#gate .tag .zh { font-size: 13px; letter-spacing: .2em; }
#gate .tag .en { font-style: italic; font-size: 16px; }
#enter { margin-top: 38px; padding: 15px 46px; border: 1px solid rgba(216, 180, 106, .55); color: var(--gold); position: relative; transition: .5s; opacity: 0; animation: up 2s 3.6s ease forwards; }
#enter::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(216, 180, 106, .18); transition: .5s; }
#enter:hover { background: rgba(216, 180, 106, .1); letter-spacing: .05em; box-shadow: 0 0 40px rgba(216, 180, 106, .18); }
#enter .zh { font-size: 14px; letter-spacing: .5em; padding-left: .5em; }
#enter .en { font-family: var(--cap); font-size: 10px; letter-spacing: .5em; margin-top: 4px; }
#gate .snd { margin-top: 20px; font-size: 11px; color: rgba(241, 231, 208, .35); letter-spacing: .15em; opacity: 0; animation: up 2s 4s ease forwards; }
#gate .snd .en { display: inline !important; margin-left: 10px; font-style: italic; font-size: 13px; }
@keyframes up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
body:not([data-scene="gate"]) #gate { opacity: 0; pointer-events: none; }
body[data-scene="gate"] #top .mark, body[data-scene="gate"] #where { opacity: 0; }

/* playbill */
#playbill { position: fixed; inset: 0; z-index: 26; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 2.5s ease; background: radial-gradient(ellipse at 50% 50%, rgba(4,3,2,.82) 0%, rgba(4,3,2,.6) 45%, rgba(4,3,2,.15) 80%); }
body.fin #playbill { opacity: 1; pointer-events: auto; }
#playbill .pb { text-align: center; width: min(620px, 90vw); }
#playbill .pbk { font-family: var(--cap); font-size: 11px; letter-spacing: .6em; color: var(--gold); }
#playbill .pbk .en { display: inline !important; margin-left: 14px; }
#playbill h3 { font-family: var(--en); font-style: italic; font-weight: 300; font-size: clamp(36px, 4.6vw, 64px); margin-top: 18px; color: var(--cream); }
#playbill .pbz { font-family: var(--zh); letter-spacing: .8em; padding-left: .8em; color: rgba(241, 231, 208, .6); margin-top: 8px; font-size: 15px; }
#playbill .pbq { margin: 30px auto 0; max-width: 520px; line-height: 1.8; color: rgba(241, 231, 208, .7); }
#playbill .pbq .zh { font-size: 14px; letter-spacing: .12em; }
#playbill .pbq .en { font-style: italic; font-size: 16px; color: rgba(236, 214, 170, .7); margin-top: 6px; }
#playbill .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 34px 0; padding: 20px 0; border-top: 1px solid rgba(216, 180, 106, .2); border-bottom: 1px solid rgba(216, 180, 106, .2); }
#playbill .cols b { display: block; font-family: var(--cap); font-weight: 400; font-size: 9px; letter-spacing: .35em; color: var(--gold2); margin-bottom: 8px; }
#playbill .cols b .zh { font-family: var(--zh); font-size: 10px; letter-spacing: .3em; } #playbill .cols b .en { display: inline !important; margin-left: 6px; }
#playbill .cols span { font-size: 13px; line-height: 1.6; color: rgba(241, 231, 208, .7); }
#playbill .cols span .zh { font-size: 12px; } #playbill .cols span .en { font-style: italic; font-size: 14px; }
.ticket { display: flex; width: 330px; margin: 0 auto; height: 74px; color: #2a1608; font-family: var(--en); filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .6)); transform: rotate(-1.5deg); transition: transform .5s; }
.ticket:hover { transform: rotate(0deg) translateY(-2px); }
.ticket .tl, .ticket .tr { background: linear-gradient(135deg, #e9d9b4, #d6bf8e); display: flex; flex-direction: column; justify-content: center; }
.ticket .tl { flex: 1; padding: 0 18px; text-align: left; border-right: 1px dashed rgba(42, 22, 8, .45); -webkit-mask: radial-gradient(circle at 100% 0, transparent 6px, #000 6.5px) top / 100% 51% no-repeat, radial-gradient(circle at 100% 100%, transparent 6px, #000 6.5px) bottom / 100% 51% no-repeat; }
.ticket .tl i { font-family: var(--cap); font-style: normal; font-size: 8px; letter-spacing: .4em; opacity: .65; }
.ticket .tl b { font-family: var(--cap); font-size: 19px; font-weight: 600; letter-spacing: .12em; }
.ticket .tl span { font-size: 11px; opacity: .7; }
.ticket .tl span .zh { font-size: 10px; } .ticket .tl span .en { display: inline !important; margin-left: 6px; font-style: italic; }
.ticket .tr { width: 104px; padding: 0 12px; text-decoration: none; color: #2a1608; text-align: center; -webkit-mask: radial-gradient(circle at 0 0, transparent 6px, #000 6.5px) top / 100% 51% no-repeat, radial-gradient(circle at 0 100%, transparent 6px, #000 6.5px) bottom / 100% 51% no-repeat; }
.ticket .tr i { font-style: normal; font-size: 8px; letter-spacing: .25em; font-family: var(--cap); opacity: .6; }
.ticket .tr i .zh { font-family: var(--zh); font-size: 9px; letter-spacing: .2em; } .ticket .tr i .en { display: none !important; }
body[data-lang="en"] .ticket .tr i .en { display: inline !important; }
.ticket .tr b { font-size: 14px; font-weight: 600; margin-top: 3px; letter-spacing: .02em; }
.pbb { margin-top: 34px; display: flex; gap: 28px; justify-content: center; }
.pbb button { color: var(--gold); font-size: 12px; letter-spacing: .25em; border-bottom: 1px solid rgba(216, 180, 106, .3); padding-bottom: 4px; }
.pbb button .en { display: inline !important; margin-left: 8px; font-family: var(--cap); font-size: 9px; }

body.clean #top, body.clean #where, body.clean #next, body.clean #hots, body.clean #hint { display: none !important; }
body.nosub #sub { display: none; }

@media (max-width: 720px) {
  #top { padding: 16px 16px; } .mark span { display: none; } #top nav { gap: 14px; }
  #where { left: 16px; bottom: 16px; } #where .en { display: none !important; }
  #next { right: 16px; bottom: 14px; } #sub { bottom: 12vh; }
  #card .inner { padding: 56px 26px 40px; }
  #playbill .cols { grid-template-columns: 1fr; gap: 10px; }
}

/* ================= game layer ================= */
#next { display: none !important; }
.gobj { position: fixed; left: 30px; top: 66px; z-index: 15; max-width: 360px; font-size: 13px; color: rgba(241, 231, 208, .78); opacity: 0; transform: translateY(-4px); transition: opacity .8s, transform .8s; pointer-events: none; display: flex; gap: 10px; align-items: baseline; }
.gobj.on { opacity: 1; transform: none; }
.gobj i { width: 7px; height: 7px; flex: none; transform: rotate(45deg) translateY(-1px); border: 1px solid var(--gold); background: rgba(216, 180, 106, .25); }
.gobj .zh { letter-spacing: .12em; } .gobj .en { font-style: italic; font-size: 14px; color: rgba(236, 214, 170, .6); }
body[data-lang="both"] .gobj .zh + .en { display: block; margin-top: 2px; }
body[data-scene="gate"] .gobj, body[data-scene="gate"] .gjbtn { opacity: 0 !important; pointer-events: none; }
.glab { position: fixed; left: 0; top: 0; z-index: 17; pointer-events: none; opacity: 0; transition: opacity .25s; padding: 8px 12px 7px; background: rgba(8, 5, 3, .72); border: 1px solid rgba(216, 180, 106, .3); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); white-space: nowrap; }
.glab.on { opacity: 1; }
.glab .zh { font-size: 13px; letter-spacing: .14em; color: var(--cream); } .glab .en { font-style: italic; font-size: 14px; color: var(--gold); }
body[data-lang="both"] .glab .zh + .en { display: block; }
.glab small { display: block; margin-top: 4px; font-family: var(--cap); font-size: 9px; letter-spacing: .3em; color: rgba(216, 180, 106, .7); }
.glab small .zh { font-family: var(--zh); font-size: 10px; letter-spacing: .25em; color: rgba(216, 180, 106, .75); } body[data-lang="both"] .glab small .en { display: inline; margin-left: 8px; font-size: 9px; }
.gtoast { position: fixed; left: 50%; top: 24vh; transform: translate(-50%, 6px); z-index: 18; pointer-events: none; opacity: 0; transition: .7s; text-align: center; color: var(--gold); text-shadow: 0 0 18px #000; }
.gtoast.on { opacity: 1; transform: translate(-50%, 0); }
.gtoast .zh { font-size: 14px; letter-spacing: .3em; } .gtoast .en { font-family: var(--cap); font-size: 10px; letter-spacing: .4em; margin-top: 4px; }
body[data-lang="both"] .gtoast .zh + .en { display: block; }
.gdot { position: fixed; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(216, 180, 106, .8); z-index: 9; pointer-events: none; opacity: 0; transform-origin: 14px 14px; }
.gdot.on { animation: gdot 1s ease-out; }
@keyframes gdot { 0% { opacity: .9; scale: .3; } 100% { opacity: 0; scale: 1.4; } }
.gjbtn { display: flex; align-items: center; gap: 7px; color: var(--gold); font-family: var(--en); font-size: 13px; }
.gjbtn .ic { width: 14px; height: 10px; border: 1px solid var(--gold); position: relative; }
.gjbtn .ic::after { content: ''; position: absolute; left: 1px; right: 1px; top: 1px; height: 5px; border-bottom: 1px solid var(--gold); border-left: 1px solid transparent; transform: skewY(0); clip-path: polygon(0 0, 100% 0, 50% 100%); background: rgba(216, 180, 106, .3); }
.gjbtn b { font-weight: 500; }
.gjbtn.pulse { animation: jp 1.2s ease; }
@keyframes jp { 30% { color: #fff; text-shadow: 0 0 14px var(--gold); transform: scale(1.15); } }
.gchoice { position: fixed; inset: 0; z-index: 29; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12vh; background: radial-gradient(ellipse at 50% 85%, rgba(0, 0, 0, .7), rgba(0, 0, 0, .1) 70%); opacity: 0; pointer-events: none; transition: opacity .8s; }
.gchoice.open { opacity: 1; pointer-events: auto; }
.gchoice .gc { text-align: center; width: min(760px, 92vw); }
.gchoice .q .zh { font-size: 20px; letter-spacing: .16em; color: var(--cream); } .gchoice .q .en { font-style: italic; font-size: 19px; color: rgba(236, 214, 170, .8); margin-top: 4px; }
body[data-lang="both"] .gchoice .q .zh + .en, body[data-lang="both"] .gchoice .s .zh + .en { display: block; }
.gchoice .s { margin-top: 8px; font-size: 13px; color: rgba(241, 231, 208, .5); }
.gchoice .opts { display: flex; gap: 18px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.gchoice .opt { min-width: 220px; padding: 16px 26px 14px; border: 1px solid rgba(216, 180, 106, .45); background: rgba(10, 6, 4, .55); color: var(--cream); transition: .4s; position: relative; }
.gchoice .opt::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(216, 180, 106, .12); }
.gchoice .opt:hover { background: rgba(216, 180, 106, .14); box-shadow: 0 0 40px rgba(216, 180, 106, .2); transform: translateY(-2px); }
.gchoice .opt .l .zh { font-size: 15px; letter-spacing: .2em; } .gchoice .opt .l .en { font-style: italic; font-size: 16px; color: var(--gold); }
body[data-lang="both"] .gchoice .opt .l .zh + .en, body[data-lang="both"] .gchoice .opt .n .zh + .en { display: block; }
.gchoice .opt .n { display: block; margin-top: 6px; font-size: 11px; color: rgba(241, 231, 208, .45); }
.gchoice .opt.locked { opacity: .35; cursor: not-allowed; }
.gjour { position: fixed; inset: 0; z-index: 30; display: flex; justify-content: flex-end; background: rgba(3, 2, 1, 0); pointer-events: none; transition: background .7s; }
.gjour.open { background: rgba(3, 2, 1, .5); pointer-events: auto; }
.gjour .gj { position: relative; width: min(420px, 92vw); height: 100%; overflow-y: auto; padding: 64px 38px 40px; background: linear-gradient(180deg, rgba(20, 13, 8, .95), rgba(9, 6, 4, .97)); border-left: 1px solid rgba(216, 180, 106, .22); transform: translateX(100%); transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.gjour.open .gj { transform: none; }
.gjour .x { position: absolute; top: 22px; right: 26px; font-size: 26px; color: var(--gold); }
.gjh { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid rgba(216, 180, 106, .2); padding-bottom: 14px; margin-bottom: 14px; }
.gjh .k { font-family: var(--cap); letter-spacing: .4em; font-size: 11px; color: var(--gold); } .gjh .k .zh { font-family: var(--zh); letter-spacing: .3em; } .gjh .k .en { display: inline !important; margin-left: 10px; }
.gjh .n { font-size: 22px; color: var(--cream); }
.gji { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 12px 4px; border-bottom: 1px solid rgba(216, 180, 106, .08); color: var(--cream); transition: .3s; }
.gji:hover { background: rgba(216, 180, 106, .06); }
.gji .zh { font-size: 14px; letter-spacing: .1em; } .gji .en { font-style: italic; font-size: 15px; color: rgba(241, 231, 208, .55); }
body[data-lang="both"] .gji .zh + .en { display: inline; margin-left: 10px; }
.gji .seal { width: 16px; height: 16px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 35%, #c23a2a, #6a0d08 70%); box-shadow: 0 0 6px rgba(200, 40, 30, .5); }
.gji.locked { color: rgba(241, 231, 208, .3); cursor: default; } .gji.locked .seal { background: #2a1a14; box-shadow: none; }
.gji.card::before { content: '✦'; color: var(--gold); font-size: 11px; width: 16px; text-align: center; }
.gjs { margin: 22px 0 6px; font-family: var(--cap); font-size: 10px; letter-spacing: .35em; color: var(--gold2); } .gjs .zh { font-family: var(--zh); letter-spacing: .25em; } .gjs .en { display: inline !important; margin-left: 8px; }
#card .letter { position: relative; margin-top: 10px; padding: 46px 30px 34px; background: linear-gradient(170deg, #e8dcc0, #d6c39c); color: #2a1a10; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
#card .letter .seal { position: absolute; top: -18px; left: 50%; margin-left: -22px; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d0432f, #7a0e09 65%, #4a0604); box-shadow: 0 4px 12px rgba(0, 0, 0, .5), inset 0 0 0 4px rgba(0, 0, 0, .15); }
#card .letter .seal::after { content: 'OG'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--cap); font-size: 12px; color: rgba(255, 210, 190, .55); letter-spacing: .05em; }
#card .letter .kick { color: #7a4a20; } #card .letter h2 .zh { color: #2a1a10; font-size: 22px; } #card .letter h2 .en { color: #7a4a20; font-size: 20px; }
#card .letter .body p.zh { color: #3a2614; font-size: 15px; } #card .letter .body p.en { color: #5a3a20; font-size: 17px; font-style: italic; }
#card .letter .sig { text-align: right; font-family: var(--en); font-style: italic; font-size: 22px; color: #7a0e09; margin-top: 12px; }
.gend { position: fixed; inset: 0; z-index: 27; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 50%, rgba(4, 3, 2, .88), rgba(4, 3, 2, .55) 60%, rgba(4, 3, 2, .2)); opacity: 0; pointer-events: none; transition: opacity 2.5s; }
.gend.open { opacity: 1; pointer-events: auto; }
.gend .ge { text-align: center; width: min(640px, 92vw); }
.gend .k { font-family: var(--cap); letter-spacing: .6em; font-size: 11px; color: var(--gold); } .gend .k .zh { font-family: var(--zh); letter-spacing: .4em; } .gend .k .en { display: inline !important; margin-left: 10px; }
.gend h3 { margin: 18px 0 16px; font-weight: 300; } .gend h3 .zh { font-family: var(--zh); font-size: 34px; letter-spacing: .3em; color: var(--cream); } .gend h3 .en { font-style: italic; font-size: 30px; color: rgba(236, 214, 170, .85); margin-top: 6px; }
body[data-lang="both"] .gend h3 .zh + .en, body[data-lang="both"] .gend .d .zh + .en { display: block; }
.gend .d { max-width: 520px; margin: 0 auto; line-height: 1.85; color: rgba(241, 231, 208, .75); } .gend .d .zh { font-size: 14px; letter-spacing: .08em; } .gend .d .en { font-style: italic; font-size: 16px; color: rgba(236, 214, 170, .7); margin-top: 10px; }
.gend .ends { margin: 28px 0 30px; display: flex; gap: 12px; justify-content: center; align-items: center; }
.gend .ends span { width: 30px; height: 30px; border: 1px solid rgba(216, 180, 106, .3); display: flex; align-items: center; justify-content: center; font-family: var(--cap); font-size: 11px; color: rgba(216, 180, 106, .4); transform: rotate(45deg); }
.gend .ends span.on { background: rgba(216, 180, 106, .2); color: var(--gold); border-color: var(--gold); box-shadow: 0 0 14px rgba(216, 180, 106, .3); }
.gend .ends em { font-style: normal; font-size: 12px; color: rgba(241, 231, 208, .5); margin-left: 12px; } .gend .ends em .en { display: inline !important; margin-left: 6px; font-style: italic; }
@media (max-width: 720px) { .gobj { left: 16px; top: 54px; max-width: 70vw; } .gchoice .opt { min-width: 70vw; } }

/* gate v2: the 3D mask carries the title; the DOM is a quiet caption in the corner */
#gate { justify-content: flex-start; align-items: flex-end; text-align: left; padding: 0 0 9vh 8vw; }
#gate .gwrap { align-items: flex-start; }
#gate .pre { margin-bottom: 18px; }
#gate .pre .en { margin-left: 14px; }
#gate .zhT { font-size: clamp(26px, 2.6vw, 40px); letter-spacing: .55em; padding-left: 0; margin: 0 0 18px; color: var(--cream); font-weight: 500; text-shadow: 0 0 30px rgba(0,0,0,.9); }
#gate .tag { max-width: 420px; text-align: left; }
#gate .row { display: flex; align-items: center; gap: 22px; margin-top: 30px; }
#gate #enter { margin-top: 0; }
#gate .snd { margin-top: 0; }
@media (max-width: 720px) { #gate { padding: 0 6vw 10vh; } #gate .row { flex-direction: column; align-items: flex-start; gap: 12px; } }

body.choosing #sub, body.choosing #hint { opacity: 0 !important; }

/* v3: prominent objective + waypoint */
.gobj { left: 50%; top: 18px; transform: translate(-50%, -6px); max-width: min(620px, 70vw); padding: 10px 14px 10px 18px; align-items: center; background: rgba(12, 7, 4, .78); border: 1px solid rgba(216, 180, 106, .6); box-shadow: 0 0 30px rgba(216, 180, 106, .18); pointer-events: auto; z-index: 21; }
.gobj.on { transform: translate(-50%, 0); animation: objIn 1.2s ease; }
@keyframes objIn { 0% { box-shadow: 0 0 0 rgba(216,180,106,0); } 40% { box-shadow: 0 0 60px rgba(216,180,106,.55); } 100% { box-shadow: 0 0 30px rgba(216,180,106,.18); } }
.gobj .ot .zh { font-size: 15px; color: #fff4dc; letter-spacing: .12em; } .gobj .ot .en { font-size: 14px; color: var(--gold); }
body[data-lang="both"] .gobj .ot .zh + .en { display: block; }
.gobj .ogo { display: none; margin-left: 14px; padding: 6px 12px; border: 1px solid var(--gold); color: #1a0e06; background: var(--gold); font-size: 12px; letter-spacing: .1em; white-space: nowrap; }
.gobj.hasgo .ogo { display: block; } .gobj .ogo .en { display: inline !important; margin-left: 4px; } .gobj .ogo .zh + .en { display: none !important; } body[data-lang="en"] .gobj .ogo .en { display: inline !important; }
.gobj .ogo:hover { filter: brightness(1.15); }
.gbeacon { position: fixed; left: 0; top: 0; z-index: 12; pointer-events: none; opacity: 0; transition: opacity .6s; }
.gbeacon.on { opacity: 1; }
.gbeacon .pin { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; transform: rotate(45deg); border: 2px solid var(--gold); background: rgba(216, 180, 106, .35); box-shadow: 0 0 18px var(--gold); animation: pinp 1.6s ease-in-out infinite; }
@keyframes pinp { 50% { box-shadow: 0 0 36px var(--gold); background: rgba(216, 180, 106, .7); } }
.gbeacon .arr { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; display: none; }
.gbeacon .arr::after { content: ''; position: absolute; left: 22px; top: 8px; border: 7px solid transparent; border-left: 11px solid var(--gold); filter: drop-shadow(0 0 6px var(--gold)); }
.gbeacon.off .arr { display: block; }
.gbeacon b { position: absolute; left: 16px; top: -8px; font: 500 12px var(--en); color: var(--gold); text-shadow: 0 0 8px #000; white-space: nowrap; }
#sub { pointer-events: auto; cursor: pointer; }
.mark { opacity: .7; }

/* gate v3: chandelier above, crisp type below */
#gate { justify-content: center; align-items: flex-end; text-align: center; padding: 0 0 7vh; background: linear-gradient(to top, rgba(2,1,1,.85), rgba(2,1,1,.0) 55%); }
#gate .gwrap { align-items: center; }
#gate h1 { display: block; text-shadow: 0 2px 30px rgba(0,0,0,.9); }
#gate h1 .l1 { font-size: clamp(44px, 6.4vw, 104px); color: #fff3dc; }
#gate h1 .l2 { margin-top: 10px; }
#gate .zhT { font-size: clamp(16px, 1.5vw, 22px); letter-spacing: .8em; padding-left: .8em; margin: 18px 0 14px; color: rgba(241,231,208,.85); font-weight: 400; }
#gate .tag { text-align: center; }
#gate .row { justify-content: center; margin-top: 22px; }
#gate .snd { margin-top: 14px; }
@media (max-width: 720px) { #gate { padding: 0 6vw 9vh; } }
.gobj { pointer-events: none !important; } .gobj .ogo { pointer-events: auto; }
