:root {
  color-scheme: dark;
  --accent: #6fb0d4;
  --accent-rgb: 111, 176, 212;
  --accent-deep: #2f6381;
  --ink: #f4f7f8;
  --muted: #8f9aa0;
  --line: rgba(255, 255, 255, 0.14);
  --panel: rgba(5, 10, 13, 0.84);
  --black: #030608;
  --topbar: 82px;
  font-family: "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; min-height: 100%; background: var(--black); }

body {
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: #030608;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-shell {
  position: relative;
  width: 100vw;
  height: 100dvh;
  min-height: 620px;
  overflow: hidden;
  background: #030608;
}

.topbar {
  position: fixed;
  z-index: 40;
  inset: 0 0 auto;
  height: var(--topbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 clamp(18px, 3vw, 44px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(3, 6, 8, 0.98), rgba(3, 6, 8, 0.82));
  backdrop-filter: blur(20px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  color: #fff;
  text-decoration: none;
}

.diama-logo-crop {
  position: relative;
  width: 122px;
  height: 33px;
  overflow: hidden;
}

.diama-logo-crop img {
  position: absolute;
  top: -46px;
  left: 0;
  width: 122px;
  height: 122px;
}

.brand-x {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 300;
}

.panic-logo-crop {
  position: relative;
  display: block;
  overflow: hidden;
  flex: 0 0 auto;
}

.panic-logo-crop img {
  position: absolute;
  left: 0;
  display: block;
  width: 100%;
  height: auto;
}

.panic-logo-header { width: 104px; height: 32px; }
.panic-logo-header img { top: -13px; }

.primary-nav {
  align-self: stretch;
  display: flex;
  align-items: stretch;
}

.nav-tab {
  position: relative;
  min-width: 128px;
  padding: 0 20px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  color: #77838a;
  background: transparent;
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease;
}

.nav-tab span {
  margin-right: 8px;
  color: rgba(var(--accent-rgb), 0.62);
  font-family: Consolas, monospace;
  font-size: 0.57rem;
}

.nav-tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.8);
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.nav-tab:hover,
.nav-tab:focus-visible,
.nav-tab.is-active { color: #fff; outline: none; background: rgba(var(--accent-rgb), 0.06); }
.nav-tab.is-active::after { transform: scaleX(1); }

.viewer {
  position: fixed;
  z-index: 0;
  inset: 0;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% -12%, rgba(222, 244, 255, 0.12), transparent 47%),
    radial-gradient(circle at 52% 46%, rgba(var(--accent-rgb), 0.12), transparent 26%),
    linear-gradient(180deg, #091016 0%, #030608 74%);
}

#sceneCanvas {
  position: absolute;
  z-index: 4;
  inset: var(--topbar) 0 0;
  width: 100%;
  height: calc(100% - var(--topbar));
  touch-action: none;
  cursor: grab;
  opacity: 1;
  transition: opacity 280ms ease, filter 280ms ease;
}

#sceneCanvas:active { cursor: grabbing; }
#sceneCanvas.is-switching { opacity: 0.2; filter: blur(5px); }

.atmosphere {
  position: absolute;
  inset: var(--topbar) 0 0;
  overflow: hidden;
  pointer-events: none;
  perspective: 900px;
}

.room-back-wall {
  position: absolute;
  inset: 0 13% 31%;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 15%),
    linear-gradient(180deg, #0b1115 0%, #070b0e 72%, #05080a 100%);
  box-shadow: inset 0 -60px 100px rgba(0, 0, 0, 0.5), inset 0 0 80px rgba(var(--accent-rgb), 0.045);
}

.room-side {
  position: absolute;
  top: 0;
  bottom: 18%;
  width: 24%;
  background: linear-gradient(180deg, #090f13 0%, #030608 88%);
  opacity: 0.96;
}

.room-side-left { left: 0; clip-path: polygon(0 0, 100% 0, 55% 100%, 0 100%); border-right: 1px solid rgba(255, 255, 255, 0.045); }
.room-side-right { right: 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 45% 100%); border-left: 1px solid rgba(255, 255, 255, 0.045); }

.room-floor {
  position: absolute;
  top: 68%;
  right: -12%;
  bottom: -28%;
  left: -12%;
  background: linear-gradient(180deg, #081014 0%, #020405 72%);
  transform: perspective(680px) rotateX(61deg);
  transform-origin: top center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 50px 100px rgba(0, 0, 0, 0.6);
}

.light-column {
  position: absolute;
  top: -25%;
  width: 260px;
  height: 110%;
  filter: blur(48px);
  opacity: 0.11;
}

.light-column-a { left: 17%; background: linear-gradient(180deg, var(--accent), transparent 80%); transform: rotate(18deg); }
.light-column-b { right: 14%; background: linear-gradient(180deg, #5e6cff, transparent 75%); transform: rotate(-14deg); opacity: 0.07; }

.floor-grid {
  position: absolute;
  right: -20%;
  bottom: -35%;
  left: -20%;
  height: 57%;
  opacity: 0.13;
  transform: perspective(620px) rotateX(66deg);
  transform-origin: bottom center;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.28) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse at center, black 0, transparent 68%);
}

.floor-ring {
  position: absolute;
  left: 50%;
  bottom: -3%;
  width: min(42vw, 570px);
  height: 140px;
  transform: translateX(-50%) perspective(720px) rotateX(64deg);
  transform-style: preserve-3d;
  border: 2px solid rgba(var(--accent-rgb), 0.72);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(var(--accent-rgb), 0.08) 0 46%, rgba(0, 0, 0, 0.18) 48% 64%, rgba(var(--accent-rgb), 0.11) 66% 68%, transparent 70%);
  box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.42), inset 0 0 38px rgba(var(--accent-rgb), 0.16);
  opacity: 0.82;
}

.floor-ring::before,
.floor-ring::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.floor-ring::before { inset: 9%; border: 1px solid rgba(var(--accent-rgb), 0.5); box-shadow: inset 0 0 22px rgba(var(--accent-rgb), 0.2); }
.floor-ring::after { inset: -4%; transform: translateZ(-24px); border: 10px solid rgba(7, 10, 12, 0.94); box-shadow: 0 20px 28px rgba(0, 0, 0, 0.9), 0 0 18px rgba(var(--accent-rgb), 0.16); }
.floor-ring span { position: absolute; inset: 34%; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 50%; box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.28); }

.model-shadow {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 3%;
  width: 176px;
  height: 36px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.95) 0 24%, rgba(0, 0, 0, 0.66) 45%, transparent 72%);
  filter: blur(9px);
  opacity: 0.82;
}

.scanlines,
.vignette { position: absolute; z-index: 5; inset: var(--topbar) 0 0; pointer-events: none; }
.scanlines { opacity: 0.045; background: repeating-linear-gradient(0deg, transparent 0 3px, #fff 4px); }
.vignette { background: radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.68) 100%); }

.loading-state,
.error-state {
  position: absolute;
  z-index: 32;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  text-align: center;
}

.loading-state { transition: opacity 300ms ease; }
.loading-state.is-hidden { opacity: 0; pointer-events: none; }
.loader-ring { width: 54px; height: 54px; border: 1px solid rgba(255, 255, 255, 0.12); border-top-color: var(--accent); border-radius: 50%; box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.18); animation: spin 1s linear infinite; }
.loading-state p { margin: 16px 0 0; color: #9aa5ab; font: 700 0.68rem Consolas, monospace; letter-spacing: 0.16em; text-transform: uppercase; }
.error-state strong { margin-bottom: 14px; }
.error-state button { padding: 9px 15px; border: 1px solid var(--accent); color: var(--accent); background: transparent; cursor: pointer; }

.model-index {
  position: absolute;
  z-index: 9;
  left: 50%;
  bottom: 27px;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.model-buttons { display: flex; gap: 6px; }

.model-button {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: #77838a;
  background: rgba(4, 8, 10, 0.76);
  font: 800 0.54rem Consolas, monospace;
  cursor: pointer;
  transition: 180ms ease;
}

.model-button:hover,
.model-button:focus-visible { border-color: rgba(var(--accent-rgb), 0.7); color: #fff; outline: none; transform: translateY(-2px); }
.model-button.is-active { border-color: var(--accent); color: var(--accent); background: rgba(var(--accent-rgb), 0.12); box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.22); }

.scene-tools {
  position: absolute;
  z-index: 9;
  right: 30px;
  top: calc(var(--topbar) + 20px);
  display: flex;
  gap: 8px;
}

.swatch { width: 21px; height: 21px; padding: 0; border: 2px solid transparent; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 4px #0b0f12; }
.swatch.is-active { border-color: #f5fbff; }
.swatch-green { background: #78ff68; }
.swatch-blue { background: #6fb0d4; }
.swatch-pink { background: #ff4fd8; }

.view-stage {
  position: fixed;
  z-index: 12;
  inset: var(--topbar) 0 0;
  pointer-events: none;
}

.view {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 280ms ease, transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 280ms;
}

.view.is-active { opacity: 1; visibility: visible; transform: translateY(0); }
.view:not(.lineup-view).is-active { pointer-events: auto; }
body[data-active-view="location"] #sceneCanvas,
body[data-active-view="location"] .model-index,
body[data-active-view="location"] .scene-tools,
body[data-active-view="location"] .loading-state,
body[data-active-view="location"] .error-state {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.view-kicker {
  position: absolute;
  top: clamp(24px, 4vh, 48px);
  left: clamp(24px, 4vw, 62px);
  display: grid;
  gap: 7px;
  font: 700 0.61rem Consolas, monospace;
  letter-spacing: 0.18em;
}

.view-kicker span { color: var(--accent); }
.view-kicker b { color: rgba(255, 255, 255, 0.52); }

.lineup-list {
  position: absolute;
  z-index: 3;
  top: 18%;
  right: clamp(62px, 9vw, 150px);
  bottom: 17%;
  left: clamp(62px, 9vw, 150px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: center;
  gap: clamp(10px, 2vh, 24px) clamp(90px, 18vw, 300px);
  margin: 0;
  padding: 0;
  list-style: none;
  perspective: 900px;
}

.lineup-item {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0;
  text-transform: uppercase;
  transform-style: preserve-3d;
  animation: lineupIn 700ms both;
}

.lineup-item:nth-child(even) { justify-content: flex-end; text-align: right; transform: rotateY(-7deg) translateZ(48px); }
.lineup-item:nth-child(odd) { transform: rotateY(7deg) translateZ(48px); }
.lineup-item:nth-child(2) { animation-delay: 60ms; }
.lineup-item:nth-child(3) { animation-delay: 120ms; }
.lineup-item:nth-child(4) { animation-delay: 180ms; }
.lineup-item:nth-child(5) { animation-delay: 240ms; }
.lineup-item:nth-child(6) { animation-delay: 300ms; }

.lineup-item div { min-width: 0; }
.lineup-item strong {
  display: block;
  color: #f7fbfd;
  font: 900 clamp(29px, 3.9vw, 66px)/0.88 "Inter", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.07em;
  white-space: nowrap;
  text-shadow:
    1px 1px 0 #7daac1,
    2px 2px 0 #53798d,
    3px 3px 0 #304c5c,
    6px 9px 22px rgba(0, 0, 0, 0.88),
    0 0 16px rgba(var(--accent-rgb), 0.18);
}

.visual-credit,
.event-stamp {
  position: absolute;
  bottom: clamp(24px, 4vh, 48px);
  display: grid;
  gap: 6px;
  font-family: Consolas, monospace;
}

.visual-credit { left: clamp(24px, 4vw, 62px); }
.event-stamp { right: clamp(72px, 7vw, 112px); text-align: right; }
.visual-credit span,
.event-stamp span { color: var(--accent); font-size: 0.56rem; font-weight: 700; letter-spacing: 0.19em; }
.visual-credit strong { font-size: clamp(22px, 2.4vw, 36px); letter-spacing: 0.08em; }
.event-stamp strong { font-size: clamp(12px, 1.1vw, 17px); letter-spacing: 0.1em; }

.register-view {
  display: grid;
  grid-template-columns: minmax(220px, 0.48fr) minmax(520px, 1.52fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  padding: clamp(28px, 5vw, 78px);
}

.panel-heading span,
.location-copy > span { color: var(--accent); font: 700 0.63rem Consolas, monospace; letter-spacing: 0.2em; }
.panel-heading h2,
.location-copy h2 { margin: 17px 0; font: 900 clamp(60px, 8vw, 128px)/0.78 Impact, "Arial Narrow", sans-serif; letter-spacing: -0.035em; text-transform: uppercase; text-shadow: 5px 5px 0 #315b71, 10px 12px 28px #000; }
.panel-heading p { max-width: 360px; color: #aab3b8; line-height: 1.6; }

.ticket-portal {
  position: relative;
  width: min(100%, 760px);
  min-height: 460px;
  justify-self: end;
  overflow: hidden;
  padding: clamp(26px, 3.7vw, 48px);
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  color: #edf8fc;
  background:
    linear-gradient(145deg, rgba(10, 23, 30, 0.86), rgba(2, 7, 10, 0.74)),
    radial-gradient(circle at 92% 8%, rgba(var(--accent-rgb), 0.2), transparent 42%);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.48), inset 0 0 55px rgba(var(--accent-rgb), 0.045);
  backdrop-filter: blur(24px) saturate(0.76);
}

.ticket-portal::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 28%, rgba(255, 255, 255, 0.9) 50%, var(--accent) 72%, transparent);
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.68);
}

.ticket-portal-header { display: flex; align-items: center; gap: 14px; padding-bottom: 22px; border-bottom: 1px solid rgba(var(--accent-rgb), 0.2); }
.ticket-provider-mark { display: flex; align-items: center; justify-content: center; gap: 5px; width: 58px; height: 46px; flex: 0 0 auto; border: 1px solid rgba(var(--accent-rgb), 0.38); background: rgba(1, 6, 9, 0.42); }
.ticket-provider-mark span { color: #f5fbfd; font: 900 20px/1 Impact, sans-serif; }
.ticket-provider-mark i { color: var(--accent); font: 800 12px/1 Consolas, monospace; }
.ticket-portal-header > div:nth-child(2) { display: grid; gap: 4px; }
.ticket-portal-header > div:nth-child(2) span { color: #f5fbfd; font: 900 clamp(0.8rem, 1.4vw, 1rem) "Inter", Arial, sans-serif; letter-spacing: -0.02em; }
.ticket-portal-header > div:nth-child(2) strong { color: rgba(222, 240, 248, 0.48); font: 700 0.48rem Consolas, monospace; letter-spacing: 0.18em; }
.sale-status { margin-left: auto; padding: 8px 11px; border: 1px solid rgba(var(--accent-rgb), 0.45); color: var(--accent); background: rgba(var(--accent-rgb), 0.08); font: 800 0.52rem Consolas, monospace; letter-spacing: 0.15em; }

.ticket-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.ticket-option { min-height: 112px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 18px; border: 1px solid rgba(var(--accent-rgb), 0.16); background: rgba(0, 5, 8, 0.36); }
.ticket-option.is-featured { border-color: rgba(var(--accent-rgb), 0.46); background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.14), rgba(0, 5, 8, 0.38)); }
.ticket-option > div { display: grid; gap: 7px; }
.ticket-option > div span { color: #f4fbfd; font: 850 clamp(0.65rem, 1.3vw, 0.82rem) "Inter", Arial, sans-serif; letter-spacing: 0.04em; }
.ticket-option > div small { color: rgba(216, 237, 246, 0.43); font: 700 0.47rem Consolas, monospace; letter-spacing: 0.14em; }
.ticket-option > strong { display: grid; justify-items: end; color: #fff; text-align: right; white-space: nowrap; font: 900 clamp(1rem, 2vw, 1.32rem) "Inter", Arial, sans-serif; letter-spacing: -0.04em; }
.ticket-option > strong small { margin-top: 6px; color: rgba(216, 237, 246, 0.42); font: 700 0.43rem Consolas, monospace; letter-spacing: 0.12em; }

.ticket-checkout { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 12px; padding: 0 22px; border: 1px solid rgba(255, 255, 255, 0.64); color: #02080b; background: linear-gradient(105deg, #edf9fd 0%, var(--accent) 72%, #eefaff 140%); text-decoration: none; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.36), 0 0 30px rgba(var(--accent-rgb), 0.12); transition: transform 170ms ease, filter 170ms ease, box-shadow 170ms ease; }
.ticket-checkout span { font: 900 clamp(0.72rem, 1.4vw, 0.88rem) "Inter", Arial, sans-serif; letter-spacing: 0.08em; }
.ticket-checkout svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ticket-checkout:hover,
.ticket-checkout:focus-visible { outline: none; filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 21px 46px rgba(0, 0, 0, 0.42), 0 0 34px rgba(var(--accent-rgb), 0.24); }

.ticket-trust { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 2px 13px; border-bottom: 1px solid rgba(var(--accent-rgb), 0.13); }
.ticket-trust span { display: flex; align-items: center; gap: 7px; color: rgba(223, 241, 248, 0.62); font: 700 0.47rem Consolas, monospace; letter-spacing: 0.12em; }
.ticket-trust i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px rgba(var(--accent-rgb), 0.85); }
.ticket-disclaimer { margin: 13px 0 0; color: rgba(220, 238, 246, 0.38); font-size: 0.61rem; letter-spacing: 0.02em; }
.ticket-disclaimer strong { color: rgba(231, 245, 250, 0.67); }

.location-view {
  display: grid;
  place-items: center;
  padding: clamp(18px, 3vw, 46px);
}

.haunted-threshold {
  position: relative;
  isolation: isolate;
  width: min(100%, 660px, calc(100dvh - var(--topbar) - 70px));
  aspect-ratio: 1.08;
  justify-self: center;
  overflow: hidden;
  color: inherit;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(var(--accent-rgb), 0.09), transparent 38%),
    linear-gradient(180deg, rgba(7, 15, 20, 0.08), rgba(2, 5, 7, 0.8));
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.26);
  mask-image: linear-gradient(to bottom, black 0 91%, transparent 100%);
  transform: translateY(clamp(42px, 7vh, 68px));
}

.portal-secret-label { position: absolute; z-index: 7; top: 5.5%; left: 50%; margin: 0; color: rgba(229, 244, 250, 0.78); font: 700 clamp(0.56rem, 1vw, 0.72rem) Consolas, monospace; letter-spacing: 0.26em; white-space: nowrap; transform: translateX(-50%); text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.42); }

.dead-branches { position: absolute; z-index: 4; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: #020405; stroke-width: 17; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(var(--accent-rgb), 0.32)); pointer-events: none; }
.bat-flight { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; fill: rgba(1, 4, 6, 0.9); filter: drop-shadow(0 0 5px rgba(var(--accent-rgb), 0.38)); animation: batFloat 5s ease-in-out infinite; pointer-events: none; }

.portal-arch { position: absolute; z-index: 3; left: 50%; bottom: 5%; width: 43%; height: 69%; transform: translateX(-50%); padding: 13px; border: 1px solid rgba(205, 237, 250, 0.44); border-radius: 50% 50% 7% 7% / 30% 30% 4% 4%; background: linear-gradient(105deg, #0a1217, #315568 48%, #081015 54%, #1a3543); box-shadow: 0 0 0 7px rgba(4, 10, 14, 0.88), 0 0 0 8px rgba(var(--accent-rgb), 0.32), 0 0 42px rgba(var(--accent-rgb), 0.25), inset 0 0 22px #000; }
.portal-arch::before,
.portal-arch::after { content: ""; position: absolute; pointer-events: none; }
.portal-arch::before { inset: 22px; border: 1px solid rgba(var(--accent-rgb), 0.24); border-radius: inherit; }
.portal-arch::after { right: 50%; bottom: -9%; left: 50%; width: 168%; height: 17%; transform: translateX(-50%); border: 1px solid rgba(var(--accent-rgb), 0.3); border-radius: 50%; background: radial-gradient(ellipse, rgba(var(--accent-rgb), 0.12), rgba(0, 0, 0, 0.84) 64%); box-shadow: 0 0 30px rgba(var(--accent-rgb), 0.16); }

.portal-core { position: relative; z-index: 1; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 50% 50% 5% 5% / 29% 29% 3% 3%; background: radial-gradient(circle at 50% 35%, rgba(var(--accent-rgb), 0.18), rgba(1, 4, 6, 0.66) 50%, rgba(0, 0, 0, 0.88)); box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.9), inset 0 0 18px rgba(var(--accent-rgb), 0.14); }

.portal-countdown { display: flex; align-items: center; justify-content: center; gap: clamp(3px, 0.5vw, 7px); width: calc(100% - 22px); }
.portal-countdown > div { display: grid; justify-items: center; }
.portal-countdown strong { color: rgba(242, 250, 253, 0.96); font: 850 clamp(17px, 2.25vw, 30px)/1 "Inter", Arial, sans-serif; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.4); }
.portal-countdown i { align-self: flex-start; margin-top: 4px; color: rgba(220, 240, 248, 0.32); font: normal 700 clamp(13px, 1.5vw, 21px)/1 Consolas, monospace; }

.portal-location-reveal { position: relative; z-index: 8; width: min(76%, 230px); text-align: center; }
.portal-location-reveal > span { display: block; color: var(--accent); font: 700 0.39rem Consolas, monospace; letter-spacing: 0.14em; }
.portal-location-reveal > strong { display: block; margin: 9px 0 7px; color: #fff; font: 900 clamp(20px, 2.5vw, 34px)/0.9 "Inter", Arial, sans-serif; letter-spacing: -0.055em; }
.portal-location-reveal p { margin: 0 0 14px; color: rgba(229, 243, 248, 0.66); font-size: clamp(0.48rem, 0.72vw, 0.62rem); line-height: 1.45; }
.portal-location-reveal a { position: relative; z-index: 9; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 8px; border: 0; color: #f3fbfe; background: transparent; text-decoration: none; font: 850 clamp(0.58rem, 0.86vw, 0.74rem) "Inter", Arial, sans-serif; letter-spacing: 0.11em; text-shadow: 0 0 16px rgba(var(--accent-rgb), 0.72); pointer-events: auto; cursor: pointer; }
.portal-location-reveal a:hover, .portal-location-reveal a:focus-visible { outline: none; color: var(--accent); background: transparent; text-shadow: 0 0 22px rgba(var(--accent-rgb), 0.95); }

.fog-bands { position: absolute; z-index: 5; right: -12%; bottom: 0; left: -12%; height: 29%; overflow: hidden; pointer-events: none; }
.fog-bands i { position: absolute; left: -20%; width: 140%; height: 48%; border-radius: 50%; background: radial-gradient(ellipse, rgba(143, 192, 215, 0.18), transparent 64%); filter: blur(13px); animation: fogDrift 8s ease-in-out infinite alternate; }
.fog-bands i:nth-child(1) { bottom: 2%; }
.fog-bands i:nth-child(2) { bottom: 22%; animation-duration: 11s; animation-direction: alternate-reverse; opacity: 0.7; }
.fog-bands i:nth-child(3) { bottom: -13%; animation-duration: 14s; opacity: 0.85; }

.graveyard { position: absolute; z-index: 2; right: 4%; bottom: 3%; left: 4%; height: 22%; pointer-events: none; }
.graveyard i { position: absolute; bottom: 0; width: 6%; height: 44%; border-radius: 48% 48% 5% 5%; background: #020405; box-shadow: 0 0 3px rgba(var(--accent-rgb), 0.3); }
.graveyard i::after { content: ""; position: absolute; right: -40%; bottom: 0; left: -40%; height: 8px; border-radius: 50%; background: #020405; }
.graveyard i:nth-child(1) { left: 5%; height: 53%; transform: rotate(-5deg); }
.graveyard i:nth-child(2) { left: 18%; width: 5%; height: 32%; transform: rotate(4deg); }
.graveyard i:nth-child(3) { right: 17%; width: 5%; height: 37%; transform: rotate(-4deg); }
.graveyard i:nth-child(4) { right: 4%; height: 56%; transform: rotate(6deg); }

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 28px;
  max-width: calc(100% - 30px);
  padding: 12px 17px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: #fff;
  background: rgba(19, 54, 72, 0.95);
  font: 700 0.58rem Consolas, monospace;
  letter-spacing: 0.11em;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translate(-50%, 15px);
  pointer-events: none;
  transition: 250ms ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes lineupIn { from { opacity: 0; filter: blur(7px); translate: 0 15px; } to { opacity: 1; filter: blur(0); translate: 0 0; } }
@keyframes batFloat { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(8px, -9px); } }
@keyframes fogDrift { from { transform: translateX(-5%) scaleX(0.96); } to { transform: translateX(7%) scaleX(1.04); } }

@media (max-width: 1050px) {
  .nav-tab { min-width: 108px; padding: 0 12px; }
  .lineup-list { right: 76px; left: 76px; gap-inline: 130px; }
  .register-view { grid-template-columns: 1fr; align-content: center; gap: 24px; overflow-y: auto; }
  .panel-heading { display: flex; align-items: baseline; gap: 16px; }
  .panel-heading h2 { margin: 0; font-size: 60px; }
  .panel-heading p { display: none; }
  .ticket-portal { min-height: 430px; justify-self: center; }
  .location-view { padding: 24px; }
  .haunted-threshold { width: min(100%, 520px, calc(100dvh - var(--topbar) - 70px)); }
}

@media (max-width: 760px) {
  :root { --topbar: 66px; }
  .app-shell { min-height: 560px; }
  .topbar { align-items: center; padding: 0 12px; backdrop-filter: none; }
  .brand-lockup { gap: 7px; }
  .diama-logo-crop { width: 88px; height: 25px; }
  .diama-logo-crop img { top: -33px; width: 88px; height: 88px; }
  .panic-logo-header { width: 72px; height: 23px; }
  .panic-logo-header img { top: -9px; }
  .primary-nav { position: fixed; z-index: 41; right: 0; bottom: 0; left: 0; height: 62px; background: rgba(3, 6, 8, 0.94); backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
  .nav-tab { flex: 1; min-width: 0; padding: 0 6px; border-left: 0; font-size: 0.57rem; }
  .nav-tab span { display: block; margin: 0 0 4px; }
  .nav-tab::after { top: -1px; bottom: auto; }
  #sceneCanvas { height: calc(100% - var(--topbar) - 62px); }
  .viewer::after { content: ""; position: absolute; z-index: 6; right: 0; bottom: 0; left: 0; height: 62px; background: #030608; }
  .view-stage { bottom: 62px; }
  .scanlines, .vignette, .atmosphere { bottom: 62px; }
  .model-index { display: none; }
  .scene-tools { top: calc(var(--topbar) + 14px); right: 14px; }
  .floor-ring { bottom: 8%; width: 76vw; height: 110px; }
  .model-shadow { bottom: 14%; }
  .view-kicker { top: 18px; left: 17px; }
  .lineup-list { top: 18%; right: 16px; bottom: 18%; left: 16px; gap: 9px 18px; }
  .lineup-item { gap: 0; }
  .lineup-item:nth-child(even),
  .lineup-item:nth-child(odd) { transform: translateZ(36px); }
  .lineup-item strong { font-size: clamp(24px, 7.4vw, 39px); text-shadow: 1px 1px 0 #7daac1, 2px 2px 0 #53798d, 4px 7px 18px #000; }
  .visual-credit { left: 16px; bottom: 16px; }
  .event-stamp { right: 16px; bottom: 16px; }
  .event-stamp strong { max-width: 180px; font-size: 0.58rem; }
  .register-view { display: block; padding: 20px 16px 45px; overflow-y: auto; }
  .panel-heading { margin-bottom: 20px; }
  .panel-heading span { display: none; }
  .panel-heading h2 { font-size: 54px; }
  .ticket-portal { min-height: 0; padding: 20px; box-shadow: 0 22px 55px rgba(0, 0, 0, 0.42); }
  .ticket-options { grid-template-columns: 1fr; }
  .ticket-option { min-height: 86px; }
  .location-view { place-items: center; padding: 12px 18px 34px; overflow: hidden; }
  .haunted-threshold { width: min(100%, 390px, calc(100dvh - var(--topbar) - 130px)); }
  .portal-secret-label { top: 4.5%; font-size: 0.5rem; }
  .portal-arch { padding: 9px; }
  .portal-arch::before { inset: 15px; }
  .portal-countdown { width: calc(100% - 12px); gap: 3px; }
  .portal-countdown strong { font-size: clamp(13px, 4vw, 18px); }
  .portal-countdown i { font-size: 11px; }
  .portal-location-reveal { width: min(82%, 190px); }
  .portal-location-reveal > strong { font-size: 17px; }
  .portal-location-reveal p { margin-bottom: 9px; font-size: 0.42rem; }
  .portal-location-reveal a { min-height: 44px; font-size: 0.55rem; }
  .toast { bottom: 76px; }
}

@media (max-width: 520px) {
  .topbar { justify-content: center; }
  .brand-lockup { transform: scale(0.92); }
  .lineup-list { right: 10px; left: 10px; align-content: center; gap-inline: 10px; }
  .lineup-item strong { font-size: clamp(21px, 6.9vw, 31px); }
  .visual-credit strong { font-size: 18px; }
  .ticket-portal-header { gap: 10px; }
  .ticket-provider-mark { width: 48px; }
  .sale-status { padding: 7px 8px; font-size: 0.46rem; }
  .ticket-option { padding: 14px; }
  .ticket-checkout { min-height: 58px; padding: 0 16px; }
  .ticket-trust { gap: 8px; }
  .ticket-trust span { font-size: 0.4rem; letter-spacing: 0.08em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
