:root {
  --bg-0: #07061a;
  --bg-1: #120c35;
  --bg-2: #1e1258;
  --ink: #f5f2ff;
  --muted: rgba(228, 222, 255, 0.7);
  --faint: rgba(228, 222, 255, 0.45);
  --line: rgba(255, 255, 255, 0.12);
  --gold-1: #fff0bf;
  --gold-2: #f2c86b;
  --gold-3: #c98f2a;
  --green: #5ff0a8;
  --red: #ff3b5c;
  --violet: #7b5cff;
  --blue: #3f7bff;
  --ticket-ink: #1a1240;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-line: rgba(185, 166, 255, 0.3);
  --grad: linear-gradient(115deg, #2f6bff 0%, #5b4bff 45%, #9a3dff 100%);
  --radius: 22px;
  --pad: 18px;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR",
    "Malgun Gothic", "Hiragino Sans", "Noto Sans JP", "PingFang SC", "Noto Sans SC",
    "Microsoft YaHei", "Segoe UI", Roboto, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg-0);
  overflow-x: hidden;
}

html.sheet-open { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.4;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(120% 60% at 50% -10%, #3a1d8f 0%, rgba(58, 29, 143, 0) 60%),
    radial-gradient(90% 50% at 100% 30%, rgba(63, 123, 255, 0.28) 0%, rgba(63, 123, 255, 0) 70%),
    radial-gradient(90% 60% at 0% 80%, rgba(170, 70, 255, 0.24) 0%, rgba(170, 70, 255, 0) 70%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  background-attachment: fixed;
  padding:
    max(10px, env(safe-area-inset-top))
    max(10px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
}

:lang(ko) { word-break: keep-all; }
:lang(ja), :lang(zh) { line-break: strict; }
:lang(ja) { word-break: auto-phrase; }
.card, .sheet { overflow-wrap: break-word; }

button, a { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
p, h2, dl, dd, ol, ul { margin: 0; }
svg { display: block; }

:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 12px; }

/* Starfield: two tiled SVG layers, the second twinkles. */
.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='12' cy='18' r='.7' opacity='.7'/%3E%3Ccircle cx='70' cy='44' r='.5' opacity='.5'/%3E%3Ccircle cx='150' cy='12' r='.8' opacity='.8'/%3E%3Ccircle cx='200' cy='90' r='.6' opacity='.6'/%3E%3Ccircle cx='110' cy='120' r='.5' opacity='.4'/%3E%3Ccircle cx='30' cy='160' r='.8' opacity='.7'/%3E%3Ccircle cx='175' cy='190' r='.5' opacity='.5'/%3E%3Ccircle cx='90' cy='205' r='.6' opacity='.6'/%3E%3C/g%3E%3C/svg%3E");
}
.sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='340' height='420'%3E%3Cg fill='%23ffe7a3'%3E%3Cpath d='M60 40l1.2 3 3 .3-2.3 2 .7 3-2.6-1.6-2.6 1.6.7-3-2.3-2 3-.3z'/%3E%3Cpath d='M280 150l1 2.4 2.5.2-1.9 1.6.6 2.5-2.2-1.3-2.2 1.3.6-2.5-1.9-1.6 2.5-.2z'/%3E%3Cpath d='M130 330l1.2 3 3 .3-2.3 2 .7 3-2.6-1.6-2.6 1.6.7-3-2.3-2 3-.3z'/%3E%3C/g%3E%3Cg fill='%23fff'%3E%3Ccircle cx='220' cy='60' r='1.1'/%3E%3Ccircle cx='30' cy='260' r='1'/%3E%3Ccircle cx='310' cy='360' r='1.2'/%3E%3C/g%3E%3C/svg%3E");
  animation: twinkle 5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.35; } to { opacity: 1; } }

/* Phone card */
.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: var(--pad) var(--pad) 14px;
  border-radius: 30px;
  background:
    radial-gradient(140% 50% at 50% 0%, rgba(123, 92, 255, 0.22) 0%, rgba(123, 92, 255, 0) 70%),
    linear-gradient(180deg, rgba(34, 22, 92, 0.78) 0%, rgba(14, 10, 42, 0.86) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(242, 200, 107, 0.06) inset,
    0 30px 80px -20px rgba(0, 0, 0, 0.7),
    0 0 60px -10px rgba(123, 92, 255, 0.35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.ready .card { opacity: 1; transform: none; }

/* Header */
.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.brand { min-width: 0; }
.wordmark {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  white-space: nowrap;
}
.wordmark span {
  background: linear-gradient(180deg, var(--gold-1) 0%, var(--gold-2) 48%, var(--gold-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(242, 200, 107, 0.25));
}
.trophy { width: 24px; height: 24px; fill: var(--gold-2); flex: none; filter: drop-shadow(0 0 6px rgba(242, 200, 107, 0.45)); }
.nfc {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  color: var(--green);
  white-space: nowrap;
}
.nfc-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(95, 240, 168, 0.18), 0 0 10px rgba(95, 240, 168, 0.7);
}

.lang {
  display: flex;
  flex: none;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
}
.lang button {
  min-width: 34px;
  height: 30px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}
.lang button[aria-pressed="true"] {
  color: var(--ticket-ink);
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
  box-shadow: 0 2px 10px rgba(242, 200, 107, 0.35);
}

.eventline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.16em;
  color: var(--gold-1);
  background: linear-gradient(90deg, rgba(242, 200, 107, 0) 0%, rgba(242, 200, 107, 0.12) 50%, rgba(242, 200, 107, 0) 100%);
  border-top: 1px solid rgba(242, 200, 107, 0.18);
  border-bottom: 1px solid rgba(242, 200, 107, 0.18);
  white-space: nowrap;
}
.eventline .spark { color: var(--gold-2); font-size: 10px; letter-spacing: 0; }
.eventline .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--gold-2); }

/* Greeting */
.greet { display: flex; gap: 10px; align-items: stretch; }
.guide {
  flex: 0 0 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 20px;
}
.guide-slot {
  position: relative;
  width: 92px;
  height: 104px;
  display: grid;
  place-items: center;
  border-radius: 46px 46px 26px 26px;
  background:
    radial-gradient(60% 50% at 50% 40%, rgba(123, 160, 255, 0.35), rgba(123, 160, 255, 0) 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1.5px dashed rgba(242, 200, 107, 0.55);
  transition: transform 0.2s ease;
}
.guide:active .guide-slot { transform: scale(0.96); }
.guide-slot.has-art { border: 0; background: none; }
.guide-slot[data-character] { overflow: hidden; }
.guide-3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.guide-placeholder { transition: opacity 0.3s ease; }
.guide-slot.has-3d { border-style: solid; border-color: rgba(242, 200, 107, 0.35); }
.guide-host {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.guide-host .guide-3d { inset: 0 auto auto 0; }
.guide-host.on .guide-3d { opacity: 1; }
.guide-slot.has-3d .guide-placeholder { opacity: 0; }
.guide-slot.has-art img { width: 100%; height: 100%; object-fit: contain; }
.guide-placeholder { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 6px; text-align: center; }
.ph-star { font-size: 22px; color: var(--gold-2); text-shadow: 0 0 12px rgba(242, 200, 107, 0.7); animation: ph-pulse 1.4s ease-in-out infinite; }
@keyframes ph-pulse { 0%, 100% { opacity: 0.45; transform: scale(0.9); } 50% { opacity: 1; transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .ph-star { animation: none; } }
.ph-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--gold-1);
  text-transform: uppercase;
  line-height: 1.2;
}
.guide-tap {
  font-size: 10px;
  font-weight: 600;
  color: var(--faint);
  text-align: center;
  line-height: 1.2;
}

.bubble {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 12px 14px 12px;
  border-radius: 18px;
  background: #fbfaff;
  color: var(--ticket-ink);
  font-size: 13.5px;
  line-height: 1.45;
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bubble::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 34px;
  width: 16px;
  height: 16px;
  background: inherit;
  border-radius: 3px;
  transform: rotate(45deg);
}
.bubble-hello { font-weight: 800; font-size: 14.5px; }
.bubble b { color: #5a35e8; font-weight: 800; }.chip {
  align-self: flex-start;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px 7px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 750;
  color: #fff;
  background: linear-gradient(90deg, #4a6bff, #8a4dff);
  box-shadow: 0 6px 16px -6px rgba(110, 80, 255, 0.8);
}
.chip svg { width: 13px; height: 13px; }

/* Ticket */
.ticket-wrap { filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.45)); }
.ticket {
  --notch: 11px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 16px 14px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f1ff 100%);
  color: var(--ticket-ink);
  border-radius: 18px;
  -webkit-mask:
    radial-gradient(circle var(--notch) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
    radial-gradient(circle var(--notch) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
}
.ticket > div {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.ticket > div + div::before {
  content: "/";
  position: absolute;
  left: 0;
  bottom: 2px;
  transform: translateX(-50%);
  font-size: 34px;
  font-weight: 300;
  line-height: 1;
  color: #cfc8ea;
}
.ticket dt {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.14em;
  color: #8a82b5;
}
.ticket dd {
  font-size: 46px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #2a1a78 0%, #5a35e8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Light lower panel; the AI banner straddles its top edge. */
.lower {
  --lift: 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 4px calc(-1 * var(--pad)) -14px;
  padding: 0 var(--pad) 14px;
  color: var(--ticket-ink);
  isolation: isolate;
}
.lower::before {
  content: "";
  position: absolute;
  inset: var(--lift) 0 0;
  z-index: -1;
  border-radius: 28px 28px 29px 29px;
  background:
    radial-gradient(120% 40% at 50% 0%, rgba(123, 92, 255, 0.1), rgba(123, 92, 255, 0) 70%),
    linear-gradient(180deg, #ffffff 0%, #f6f4fc 100%);
}

/* AI banner */
.ai {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(115deg, #2f6bff 0%, #5b4bff 45%, #9a3dff 100%);
  box-shadow: 0 16px 30px -12px rgba(90, 60, 230, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
  transition: transform 0.15s ease;
}
.ai:active { transform: scale(0.985); }
.ai::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 120% at 90% 0%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='80'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='14' cy='12' r='.8' opacity='.6'/%3E%3Ccircle cx='96' cy='18' r='1' opacity='.7'/%3E%3Ccircle cx='60' cy='66' r='.7' opacity='.5'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.ai-icon {
  position: relative;
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22) inset;
}
.ai-icon svg { width: 34px; height: 34px; }
.ai-spark { position: absolute; color: #fff3c4; line-height: 1; text-shadow: 0 0 6px rgba(255, 236, 170, 0.9); }
.ai-spark-1 { top: -3px; right: -3px; font-size: 13px; }
.ai-spark-2 { top: 8px; left: -4px; font-size: 8px; }
.ai-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ai-title { font-size: 16.5px; font-weight: 850; letter-spacing: -0.01em; line-height: 1.2; }
.ai-sub { font-size: 12.5px; color: rgba(255, 255, 255, 0.85); line-height: 1.3; }
.chev { width: 18px; height: 18px; flex: none; opacity: 0.9; }

/* Tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 2px; }
.tile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e7e3f3;
  box-shadow: 0 10px 22px -16px rgba(40, 20, 110, 0.55);
  transition: transform 0.15s ease;
}
.tile:active { transform: scale(0.97); }
.tile-art {
  display: block;
  aspect-ratio: 16 / 11;
  background: linear-gradient(180deg, #f3f0ff 0%, #ffffff 100%);
}
.tile-map .tile-art {
  background:
    radial-gradient(80% 70% at 50% 40%, rgba(123, 92, 255, 0.35), rgba(123, 92, 255, 0) 70%),
    #120d33;
}
.tile-art svg { width: 100%; height: 100%; }
.tile-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 12px 11px;
  border-top: 1px solid #f0edf8;
}
.tile-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}
.tile-title svg { width: 15px; height: 15px; flex: none; color: #c98f2a; }
.tile-sub { font-size: 11.5px; color: #7a72a3; }
.pin-dot {
  width: 9px; height: 9px; flex: none; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.22);
}

.maplink {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: -4px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 650;
  color: #5d5590;
  text-decoration: underline;
  text-decoration-color: rgba(93, 85, 144, 0.35);
  text-underline-offset: 3px;
}
.maplink svg { width: 12px; height: 12px; }

.vote {
  --vote: #e8384f;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1.5px solid var(--vote);
  color: var(--vote);
  font-size: 15.5px;
  font-weight: 800;
  text-decoration: none;
  background: #fff;
  box-shadow: 0 8px 20px -12px rgba(232, 56, 79, 0.7);
  transition: background 0.2s, transform 0.15s;
}
.vote:active { transform: scale(0.985); background: #fff1f3; }

.ear-note {
  margin: -4px 0 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.45;
  color: #7f79a3;
}
.foot {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 10.5px;
  color: #9a94bb;
  letter-spacing: 0.02em;
}
.foot span + span::before { content: "·"; margin-right: 8px; }

/* Sheets */
.layer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.layer[hidden] { display: none; }
.layer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 18, 0.62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: fade-in 0.25s ease;
}
.sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 430px;
  max-height: 88vh;
  max-height: 88dvh;
  border-radius: 26px 26px 0 0;
  color: var(--ink);
  background: linear-gradient(180deg, #23175f 0%, #120c35 100%);
  box-shadow: 0 -20px 60px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  overflow: hidden;
  outline: none;
  animation: sheet-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes sheet-in { from { transform: translateY(40px); } to { transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.sheet-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 20px max(20px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sheet-grabber { align-self: center; width: 40px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.25); }
.sheet h2 { font-size: 20px; font-weight: 850; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sheet-text { font-size: 14px; color: var(--muted); line-height: 1.55; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.icon-btn {
  flex: none;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}
.icon-btn svg { width: 14px; height: 14px; }
.btn-primary {
  align-self: stretch;
  min-height: 50px;
  border-radius: 999px;
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--ticket-ink);
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
}

.days {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  gap: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}
.days button {
  min-height: 40px;
  padding: 4px 6px;
  border-radius: 10px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 750;
  color: var(--muted);
}
.days button[aria-selected="true"] { color: #fff; background: linear-gradient(90deg, #4a6bff, #8a4dff); }

.timeline { list-style: none; padding: 0; display: flex; flex-direction: column; }
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 0 10px 18px;
  font-size: 14.5px;
  font-weight: 650;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0; bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.12);
}
.tl-item:first-child::before { top: 50%; }
.tl-item:last-child::before { bottom: 50%; }
.tl-item::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px; height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: #3a2f8a;
  box-shadow: 0 0 0 2px #1a1145;
}
.tl-star::after { background: var(--gold-2); }
.tl-show::after { background: var(--violet); box-shadow: 0 0 0 2px #1a1145, 0 0 10px 1px rgba(123, 92, 255, 0.8); }
.tl-show .tl-label { color: #fff; font-weight: 800; }
.tl-time { display: flex; flex-direction: column; line-height: 1.15; }
.tl-time time { font-size: 13px; font-weight: 750; color: var(--gold-1); font-variant-numeric: tabular-nums; }
.tl-time .tl-to { font-size: 11px; font-weight: 650; color: var(--faint); }
.tl-label { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.tl-label small { font-size: 11.5px; font-weight: 550; color: var(--faint); }

.day-panel { display: flex; flex-direction: column; gap: 6px; }
.day-name {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.14em;
  color: var(--gold-1);
  background: rgba(242, 200, 107, 0.12);
  border: 1px solid rgba(242, 200, 107, 0.3);
}
.lineup-title { margin-top: 8px; font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: 0.02em; }
.lineup { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lineup li {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.schedule-note { font-size: 11.5px; color: var(--faint); text-align: center; }

/* Full-screen map */
.layer-full .sheet {
  max-width: 100%;
  max-height: 100%;
  height: 100%;
  border-radius: 0;
  background:
    radial-gradient(100% 50% at 50% 0%, rgba(123, 92, 255, 0.3), rgba(123, 92, 255, 0) 70%),
    linear-gradient(180deg, #160f40 0%, #0a0722 100%);
}
.layer-full .sheet-body {
  flex: 1;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-left: max(18px, env(safe-area-inset-left));
  padding-right: max(18px, env(safe-area-inset-right));
}
.map-seat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
}
.map-seat b { color: var(--gold-1); }

.layer-full .sheet-body { gap: 10px; }
.map-frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 300px;
  margin: 0 -12px;
  overflow: hidden;
  border-radius: 20px;
  background: radial-gradient(70% 60% at 50% 45%, rgba(123, 92, 255, 0.16), rgba(123, 92, 255, 0) 70%);
  touch-action: none;
}
.venue {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  cursor: grab;
}
.venue.dragging { cursor: grabbing; }
.venue text { font-family: var(--font); text-anchor: middle; }
.venue .ml, .venue .ml-nums, .venue .pin, .venue .pick { pointer-events: none; }
.ml-floor { font-size: 12.5px; font-weight: 900; fill: #fff; paint-order: stroke; stroke: rgba(18, 13, 51, 0.55); stroke-width: 2.4px; stroke-linejoin: round; }
.ml-stage { font-size: 11px; font-weight: 900; letter-spacing: 0.06em; fill: #3a2304; }
.ml-group { font-size: 13px; font-weight: 900; fill: #fff; paint-order: stroke; stroke: #120d33; stroke-width: 3.4px; stroke-linejoin: round; }
.ml-sm { font-size: 10.5px; }
.ml-sky { fill: #e3d8ff; }
.ml-r { fill: #b9f5e6; }
.ml-s { fill: #d3ebff; }
.ml-mark { font-size: 10.5px; font-weight: 900; fill: #fff; }
.ml-nums { display: none; font-size: 6.5px; font-weight: 800; fill: #fff; fill-opacity: 0.92; }
.venue.zoomed .ml-nums { display: inline; }
.venue [data-b], .venue [data-w], .venue .mk { cursor: pointer; }
.pick { fill: none; stroke: #fff; stroke-width: 2.2px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pulse { animation: pulse 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }

.map-tools {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.map-tool {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--ink);
  background: rgba(30, 20, 84, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.8);
}
.map-tool svg { width: 16px; height: 16px; }
.map-tool:disabled { opacity: 0.4; cursor: default; }
.map-tool-seat { color: var(--gold-1); }
.map-info {
  align-self: center;
  max-width: 100%;
  margin-top: -4px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  background: rgba(18, 12, 53, 0.82);
  border: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.map-info.picked { color: var(--gold-1); font-weight: 800; border-color: rgba(242, 200, 107, 0.4); }

/* 2D / 3D venue */
.map-mode {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 13px;
  background: rgba(30, 20, 84, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.8);
}
.map-mode[hidden] { display: none; }
.map-mode button {
  min-width: 42px;
  height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 850;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.map-mode button[aria-pressed="true"] { color: var(--ticket-ink); background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); }
.map-frame.is-3d .venue, .map-frame.is-3d .map-tools { display: none; }
.v3d { position: absolute; inset: 0; z-index: 1; background: radial-gradient(80% 60% at 50% 40%, #241a5c, #0f0a2c 75%); }
.v3d[hidden] { display: none; }
.v3d-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.v3d-canvas:active { cursor: grabbing; }
.v3d-labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.v3d-label { position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform; transition: opacity 0.25s ease; }
.v3d-label-block { font-size: 9.5px; font-weight: 900; color: #fff; text-shadow: 0 0 3px rgba(10, 6, 40, 0.95), 0 1px 2px rgba(10, 6, 40, 0.9); }
.v3d-label-stage {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #3a2304;
  background: var(--gold-2);
  box-shadow: 0 4px 14px -4px rgba(242, 200, 107, 0.7);
}
.v3d-label-seat {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 850;
  color: #fff;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.25), 0 6px 16px -6px rgba(255, 59, 92, 0.8);
}
.v3d-label-pick {
  display: none;
  margin-top: -8px;
  padding: 6px 12px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 850;
  color: var(--gold-1);
  background: rgba(18, 12, 53, 0.94);
  border: 1px solid rgba(242, 200, 107, 0.55);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.95);
}
.v3d-label-pick.on { display: block; }
.v3d-label-pick::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  background: rgb(18, 12, 53);
  border-right: 1px solid rgba(242, 200, 107, 0.55);
  border-bottom: 1px solid rgba(242, 200, 107, 0.55);
  transform: rotate(45deg);
}
.v3d-status {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.v3d[data-state="loading"] .v3d-status { display: flex; }
.v3d-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--gold-2);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.v3d-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.v3d:not([data-state="ready"]) .v3d-actions { display: none; }
.v3d-cta {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px 0 15px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 850;
  color: var(--ticket-ink);
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35) inset, 0 12px 26px -10px rgba(242, 200, 107, 0.75);
}
.v3d-cta svg { width: 18px; height: 18px; flex: none; }
.v3d-cta[hidden] { display: none; }
.v3d-cta-back {
  color: var(--ink);
  background: rgba(30, 20, 84, 0.92);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset, 0 12px 26px -10px rgba(0, 0, 0, 0.9);
}
/* Seat view: look-around tools, top right, clear of the 2D/3D switch. */
.v3d-look {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
}
.v3d:not([data-state="ready"]) .v3d-look, .v3d:not([data-view="seat"]) .v3d-look { display: none; }
.v3d-tool {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px 0 8px;
  border-radius: 13px;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  color: var(--ink);
  background: rgba(30, 20, 84, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.8);
}
.v3d-tool[hidden] { display: none; }
.v3d-tool > svg { width: 20px; height: 20px; flex: none; }
.v3d-tool[aria-pressed="true"] { color: var(--ticket-ink); background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); border-color: transparent; }
.v3d-dial {
  width: 22px;
  height: 22px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--gold-1);
  border: 1.5px solid rgba(242, 200, 107, 0.6);
}
.v3d-stage-arrow { display: block; width: 14px; height: 14px; will-change: transform; }
.v3d-stage-arrow svg { display: block; width: 14px; height: 14px; }

.legend {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: space-between;
  gap: 7px 10px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--muted);
}
.legend li { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend-marks { display: flex; justify-content: flex-start; gap: 7px 16px; margin-top: -2px; }
.lg { width: 12px; height: 12px; flex: none; border-radius: 3px; }
.lg-fa { background: #ff6f4a; }
.lg-fb { background: #3fbf6e; }
.lg-fc { background: #4d7ee8; }
.lg-vip { background: #ec4f86; }
.lg-r { background: #34c4a6; }
.lg-s { background: #63b0f2; }
.lg-sb { background: #9a7cf0; }
.lg-wc { background: #6e6a8e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8.6' cy='2.6' r='.9' fill='%23fff'/%3E%3Cpath d='M8 5.2v4.6h3.6l1.6 3.4M5.6 7.6a3.6 3.6 0 1 0 4.8 4.6'/%3E%3C/g%3E%3C/svg%3E") center / 10px no-repeat; box-shadow: 0 0 0 1.5px #a7a3c2 inset; }
.lg-seat { border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(255, 59, 92, 0.25); width: 10px; height: 10px; margin: 1px; }
.lg-gate, .lg-office {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 900;
  color: #fff;
  background: #22b573;
}
.lg-office { background: #ff9a2e; }

/* Venue facilities (facilities.js, data in facilities.json) */
.fac-glyphs { position: absolute; width: 0; height: 0; overflow: hidden; }
.fi { width: 16px; height: 16px; flex: none; }
/* FilterBar pattern (FAM design system, Ben 1 and 6 Oct): a Filter button and a Sort button open a
   menu, each active filter shows as a chip with Clear all. No row of filter buttons. */
.fac-filter-wrap { position: relative; flex-shrink: 0; margin-top: -2px; }
.fac-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fac-filter-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: 10px;
  font-size: 13px; font-weight: 650; color: var(--text, #fff);
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14);
}
.fac-filter-btn .ic { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fac-filter-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.14); }
.fac-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; line-height: 18px; text-align: center; color: #120d33; background: #fff; }
.fac-chips { display: contents; }
.fac-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 8px 0 6px; border-radius: 9px;
  font-size: 12px; font-weight: 600; color: #fff;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.18);
}
.fac-chip .fi { width: 14px; height: 14px; }
.fac-chip .x { margin-left: 2px; opacity: 0.7; font-size: 14px; line-height: 1; }
.fac-clear { height: 30px; padding: 0 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; }
.fac-menu {
  position: absolute; z-index: 20; top: 40px; left: 0;
  min-width: 220px; padding: 6px; display: flex; flex-direction: column; gap: 2px;
  border-radius: 14px; background: #1c1650; border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 40px rgba(5, 2, 20, 0.55);
}
.fac-menu[hidden] { display: none; }
.fac-menu-sort { left: auto; }
.fac-menu button {
  display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 0 12px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; color: #fff; text-align: left;
  background: none; border: 0;
}
.fac-menu button:hover, .fac-menu button:focus-visible { background: rgba(255, 255, 255, 0.07); }
.fac-menu button span { flex: 1; }
.fac-menu button[aria-pressed="true"]::after, .fac-menu button[aria-checked="true"]::after { content: "¹3"; font-weight: 800; }
.map-info, .near { flex-shrink: 0; }
.venue .fac.is-off:not(.is-target) { display: none; }
/* A provisional target keeps its dashed outline: routing to it does not confirm it. */
.venue .fac.is-target rect, .venue .fac.is-target circle:not(.fac-pulse) { stroke: #ffd36b; stroke-width: 2.2px; }
.venue .fac-route { pointer-events: none; }
.route-case, .route-line { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.route-case { stroke: #120d33; stroke-opacity: 0.85; stroke-width: 8px; }
.route-line { stroke: #ffd36b; stroke-width: 4px; stroke-dasharray: 9 6; animation: route-dash 0.9s linear infinite; }
@keyframes route-dash { to { stroke-dashoffset: -15; } }
.route-arrow path { fill: #fff; stroke: #120d33; stroke-width: 1px; stroke-linejoin: round; }
.route-step-case, .route-step { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.route-step-case { stroke: #120d33; stroke-width: 11px; }
.route-step { stroke: #fff; stroke-width: 6px; }
.route-step-dot { fill: #fff; stroke: #120d33; stroke-width: 1.6px; vector-effect: non-scaling-stroke; }
.near { display: flex; flex-direction: column; gap: 6px; }
.near-title { font-size: 11.5px; font-weight: 750; letter-spacing: 0.02em; color: var(--faint); }
.near-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.near-btn {
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 12px;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
}
.near-btn .fi { width: 20px; height: 20px; }
.near-txt { min-width: 0; display: flex; flex-direction: column; font-size: 12px; font-weight: 750; line-height: 1.2; }
.near-txt > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.near-m { font-size: 11.5px; font-weight: 800; color: var(--gold-1); }
.near-btn[aria-pressed="true"] { background: rgba(242, 200, 107, 0.16); border-color: rgba(242, 200, 107, 0.7); box-shadow: 0 0 0 1px rgba(242, 200, 107, 0.35) inset; }
/* Turn-by-turn: where you are going, numbered steps with distance and time, Back and Next. */
.steps {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px 10px;
  border-radius: 16px;
  background: rgba(242, 200, 107, 0.07);
  border: 1px solid rgba(242, 200, 107, 0.35);
}
.steps[hidden] { display: none; }
.steps-head { display: flex; align-items: flex-start; gap: 10px; }
.steps-title { flex: 1; min-width: 0; }
.steps-kicker { font-size: 11px; font-weight: 750; letter-spacing: 0.02em; color: var(--faint); }
.steps-dest { margin: 1px 0 0; font-size: 15px; font-weight: 800; line-height: 1.3; color: var(--ink); }
.steps-prov {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 750;
  vertical-align: 2px;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.45);
}
.steps-prov[hidden] { display: none; }
.steps-total { margin-top: 2px; font-size: 13px; font-weight: 750; color: var(--gold-1); }
.steps-close { width: 32px; height: 32px; }
.steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 210px; overflow-y: auto; overscroll-behavior: contain; }
.step-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 9px;
  padding: 6px 8px;
  border-radius: 10px;
  text-align: left;
  color: var(--muted);
  background: none;
  border: 0;
}
.step-n {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 11.5px;
  font-weight: 850;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.12);
}
.step-txt { font-size: 13px; line-height: 1.4; padding-top: 2px; }
.step-m { padding-top: 3px; font-size: 11.5px; font-weight: 700; white-space: nowrap; color: var(--faint); }
.step.is-current .step-btn { color: var(--ink); background: rgba(242, 200, 107, 0.16); }
.step.is-current .step-n { color: #2a1a00; background: #ffd36b; }
.step.is-current .step-txt { font-weight: 700; }
.step.is-current .step-m { color: var(--gold-1); }
.steps-nav { display: flex; align-items: center; gap: 8px; }
.steps-count { flex: 1; text-align: center; font-size: 12px; font-weight: 700; color: var(--faint); }
.steps-btn {
  min-width: 96px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--line);
}
.steps-btn svg { width: 14px; height: 14px; }
.steps-next { color: var(--ticket-ink); border-color: var(--gold-2); background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); }
.steps-btn:disabled { opacity: 0.35; cursor: default; }
.steps-approx { font-size: 11px; line-height: 1.35; color: var(--faint); }
.v3d-label-fac {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 850;
  color: #2a1a00;
  background: #ffd36b;
  box-shadow: 0 0 0 3px rgba(255, 211, 107, 0.25), 0 6px 16px -6px rgba(255, 211, 107, 0.8);
}

.map-notes { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; line-height: 1.4; color: var(--faint); }
.map-soon { display: flex; align-items: flex-start; gap: 6px; color: var(--muted); }
.soon-dot {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9.5px;
  font-weight: 900;
  font-style: italic;
  font-family: Georgia, serif;
  color: var(--ticket-ink);
  background: var(--gold-2);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
  z-index: 60;
  max-width: calc(100% - 40px);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ticket-ink);
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}
.toast:empty { display: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Narrow phones (360 px) */
@media (max-width: 374px) {
  :root { --pad: 14px; }
  .wordmark { font-size: 22px; }
  .lang button { min-width: 30px; padding: 0 5px; font-size: 11px; }
  .guide { flex-basis: 84px; }
  .guide-slot { width: 82px; height: 96px; }
  .bubble { font-size: 13px; }
  .ticket dd { font-size: 40px; }
  .eventline { letter-spacing: 0.12em; gap: 7px; }
}

@media (min-width: 480px) {
  body { padding-top: 28px; padding-bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Schedule legibility (Ben, 6 Oct): larger type and stronger contrast in the schedule sheet. */
.days button { font-size: 14.5px; min-height: 44px; }
.tl-item { font-size: 16.5px; padding: 12px 0 12px 20px; grid-template-columns: 62px 1fr; }
.tl-time time { font-size: 15px; }
.tl-time .tl-to { font-size: 12.5px; color: var(--muted); }
.tl-label { line-height: 1.35; }
.tl-label small { font-size: 13.5px; color: var(--muted); }
.day-name { font-size: 12.5px; }
.lineup-title { font-size: 15.5px; color: #fff; margin-top: 12px; }
.lineup { gap: 8px; }
.lineup li { font-size: 15px; padding: 7px 12px; background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.2); color: #fff; }
.schedule-note { font-size: 13px; color: var(--muted); }
.sheet-text { font-size: 15.5px; }

/* ---------- Fan flow (Cass's delivery scope v3, screens 1–8) ---------- */
.ic {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.view { display: flex; flex-direction: column; gap: 14px; }
.view-live, .view-after { gap: 12px; }

.live-pill {
  display: none;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid var(--surface-line);
  background: rgba(255, 255, 255, 0.05);
}
.live-dot {
  width: 8px; height: 8px; flex: none; border-radius: 50%;
  background: #ff5f7e;
  box-shadow: 0 0 0 3px rgba(255, 95, 126, 0.2);
  animation: live-blink 1.6s ease-in-out infinite;
}
@keyframes live-blink { 50% { opacity: 0.35; } }
html[data-phase="live"] .live-pill, html[data-phase="award"] .live-pill { display: inline-flex; }
html[data-phase="live"] .nfc, html[data-phase="award"] .nfc { display: none; }

/* Screen 1: While-you-wait card and the rows on screen 2 */
.wait-card, .row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 14px 14px 14px 16px;
  border-radius: 20px;
  color: var(--ink);
  background: linear-gradient(180deg, #241a62 0%, #1b1450 100%);
  border: 1px solid rgba(155, 135, 255, 0.55);
  box-shadow: 0 12px 26px -16px rgba(40, 20, 110, 0.8);
  transition: transform 0.15s ease, box-shadow 0.3s ease;
}
.wait-card:active, .row:active { transform: scale(0.985); }
.row { background: var(--surface); border-color: var(--surface-line); box-shadow: none; padding: 15px 16px; }
.row-hl { border-color: rgba(170, 150, 255, 0.85); background: rgba(123, 92, 255, 0.1); }
.row-dashed { border-style: dashed; }
.row-icon {
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--gold-2);
  background: rgba(255, 255, 255, 0.08);
}
.row-icon-ai { font-size: 15px; font-weight: 850; color: var(--gold-1); letter-spacing: 0.02em; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-title { font-size: 16px; font-weight: 800; line-height: 1.3; }
.row-sub { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.wait-pill {
  flex: none;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  color: var(--ticket-ink);
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
}
.wait-pill:empty { display: none; }
html[data-phase="queue"] .wait-card {
  border-color: var(--gold-2);
  box-shadow: 0 0 0 3px rgba(242, 200, 107, 0.18), 0 14px 30px -12px rgba(242, 200, 107, 0.45);
}
html[data-phase="queue"] .wait-pill { animation: live-blink 1.8s ease-in-out infinite; }

/* Full-screen layers (screens 2, 5, 6) */
.layer-screen .sheet-body { gap: 12px; }
.screen-head { display: flex; align-items: center; gap: 12px; }
.back-btn {
  flex: none;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.screen-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.screen-titles h2 { font-size: 21px; line-height: 1.2; }
.screen-titles p { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.powered {
  margin-top: auto;
  padding-top: 12px;
  text-align: center;
  font-size: 11.5px;
  color: var(--faint);
}
.view .powered { margin-top: 4px; }

/* Screen 2: countdown */
.countdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px 14px;
  border-radius: 22px;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 16px 30px -14px rgba(90, 60, 230, 0.8);
}
.cd-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cd-main { min-width: 0; }
.cd-label { font-size: 13px; color: rgba(255, 255, 255, 0.88); }
.cd-time {
  margin-top: 4px;
  font-size: 34px;
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cd-seat { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12.5px; text-align: right; color: rgba(255, 255, 255, 0.9); }
.cd-steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}
.cd-steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 2px 5px;
  border-radius: 10px;
  text-align: center;
  font-size: 10.5px;
  line-height: 1.2;
  background: rgba(255, 255, 255, 0.12);
}
.cd-steps time { font-size: 12px; font-weight: 850; font-variant-numeric: tabular-nums; }
.cd-steps .done { opacity: 0.5; }
.cd-steps .next { color: var(--ticket-ink); background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); }
.cd-date { font-size: 11.5px; color: rgba(255, 255, 255, 0.8); }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 2px; }
.pair-vote, .pair-merch {
  display: grid;
  place-items: center;
  min-height: 54px;
  padding: 6px 10px;
  border-radius: 16px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  background: #fff;
}
.pair-vote { color: #e8384f; border: 1.5px solid #e8384f; }
.pair-merch { color: var(--ticket-ink); }

/* Shared placeholders for the 3D guide */
.slot-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted);
  transition: opacity 0.3s ease;
}
.slot-ph .ic { width: 32px; height: 32px; color: #b9a6ff; stroke-width: 1.5; }
.has-3d > .slot-ph { opacity: 0; }

/* Screen 5: AI guide */
.g-status { display: flex; align-items: center; gap: 6px; color: var(--green) !important; font-weight: 650; }
.g-status::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: currentColor; }
#guideScreen[data-mode="text"] .g-status { color: var(--muted) !important; }
.seg {
  flex: none;
  display: flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--surface-line);
  background: rgba(255, 255, 255, 0.05);
}
.seg button {
  min-width: 52px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 750;
  color: var(--muted);
}
.seg button[aria-pressed="true"] { color: var(--ticket-ink); background: #f3efff; }
.g-stage {
  position: relative;
  flex: none;
  /* Grows with the screen so a tall phone or a desktop window shows Nike large, not a gap above the composer. */
  height: clamp(210px, 46vh, 560px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 22px;
  border: 1.5px dashed rgba(170, 150, 255, 0.5);
  background:
    radial-gradient(60% 60% at 50% 55%, rgba(123, 160, 255, 0.2), rgba(123, 160, 255, 0) 70%),
    rgba(255, 255, 255, 0.04);
  transition: height 0.3s ease;
}
.g-stage.has-3d { border-style: solid; border-color: rgba(170, 150, 255, 0.25); }
#guideScreen[data-mode="text"] .g-stage { height: clamp(128px, 24vh, 260px); }
.g-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--surface-line);
}
.g-note .ic { width: 20px; height: 20px; color: var(--gold-2); }
#guideScreen[data-mode="text"] .g-note { display: none; }
.chat-log { flex: 1 0 auto; display: flex; flex-direction: column; gap: 10px; min-height: 90px; }
.msg {
  max-width: 86%;
  padding: 11px 15px;
  border-radius: 20px;
  font-size: 14.5px;
  line-height: 1.45;
  animation: msg-in 0.25s ease;
}
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg-bot { align-self: flex-start; color: var(--ticket-ink); background: #fbfaff; border-bottom-left-radius: 6px; }
.msg-user { align-self: flex-end; color: #fff; background: #3d3290; border-bottom-right-radius: 6px; }
.msg-list { list-style: none; padding: 0; margin-top: 6px; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
.msg-list li { display: grid; grid-template-columns: 46px 1fr; gap: 8px; }
.msg-list time { font-weight: 800; color: #5a35e8; font-variant-numeric: tabular-nums; }
.msg-list .is-next { font-weight: 800; }
.msg-tag { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; font-size: 10.5px; font-weight: 850; color: #fff; background: #5a35e8; vertical-align: 1px; }
.msg-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.msg-act {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 750;
  color: #fff;
  background: linear-gradient(90deg, #4a6bff, #8a4dff);
}
.msg-typing { display: inline-flex; gap: 4px; padding: 15px 16px; }
.msg-typing span { width: 7px; height: 7px; border-radius: 50%; background: #8a82b5; animation: typing 1s ease-in-out infinite; }
.msg-typing span:nth-child(2) { animation-delay: 0.15s; }
.msg-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 100% { opacity: 0.3; transform: none; } 50% { opacity: 1; transform: translateY(-3px); } }
/* Compact pills sized to their text, one row that wraps (Ben, 6 Oct). */
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick button {
  position: relative;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.2;
  background: var(--surface);
  border: 1px solid var(--surface-line);
}
/* Keeps a finger-sized hit area around the smaller pill without spacing the row out. */
.quick button::after { content: ""; position: absolute; inset: -6px -3px; }
.quick button:active { background: rgba(123, 92, 255, 0.25); }
.composer { display: flex; align-items: center; gap: 8px; }
.composer input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--surface-line);
  outline: none;
}
.composer input::placeholder { color: var(--faint); }
.composer input:focus { border-color: rgba(170, 150, 255, 0.85); }
.round-btn {
  flex: none;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--surface-line);
  background: var(--surface);
}
.round-btn .ic { width: 21px; height: 21px; }
.mic-btn {
  flex: none;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 10px 24px -10px rgba(110, 80, 255, 0.9);
}
.mic-btn .ic-send, .composer.has-text .mic-btn .ic-mic { display: none; }
.composer.has-text .mic-btn .ic-send { display: block; }
.mic-btn[aria-pressed="true"] { animation: mic-live 1.4s ease-in-out infinite; }
@keyframes mic-live {
  0%, 100% { box-shadow: 0 0 0 0 rgba(170, 150, 255, 0.55), 0 10px 24px -10px rgba(110, 80, 255, 0.9); }
  50% { box-shadow: 0 0 0 9px rgba(170, 150, 255, 0), 0 10px 24px -10px rgba(110, 80, 255, 0.9); }
}
.msg-note {
  align-self: stretch;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--surface-line);
  animation: msg-in 0.25s ease;
}
@media (prefers-reduced-motion: reduce) { .mic-btn[aria-pressed="true"] { animation: none; outline: 3px solid rgba(170, 150, 255, 0.7); } }

/* Screen 6: AR moment */
.ar-view {
  position: relative;
  flex: none;
  height: min(58vh, 470px);
  min-height: 330px;
  overflow: hidden;
  border-radius: 24px;
  border: 1.5px dashed rgba(170, 150, 255, 0.5);
  background:
    radial-gradient(80% 50% at 50% 30%, rgba(123, 92, 255, 0.25), rgba(123, 92, 255, 0) 70%),
    linear-gradient(180deg, #221a5c 0%, #150f3e 100%);
}
.ar-floor {
  position: absolute;
  left: -30%; right: -30%; bottom: -10%;
  height: 52%;
  background:
    repeating-linear-gradient(90deg, rgba(185, 166, 255, 0.18) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg, rgba(185, 166, 255, 0.18) 0 1px, transparent 1px 44px);
  transform: perspective(300px) rotateX(58deg);
  transform-origin: 50% 100%;
  -webkit-mask: linear-gradient(180deg, transparent, #000 60%);
  mask: linear-gradient(180deg, transparent, #000 60%);
  pointer-events: none;
}
.ar-cam-label { position: absolute; top: 12px; left: 0; right: 0; text-align: center; font-size: 12.5px; color: var(--muted); }
.ar-coming {
  position: absolute;
  top: 38px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  color: var(--ticket-ink);
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
  z-index: 2;
}
.ar-char {
  position: absolute;
  left: 23%; right: 23%;
  top: 22%; bottom: 25%;
  display: grid;
  place-items: center;
  border-radius: 22px;
  border: 1.5px dashed rgba(242, 200, 107, 0.75);
  overflow: hidden;
}
.ar-char .slot-ph { color: var(--gold-1); }
.ar-char .slot-ph .ic { color: var(--gold-2); }
.ar-char.has-3d { border-color: transparent; }
.ar-ring {
  position: absolute;
  left: 25%; right: 25%;
  bottom: 18%;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(242, 200, 107, 0.6);
  box-shadow: 0 0 24px rgba(242, 200, 107, 0.25);
}
#arScreen[data-char="off"] .ar-char, #arScreen[data-char="off"] .ar-ring { display: none; }
.ar-frame { display: none; position: absolute; inset: 10px; border-radius: 18px; border: 2px solid var(--gold-2); box-shadow: 0 0 0 1px rgba(242, 200, 107, 0.3) inset, 0 0 20px rgba(242, 200, 107, 0.3) inset; pointer-events: none; }
#arScreen[data-frame="on"] .ar-frame { display: block; }
.ar-frame-mark {
  position: absolute;
  top: -1px; left: 50%;
  transform: translate(-50%, -50%);
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--ticket-ink);
  background: var(--gold-2);
  white-space: nowrap;
}
.ar-star { position: absolute; color: var(--gold-1); text-shadow: 0 0 8px rgba(242, 200, 107, 0.8); }
.ar-star-1 { top: 18%; left: 8%; font-size: 16px; }
.ar-star-2 { top: 34%; right: 7%; font-size: 12px; }
.ar-star-3 { bottom: 26%; left: 10%; font-size: 10px; }
.ar-chip {
  position: absolute;
  bottom: 14px;
  padding: 6px 11px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  background: rgba(10, 7, 30, 0.82);
}
.ar-chip-date { left: 14px; color: var(--gold-1); }
.ar-chip-ai { right: 14px; color: var(--ink); }
.ar-locked {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  font-size: 14.5px;
  line-height: 1.5;
  background: rgba(8, 6, 26, 0.86);
}
.ar-locked .ic { width: 34px; height: 34px; color: var(--gold-2); }
html[data-phase="live"] .ar-locked, html[data-phase="award"] .ar-locked { display: flex; }
.ar-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  text-align: center;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  border: 1px solid var(--surface-line);
  background: var(--surface);
}
.opt[aria-pressed="true"], .opt[aria-selected="true"], .opt[aria-checked="true"] {
  color: var(--ticket-ink);
  border-color: #f3efff;
  background: #f3efff;
}
.opt-locked {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-style: dashed;
  color: var(--muted);
  background: none;
}
.opt-locked .ic { width: 16px; height: 16px; }
.ar-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 4px; }
.seg-cap { justify-self: start; }
.ar-share { justify-self: end; }
.shutter {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 6px solid #f3efff;
  background: var(--grad);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 12px 30px -10px rgba(110, 80, 255, 0.9);
  transition: transform 0.12s ease;
}
.shutter:active { transform: scale(0.94); }
#arScreen[data-cap="video"] .shutter { background: radial-gradient(circle, #ff4b6e 0 42%, #c2183d 43% 100%); }
.ar-note { text-align: center; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
html[data-phase="live"] .ar-coming, html[data-phase="award"] .ar-coming { display: none; }

/* AR learn mode (assets/dance.js): the Dance row opens #danceSheet; a lesson sets data-dance on the screen. */
.row-chev { width: 18px; height: 18px; color: var(--faint); }
html[data-phase="live"] .ar-dance-btn, html[data-phase="award"] .ar-dance-btn { display: none; }
.dance-sheet-sub { margin-top: -6px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.dance-menu { display: flex; flex-direction: column; gap: 14px; }
.dance-menu[hidden], .dance-pick[hidden] { display: none; }
.dance-group h3 { margin: 0 0 4px 12px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-2); }
.dance-list {
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  border-radius: 14px; background: #1c1650; border: 1px solid rgba(255, 255, 255, 0.14);
}
.dance-item {
  display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 6px 12px; border-radius: 10px;
  color: #fff; text-align: left; background: none;
}
.dance-item:hover, .dance-item:focus-visible { background: rgba(255, 255, 255, 0.07); }
.dance-item-title { flex: 1; font-size: 14.5px; font-weight: 700; }
.dance-item-meta { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.dance-item[aria-current="true"] .dance-item-title::after { content: " ♪"; color: var(--gold-2); }
.dance-item .ic { width: 16px; height: 16px; color: var(--faint); }
.dance-pick { display: flex; flex-direction: column; gap: 10px; }
.dance-pick-back { align-self: flex-start; padding-left: 0; text-decoration: none; }
.dance-pick-title { font-size: 22px; font-weight: 850; }
.dance-pick-meta { margin-top: -6px; font-size: 13px; color: var(--muted); }

.dance-hud {
  position: absolute; z-index: 2; top: 10px; left: 10px; right: 10px;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px 8px 8px; border-radius: 18px;
  background: rgba(10, 7, 30, 0.72);
  pointer-events: none;
}
.dance-hud[hidden] { display: none; }
.dance-count {
  flex: none; width: 64px; height: 64px; border-radius: 16px;
  display: grid; place-items: center;
  font-size: 46px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums;
  color: var(--ticket-ink); background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
}
.dance-hud.beat .dance-count { animation: dance-beat 0.18s ease-out; }
@keyframes dance-beat { from { transform: scale(1.12); } to { transform: scale(1); } }
.dance-hud.is-held .dance-count { opacity: 0.6; }
.dance-now { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.dance-step { font-size: 19px; font-weight: 850; line-height: 1.2; color: #fff; overflow-wrap: anywhere; }
.dance-ticks { display: flex; gap: 5px; }
.dance-ticks i { flex: 1; max-width: 22px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); }
.dance-ticks i.on { background: var(--gold-2); }
.dance-ticks i.now { background: #fff; }

.dance-panel { display: flex; flex-direction: column; gap: 10px; }
.dance-panel[hidden] { display: none; }
.dance-top { display: flex; align-items: center; gap: 12px; }
.dance-titles { flex: 1; min-width: 0; }
.dance-titles h3 { font-size: 19px; font-weight: 850; line-height: 1.2; }
.dance-progress { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.dance-dots { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.dance-dots li { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); }
.dance-dots li.on { border-color: var(--gold-2); background: var(--gold-2); }
.dance-dots li.now { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18); }
.dance-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dance-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px; border-radius: 12px;
  font-size: 13.5px; font-weight: 700; color: var(--muted);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--surface-line);
}
.dance-toggle .ic { width: 18px; height: 18px; }
.dance-toggle[aria-pressed="true"] { color: var(--ticket-ink); background: #f3efff; border-color: #f3efff; }
.dance-sound { margin-left: auto; padding: 0; width: 44px; justify-content: center; }
.dance-sound .ic-off, .dance-sound[aria-pressed="false"] .ic-on { display: none; }
.dance-sound[aria-pressed="false"] .ic-off { display: block; }
.dance-nav { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 8px; }
.dance-nav-btn {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 50px; padding: 4px 8px; border-radius: 14px;
  font-size: 13.5px; font-weight: 750; line-height: 1.2; text-align: center;
  background: var(--surface); border: 1px solid var(--surface-line);
}
.dance-nav-btn .ic { width: 17px; height: 17px; }
.dance-nav-btn:disabled { opacity: 0.38; }
.dance-nav-btn[aria-pressed="true"] { color: var(--ticket-ink); background: #f3efff; border-color: #f3efff; }
.dance-hint { min-height: 1.4em; text-align: center; font-size: 13px; line-height: 1.4; color: var(--gold-1); }
.dance-foot { display: flex; justify-content: center; gap: 4px; margin-top: -4px; }
.dance-panel[data-mode="watch"] [data-learn-only], .dance-panel[data-mode="learn"] [data-watch-only] { display: none; }

#arScreen[data-dance] .ar-view { height: min(50vh, 420px); min-height: 300px; }
#arScreen[data-dance] .ar-char { display: grid; left: 8%; right: 8%; top: 21%; bottom: 7%; }
#arScreen[data-dance] .ar-ring { display: block; left: 22%; right: 22%; bottom: 5%; }
#arScreen[data-dance] .ar-cam-label, #arScreen[data-dance] .ar-coming, #arScreen[data-dance] .ar-chip,
#arScreen[data-dance] .ar-opts, #arScreen[data-dance] #arArtistBtn, #arScreen[data-dance] .ar-dance-btn,
#arScreen[data-dance] .ar-note { display: none; }
#arScreen[data-dance="learn"] .ar-controls { display: none; }
/* With the 3D robot in .ar-char, character.js sets the ring round its soles (data-floor-mark), photo and dance alike. */
#arScreen .ar-ring[data-grounded] {
  left: var(--floor-l); top: var(--floor-t); right: auto; bottom: auto;
  width: var(--floor-w); height: var(--floor-h);
  background: radial-gradient(closest-side, rgba(8, 4, 24, 0.6), rgba(8, 4, 24, 0.32) 62%, rgba(8, 4, 24, 0.08));
  box-shadow: 0 0 18px rgba(242, 200, 107, 0.22);
}

/* Guide bar on screens 7 and 8 */
.gbar { display: flex; align-items: center; gap: 12px; }
.gbar-slot {
  position: relative;
  flex: none;
  width: 78px;
  height: 88px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 24px;
  border: 1.5px dashed rgba(170, 150, 255, 0.55);
  background: radial-gradient(60% 50% at 50% 45%, rgba(123, 160, 255, 0.3), rgba(123, 160, 255, 0) 70%), rgba(255, 255, 255, 0.04);
}
.gbar-slot.has-3d { border-style: solid; border-color: rgba(170, 150, 255, 0.25); }
.gbar-bubble { font-size: 14px; font-weight: 650; }
.gbar-bubble::before { top: 50%; margin-top: -8px; }

.trophy-pop {
  display: none;
  position: absolute;
  top: 6px; right: 6px;
  z-index: 2;
  width: 30px; height: 30px;
  padding: 5px;
  border-radius: 50%;
  background: rgba(18, 12, 53, 0.85);
  box-shadow: 0 0 14px rgba(242, 200, 107, 0.6);
}
.trophy-pop svg { width: 100%; height: 100%; fill: var(--gold-2); }
html[data-phase="award"] .trophy-pop { display: block; animation: trophy 1.2s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
html[data-phase="award"] .has-3d > .trophy-pop, .guide-host:not(.on) .trophy-pop { display: none; }
/* The robot's celebrate clip holds up its own 3D trophy; Nike, the award host, shows this one. */
.guide-host[data-kind="robot"] .trophy-pop { display: none; }
@keyframes trophy { from { transform: scale(0) rotate(-30deg); } to { transform: none; } }

/* Screen 7: during the show */
.panel {
  padding: 14px 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--surface-line);
}
.cap { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.now-row { display: flex; align-items: center; gap: 14px; margin: 10px 0 12px; }
.img-ph {
  flex: none;
  width: 68px; height: 68px;
  display: grid; place-items: center;
  border-radius: 14px;
  font-size: 11px;
  color: var(--faint);
  border: 1.5px dashed rgba(170, 150, 255, 0.5);
}
.now-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.now-artist { font-size: 18px; font-weight: 800; line-height: 1.25; }
.now-song { font-size: 13.5px; color: var(--muted); }
.progress { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.progress span { display: block; width: 62%; height: 100%; border-radius: inherit; background: #9a8bff; }
.vote-now {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 16px 12px;
  border-radius: 22px;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 16px 30px -14px rgba(90, 60, 230, 0.85);
  transition: transform 0.15s ease;
}
.vote-now:active { transform: scale(0.985); }
.vn-line { font-size: 13.5px; color: rgba(255, 255, 255, 0.92); }
.vn-big { font-size: 30px; font-weight: 900; letter-spacing: 0.05em; line-height: 1.1; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.stat-n { font-size: 28px; font-weight: 850; line-height: 1; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bars-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bars-head h3, .sec-head h3, .sec-title { margin: 0; font-size: 15px; font-weight: 800; }
.sample-badge {
  flex: none;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0.08em;
  color: var(--gold-1);
  border: 1px dashed rgba(242, 200, 107, 0.7);
}
.bar-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.bar-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13px; }
.bar-list b { font-variant-numeric: tabular-nums; }
.bar-track { grid-column: 1 / -1; height: 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4a6bff, #9a3dff); transition: width 0.8s ease; }
.bars-note { font-size: 11.5px; line-height: 1.4; color: var(--faint); }
.note-card { display: flex; align-items: flex-start; gap: 12px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.note-card .ic { width: 20px; height: 20px; color: var(--gold-2); margin-top: 1px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 4px; }
.see-all { font-size: 13px; color: var(--muted); padding: 6px 0; }
.feed { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.post { display: flex; align-items: center; gap: 13px; }
.post > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: var(--muted); }
.post b { font-size: 14.5px; color: var(--ink); }
.avatar-ph { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px dashed rgba(170, 150, 255, 0.55); }
.sec-title { margin-top: 4px; }
.up-list { list-style: none; padding: 0; margin-top: -6px; }
.up-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; font-size: 14.5px; border-bottom: 1px solid var(--line); }
.up-list li span:last-child { color: var(--muted); }
.btn-outline {
  width: 100%;
  min-height: 54px;
  padding: 8px 16px;
  border-radius: 18px;
  text-align: center;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.3;
  border: 1px solid rgba(200, 185, 255, 0.45);
  background: rgba(255, 255, 255, 0.03);
}
.btn-hl { border-color: rgba(170, 150, 255, 0.95); background: rgba(123, 92, 255, 0.12); }
.seat-link {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(228, 222, 255, 0.3);
}
.award {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  color: var(--ticket-ink);
  background: linear-gradient(135deg, var(--gold-1) 0%, var(--gold-2) 60%, #e3a94a 100%);
  box-shadow: 0 16px 34px -14px rgba(242, 200, 107, 0.7);
}
html[data-phase="award"] .award { display: flex; animation: msg-in 0.4s ease; }
.award-trophy { flex: none; width: 54px; height: 54px; padding: 10px; border-radius: 50%; background: rgba(26, 18, 64, 0.9); }
.award-trophy svg { width: 100%; height: 100%; fill: var(--gold-2); }
.award-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.award-label { font-size: 11.5px; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; }
.award-cat { font-size: 13px; font-weight: 700; }
.award-win { font-size: 19px; font-weight: 900; }
.award-sub { font-size: 12px; opacity: 0.8; }
html[data-phase="award"] .now-card { display: none; }

/* Screen 8: after the show */
.badge-title { margin: 4px 0 0; text-align: center; font-size: 22px; font-weight: 850; line-height: 1.25; }
.medal {
  align-self: center;
  width: 200px; height: 200px;
  padding: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 92, 255, 0.35) 55%, rgba(123, 92, 255, 0.12) 100%);
}
.medal-inner {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 50%;
  border: 7px solid #8f7dff;
  background: radial-gradient(circle at 50% 35%, #2c2075 0%, #1a1248 100%);
  box-shadow: 0 0 30px rgba(143, 125, 255, 0.5);
}
.medal-kgma {
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(180deg, var(--gold-1) 0%, var(--gold-2) 55%, var(--gold-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.medal-att { font-size: 11px; letter-spacing: 0.32em; color: var(--muted); }
.medal-line { font-size: 13px; font-weight: 650; }
.comp-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  color: #fff;
  background: var(--grad);
  box-shadow: 0 16px 30px -14px rgba(90, 60, 230, 0.85);
}
.comp-card h3 { margin: 0; font-size: 17.5px; font-weight: 850; line-height: 1.3; }
.comp-card p { font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.9); }
.comp-btn {
  min-height: 52px;
  padding: 8px 14px;
  border-radius: 18px;
  text-align: center;
  font-size: 16px;
  font-weight: 850;
  color: #3a2a9a;
  background: #fff;
}
.comp-card .comp-fine { font-size: 11.5px; text-align: center; color: rgba(255, 255, 255, 0.85); }
.gal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.gal-tabs { display: flex; gap: 8px; min-width: 0; flex-wrap: wrap; }
.gal { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gal-tile {
  aspect-ratio: 1 / 1.05;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 12px;
  color: var(--faint);
  border: 1.5px dashed rgba(170, 150, 255, 0.5);
  background: rgba(123, 92, 255, 0.1);
}
.link-list { list-style: none; padding: 0; }
.link-list li { border-bottom: 1px solid var(--line); }
.link-list button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 2px; font-size: 15px; text-align: left; }
.link-list .ic { width: 16px; height: 16px; color: var(--faint); }
.avail { text-align: center; font-size: 12.5px; color: var(--faint); }
.view-after .avail + .powered { margin-top: -6px; padding-top: 0; }

/* Quiz sheet */
.quiz { display: flex; flex-direction: column; gap: 12px; }
.quiz-top { display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 750; color: var(--muted); }
.quiz-bar { flex: 1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.quiz-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-1), var(--gold-2)); transition: width 0.3s ease; }
.quiz-q { margin: 0; font-size: 18.5px; font-weight: 800; line-height: 1.4; }
.quiz-opts { display: flex; flex-direction: column; gap: 8px; }
.quiz-opt {
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  border: 1px solid var(--surface-line);
  background: var(--surface);
}
.quiz-opt:disabled { cursor: default; }
.quiz-opt.is-right { border-color: var(--green); background: rgba(95, 240, 168, 0.14); }
.quiz-opt.is-wrong { border-color: var(--red); background: rgba(255, 59, 92, 0.14); }
.quiz-fb { font-size: 14px; font-weight: 700; }
.quiz-fb.ok { color: var(--green); }
.quiz-fb.no { color: #ff8da1; }
.quiz-score { text-align: center; padding: 8px 0 2px; }
.quiz-score strong { display: block; font-size: 44px; font-weight: 900; color: var(--gold-2); line-height: 1.1; }
.quiz-score p { font-size: 15px; color: var(--muted); }
.quiz-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz-row .btn-primary, .quiz-row .btn-outline { min-height: 50px; }

/* Companion, results and alerts sheets */
.steps { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.step { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--faint); }
.step > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.step b { font-size: 14.5px; color: var(--muted); }
.step-n {
  flex: none;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 850;
  border: 1px solid var(--surface-line);
}
.comp-flow[data-step="1"] .step[data-s="1"], .comp-flow[data-step="2"] .step[data-s="2"] { color: var(--muted); }
.comp-flow[data-step="1"] .step[data-s="1"] b, .comp-flow[data-step="2"] .step[data-s="2"] b { color: #fff; }
.comp-flow[data-step="1"] .step[data-s="1"] .step-n, .comp-flow[data-step="2"] .step[data-s="2"] .step-n { color: var(--ticket-ink); border-color: var(--gold-2); background: var(--gold-2); }
.comp-flow[data-step="2"] .step[data-s="1"] .step-n { color: var(--ticket-ink); border-color: var(--green); background: var(--green); }
.comp-pane { display: none; flex-direction: column; gap: 12px; margin-top: 14px; }
.comp-flow[data-step="1"] [data-pane="1"], .comp-flow[data-step="2"] [data-pane="2"] { display: flex; }
.pane-title { margin: 0; font-size: 17px; font-weight: 850; }
.sheet-note { font-size: 12.5px; line-height: 1.5; color: var(--faint); }
.text-btn { align-self: center; padding: 8px 12px; font-size: 13.5px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.results { list-style: none; padding: 0; }
.results li { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; font-size: 14.5px; border-bottom: 1px solid var(--line); }
.results li span { color: var(--muted); }
.switches { display: flex; flex-direction: column; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 15px; border-bottom: 1px solid var(--line); }
.switch {
  position: relative;
  flex: none;
  width: 52px; height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.2s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}
.switch[aria-checked="true"] { background: #6b5bff; }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.field-label { font-size: 13px; font-weight: 800; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -4px; }

/* Demo phase switcher (?demo=1) */
.demo-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  background: rgba(10, 7, 30, 0.95);
  border-top: 1px dashed rgba(242, 200, 107, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.demo-label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-1); text-align: center; }
.demo-phases { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; max-width: 430px; width: 100%; margin: 0 auto; }
.demo-phases button {
  min-height: 38px;
  padding: 2px 4px;
  border-radius: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.15;
  color: var(--muted);
  border: 1px solid var(--line);
}
.demo-phases button[aria-pressed="true"] { color: var(--ticket-ink); border-color: var(--gold-2); background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); }
html.demo body { padding-bottom: 100px; }
html.sheet-open .demo-bar { display: none; }

@media (max-width: 374px) {
  .cd-time { font-size: 29px; }
  .cd-steps li { font-size: 9.5px; }
  .row-title { font-size: 15px; }
  .screen-titles h2 { font-size: 19px; }
  .seg button { min-width: 44px; padding: 0 9px; }
  .quick button { font-size: 12px; padding: 0 9px; }
  .vn-big { font-size: 26px; }
  .medal { width: 180px; height: 180px; }
  .shutter { width: 72px; height: 72px; }
  .demo-phases button { font-size: 11px; }
}

/* Map sheet clean-up (Ben, 6 Oct: "a bit messy and hard to read"). Sort sits on the right; the hint is
   plain text; nearest places are one tidy list; the colour key folds away; notes are one quiet block. */
#facSortBtn { margin-left: auto; order: 10; }
.fac-menu-sort { left: auto; right: 0; }
.map-info { padding: 0; border: 0; background: none; border-radius: 0; font-weight: 600; color: var(--faint); }
.map-info.picked { color: var(--gold-1); }
.near-row { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, 0.04); }
.near-btn { min-height: 46px; gap: 10px; padding: 0 14px; border: 0; border-radius: 0; background: none; border-top: 1px solid var(--line); }
.near-btn:first-child { border-top: 0; }
.near-btn[hidden] { display: none; }
.near-btn .fi { width: 22px; height: 22px; }
.near-txt { flex: 1; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 650; }
.near-m { font-size: 13px; font-weight: 700; }
.near-btn::after { content: ""; width: 7px; height: 7px; flex: none; border-right: 2px solid var(--faint); border-top: 2px solid var(--faint); transform: rotate(45deg); margin-left: 2px; }
.near-btn[aria-pressed="true"] { background: rgba(242, 200, 107, 0.12); box-shadow: inset 3px 0 0 #ffd36b; border-color: var(--line); }
.map-key { flex-shrink: 0; border-top: 1px solid var(--line); padding-top: 10px; }
.map-key summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 650; color: var(--muted); }
.map-key summary::-webkit-details-marker { display: none; }
.map-key summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(45deg); transition: transform 0.15s; }
.map-key[open] summary::after { transform: rotate(-135deg); }
.map-key[open] .legend { margin-top: 10px; }
.map-notes { font-size: 11.5px; gap: 3px; }

/* Guide screen: the header and the avatar stay pinned at the top while the conversation scrolls
   under them (Ben, 6 Oct). The camera shortcut is gone from the composer: it read as "turn on my
   camera", and the AR photo lives in While you wait. */
#guideScreen .screen-head { position: sticky; top: 0; z-index: 4; margin-top: calc(-1 * max(16px, env(safe-area-inset-top))); padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: 8px; background: #160f40; }
#guideScreen .g-stage { position: sticky; top: calc(max(16px, env(safe-area-inset-top)) + 52px); z-index: 3; background-color: #170f42; height: clamp(200px, 38vh, 460px); }
#guideScreen[data-mode="text"] .g-stage { height: clamp(120px, 20vh, 220px); }

/* The mic becomes a stop button while it listens. */
.mic-btn .ic-stop { display: none; }
.mic-btn[aria-pressed="true"] .ic-mic { display: none; }
.mic-btn[aria-pressed="true"] .ic-stop { display: block; }
.composer.has-text .mic-btn .ic-stop { display: none; }
/* Nothing scrolls visibly above the pinned header. */
#guideScreen .sheet-body { padding-top: 0; }
#guideScreen .screen-head { margin-top: 0; }
#guideScreen .g-stage { top: calc(max(16px, env(safe-area-inset-top)) + 60px); }

/* What to do, until the first message: an instruction, not a greeting (Ben, 6 Oct). */
.chat-hint { margin: auto 0 4px; text-align: center; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.chat-log:not(:empty) ~ .chat-hint { display: none; }

/* Guide screen as one fixed layout (Ben, 6 Oct): header, avatar, chat, and the input pinned at the
   bottom. The avatar is full size until the chat starts, then shrinks to make room. */
#guideScreen .sheet { overflow: hidden; }
#guideScreen .sheet-body { height: 100%; min-height: 0; display: flex; flex-direction: column; overflow: hidden; gap: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
#guideScreen .screen-head { position: static; flex: none; padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: 0; background: none; }
#guideScreen .g-status { display: none; }
#guideScreen .g-stage { position: relative; top: auto; flex: 1 1 auto; height: auto; min-height: 220px; transition: flex-basis 0.35s ease, height 0.35s ease, min-height 0.35s ease; }
#guideScreen.has-chat .g-stage { flex: 0 0 auto; height: clamp(150px, 28vh, 280px); min-height: 0; }
#guideScreen .chat-log { flex: 0 0 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#guideScreen.has-chat .chat-log { flex: 1 1 auto; }
#guideScreen .chat-hint { flex: none; margin: 0; }
#guideScreen .composer { flex: none; }
#guideScreen .powered { flex: none; margin: 0; }
#guideScreen .g-note { flex: none; align-items: center; padding: 6px 8px 6px 12px; font-size: 12.5px; }
#guideScreen .g-note[hidden] { display: none; }
.g-note span { flex: 1; }
.g-note-x { flex: none; width: 28px; height: 28px; border-radius: 8px; font-size: 18px; line-height: 1; color: var(--muted); background: none; border: 0; }

/* Age gate (PIPA): unchecked means under 14, so the guide is text only: no mic, no earphones note,
   no "tap the mic" hint, and a short line saying why. */
.g-age-pop { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8, 6, 28, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: g-age-fade 0.18s ease-out; }
.g-age-pop[hidden] { display: none; }
.g-age-card { width: 100%; max-width: 300px; padding: 26px 20px 20px; border-radius: 26px; text-align: center; background: linear-gradient(180deg, #2b2066 0%, #1a1344 100%); border: 1px solid rgba(185, 166, 255, 0.22); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.6); animation: g-age-rise 0.22s ease-out; }
.g-age-ic { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: 14px; border-radius: 50%; background: var(--grad); box-shadow: 0 10px 24px -10px rgba(110, 80, 255, 0.9); }
.g-age-ic svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.g-age-card h3 { word-break: keep-all; margin: 0 0 6px; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.g-age-card p { margin: 0 0 20px; font-size: 13.5px; line-height: 1.45; color: var(--muted); word-break: keep-all; text-wrap: balance; }
.g-age-btns { display: flex; gap: 10px; }
.g-age-btns button { flex: 1; min-height: 48px; border-radius: 999px; font-size: 15px; font-weight: 800; cursor: pointer; }
.g-age-no { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(185, 166, 255, 0.28); color: var(--ink); }
.g-age-yes { background: var(--grad); border: 0; color: #fff; box-shadow: 0 10px 24px -12px rgba(110, 80, 255, 0.9); }
@keyframes g-age-fade { from { opacity: 0; } }
@keyframes g-age-rise { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .g-age-pop, .g-age-card { animation: none; } }
#guideScreen:not([data-age="14plus"]) .g-note,
#guideScreen:not([data-age="14plus"]) .chat-hint,
#guideScreen:not([data-age="14plus"]) .mic-btn .ic-mic,
#guideScreen:not([data-age="14plus"]) .mic-btn .ic-stop { display: none; }
#guideScreen:not([data-age="14plus"]) .mic-btn .ic-send { display: block; }

/* "Enter AR", styled like FAM's EnterArButton: accent outline, accent wash, sits on the avatar. */
.enter-ar {
  position: absolute; right: 12px; top: 12px; z-index: 5;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: #c9b8ff;
  background: rgba(123, 92, 255, 0.18); border: 1px solid #9b84ff;
  backdrop-filter: blur(6px);
}
.enter-ar:active { background: rgba(123, 92, 255, 0.32); }
