:root { color-scheme: dark; font-family: "Noto Serif SC", "Songti SC", serif; }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #100a06; }
button { font: inherit; }
#viewer { position: relative; width: 100%; height: 100%; overflow: hidden; isolation: isolate; cursor: grab; }
#viewer.dragging { cursor: grabbing; }
#panorama { display: block; width: 100%; height: 100%; touch-action: none; }
.landing-bg { position: absolute; z-index: 2; inset: 0; pointer-events: none; background-image: linear-gradient(90deg,rgba(12,6,3,.34),rgba(16,8,3,.05) 52%,rgba(10,5,2,.12)), url('./assets/sy.jpg'); background-size: cover; background-position: center; transform: scale(1.025); opacity: 1; transition: opacity 1.4s ease, transform 5s ease; }
.active .landing-bg { opacity: 0; transform: scale(1.075); }
#landing-particles { position: absolute; z-index: 3; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 1; transition: opacity 1.1s ease; }
.active #landing-particles { opacity: 0; }
#gesture-particles { position: absolute; z-index: 5; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#celebration-particles { position:absolute;z-index:7;inset:0;width:100%;height:100%;pointer-events:none;opacity:0;transition:opacity 2.6s ease; }
#celebration-particles.show { opacity:1; }
.culture-cards { position:absolute;z-index:9;inset:0;pointer-events:none; }
.culture-card { position:absolute;display:flex;flex-direction:column;justify-content:center;min-width:150px;padding:14px 17px;color:#f3dfb8;background:linear-gradient(145deg,rgba(61,32,18,.84),rgba(18,10,7,.78));border:1px solid rgba(229,183,108,.55);box-shadow:0 14px 42px rgba(0,0,0,.48),inset 0 0 30px rgba(213,149,65,.09);backdrop-filter:blur(13px);opacity:0;transform:translateY(18px) scale(.9) rotate(var(--card-rotate,0deg));transition:opacity .55s ease,transform .55s ease; }
.culture-card.show { opacity:1;transform:rotate(var(--card-rotate,0deg)); }
.culture-card h4 { margin:0 0 7px;font:700 clamp(17px,1.35vw,23px)/1.2 "STKaiti","KaiTi",serif;letter-spacing:.14em;color:#f2d395; }
.culture-card p { margin:0;color:rgba(255,241,213,.76);font:clamp(9px,.7vw,11px)/1.55 "Songti SC",serif;letter-spacing:.04em; }
.culture-cards.fade .culture-card { opacity:0;transform:translateY(-18px) scale(.94) rotate(var(--card-rotate,0deg));transition-duration:2.6s; }
.final-fade .artifact-modal,.final-fade .history-modal,.final-fade .gesture-control,.final-fade .help,.final-fade .location,.final-fade .topbar,.final-fade .crosshair { opacity:0!important;pointer-events:none!important;transition:opacity 2.6s ease!important; }
.vignette { position: absolute; z-index: 4; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 48%, transparent 58%, rgba(11,6,3,.12) 90%, rgba(5,3,2,.3) 125%); }
.topbar { position: absolute; z-index: 6; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 30px 38px; pointer-events: none; }
.brand { display: flex; align-items: center; gap: 13px; text-shadow: 0 2px 14px #000; }
.seal { display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid rgba(238,211,163,.8); color: #f0d8a9; font-size: 22px; line-height: 1; }
.brand h1 { margin: 0; font-size: 17px; letter-spacing: .34em; font-weight: 600; }
.brand p { margin: 5px 0 0; color: rgba(255,255,255,.55); font: 8px/1.2 Arial, sans-serif; letter-spacing: .19em; }
.icon-button { pointer-events: auto; display: grid; place-items: center; width: 42px; height: 42px; color: #fff; background: rgba(22,13,8,.3); border: 1px solid rgba(255,255,255,.35); border-radius: 50%; cursor: pointer; backdrop-filter: blur(5px); transition: .2s; }
.icon-button:hover { background: rgba(144,91,48,.6); transform: scale(1.05); }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.intro { position: absolute; z-index: 6; left: clamp(32px, 9vw, 150px); top: 50%; transform: translateY(-45%); color: #fff; transition: opacity .75s, transform .75s; text-shadow: 0 2px 18px rgba(0,0,0,.7); }
.intro.hidden { opacity: 0; transform: translate(-30px,-45%); pointer-events: none; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 17px; color: #e2be7e; font-size: 12px; letter-spacing: .45em; }
.eyebrow::before { content: ""; width: 31px; height: 1px; background: currentColor; }
.intro h2 { margin: 0 0 42px; font-family: "STKaiti", "KaiTi", "Kaiti SC", "FangSong", serif; font-size: clamp(44px, 5.1vw, 82px); line-height: 1.48; letter-spacing: .17em; font-weight: 900; color: #fff; -webkit-text-stroke: .45px rgba(255,255,255,.28); text-shadow: 0 3px 2px rgba(20,8,3,.95), 0 8px 30px rgba(0,0,0,.88), 0 0 18px rgba(255,255,255,.18); }
#enter { display: flex; align-items: center; justify-content: space-between; width: 218px; padding: 17px 19px 17px 27px; color: #fff0cf; background: linear-gradient(110deg,rgba(145,76,34,.88),rgba(95,46,22,.8)); border: 1px solid rgba(255,218,151,.9); border-radius: 2px; box-shadow: 0 8px 30px rgba(24,10,4,.46), inset 0 0 20px rgba(239,183,99,.12); letter-spacing: .28em; cursor: pointer; backdrop-filter: blur(8px); transition: .25s; }
#enter:hover { background: linear-gradient(110deg,rgba(181,102,48,.96),rgba(118,57,26,.9)); padding-left: 33px; transform: translateY(-2px); box-shadow: 0 12px 36px rgba(24,10,4,.58), 0 0 20px rgba(224,157,75,.2); }
#enter i { display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid rgba(255,230,182,.35); border-radius: 50%; background: rgba(237,205,151,.2); font: normal 18px Arial; }
.crosshair { position: absolute; z-index: 5; left: 50%; top: 50%; width: 26px; height: 26px; transform: translate(-50%,-50%); border: 1px solid rgba(255,255,255,.45); border-radius: 50%; opacity: 0; transition: opacity .5s; pointer-events: none; }
.active .crosshair { opacity: .6; }
.crosshair span { position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: #fff; transform: translate(-50%,-50%); }
.crosshair.targeted { opacity: 1; border-color: #e6b968; transform: translate(-50%,-50%) scale(1.18); box-shadow: 0 0 0 5px rgba(230,185,104,.13),0 0 20px rgba(230,185,104,.55); }
.crosshair.targeted span { background:#f7d899;box-shadow:0 0 8px #f3c979; }
.crosshair.targeted.target-x2 { border-color:#b9e0ca;box-shadow:0 0 0 6px rgba(150,216,181,.16),0 0 26px rgba(165,228,195,.82); }
.crosshair.targeted.target-x2 span { background:#e1ffed;box-shadow:0 0 11px #aee4c8; }
.crosshair.targeted.target-m1 { border-color:#ffb45f;box-shadow:0 0 0 6px rgba(255,142,55,.18),0 0 28px rgba(255,151,62,.9); }
.crosshair.targeted.target-m1 span { background:#ffe0b4;box-shadow:0 0 12px #ff9f48; }
.crosshair.targeted.target-m2 { border-color:#78bfff;box-shadow:0 0 0 6px rgba(61,145,255,.18),0 0 28px rgba(77,164,255,.95); }
.crosshair.targeted.target-m2 span { background:#d7edff;box-shadow:0 0 12px #58aaff; }
.crosshair.targeted.target-w1 { border-color:#ff9fce;box-shadow:0 0 0 6px rgba(255,105,180,.18),0 0 30px rgba(255,119,190,.95); }
.crosshair.targeted.target-w1 span { background:#ffe1f1;box-shadow:0 0 13px #ff83c1; }
.crosshair.targeted.target-w2 { border-color:#ff6c68;box-shadow:0 0 0 6px rgba(255,67,62,.2),0 0 30px rgba(255,75,70,.98); }
.crosshair.targeted.target-w2 span { background:#ffe0de;box-shadow:0 0 13px #ff514c; }
.help { position: absolute; z-index: 6; left: 50%; bottom: 34px; transform: translateX(-50%); display: flex; gap: 35px; padding: 12px 20px; color: rgba(255,255,255,.8); background: rgba(18,10,6,.25); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(7px); opacity: 0; transition: opacity .5s; }
.active .help { opacity: 1; }
.help > div { display: flex; align-items: center; gap: 9px; }
.help p { margin: 0; font: 11px/1.3 Arial, sans-serif; white-space: nowrap; }
.help b { display: block; font-weight: 400; }
.help small { color: rgba(255,255,255,.45); font-size: 9px; }
.mouse-icon { width: 16px; height: 23px; border: 1px solid currentColor; border-radius: 9px; position: relative; }
.mouse-icon::after { content:""; position:absolute; width:2px; height:5px; left:6px; top:4px; background:currentColor; border-radius:2px; }
.wheel-icon,.key-icon { display:grid; place-items:center; width:23px; height:23px; border:1px solid rgba(255,255,255,.65); border-radius:4px; font:10px Arial; }
.location { position: absolute; z-index: 6; right: 38px; bottom: 36px; display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.7); font-size: 11px; letter-spacing: .2em; text-shadow: 0 1px 8px #000; opacity: 0; transition: opacity .8s .5s; }
.active .location { opacity: 1; }
.location span { width: 5px; height: 5px; border-radius: 50%; background: #d4a55f; box-shadow: 0 0 0 4px rgba(212,165,95,.2); }
.status { position: absolute; z-index: 7; inset: auto auto 18px 18px; color: rgba(255,255,255,.65); font: 11px Arial; transition: opacity .3s; }
.status.loaded { opacity: 0; }
.gesture-control { position: absolute; z-index: 7; left: 28px; bottom: 28px; display: flex; align-items: center; gap: 12px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .6s 1s; }
.active .gesture-control { opacity: 1; transform: none; pointer-events: auto; }
#gesture-camera { display: none; width: 74px; height: 54px; border: 1px solid rgba(230,190,124,.45); border-radius: 3px; object-fit: cover; transform: scaleX(-1); opacity: .72; }
.gesture-control.on #gesture-camera { display: block; }
#gesture-toggle { display: flex; align-items: center; gap: 9px; padding: 10px 14px; color: #ead4aa; background: rgba(24,13,8,.68); border: 1px solid rgba(222,179,108,.4); cursor: pointer; backdrop-filter: blur(9px); letter-spacing: .12em; }
#gesture-toggle:hover { border-color: rgba(239,199,129,.8); background: rgba(88,48,25,.72); }
.gesture-dot { width: 7px; height: 7px; border-radius: 50%; background: #9a7244; box-shadow: 0 0 0 4px rgba(154,114,68,.14); }
.gesture-control.on .gesture-dot { background: #d9ad66; box-shadow: 0 0 10px #e8bc71,0 0 0 4px rgba(217,173,102,.18); }
.gesture-control.aim-warning { animation: aim-shake .36s ease 2; }
@keyframes aim-shake { 0%,100%{transform:translateX(0)} 35%{transform:translateX(-7px)} 70%{transform:translateX(7px)} }
#gesture-state { display: block; margin-top: 5px; color: rgba(255,255,255,.48); font: 9px/1.2 Arial,sans-serif; letter-spacing: .08em; }
.artifact-modal { position: absolute; z-index: 8; left: var(--modal-x,50%); top: var(--modal-y,70%); width: min(310px,calc(100% - 40px)); padding: 27px 34px 31px; color: #f2dfb7; text-align: center; background: linear-gradient(145deg,rgba(51,27,16,.7),rgba(19,11,7,.62)); border: 1px solid rgba(230,190,124,.48); box-shadow: 0 24px 80px rgba(0,0,0,.48),inset 0 0 45px rgba(210,147,67,.08); backdrop-filter: blur(16px); opacity: 0; transform: translate(-50%,12px) scale(.94); transform-origin:50% 0; pointer-events: none; transition: opacity .45s,transform .45s; }
.artifact-modal.show { opacity: 1; transform: translate(-50%,0) scale(1); pointer-events: auto; }
.artifact-modal::before,.artifact-modal::after { content:""; position:absolute; left:22px; right:22px; height:1px; background:linear-gradient(90deg,transparent,#c39252,transparent); }
.artifact-modal::before { top:18px; }.artifact-modal::after { bottom:18px; }
.artifact-modal p { margin:0 0 12px; color:#c89b5e; font-size:11px; letter-spacing:.42em; }
.artifact-modal h3 { margin:0 0 9px; font:600 48px/1.15 "STKaiti","KaiTi",serif; letter-spacing:.18em; }
.artifact-modal span { color:rgba(246,224,183,.58); font-size:11px; letter-spacing:.28em; }
.history-modal { position:absolute;z-index:10;left:50%;top:58%;width:min(520px,calc(100% - 48px));box-sizing:border-box;padding:28px 36px;color:#f4dfb5;background:linear-gradient(145deg,rgba(53,28,16,.88),rgba(16,9,6,.84));border:1px solid rgba(230,185,111,.58);box-shadow:0 26px 90px rgba(0,0,0,.62),inset 0 0 44px rgba(205,141,60,.1);backdrop-filter:blur(15px);opacity:0;transform:translate(-50%,18px) scale(.95);pointer-events:none;transition:opacity .65s ease,transform .65s ease; }
.history-modal::before,.history-modal::after { content:"";position:absolute;left:24px;right:24px;height:1px;background:linear-gradient(90deg,transparent,#c59659,transparent); }
.history-modal::before { top:16px; }.history-modal::after { bottom:16px; }
.history-modal span { display:block;font:600 clamp(16px,1.45vw,22px)/1.9 "STKaiti","KaiTi",serif;letter-spacing:.08em;text-align:center; }
.history-modal.show { opacity:1;transform:translate(-50%,0) scale(1);pointer-events:auto; }
@media (max-width: 700px) {
  .topbar { padding: 20px; }
  .intro { left: 28px; }
  .intro h2 { letter-spacing: .1em; }
  .help { bottom: 22px; gap: 18px; }
  .help > div:nth-child(2), .help > div:nth-child(3) { display: none; }
  .location { right: 20px; top: 79px; bottom: auto; }
  .gesture-control { left: 16px; bottom: 16px; }
  .culture-card { min-width:110px;padding:6px 8px; }
  .culture-card h4 { margin-bottom:2px;font-size:13px; }
  .culture-card p { font-size:7.5px;line-height:1.25; }
}
