/* =========================================================================
   Amrapalli 360 — tour interface
   ========================================================================= */
:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --bg: #07090d;
  --ink: #f4f6f8;
  --ink-dim: rgba(244, 246, 248, .62);
  --ink-faint: rgba(244, 246, 248, .38);
  --panel: rgba(12, 15, 20, .58);
  --panel-solid: rgba(12, 15, 20, .92);
  --edge: rgba(255, 255, 255, .13);
  --edge-soft: rgba(255, 255, 255, .07);
  --accent: #c8a26a;
  --accent-soft: rgba(200, 162, 106, .18);
  --rail-w: 152px;
  --pad: 22px;
  --r: 10px;
  --blur: saturate(140%) blur(18px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body.is-loading { cursor: progress; }

/* ------------------------------------------------------------------ stage */
#stage { position: fixed; inset: 0; overflow: hidden; }

#pano {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: default;
}

/* soft cinematic vignette so UI chrome always has contrast */
#vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(130% 92% at 50% 45%, transparent 42%, rgba(0, 0, 0, .34) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, .46) 0%, transparent 22%, transparent 62%, rgba(0, 0, 0, .58) 100%);
  z-index: 2;
}



/* ------------------------------------------------------------- info tags */
#tags { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
#tags.walking .tag { opacity: 0; }
.tag {
  position: absolute; left: 0; top: 0;
  display: flex; align-items: center; gap: 8px;
  transform: translate(-6px, -50%);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
  white-space: nowrap; opacity: 1; transition: opacity .45s var(--ease);
}
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(200,162,106,.25), 0 0 12px rgba(200,162,106,.6); flex: none; }
.tag span { padding: 4px 9px; border-radius: 5px; background: var(--panel); border: 1px solid var(--edge); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.tag.far { opacity: 0; }

/* ------------------------------------------------------------ sheets */
#map, #enquire {
  position: absolute; inset: 0; z-index: 22;
  display: flex; align-items: center; justify-content: center; padding: 22px;
  background: rgba(4, 6, 9, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
}
#map.on, #enquire.on { opacity: 1; visibility: visible; }
#map .sheet, #enquire .sheet {
  position: relative; width: min(760px, 100%); max-height: 88vh; overflow-y: auto;
  padding: 24px 26px 26px; border-radius: 14px; background: var(--panel-solid); border: 1px solid var(--edge);
}
#enquire .sheet { width: min(520px, 100%); }
.mhead { display: flex; align-items: baseline; gap: 14px; padding-right: 44px; margin-bottom: 14px; }
.mhead h2 { margin: 0; font-size: 22px; font-weight: 300; }
.mhead .kicker, .kicker { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); }
.mhead .close { position: absolute; top: 14px; right: 14px; }
#map-stage { position: relative; border-radius: 10px; overflow: hidden; background: #000; }
#map-img { display: block; width: 100%; height: auto; }
#map-pins { position: absolute; inset: 0; }
.pin {
  position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; padding: 0; border: 0; background: transparent; cursor: pointer;
  touch-action: manipulation;
}
.pin::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: rgba(255,255,255,.85); border: 2px solid rgba(0,0,0,.45); transition: transform .2s var(--ease), background .2s var(--ease); }
.pin.done::before { background: var(--accent); }
.pin.active::before { background: #fff; transform: scale(1.35); box-shadow: 0 0 0 5px rgba(200,162,106,.35), 0 0 18px rgba(200,162,106,.8); }
.pin:hover::before, .pin:focus-visible::before { transform: scale(1.4); }
.pin .ptip { position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; background: var(--panel-solid); border: 1px solid var(--edge); color: var(--ink); opacity: 0; pointer-events: none; transition: opacity .15s var(--ease); }
.pin:hover .ptip, .pin.active .ptip { opacity: 1; }
#map-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
#map-list li { margin: 0; }
#map-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px 6px 6px; border: 1px solid var(--edge); border-radius: 8px; background: rgba(255,255,255,.03); color: var(--ink-dim); cursor: pointer; font: inherit; font-size: 12px; text-align: left; touch-action: manipulation; }
#map-list button img { width: 52px; height: 26px; object-fit: cover; border-radius: 4px; flex: none; }
#map-list button:hover { background: rgba(255,255,255,.08); color: var(--ink); }
#map-list button.active { border-color: var(--accent); color: var(--ink); }
#map-list button .n { font-variant-numeric: tabular-nums; color: var(--ink-faint); margin-right: 2px; }
#map.no-image #map-stage { display: none; }

#enquire .tagline { margin: 0 0 16px; color: var(--ink-dim); font-size: 14px; }
#enquire .cta { display: grid; gap: 8px; margin-bottom: 18px; }
#enquire .cta:empty { display: none; }
#enquire .share { display: flex; gap: 18px; align-items: center; padding-top: 16px; border-top: 1px solid var(--edge); }
#enquire .qr { flex: none; background: #fff; padding: 6px; border-radius: 8px; line-height: 0; }
#enquire .qr img { display: block; width: 112px; height: 112px; }
#enquire .share-text { min-width: 0; flex: 1; }
#enquire .url { font-size: 13px; color: var(--ink-dim); margin: 6px 0 10px; word-break: break-all; }
#enquire .row { display: flex; gap: 8px; flex-wrap: wrap; }
#enquire .row .end-btn { width: auto; padding: 10px 14px; }
@media (max-width: 620px) { #enquire .share { flex-direction: column; align-items: flex-start; } }

#b-sound .i-off { display: none; }
#b-sound[aria-pressed="false"] .i-on { display: none; }
#b-sound[aria-pressed="false"] .i-off { display: block; }
body.kiosk #b-help, body.kiosk #b-enquire, body.kiosk #b-ui, body.kiosk #sections, body.kiosk #hint { display: none !important; }
body.in-vr #hud, body.in-vr #hotspots, body.in-vr #tags { visibility: hidden; }
@media (max-width: 760px) { #b-enquire.wide { padding: 0 9px; } }

/* ---------------------------------------------------------- pointers */
/* Floor pointers pinned to the gates; the click target marker. All sit in a
   layer that lets clicks through to the panorama except on the pointers. */
#hotspots { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
#hotspots.walking .hot { opacity: 0; transition: opacity .35s var(--ease); }
.hot {
  touch-action: manipulation;
  position: absolute; left: 0; top: 0;
  width: 96px; height: 96px; margin: -48px 0 0 -48px;
  padding: 0; border: 0; background: transparent;
  pointer-events: auto; cursor: pointer;
  opacity: 1; transition: opacity .6s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.hot .disc, .hot .pulse {
  position: absolute; left: 50%; top: 50%;
  width: 58px; height: 58px; margin: -29px 0 0 -29px;
  border-radius: 50%;
  transform: rotateX(62deg);
}
.hot .disc {
  border: 1.5px solid rgba(255, 255, 255, .85);
  background: radial-gradient(circle, rgba(200, 162, 106, .42) 0%, rgba(200, 162, 106, .12) 60%, transparent 72%);
  box-shadow: 0 0 22px rgba(200, 162, 106, .35);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.hot .pulse {
  border: 1px solid rgba(200, 162, 106, .9);
  animation: hotPulse 2.2s ease-out infinite;
}
@keyframes hotPulse {
  0%   { transform: rotateX(62deg) scale(.55); opacity: .9; }
  100% { transform: rotateX(62deg) scale(1.55); opacity: 0; }
}
.hot .chev {
  position: absolute; left: 50%; top: 50%;
  width: 12px; height: 12px; margin: -26px 0 0 -6px;
  border-left: 2.5px solid #fff; border-top: 2.5px solid #fff;
  transform: rotate(45deg);
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.7));
  animation: chevBob 1.6s ease-in-out infinite;
}
@keyframes chevBob { 0%, 100% { margin-top: -26px; } 50% { margin-top: -32px; } }
.hot.back .chev { transform: rotate(225deg); margin-top: -18px; animation: none; }
.hot .hlbl {
  position: absolute; left: 50%; top: calc(50% + 24px);
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 5px;
  background: var(--panel-solid); border: 1px solid var(--edge); color: var(--ink);
  opacity: .85; transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.hot.back .hlbl { opacity: 0; }
.hot:hover .disc, .hot:focus-visible .disc { transform: rotateX(62deg) scale(1.18); border-color: var(--accent); }
.hot:hover .hlbl, .hot:focus-visible .hlbl { opacity: 1; }
.hot:focus-visible { outline: none; }


/* off-screen gate: the pointer parks at the screen edge as a chevron */
.hot.edge .disc, .hot.edge .pulse { display: none; }
.hot.edge .chev {
  width: 14px; height: 14px; margin: -7px 0 0 -7px; animation: none;
  border-width: 2.5px;
}
.hot.edge.edge-l .chev { transform: rotate(-45deg); margin-left: -3px; }
.hot.edge.edge-r .chev { transform: rotate(135deg); margin-left: -11px; }
.hot.edge::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--edge);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.hot.edge .hlbl { top: calc(50% + 26px); opacity: 0; }
.hot.edge:hover .hlbl { opacity: 1; }

#target { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; opacity: 0; }
#target.on { animation: targetIn .5s var(--ease) both; }
@keyframes targetIn { from { opacity: 0; } 30% { opacity: 1; } to { opacity: 1; } }
#target .tdisc {
  position: absolute; left: -18px; top: -18px; width: 36px; height: 36px;
  border-radius: 50%; border: 1.5px solid rgba(255,255,255,.9);
  background: radial-gradient(circle, rgba(200,162,106,.55) 0%, rgba(200,162,106,.15) 55%, transparent 70%);
  transform: rotateX(62deg);
  animation: targetRing 1.1s ease-out infinite;
}
@keyframes targetRing { 0% { transform: rotateX(62deg) scale(.6); opacity: 1; } 100% { transform: rotateX(62deg) scale(1.4); opacity: .15; } }
#target .tpin {
  position: absolute; left: -1px; top: -30px; width: 2px; height: 26px;
  background: linear-gradient(to bottom, transparent, #fff);
  animation: pinDrop .45s var(--ease) both;
}
@keyframes pinDrop { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 760px) {
  .hot { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
  .hot .hlbl { display: none; }
}

/* ------------------------------------------------------------------- chrome */
.ui { position: absolute; z-index: 6; }
.ui-hidden #hud { opacity: 0; pointer-events: none; }
#hud { transition: opacity .45s var(--ease); }

.panel {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--r);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

/* ---- top-left: identity + scene title */
#brand {
  top: calc(var(--pad) + var(--sat));
  left: calc(var(--pad) + var(--sal));
  max-width: min(46vw, 480px);
  pointer-events: none;
}
#brand .eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
}
#brand .eyebrow b { color: var(--ink-dim); font-weight: 600; letter-spacing: .26em; }
#brand .eyebrow i {
  font-style: normal;
  color: var(--accent);
  letter-spacing: .2em;
}
#scene-title {
  font-size: clamp(22px, 3.2vw, 38px);
  font-weight: 300;
  letter-spacing: .01em;
  line-height: 1.12;
  margin: 0;
  text-shadow: 0 2px 26px rgba(0, 0, 0, .55);
}
#scene-sub {
  margin: 7px 0 0;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
#scene-desc {
  margin: 12px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 40ch;
}
.title-swap { animation: titleIn .6s var(--ease) both; }
@keyframes titleIn {
  from { opacity: 0; transform: translateY(9px); }
  to   { opacity: 1; transform: none; }
}

/* ---- top-right: section switch */
#sections {
  top: calc(var(--pad) + var(--sat));
  right: calc(var(--pad) + var(--sar));
  display: flex;
  padding: 4px;
  gap: 2px;
}
#sections a {
  display: block;
  padding: 8px 15px;
  font-size: 11px;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  border-radius: 7px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
#sections a:hover { color: var(--ink); background: rgba(255, 255, 255, .07); }
#sections a[aria-current="page"] { color: #10131a; background: var(--accent); font-weight: 600; }

/* ---- bottom-left: scene stepper */
#stepper {
  left: calc(var(--pad) + var(--sal));
  bottom: calc(var(--pad) + var(--sab));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 9px;
}
#stepper .count {
  font-size: 12px;
  letter-spacing: .13em;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
  min-width: 56px;
  text-align: center;
}
#stepper .count b { color: var(--ink); font-weight: 500; }

/* ---- bottom-right: controls */
#controls {
  right: calc(var(--pad) + var(--sar));
  bottom: calc(var(--pad) + var(--sab));
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px;
}

.btn {
  touch-action: manipulation;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-dim);
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.btn:hover { background: rgba(255, 255, 255, .09); color: var(--ink); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.btn.wide { width: auto; padding: 0 13px; font-size: 10.5px; letter-spacing: .15em; text-transform: uppercase; font-weight: 600; }
.btn .tip {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-radius: 5px;
  background: var(--panel-solid);
  border: 1px solid var(--edge);
  color: var(--ink-dim);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.btn:hover .tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.sep { width: 1px; height: 20px; background: var(--edge); margin: 0 4px; }

/* ---- path track: where you are on the sequence */
#track {
  left: 50%;
  bottom: calc(var(--pad) + 74px + var(--sab));
  transform: translateX(-50%);
  width: min(52vw, 640px);
  height: 26px;
  pointer-events: none;
}
#track-line {
  position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; margin-top: -.5px;
  background: rgba(255, 255, 255, .22);
}
#track-fill {
  position: absolute; left: 0; top: 0; height: 100%; width: 0;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(200, 162, 106, .6);
  transition: width .12s linear;
}
#track-nodes { position: absolute; inset: 0; }
.node {
  position: absolute; top: 50%;
  width: 22px; height: 22px; margin: -11px 0 0 -11px;
  padding: 0; border: 0; background: transparent;
  cursor: pointer; pointer-events: auto;
}
.node::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .35);
  transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.node.done::before { background: var(--accent); }
.node.active::before { background: #fff; transform: scale(1.7); box-shadow: 0 0 0 4px rgba(255,255,255,.14); }
.node:hover::before { transform: scale(1.6); background: #fff; }
.node:focus-visible::before { box-shadow: 0 0 0 3px var(--accent); }
.node .ntip {
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 5px;
  background: var(--panel-solid); border: 1px solid var(--edge); color: var(--ink-dim);
  opacity: 0; pointer-events: none;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.node:hover .ntip, .node:focus-visible .ntip { opacity: 1; transform: translateX(-50%) translateY(0); }

#b-auto .i-pause { display: none; }
#b-auto[aria-pressed="true"] .i-play { display: none; }
#b-auto[aria-pressed="true"] .i-pause { display: block; }

/* ---- end card */
#endcard {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(4, 6, 9, .5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease), visibility .5s;
}
#endcard.on { opacity: 1; visibility: visible; }
#endcard .card {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 34px 36px 28px; text-align: center;
  background: var(--panel-solid); border: 1px solid var(--edge); border-radius: 16px;
  min-width: min(360px, 100%);
}
#endcard .kicker { font-size: 10px; letter-spacing: .34em; text-transform: uppercase; color: var(--accent); }
#endcard h2 { margin: 0 0 8px; font-size: 30px; font-weight: 200; }
.end-btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 14px 20px;
  border: 1px solid var(--edge); border-radius: 10px;
  background: rgba(255, 255, 255, .04); color: var(--ink);
  font: inherit; font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.end-btn:hover { background: rgba(255, 255, 255, .09); border-color: var(--accent); }
.end-btn.primary { color: #10131a; background: var(--accent); border-color: var(--accent); font-weight: 600; }
.end-btn.primary:hover { background: #d9b57e; }
.end-btn .arrow { font-size: 15px; }

/* ---- hint strip */
#hint {
  left: 50%;
  bottom: calc(var(--pad) + 110px);
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 9px 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .6s var(--ease);
  text-align: center;
}
#hint.on { opacity: 1; }
#hint kbd {
  font: inherit;
  color: var(--ink-dim);
  border: 1px solid var(--edge);
  border-radius: 4px;
  padding: 1px 5px;
  margin: 0 2px;
}

/* ------------------------------------------------------------------ cover */
#cover {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  text-align: center;
  background: #06080b;
  transition: opacity .8s var(--ease), visibility .8s;
}
#cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .34;
  filter: blur(2px) saturate(115%);
  transform: scale(1.06);
}
#cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(76% 62% at 50% 50%, rgba(6, 8, 11, .28) 0%, rgba(6, 8, 11, .92) 100%);
}
#cover > * { position: relative; z-index: 1; }
#cover.gone { opacity: 0; visibility: hidden; }

#cover .kicker {
  font-size: 10px;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--accent);
}
#cover h1 {
  margin: 0;
  font-size: clamp(34px, 6.4vw, 74px);
  font-weight: 200;
  letter-spacing: .015em;
  line-height: 1.04;
}
#cover h1 b { font-weight: 500; }
#cover p {
  margin: 0;
  max-width: 44ch;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-dim);
  padding: 0 24px;
}

#enter {
  position: relative;
  width: 132px; height: 132px;
  border-radius: 50%;
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, .03);
  color: var(--ink);
  cursor: pointer;
  font-size: 10.5px;
  letter-spacing: .26em;
  text-transform: uppercase;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}
#enter:hover:not(:disabled) { background: rgba(255, 255, 255, .09); border-color: var(--accent); transform: scale(1.04); }
#enter:disabled { cursor: progress; color: var(--ink-faint); }
#enter svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
#enter circle { fill: none; stroke-width: 1.5; }
#enter .track { stroke: rgba(255, 255, 255, .09); }
#enter .prog {
  stroke: var(--accent);
  stroke-linecap: round;
  transition: stroke-dashoffset .3s linear, opacity .4s var(--ease);
}
#enter .lbl { position: relative; z-index: 1; }

#cover .legend { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
#cover .legend span { display: inline-flex; align-items: center; gap: 9px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-dim); }
#cover .legend svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ modal */
#help {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 6, 9, .74);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
}
#help.on { opacity: 1; visibility: visible; }
#help .sheet {
  width: min(620px, 100%);
  max-height: 84vh;
  overflow-y: auto;
  padding: 30px 32px;
  border-radius: 14px;
  background: var(--panel-solid);
  border: 1px solid var(--edge);
}
#help h2 {
  margin: 0 0 22px;
  font-size: 12px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
#help dl { margin: 0; display: grid; grid-template-columns: 148px 1fr; gap: 13px 20px; align-items: baseline; }
#help dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
#help dd { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-dim); }
#help .close { position: absolute; top: 18px; right: 18px; }

/* ------------------------------------------------------------ loading bar */
#loadbar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  z-index: 30;
  opacity: 0;
  transition: width .3s var(--ease), opacity .4s var(--ease);
  box-shadow: 0 0 12px rgba(200, 162, 106, .7);
}
#loadbar.on { opacity: 1; }

#toast {
  position: fixed;
  left: 50%;
  top: calc(var(--pad) + 4px);
  transform: translate(-50%, -14px);
  z-index: 31;
  padding: 9px 16px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

#nogl {
  position: fixed; inset: 0; z-index: 60;
  display: none;
  align-items: center; justify-content: center;
  padding: 32px; text-align: center;
  background: var(--bg); color: var(--ink-dim);
  font-size: 14px; line-height: 1.6;
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  :root { --pad: 14px; --rail-w: 116px; }
  #brand { max-width: 62vw; }
  #scene-desc { display: none; }
  #hint { display: none; }
  #track { width: min(70vw, 640px); }
  #help dl { grid-template-columns: 1fr; gap: 3px 0; }
  #help dt { margin-top: 12px; }
}

@media (max-width: 760px) {
  /* narrow: drop secondary buttons so the toolbar never collides with the stepper */
  #b-ui { display: none; }
  .btn { width: 34px; height: 34px; }
  #stepper .count { min-width: 48px; font-size: 11px; }
  .btn .tip { display: none; }
}

@media (max-width: 620px) {
  #track { width: calc(100vw - 2 * var(--pad) - 4px); bottom: calc(var(--pad) + 62px + var(--sab)); }
  #hint { display: block; bottom: calc(var(--pad) + 100px + var(--sab)); font-size: 10px; padding: 7px 12px; }
  #endcard .card { padding: 26px 22px 22px; }
  .node .ntip { display: none; }
  #scene-title { font-size: 21px; }
  #brand .eyebrow { display: none; }             /* the section switch already names the section */
  #brand { max-width: calc(100vw - 2 * var(--pad) - 175px); }
  #sections { padding: 3px; }
  #sections a { padding: 6px 10px; font-size: 10px; letter-spacing: .12em; }
  #brand { max-width: calc(100vw - 2 * var(--pad) - 150px); }
  #controls { right: var(--pad); bottom: var(--pad); }
  #stepper { left: var(--pad); bottom: var(--pad); }
  #cover p { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .08s !important; }
}
