/* ============================================================
   Lower deck — the two bottom panels.
   Left  = Instagram link-out  (cyan frame, crosshatch, was the Nuggets card)
   Right = venue map           (red frame, brick, was the Knicks card)
   ============================================================ */

.deck {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(4px, 0.8cqw, 12px);
  min-height: 0;
}

/* ── Shared panel chrome ──────────────────────────────────── */
.panel {
  display: block;
  min-height: 0;
  min-width: 0;
  border-radius: 4px;
  padding: clamp(3px, 0.55cqw, 8px);
  text-decoration: none;
}

.panel__frame {
  display: flex;
  flex-direction: column;
  gap: clamp(2px, 0.45cqw, 7px);
  height: 100%;
  min-height: 0;
  padding: clamp(4px, 0.8cqw, 12px);
  border-radius: 3px;
}

/* Cyan panel — same brushed-metal treatment as the gold frame, recoloured. */
.panel--ig {
  background:
    repeating-linear-gradient(90deg,
      rgba(0,0,0,.24) 0 2px, rgba(0,0,0,0) 2px 5px,
      rgba(255,255,255,.16) 5px 6px, rgba(0,0,0,0) 6px 12px),
    linear-gradient(180deg, #6ef0ff 0%, #17a8d8 45%, #0b5f88 100%);
  box-shadow: 0 0 0 2px #000, inset 0 1px 0 rgba(255,255,255,.4);
}
.panel--ig .panel__frame {
  background-color: #0b1740;
  background-image:
    radial-gradient(rgba(122,186,255,.20) 1px, transparent 1.3px),
    repeating-linear-gradient(45deg,  rgba(255,255,255,.05) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.05) 0 1px, transparent 1px 6px),
    linear-gradient(180deg, #14265c, #050c22);
  background-size: 5px 5px, auto, auto, auto;
}

/* Red panel — brick, via two mortar layers with the second offset half a brick. */
.panel--map {
  background:
    repeating-linear-gradient(90deg,
      rgba(0,0,0,.24) 0 2px, rgba(0,0,0,0) 2px 5px,
      rgba(255,255,255,.14) 5px 6px, rgba(0,0,0,0) 6px 12px),
    linear-gradient(180deg, #ff8a5c 0%, #d8391f 45%, #7d1a0d 100%);
  box-shadow: 0 0 0 2px #000, inset 0 1px 0 rgba(255,255,255,.36);
}
.panel--map .panel__frame {
  background-color: #3a0c14;
  background-image:
    repeating-linear-gradient(0deg,  rgba(0,0,0,.5) 0 2px, transparent 2px 16px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.5) 0 2px, transparent 2px 32px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.5) 0 2px, transparent 2px 32px),
    repeating-linear-gradient(0deg,  rgba(255,255,255,.022) 0 3px, transparent 3px 37px),
    linear-gradient(180deg, #52161a, #240707);
  background-size: 32px 16px, 32px 16px, 32px 16px, auto, auto;
  background-position: 0 0, 0 0, 16px 8px, 0 0, 0 0;
}

/* Alternating attract glow, as the two cards pulse in the original. */
.panel--ig  { animation: panel-glow 1.7s steps(2, jump-none) infinite; }
.panel--map { animation: panel-glow 1.7s steps(2, jump-none) infinite .85s; }
@keyframes panel-glow { to { filter: brightness(1.14); } }

/* ============================================================
   Instagram panel
   ============================================================ */

.panel--ig { cursor: pointer; }
.panel--ig .panel__frame {
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 1.1cqw, 16px);
  text-align: center;
}

/* Cream medallion. The club seal is solid black on transparent, so it needs a
   light plate under it — inverting it to white would read as a sticker and
   fight the crosshatch. This also matches the bright logo plate in the
   reference card. */
.medallion {
  display: grid;
  place-items: center;
  width: clamp(48px, 11cqw, 140px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fffaf0 0%, #f4e8cc 55%, #d6c199 100%);
  box-shadow:
    0 0 0 clamp(2px, 0.35cqw, 5px) var(--jam-gold),
    0 0 0 clamp(3px, 0.55cqw, 7px) #000,
    inset 0 2px 6px rgba(0,0,0,.28);
  transition: transform .12s steps(3), box-shadow .12s steps(3);
}
.medallion img {
  width: 84%;
  height: auto;
  display: block;
}
.panel--ig:hover .medallion,
.panel--ig:focus-visible .medallion {
  transform: rotate(-4deg) scale(1.06);
  box-shadow:
    0 0 0 clamp(2px, 0.35cqw, 5px) var(--jam-cyan),
    0 0 0 clamp(3px, 0.55cqw, 7px) #000,
    0 0 clamp(10px, 1.8cqw, 24px) rgba(34, 231, 255, .8);
}

.ig__handle {
  font-family: var(--font-display);
  font-size: clamp(6px, 1.02cqw, 13px);
  color: var(--jam-gold);
  text-shadow: var(--outline-thin);
  word-break: break-all;
}

/* Their own bio line, which happens to fit the panel perfectly. */
.ig__tagline {
  font-size: clamp(6px, 1cqw, 13px);
  line-height: 1.7;
  color: var(--jam-cream);
  opacity: .88;
}

/* Stat grid, standing in for the reference's SPEED / POWER / DUNKS block.
   Width-capped so each key sits next to its own value — at full panel width
   the pairs stretch apart and "167  POSTS" reads as one phrase. */
.ig__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1px, 0.28cqw, 4px) clamp(8px, 1.8cqw, 26px);
  width: min(100%, 34cqw);
  font-size: clamp(6px, 0.98cqw, 13px);
}
.stat {
  display: flex;
  justify-content: space-between;
  gap: .6em;
  white-space: nowrap;
  border-bottom: 1px dotted rgba(34, 231, 255, .25);
}
.stat__key { color: var(--jam-cyan); }
/* Maxed-out ratings get a glow, because a straight row of 99s should look
   like a flex rather than a data table. */
.stat__val {
  color: var(--jam-green);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 6px rgba(72, 255, 98, .85);
}
.panel--ig:hover .stat__val,
.panel--ig:focus-visible .stat__val {
  color: #ffffff;
  text-shadow: 0 0 10px var(--jam-green), 0 0 18px rgba(72, 255, 98, .6);
}

/* "FOLLOW US" — the reference's blinking magenta "JOIN IN". */
.cta {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: clamp(7px, 1.15cqw, 15px);
  color: var(--jam-magenta);
  text-shadow: var(--outline-thin);
  animation: cta-blink .95s steps(2, jump-none) infinite;
}
@keyframes cta-blink { to { opacity: .35; } }

.panel--ig:hover .cta,
.panel--ig:focus-visible .cta {
  color: #fff;
  animation: none;
  transform: translateY(-2px) rotate(-2deg);
}

/* ============================================================
   Map panel
   ============================================================ */

.map__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5em;
  margin: 0;
  font-size: clamp(6px, 0.98cqw, 13px);
  font-weight: 400;
}
.map__label {
  font-family: var(--font-display);
  font-size: .86em;
  color: var(--jam-gold);
  text-shadow: var(--outline-thin);
}
.map__venue {
  color: var(--jam-cream);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map__screen {
  position: relative;
  flex: 1;
  min-height: clamp(60px, 12cqw, 168px);
  border: 2px solid #000;
  border-radius: 2px;
  overflow: hidden;
  background: #12121c;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.18);
}
.map__screen iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Brief white flash when the venue changes — a "channel change". */
.map__screen.is-swapping::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  animation: map-flash .28s steps(3) forwards;
  pointer-events: none;
  z-index: 2;
}
@keyframes map-flash { from { opacity: .85; } to { opacity: 0; } }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .deck {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  /* Map first: knowing where the game is beats a social link. Instagram
     follows, and the CREDIT bar stays last so it reads as the cabinet's
     footer rather than wedging itself between the two panels. */
  .panel--map { order: -1; }

  .medallion { width: clamp(64px, 18vw, 96px); }
  .ig__handle { font-size: 11px; }
  .ig__stats { font-size: 11px; max-width: 320px; }
  .cta { font-size: 13px; margin-top: 10px; }
  .map__head { font-size: 12px; }
  .map__screen { min-height: 220px; }

  /* The alternating brightness pulse is charming on a wide screen and
     distracting on a small one. */
  .panel--ig, .panel--map { animation: none; }
}

@media (max-width: 620px) {
  .map__screen { min-height: 190px; }
  .ig__stats { grid-template-columns: 1fr; max-width: 220px; }
}
