/* ============================================================
   SCREENS — landing, auth confirm, team selector, reveal, card
   ============================================================ */

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--s3);
}

/* ---------- Broadcast top bar (persistent chrome) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: 12px 18px;
  background: linear-gradient(180deg, rgba(12, 14, 20, 0.96), rgba(12, 14, 20, 0.82));
  border-bottom: 1px solid rgba(242, 227, 194, 0.18);
  backdrop-filter: blur(4px);
}
.topbar__brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 15px;
}
.topbar__brand .jp { font-size: 9px; }
.topbar__live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--red-hot);
  margin-left: auto;
}
.topbar__live b {
  color: var(--cream);
  font-weight: 600;
  letter-spacing: 0.22em;
}
.topbar__live::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red-hot);
  box-shadow: var(--glow-red);
  animation: live-blink 1.6s steps(2) infinite;
}
@keyframes live-blink { 50% { opacity: 0.25; } }
.topbar__session {
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--cream-dim);
}

/* Audio settings: icon button + popover with two toggle pills */
.topbar__audio { position: relative; display: inline-flex; align-items: center; margin-left: auto; }
.audio-btn {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  background: transparent;
  border: 1px solid rgba(242, 227, 194, 0.30);
  border-radius: 6px;
  color: var(--cream-dim);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.audio-btn:hover, .audio-btn.is-open { color: var(--orange-hot); border-color: var(--orange); background: rgba(232,118,44,0.08); }
.audio-pop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 200;
  min-width: 160px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #161922 0%, #0c0e14 100%);
  border: 1px solid rgba(242, 227, 194, 0.18);
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(0,0,0,0.55);
  display: grid;
  gap: 8px;
}
.audio-pop[hidden] { display: none; }
.audio-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream);
  cursor: pointer;
  user-select: none;
}
.audio-row input { position: absolute; opacity: 0; pointer-events: none; }
.audio-pill {
  position: relative;
  width: 32px; height: 18px;
  border-radius: 9px;
  background: rgba(242, 227, 194, 0.18);
  border: 1px solid rgba(242, 227, 194, 0.3);
  transition: background 0.15s, border-color 0.15s;
}
.audio-pill::after {
  content: "";
  position: absolute;
  top: 1px; left: 1px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--cream-dim);
  transition: transform 0.18s ease, background 0.18s ease;
}
.audio-row input:checked ~ .audio-pill {
  background: rgba(232, 118, 44, 0.35);
  border-color: var(--orange);
}
.audio-row input:checked ~ .audio-pill::after {
  transform: translateX(14px);
  background: var(--orange-hot);
}

/* Luma registration CTA — tertiary ghost button on the broadcast bar */
.topbar__cta {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream);
  background: transparent;
  border: 1px solid rgba(242, 227, 194, 0.45);
  border-radius: 6px;
  padding: 6px 12px;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.topbar__cta:hover { color: var(--orange-hot); border-color: var(--orange); background: rgba(232, 118, 44, 0.08); }

/* responsive */
@media (max-width: 720px) {
  .topbar { padding: 10px 12px; gap: 10px; }
  .topbar__brand { font-size: 12px; }
  .topbar__brand .jp { display: none; }
  .topbar__live { font-size: 9px; letter-spacing: 0.18em; gap: 6px; }
  .topbar__live b { letter-spacing: 0.14em; }
  .topbar__cta { padding: 5px 9px; font-size: 9px; letter-spacing: 0.18em; }
}
@media (max-width: 480px) {
  .topbar__live { display: none; }
}

/* ============================================================
   1 — LANDING
   ============================================================ */
.landing {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 53px);
  overflow: hidden;
}
.landing__hero {
  flex: 1;
  min-height: 90vh;
  min-height: 90dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--s6) var(--s3) var(--s5);
  position: relative;
  overflow: hidden;
}

/* ---------- VHS parallax scene ---------- */
.landing__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.lbg {
  position: absolute;
  inset: -8%;            /* overscan so parallax never reveals edges */
  will-change: transform;
  transition: transform 0.18s ease-out;
}
.lbg svg { width: 100%; height: 100%; display: block; }
/* stadium photo backdrop (drop file at assets/hero-stadium.jpg).
   Fallback sunset gradient shows if the image is missing. */
.lbg-photo {
  inset: -6%;
  background-color: #1a1020;
  /* photo on top; sunset gradient beneath shows only if the file is missing */
  background-image:
    url('../assets/hero-stadium.jpg'),
    linear-gradient(180deg, #160d1e 0%, #3a1430 30%, #7a2530 55%, #c0461f 80%, #1a1020 100%);
  background-repeat: no-repeat;
  background-position: center 42%, center;
  background-size: cover, cover;
}
.lbg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% 92%, rgba(242,227,194,0.10), transparent 60%),
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(16,18,26,0.55), transparent 70%);
}
.landing__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12,14,20,0.55) 0%, rgba(12,14,20,0.15) 35%, rgba(12,14,20,0.45) 75%, var(--ink) 100%),
    radial-gradient(ellipse 55% 50% at 50% 48%, rgba(12,14,20,0.5), transparent 70%);
}
/* VHS: chromatic shimmer + heavy scanlines + jitter */
.landing__vhs {
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
  opacity: 0.5;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.25) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, rgba(255,0,60,0.06), transparent 6%, transparent 94%, rgba(0,180,255,0.06));
  animation: vhs-jitter 0.22s steps(2) infinite;
}
@keyframes vhs-jitter {
  0% { transform: translateX(0); }
  100% { transform: translateX(0.6px); }
}
/* travelling tracking band (VHS head-switch noise) */
.landing__trackband {
  position: absolute;
  left: 0; right: 0;
  height: 14%;
  top: -14%;
  background: linear-gradient(180deg, transparent, rgba(242,227,194,0.07) 40%, rgba(255,255,255,0.12) 50%, rgba(242,227,194,0.07) 60%, transparent);
  mix-blend-mode: overlay;
  animation: track-roll 7s linear infinite;
}
@keyframes track-roll {
  0% { top: -14%; }
  100% { top: 100%; }
}
.landing__hero > :not(.landing__bg) { position: relative; z-index: 2; }
.landing__kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--teal);
  margin-bottom: var(--s3);
}
.landing__kicker::before, .landing__kicker::after {
  content: "";
  width: 48px; height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.landing__title {
  font-size: clamp(54px, 11vw, 132px);
  color: var(--cream);
  text-shadow:
    0 0 50px rgba(232, 118, 44, 0.3),
    3px 3px 0 rgba(0, 0, 0, 0.85);
}
.landing__title em {
  font-style: normal;
  color: var(--orange);
  text-shadow: 0 0 40px rgba(232, 118, 44, 0.55), 3px 3px 0 rgba(0,0,0,0.85);
}
.landing__title-jp {
  margin-top: 8px;
  font-size: clamp(11px, 2vw, 15px);
  letter-spacing: 0.65em;
}
.landing__sub {
  margin-top: var(--s4);
}
.landing__cta {
  margin-top: var(--s5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.landing__cta .hint {
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--cream-dim);
}
.x-logo {
  width: 20px; height: 20px;
  flex: none;
}

/* lower-third broadcast bars */
.lower-third {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px 10px;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--cream-dim);
  text-transform: uppercase;
}
.lower-third .bar-o { height: 6px; flex: 1; background: var(--orange); opacity: 0.85; }
.lower-third .bar-t { height: 6px; width: 18%; background: var(--teal); opacity: 0.7; }
.lower-third .bar-r { height: 6px; width: 7%; background: var(--red); }

/* leaderboard teaser strip */
.teaser {
  border-top: 1px solid rgba(242, 227, 194, 0.18);
  background: linear-gradient(180deg, rgba(26, 29, 36, 0.7), rgba(12, 14, 20, 0.95));
  padding: var(--s4) var(--s3) var(--s5);
}
.teaser__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  max-width: 1180px;
  margin: 0 auto var(--s3);
}
.teaser__cards {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(8px, 3vw, 36px);
  flex-wrap: wrap;
}
.teaser__slot {
  text-align: center;
  transition: transform 0.25s ease;
}
.teaser__slot:nth-child(1) { transform: rotate(-4deg) translateY(8px); }
.teaser__slot:nth-child(2) { transform: translateY(-6px); z-index: 2; }
.teaser__slot:nth-child(3) { transform: rotate(4deg) translateY(8px); }
.teaser__slot:hover { transform: translateY(-12px) scale(1.04); z-index: 3; }
.teaser__slot .pcard-fit { --pcard-scale: 0.42; margin: 0 auto 10px; }
.teaser__slot .pcard { pointer-events: none; }
.teaser__handle {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--cream);
  display: block;
  margin-bottom: 5px;
}

/* ============================================================
   2 — AUTH CONFIRM
   ============================================================ */
.confirm {
  min-height: calc(100dvh - 53px);
  display: grid;
  place-items: center;
  padding: var(--s5) var(--s3);
}
.confirm__wrap {
  display: inline-flex;
  align-items: center;
  gap: clamp(22px, 5vw, 56px);
  max-width: 100%;
}
.confirm__info { display: flex; flex-direction: column; }
.confirm { text-align: left; }
.confirm__info h1 { margin-top: 6px; margin-bottom: var(--s4); }
.confirm__cardwrap { display: grid; place-items: center; }
.confirm__cardwrap .pcard-fit { --pcard-scale: 0.62; }

/* PFP-only medallion shown on the confirm screen (no card frame yet) */
.confirm__pfp {
  position: relative;
  width: clamp(180px, 26vw, 240px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--metal-lo);
  box-shadow:
    0 0 0 4px var(--ink),
    0 0 0 5px rgba(212, 175, 106, 0.7),
    0 24px 50px rgba(0,0,0,0.6),
    0 0 36px rgba(212, 175, 106, 0.15);
}
.confirm__pfp::after {
  /* faint scanlines so the photo melds with the broadcast aesthetic */
  content: "";
  position: absolute; inset: 0;
  background: var(--scanlines);
  opacity: 0.25;
  pointer-events: none;
}
.confirm__pfp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.confirm__info h1 {
  font-size: clamp(34px, 6vw, 56px);
  color: var(--cream);
  margin-top: 8px;
}
.confirm__info h1 em { font-style: normal; color: var(--orange); }
.confirm__actions {
  margin-top: var(--s4);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.confirm__not-you {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--cream-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   3 — TEAM SELECTOR
   ============================================================ */
.teams {
  min-height: calc(100dvh - 53px);
  padding: var(--s5) var(--s3) calc(var(--s6) + 80px);
}
.teams__head { text-align: center; margin-bottom: var(--s5); }
.teams__head h1 { font-size: clamp(34px, 6vw, 60px); }
.teams__head h1 em { font-style: normal; color: var(--orange); }
.teams__head .jp { display: block; margin-top: 8px; }
.teams__head .note {
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--cream-dim);
}
.teams__head .note b { color: var(--teal); font-weight: 600; }
.teams__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s3);
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------- Team carousel (horizontal, arrow-nav + snap) ---------- */
.teams__head .mono-label { display: block; margin-bottom: 14px; }
.teams__stage { position: relative; max-width: 1180px; margin: 0 auto; }
.carousel-nav {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 54px; height: 54px;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  color: var(--cream);
  background: linear-gradient(180deg, #20242c, #0c0e14);
  border: 1px solid rgba(242, 227, 194, 0.32);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(242, 227, 194, 0.12);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.carousel-nav span { display: block; line-height: 1; }
.carousel-nav:hover { color: var(--orange-hot); border-color: var(--orange); background: linear-gradient(180deg, #2a2620, #14100c); }
.carousel-nav:active { transform: translateY(-50%) scale(0.92); }
.carousel-nav--prev { left: -12px; }
.carousel-nav--next { right: -12px; }
.teams__stage.is-carousel .carousel-nav { display: inline-flex; }

.teams__grid.is-carousel {
  display: flex;
  grid-template-columns: none;
  gap: var(--s4);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 24px 52px 30px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.teams__grid.is-carousel::-webkit-scrollbar { display: none; }
.teams__grid.is-carousel .team-tile {
  flex: 0 0 clamp(240px, 64vw, 320px);
  scroll-snap-align: center;
  padding: 30px 26px 24px;
  text-align: center;
}
.teams__grid.is-carousel .team-tile .crest {
  width: 116px; height: 116px;
  margin: 0 auto 18px;
}
.teams__grid.is-carousel .team-tile .name { font-size: 24px; }
.teams__grid.is-carousel .team-tile .jp { font-size: 11px; }
.teams__grid.is-carousel .team-tile .swatches { max-width: 168px; margin: 16px auto 0; }
.teams__grid.is-carousel .team-tile .pick-tag { top: 14px; right: 14px; font-size: 9px; }
.team-tile {
  position: relative;
  text-align: left;
  padding: 18px 16px 14px;
  background: var(--metal-brush);
  border: 1px solid rgba(242, 227, 194, 0.18);
  border-radius: var(--r-panel);
  color: var(--cream);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.team-tile:hover { transform: translateY(-4px); border-color: rgba(242, 227, 194, 0.45); }
.team-tile .crest {
  display: block;
  width: 64px; height: 64px;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
}
.team-tile .crest svg,
.lb-teamrow__crest svg { width: 100%; height: 100%; display: block; }
.team-tile .name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.team-tile .jp { display: block; margin-top: 3px; font-size: 9px; }
.team-tile .swatches {
  display: flex;
  gap: 5px;
  margin-top: 12px;
}
.team-tile .swatches i {
  height: 10px;
  flex: 1;
  border-radius: 2px;
  border: 1px solid rgba(0,0,0,0.5);
}
.team-tile .pick-tag {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 8px;
  letter-spacing: 0.26em;
  color: var(--gold-hot);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.team-tile.is-picked {
  border-color: var(--gold);
  box-shadow: var(--glow-gold), inset 0 0 24px rgba(212, 175, 106, 0.12);
}
.team-tile.is-picked .pick-tag { opacity: 1; }
.team-tile.is-picked::after {
  /* corner brackets */
  content: "";
  position: absolute;
  inset: 5px;
  pointer-events: none;
  background:
    linear-gradient(var(--gold), var(--gold)) 0 0 / 16px 2px,
    linear-gradient(var(--gold), var(--gold)) 0 0 / 2px 16px,
    linear-gradient(var(--gold), var(--gold)) 100% 0 / 16px 2px,
    linear-gradient(var(--gold), var(--gold)) 100% 0 / 2px 16px,
    linear-gradient(var(--gold), var(--gold)) 0 100% / 16px 2px,
    linear-gradient(var(--gold), var(--gold)) 0 100% / 2px 16px,
    linear-gradient(var(--gold), var(--gold)) 100% 100% / 16px 2px,
    linear-gradient(var(--gold), var(--gold)) 100% 100% / 2px 16px;
  background-repeat: no-repeat;
}
.teams__lockbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 14px;
  background: linear-gradient(0deg, rgba(12, 14, 20, 0.97), rgba(12, 14, 20, 0.75));
  border-top: 1px solid rgba(242, 227, 194, 0.2);
}
.teams__lockbar .picked-label {
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--cream-dim);
}
.teams__lockbar .picked-label b { color: var(--gold-hot); font-weight: 600; }

/* ============================================================
   4 — PACK REVEAL
   ============================================================ */
.reveal {
  position: relative;
  min-height: 100dvh;
  background: #000;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
}
.reveal__skip {
  position: absolute;
  bottom: 22px; right: 22px;
  z-index: 50;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: rgba(242, 227, 194, 0.45);
}

/* phase 0: scout-file generation */
.reveal__scan {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transition: opacity 0.5s ease;
}
.reveal--scandone .reveal__scan { opacity: 0; pointer-events: none; }
.scan__frame {
  position: relative;
  width: min(34vmin, 200px);
  aspect-ratio: 1;
  border: 1px solid rgba(127, 176, 168, 0.5);
  overflow: hidden;
  box-shadow: 0 0 30px rgba(127, 176, 168, 0.15);
}
.scan__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.7) contrast(1.2) brightness(0.9);
}
.scan__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(127, 176, 168, 0.12) 1px, transparent 1px) 0 0 / 100% 14px,
    linear-gradient(90deg, rgba(127, 176, 168, 0.12) 1px, transparent 1px) 0 0 / 14px 100%;
}
.scan__line {
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: var(--teal);
  box-shadow: 0 0 14px var(--teal), 0 0 40px rgba(127, 176, 168, 0.6);
  animation: scan-sweep 1.3s ease-in-out infinite alternate;
}
@keyframes scan-sweep { from { top: 2%; } to { top: 96%; } }
.scan__log {
  width: min(420px, 86vw);
  min-height: 108px;
  padding: 10px 14px;
  font-size: 10.5px;
  line-height: 1.9;
  letter-spacing: 0.1em;
  color: var(--teal);
}
.scan__log b { color: var(--cream); font-weight: 600; }
.scan__bar {
  width: min(420px, 86vw);
  height: 10px;
  border: 1px solid rgba(242, 227, 194, 0.5);
  border-radius: var(--r-pill);
  padding: 2px;
}
.scan__bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--orange), var(--orange-hot));
  box-shadow: 0 0 10px rgba(232, 118, 44, 0.6);
  transition: width 3s linear;
}

/* phase 1: tension pulse */
.reveal__pulse {
  position: absolute;
  width: 26vmin; height: 26vmin;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 118, 44, 0.85), rgba(232, 118, 44, 0.12) 55%, transparent 70%);
  filter: blur(6px);
  animation: pulse-beat 1.1s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.6s ease;
}
@keyframes pulse-beat {
  0%, 100% { transform: scale(0.82); opacity: 0.65; }
  50% { transform: scale(1.12); opacity: 1; }
}

/* phase 2: hint flashes */
.reveal__hints {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  pointer-events: none;
}
.reveal__hints > * {
  grid-area: 1 / 1;
  opacity: 0;
}
.hint-crest svg, .hint-crest img { width: 30vmin; height: 30vmin; }
.hint-crest.flash { animation: glitch-flash 0.9s steps(6) both; }
.hint-pos { color: var(--cream); }
.hint-pos .en {
  font-family: var(--font-display);
  font-size: clamp(44px, 10vmin, 96px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
}
.hint-pos .jp { font-size: 14px; letter-spacing: 0.7em; display: block; margin-top: 6px; }
.hint-pos.stamp { animation: stamp-in 0.7s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
.hint-flag { font-size: clamp(60px, 14vmin, 120px); }
.hint-flag .region {
  display: block;
  font-size: 11px;
  letter-spacing: 0.5em;
  color: var(--cream-dim);
  margin-top: 4px;
  text-transform: uppercase;
}
.hint-flag.stamp { animation: stamp-in 0.7s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
.hint-number {
  font-family: var(--font-display);
  font-size: clamp(90px, 24vmin, 220px);
  color: var(--orange);
  text-shadow: var(--glow-amber);
}
.hint-number.rolling { animation: glitch-flash 1.1s steps(10) both; }
@keyframes glitch-flash {
  0% { opacity: 0; transform: translateX(-6px) skewX(4deg); }
  20% { opacity: 1; transform: translateX(5px) skewX(-3deg); }
  35% { opacity: 0.3; transform: none; }
  55% { opacity: 1; transform: translateX(-3px); }
  70% { opacity: 0.5; }
  100% { opacity: 1; transform: none; }
}
@keyframes stamp-in {
  from { opacity: 0; transform: scale(2.4); filter: blur(6px); }
  to { opacity: 1; transform: scale(1); filter: none; }
}
@keyframes hint-out {
  to { opacity: 0; transform: scale(0.92); filter: blur(4px); }
}
.hint-out { animation: hint-out 0.35s ease both !important; }

/* phase 3: card materialise + flip */
.reveal__stage {
  position: relative;
  perspective: 1400px;
  opacity: 0;
}
.reveal__flipper {
  position: relative;
  width: calc(400px * var(--pcard-scale, 1));
  height: calc(533px * var(--pcard-scale, 1));
  transform-style: preserve-3d;
}
.reveal__flipper .face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}
.reveal__flipper .face--back { transform: rotateY(0deg); }
.reveal__flipper .face--front { transform: rotateY(180deg); }
.reveal__stage { transform-origin: 50% 50%; }
.reveal__flipper { transform-origin: 50% 50%; }
.reveal--materialize .reveal__stage {
  opacity: 1;
  animation: card-descend 0.95s cubic-bezier(0.22, 0.8, 0.32, 1) both;
}
@keyframes card-descend {
  /* card grows in place from the center, no top-down swing */
  from { transform: scale(0.78); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.reveal--flip .reveal__flipper {
  animation: card-flip 1s cubic-bezier(0.6, 0, 0.3, 1) both;
}
@keyframes card-flip {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(180deg); }
}
.reveal--flipped .reveal__flipper { transform: rotateY(180deg); }

/* light rays behind the flipped card */
.reveal__rays {
  position: absolute;
  inset: -60%;
  pointer-events: none;
  opacity: 0;
  background: repeating-conic-gradient(
    rgba(232, 118, 44, 0.09) 0deg 6deg,
    transparent 6deg 19deg
  );
  transition: opacity 0.8s ease;
}
.reveal--flipped .reveal__rays {
  opacity: 1;
  animation: holo-rotate 36s linear infinite;
}
.reveal--burst-legendary.reveal--flipped .reveal__rays {
  background: repeating-conic-gradient(
    rgba(155, 123, 255, 0.12) 0deg 6deg,
    transparent 6deg 19deg
  );
}

/* white flash + screen shake at flip impact */
.reveal__flash {
  position: absolute;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  background: #fff;
  opacity: 0;
}
.reveal--flash .reveal__flash { animation: flash-pop 0.55s ease-out both; }
@keyframes flash-pop {
  0% { opacity: 0.95; }
  100% { opacity: 0; }
}
.reveal--shake { animation: screen-shake 0.45s linear both; }
@keyframes screen-shake {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-7px, 5px); }
  40% { transform: translate(6px, -4px); }
  60% { transform: translate(-4px, -5px); }
  80% { transform: translate(3px, 4px); }
  100% { transform: translate(0, 0); }
}

/* rarity splash title */
.reveal__splash {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  text-align: center;
  pointer-events: none;
  opacity: 0;
}
/* the tier word reads like an ink stamp slammed onto the card */
.reveal__splash .en {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(54px, 15vmin, 130px);
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  transform: rotate(-4deg);
  padding: 6px 26px;
  border-top: 4px solid currentColor;
  border-bottom: 4px solid currentColor;
}
.reveal__splash .jp {
  display: block;
  margin-top: 12px;
  font-size: clamp(12px, 2.4vmin, 18px);
  letter-spacing: 0.8em;
  transform: rotate(-4deg);
}
.reveal__splash--common .en { color: var(--silver); border-color: var(--silver); text-shadow: 0 0 30px rgba(184, 188, 196, 0.6); }
.reveal__splash--epic .en {
  background: linear-gradient(180deg, var(--gold-hot), var(--gold) 55%, #8a6f38);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  border-color: var(--gold-hot);
  filter: drop-shadow(0 0 26px rgba(212, 175, 106, 0.65));
}
.reveal__splash--legendary .en {
  background: var(--holo);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  border-color: #ff9cf0;
  animation: holo-shift 3s linear infinite;
  filter: drop-shadow(0 0 30px rgba(155, 123, 255, 0.7));
}
.reveal__splash--mystic .en {
  background: linear-gradient(120deg, #5bc8f7, #9b7bff, #6ee78a, #d4af6a, #5bc8f7);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  border-color: #9be7ff;
  animation: holo-shift 2.5s linear infinite;
  filter: drop-shadow(0 0 36px rgba(91, 200, 247, 0.85));
}
.reveal__splash--mystic .jp { color: #9be7ff; }
.reveal--splash .reveal__splash { animation: splash-slam 2.4s cubic-bezier(0.2, 1.3, 0.35, 1) both; }
@keyframes splash-slam {
  0% { opacity: 0; transform: scale(2.8); filter: blur(10px); }
  16% { opacity: 1; transform: scale(1); filter: none; }
  72% { opacity: 1; transform: scale(0.98); }
  100% { opacity: 0; transform: scale(0.94) translateY(-18px); }
}

/* gentle float once revealed — small, center-anchored breathing */
.reveal--flipped .reveal__stage {
  animation: card-float 5.5s ease-in-out 1.2s infinite;
}
@keyframes card-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* MYSTIC giveaway ticket — slides up from the bottom as a 5th beat */
.reveal__ticket {
  position: absolute;
  left: 50%; bottom: 26px;
  z-index: 55;
  transform: translate(-50%, 160%);
  display: flex;
  align-items: stretch;
  width: min(440px, 90vw);
  background: linear-gradient(180deg, #14122a, #0a0814);
  border: 1px solid rgba(155, 123, 255, 0.6);
  box-shadow: 0 0 30px rgba(91, 200, 247, 0.35), 0 18px 40px rgba(0,0,0,0.6);
  opacity: 0;
}
.reveal--ticket .reveal__ticket {
  animation: ticket-rise 0.85s cubic-bezier(0.2, 1.2, 0.35, 1) both;
}
@keyframes ticket-rise {
  from { transform: translate(-50%, 160%); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
.ticket__perf {
  width: 0; border-left: 2px dashed rgba(155, 123, 255, 0.5);
  margin: 8px 0;
}
.ticket__body { flex: 1; padding: 12px 16px; text-align: left; }
.ticket__body .t-tag {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.24em;
  background: linear-gradient(120deg, #5bc8f7, #9b7bff, #6ee78a);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: holo-shift 4s linear infinite;
}
.ticket__body .t-prize {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.04em;
  color: #eaf6ff;
  margin: 4px 0 6px;
  text-shadow: 0 0 14px rgba(91, 200, 247, 0.5);
}
.ticket__body .t-claim { display: block; font-size: 9px; letter-spacing: 0.16em; color: var(--gold-hot); }
.ticket__stub {
  display: grid;
  place-items: center;
  padding: 0 14px;
  border-left: 2px dashed rgba(155, 123, 255, 0.5);
  text-align: center;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: #9be7ff;
}
.ticket__stub .jp, .ticket__stub br + * { font-size: 9px; }

/* ============================================================
   phase 4: rarity burst — anime impact lines + halftone ink rings
   + radiating Bebop-poster shapes. Tier color set via --bc / --bc2.
   ============================================================ */
.reveal__burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 44;
  --bc: #cfd3da;
  --bc2: #9aa0ab;
}
.reveal__burst--common    { --bc: #e7eaf0; --bc2: #9aa0ab; }
.reveal__burst--epic      { --bc: #f0cd85; --bc2: #e8762c; }
.reveal__burst--legendary { --bc: #ff7be6; --bc2: #5bc8f7; }
.reveal__burst--mystic    { --bc: #9be7ff; --bc2: #9b7bff; }

:is(.reveal--burst-common, .reveal--burst-epic, .reveal--burst-legendary, .reveal--burst-mystic) .reveal__burst {
  opacity: 1;
}

/* — anime impact / speed lines rushing inward — */
/* tier-colored streaks interleaved with cool-blue streaks + soft blur so they
   melt into the dark/blue background instead of reading as hard spokes */
.burst__lines {
  position: absolute;
  inset: -25%;
  background: repeating-conic-gradient(from 0deg at 50% 50%,
    var(--bc) 0deg 0.5deg,
    transparent 0.5deg 1.9deg,
    rgba(91, 150, 230, 0.85) 1.9deg 2.4deg,
    transparent 2.4deg 3.6deg);
  -webkit-mask: radial-gradient(circle, transparent 24%, #000 42%, #000 100%);
          mask: radial-gradient(circle, transparent 24%, #000 42%, #000 100%);
  opacity: 0;
  filter: blur(1.4px);
  mix-blend-mode: screen;
}
:is(.reveal--burst-common, .reveal--burst-epic, .reveal--burst-legendary, .reveal--burst-mystic) .burst__lines {
  animation: speed-lines 0.95s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
@keyframes speed-lines {
  0%   { opacity: 0; transform: scale(1.9) rotate(-4deg); }
  18%  { opacity: 0.85; }
  55%  { opacity: 0.5; transform: scale(1) rotate(0deg); }
  100% { opacity: 0; transform: scale(0.86) rotate(3deg); }
}

/* — bold geometric shapes flying outward — */
.burst__shapes { position: absolute; inset: 0; }
.bshape {
  position: absolute;
  left: 50%; top: 46%;
  opacity: 0;
  --tx: 0px; --ty: 0px; --rot: 0deg;
}
:is(.reveal--burst-common, .reveal--burst-epic, .reveal--burst-legendary, .reveal--burst-mystic) .bshape {
  animation: shape-fly 1.25s cubic-bezier(0.18, 0.72, 0.28, 1) both;
}
@keyframes shape-fly {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.2) rotate(0deg); }
  22%  { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1) rotate(var(--rot)); }
}
/* eight directions */
.bshape--disc  { width: 24px; height: 24px; border-radius: 50%; background: var(--bc);  --tx: 30vmin;  --ty: -8vmin;  --rot: 90deg; }
.bshape--ring  { width: 30px; height: 30px; border-radius: 50%; border: 4px solid var(--bc2); --tx: -32vmin; --ty: 6vmin;  --rot: -120deg; }
.bshape--bar   { width: 46px; height: 8px;  background: var(--bc2); --tx: 22vmin;  --ty: 24vmin;  --rot: 200deg; }
.bshape--bar2  { width: 38px; height: 7px;  background: var(--bc);  --tx: -24vmin; --ty: -22vmin; --rot: -160deg; }
.bshape--star  { width: 26px; height: 26px; background: var(--bc); clip-path: polygon(50% 0,58% 42%,100% 50%,58% 58%,50% 100%,42% 58%,0 50%,42% 42%); --tx: 8vmin; --ty: -32vmin; --rot: 140deg; }
.bshape--star2 { width: 20px; height: 20px; background: var(--bc2); clip-path: polygon(50% 0,58% 42%,100% 50%,58% 58%,50% 100%,42% 58%,0 50%,42% 42%); --tx: -10vmin; --ty: 30vmin; --rot: -140deg; }
.bshape--half  { width: 30px; height: 15px; border-radius: 30px 30px 0 0; background: var(--bc2); --tx: 34vmin; --ty: 14vmin; --rot: 220deg; }
.bshape--tri   { width: 0; height: 0; border-left: 13px solid transparent; border-right: 13px solid transparent; border-bottom: 22px solid var(--bc); --tx: -34vmin; --ty: -10vmin; --rot: -200deg; }

/* keep the aura ray sweep tinted per tier on legendary/mystic */
.reveal--burst-mystic.reveal--flipped .reveal__rays {
  background: repeating-conic-gradient(
    rgba(91, 200, 247, 0.14) 0deg 5deg,
    transparent 5deg 16deg
  );
}

/* reveal dev controls */
.reveal__dev {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 60;
  display: flex;
  gap: 6px;
  opacity: 0.45;
  transition: opacity 0.2s;
}
.reveal__dev:hover { opacity: 1; }
.reveal__dev button {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
  background: rgba(26, 29, 36, 0.8);
  border: 1px solid rgba(242, 227, 194, 0.25);
  border-radius: 4px;
  padding: 4px 8px;
}
.reveal__dev button.on { color: var(--gold-hot); border-color: var(--gold); }

/* ============================================================
   5 — CARD DISPLAY
   ============================================================ */
.carddisp {
  min-height: calc(100dvh - 53px);
  padding: var(--s5) var(--s3) var(--s6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s4);
  position: relative;
}
.carddisp::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 30%, rgba(232, 118, 44, 0.1), transparent 70%);
  pointer-events: none;
}
.carddisp__head { text-align: center; }
.carddisp__head .rarity-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}
.carddisp__head h1 { font-size: clamp(28px, 5vw, 44px); margin-top: 18px; }
.carddisp__stagewrap {
  perspective: 1200px;
}
/* card settles in from the reveal handoff */
.carddisp__stagewrap .pcard-fit {
  animation: card-settle 0.9s cubic-bezier(0.2, 1.2, 0.4, 1) both;
}
@keyframes card-settle {
  from { transform: scale(1.14); filter: brightness(1.6) drop-shadow(0 0 60px rgba(232, 118, 44, 0.5)); }
  to { transform: scale(1); filter: none; }
}
/* ghost card flying to the leaderboard */
.card-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  transition: transform 0.85s cubic-bezier(0.5, 0, 0.2, 1), opacity 0.85s ease;
}
.carddisp__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.carddisp__meta {
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--cream-dim);
  text-transform: uppercase;
}
/* download-image button (replaces the static meta line) */
.carddisp__download {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 2px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color 0.18s ease;
}
.carddisp__download .dl-icon { flex: none; }
.carddisp__download:hover,
.carddisp__download:focus-visible { color: var(--orange); }
/* actions + Luma CTA grouped to one centred column */
.cta-stack {
  width: fit-content;
  max-width: 90vw;
  margin: 0 auto;
}
.cta-stack .carddisp__actions { flex-wrap: nowrap; }
/* Mystic giveaway panel on the card screen */
/* the [hidden] attr alone can't beat `display:flex` below — guard it explicitly
   so the Mystic giveaway panel only shows on Mystic cards (was leaking as an
   empty glowing box on every non-Mystic card). */
.carddisp__prize[hidden] { display: none; }
.carddisp__prize {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 560px;
  padding: 14px 20px;
  background: linear-gradient(180deg, rgba(20,18,42,0.92), rgba(10,8,20,0.92));
  border: 1px solid transparent;
  border-radius: 12px;
  background-clip: padding-box;
  position: relative;
  box-shadow: 0 0 26px rgba(91, 200, 247, 0.25);
  animation: prize-glow 3s ease-in-out infinite alternate;
}
.carddisp__prize::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: 12px;
  padding: 1px;
  background: conic-gradient(from 0deg, #5bc8f7, #9b7bff, #6ee78a, #d4af6a, #5bc8f7);
  background-size: 200% 200%;
  animation: holo-shift 5s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
@keyframes prize-glow {
  from { box-shadow: 0 0 20px rgba(91, 200, 247, 0.2); }
  to { box-shadow: 0 0 36px rgba(155, 123, 255, 0.45); }
}
.carddisp__prize .prize__seal {
  flex: none;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 22px;
  color: var(--ink);
  background: radial-gradient(circle at 35% 30%, #9be7ff, #9b7bff 60%, #5a3fb0);
  box-shadow: 0 0 18px rgba(155, 123, 255, 0.6);
}
.carddisp__prize .prize__tag { display: block; font-size: 9px; letter-spacing: 0.26em; color: #9be7ff; }
.carddisp__prize .prize__prize {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(15px, 2.6vw, 21px);
  letter-spacing: 0.04em;
  color: #eaf6ff;
  margin: 3px 0 4px;
}
.carddisp__prize .prize__claim { display: block; font-size: 9.5px; letter-spacing: 0.1em; color: var(--gold-hot); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  .confirm__wrap { grid-template-columns: 1fr; text-align: center; gap: 28px; }
  .confirm__cardwrap { order: -1; }
  .confirm__actions { justify-content: center; }
  .teaser__slot:nth-child(n) { transform: none; }
  .topbar__session { display: none; }
  .teams__grid { grid-template-columns: repeat(2, 1fr); }
  .team-tile .crest { width: 48px; height: 48px; }
  .btn--big { font-size: 19px; padding: 15px 36px; }
}
@media (max-width: 420px) {
  .teams__grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .team-tile { padding: 12px 10px 10px; }
  .team-tile .name { font-size: 14px; }
}

/* ============================================================
   REVEAL — live-flow (playReveal) refinements 2026-06-20
   ============================================================ */

/* Heartbeat tension: 3 discrete thumps on the card before the flip. */
@keyframes heartbeat-thump {
  0%   { transform: scale(1); }
  20%  { transform: scale(1.065); }
  42%  { transform: scale(0.992); }
  100% { transform: scale(1); }
}
.reveal__flipper.reveal--thump { animation: heartbeat-thump 0.42s cubic-bezier(0.22, 1.4, 0.36, 1) both; }

/* Rarity splash: lift the block off the card center and group EN+JP tightly so
   the Japanese reads right under the English label (was small + low + far). */
.reveal__splash { place-items: center; padding-bottom: 30vh; }
.reveal__splash .en { margin-bottom: 0; }
.reveal__splash .jp {
  margin-top: 4px;
  font-size: clamp(18px, 3.6vmin, 32px);
  letter-spacing: 0.42em;
  text-indent: 0.42em;          /* optical-center the tracked text */
  font-weight: 600;
  opacity: 0.95;
}
