[hidden] { display: none !important; }
:root {
  --bg: #04070a; --panel: rgba(6, 14, 16, .9); --line: rgba(120, 255, 200, .22); --text: #e6fff4; --muted: #9fbdb2;
  --green: #35ff9a; --cyan: #2de2ff; --magenta: #ff3dcf; --amber: #ffb92e; --accent: var(--green);
  --sign: "Orbitron", "Segoe UI", system-ui, sans-serif; --ui: "Inter", "Segoe UI", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--ui); overflow: hidden; -webkit-tap-highlight-color: transparent; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; }
button, a.btn { font: inherit; }
a { color: var(--green); }
kbd { font-family: var(--mono); font-size: .8em; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; background: rgba(53, 255, 154, .08); }

/* intro */
#intro { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: #020606; transition: opacity .9s ease; }
#intro.leave { opacity: 0; pointer-events: none; }
#rain { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-box { position: relative; width: min(640px, calc(100% - 32px)); padding: 34px 32px 26px; background: rgba(2, 10, 8, .82); border: 1px solid rgba(53, 255, 154, .45); border-radius: 18px; box-shadow: 0 0 60px rgba(53, 255, 154, .18), inset 0 0 40px rgba(53, 255, 154, .06); backdrop-filter: blur(3px); text-align: center; }
.intro-kicker { font-family: var(--mono); color: var(--green); letter-spacing: .2em; font-size: 13px; opacity: .8; }
#intro h1 { font-family: var(--sign); font-weight: 800; font-size: clamp(34px, 8vw, 64px); margin: 8px 0 6px; letter-spacing: .04em; color: #eafff5; text-shadow: 0 0 18px rgba(53, 255, 154, .8), 0 0 2px #fff; }
#intro h1 span { color: var(--magenta); text-shadow: 0 0 18px rgba(255, 61, 207, .9); }
.intro-who { margin: 0; font-weight: 600; color: var(--cyan); letter-spacing: .02em; }
.intro-what { color: #cfe9df; line-height: 1.5; margin: 14px auto 6px; max-width: 520px; }
.intro-count { font-family: var(--mono); color: var(--amber); font-size: 13px; margin: 6px 0 18px; }
.intro-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.intro-btns .main, .intro-btns .ghost { padding: 13px 22px; border-radius: 12px; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; }
.intro-btns .main { border: 0; background: var(--green); color: #022014; box-shadow: 0 0 24px rgba(53, 255, 154, .55); }
.intro-btns .main:disabled { opacity: .55; cursor: wait; }
.intro-btns .ghost { border: 1px solid var(--line); color: var(--text); background: transparent; }
.intro-keys { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; font-size: 12.5px; color: var(--muted); }

/* hud */
#hud { position: fixed; top: 0; left: 0; right: 0; z-index: 10; display: flex; justify-content: space-between; align-items: flex-start; padding: max(14px, env(safe-area-inset-top)) 16px 0; pointer-events: none; opacity: 0; transition: opacity .6s; }
#hud.show { opacity: 1; }
.hud-id { display: flex; flex-direction: column; text-shadow: 0 1px 8px #000; }
.hud-id b { font-family: var(--sign); letter-spacing: .06em; font-size: 17px; }
.hud-id span { font-size: 12px; color: var(--green); font-family: var(--mono); }
.hud-btns { display: flex; gap: 8px; pointer-events: auto; }
.hud-btns > * { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; font-size: 14px; cursor: pointer; backdrop-filter: blur(8px); }
.hud-btns > *:hover { border-color: var(--green); }

/* exhibit card */
.card { position: fixed; z-index: 12; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); width: min(560px, calc(100% - 24px)); transform: translate(-50%, 130%); transition: transform .35s cubic-bezier(.2, .9, .3, 1.1); display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--accent); box-shadow: 0 0 34px color-mix(in srgb, var(--accent) 35%, transparent); backdrop-filter: blur(10px); }
.card.show { transform: translate(-50%, 0); }
.card img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; flex: none; border: 1px solid var(--line); }
.c-body { min-width: 0; flex: 1; }
.c-kicker { padding-right: 64px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.card h3 { margin: 3px 0 4px; font-size: 18px; line-height: 1.2; }
.card p { margin: 0; font-size: 13.5px; line-height: 1.42; color: #cde4db; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.c-btns { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.c-btns button, .m-btns > * { border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text); border-radius: 9px; padding: 8px 12px; font-size: 13.5px; cursor: pointer; text-decoration: none; }
.c-btns button.main, .m-btns > .main { background: var(--accent); border-color: var(--accent); color: #031410; font-weight: 700; }
.c-btns button:hover { border-color: var(--accent); }
.c-hint { position: absolute; right: 12px; top: 10px; font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* tutorial */
.tutor { position: fixed; z-index: 13; left: 50%; top: 74px; transform: translate(-50%, -12px); opacity: 0; pointer-events: none; transition: .35s; width: min(420px, calc(100% - 24px)); padding: 14px 16px; border-radius: 14px; background: rgba(3, 18, 12, .92); border: 1px solid var(--green); box-shadow: 0 0 30px rgba(53, 255, 154, .3); }
.tutor.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.t-step { font-family: var(--mono); color: var(--green); font-size: 12px; }
.tutor b { display: block; font-size: 16px; margin: 3px 0; }
.tutor p { margin: 0; font-size: 14px; line-height: 1.45; color: #d5efe5; }
.t-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.t-btns button { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.t-btns .main { background: var(--green); color: #031410; border-color: var(--green); font-weight: 700; }

/* joystick */
.joy { position: fixed; z-index: 11; right: 22px; bottom: 150px; width: 108px; height: 108px; border-radius: 50%; border: 2px solid rgba(53, 255, 154, .4); background: rgba(53, 255, 154, .06); touch-action: none; }
.joy i { position: absolute; left: 32px; top: 32px; width: 40px; height: 40px; border-radius: 50%; background: rgba(53, 255, 154, .45); box-shadow: 0 0 16px rgba(53, 255, 154, .6); }

/* modal */
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(0, 4, 4, .7); backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s; }
.modal.show { opacity: 1; }
.m-win { width: min(1180px, 100%); height: min(860px, 100%); display: flex; flex-direction: column; background: #050b0c; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 0 60px rgba(53, 255, 154, .15); }
.m-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); background: #071214; }
.m-bar b { flex: 1; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-bar a { font-size: 13px; color: var(--muted); text-decoration: none; }
.m-bar button { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--text); font-size: 16px; cursor: pointer; }
#m-body { flex: 1; position: relative; overflow: auto; }
#m-body.frame { overflow: hidden; background: #000; }
#m-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
#m-body .loading { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); color: var(--green); }
#m-body.info { padding: 22px 26px 30px; line-height: 1.6; max-width: 760px; margin: 0 auto; width: 100%; }
#m-body.info .lead { font-size: 17px; color: #e9fff6; }
#m-body.info h4 { font-family: var(--sign); font-size: 13px; letter-spacing: .1em; color: var(--green); margin: 22px 0 6px; text-transform: uppercase; }
#m-body.info ul { padding-left: 20px; color: #cfe5dc; }
#m-body.info .hero { width: 100%; max-height: 300px; object-fit: contain; border-radius: 10px; background: #000; border: 1px solid var(--line); }
#m-body.info .facts { list-style: none; padding: 0; }
#m-body.info .facts li { padding: 4px 0; border-bottom: 1px dashed var(--line); }
#m-body.info .facts b { color: var(--muted); font-weight: 600; margin-right: 6px; }
.m-btns { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; --accent: var(--green); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.stats div { border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; }
.stats b { display: block; font-family: var(--sign); font-size: 26px; color: var(--green); }
.stats span { font-size: 12.5px; color: var(--muted); }

/* map */
.map { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; background: rgba(0, 4, 4, .72); backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s; }
.map.show { opacity: 1; }
.map-win { width: min(1040px, calc(100% - 20px)); height: min(720px, calc(100% - 20px)); display: flex; flex-direction: column; background: #040a0b; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.map-bar { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.map-bar b { font-family: var(--sign); font-size: 14px; letter-spacing: .06em; white-space: nowrap; }
.map-bar input { flex: 1; min-width: 0; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: #071214; color: var(--text); padding: 0 12px; font: inherit; font-size: 15px; }
.map-bar button { width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; }
.map-body { flex: 1; display: grid; grid-template-columns: 1.3fr 1fr; min-height: 0; }
#map-canvas { width: 100%; height: 100%; cursor: crosshair; }
.map-list { overflow: auto; border-left: 1px solid var(--line); padding: 8px; }
.ml-group { margin-bottom: 10px; }
.ml-h { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-transform: uppercase; padding: 4px 6px; }
.map-list button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: transparent; color: var(--text); padding: 7px 8px; border-radius: 7px; cursor: pointer; font-size: 14px; }
.map-list button:hover { background: rgba(53, 255, 154, .08); }
.map-list i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ml-empty { color: var(--muted); padding: 10px; }
.map-hint { margin: 0; padding: 8px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }

.toast { position: fixed; z-index: 40; left: 50%; top: 70px; transform: translate(-50%, -20px); opacity: 0; transition: .3s; padding: 10px 16px; border-radius: 10px; background: var(--panel); border: 1px solid var(--amber); font-size: 14px; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#fade { position: fixed; inset: 0; z-index: 20; background: #000; opacity: 0; pointer-events: none; transition: opacity .25s; }
#fade.on { opacity: 1; }
.film-cap { position: fixed; z-index: 60; left: 50%; top: 9%; transform: translateX(-50%); opacity: 0; font-family: var(--sign); font-weight: 800; font-size: clamp(26px, 5.4vw, 54px); text-align: center; width: 92%; line-height: 1.15; color: #fff; text-shadow: 0 0 20px rgba(53, 255, 154, .9), 0 3px 10px #000; transition: opacity .3s; }
.film-cap.show { opacity: 1; }

@media (max-width: 700px) {
  .hud-btns > * span { display: none; }
  .hud-btns > * { padding: 0 11px; }
  .hud-id b { font-size: 14px; }
  .card { gap: 10px; padding: 12px; }
  .card img { width: 64px; height: 64px; }
  .card h3 { font-size: 16px; }
  .card p { font-size: 13px; -webkit-line-clamp: 2; }
  .c-hint { display: none; }
  .m-win { height: 100%; border-radius: 0; border: 0; }
  .map-body { grid-template-columns: 1fr; grid-template-rows: 40% 60%; }
  .map-list { border-left: 0; border-top: 1px solid var(--line); }
  .stats { grid-template-columns: 1fr; }
  .tutor { top: 64px; }
}
#m-body.info .remote { text-align: center; padding: 40px 0; }
#m-body.info .remote h2 { font-family: var(--sign); margin: 0 0 10px; }
#m-body.info .remote .btn { display: inline-block; margin-top: 14px; padding: 12px 20px; border-radius: 11px; background: var(--green); color: #032014; font-weight: 700; text-decoration: none; }
/* project gallery */
.gal { display: grid; gap: 10px; margin-bottom: 14px; }
.gal-stage { position: relative; background: #000; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; height: min(56vh, 520px); display: grid; place-items: center; touch-action: pan-y; }
.gal-media { width: 100%; height: 100%; display: grid; place-items: center; }
.gal-media img, .gal-media video { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(4, 10, 10, .75); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; }
.gal-nav.prev { left: 10px; } .gal-nav.next { right: 10px; }
.gal-nav:focus-visible, .gal-thumbs button:focus-visible { outline: 2px solid var(--green); }
.gal-cap { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.gal-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.gal-thumbs button { flex: none; width: 92px; height: 64px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #000; cursor: pointer; opacity: .6; }
.gal-thumbs button.on { opacity: 1; border-color: var(--green); }
.gal-thumbs img, .gal-thumbs video { width: 100%; height: 100%; object-fit: cover; display: block; }
#m-body.info:has(.gal) { max-width: 980px; }

.cv-pages { display: grid; gap: 12px; }
.cv-pages img { width: 100%; border-radius: 10px; background: #fff; }
