/* ============================================================
   Chess Arena · Beta Founder's Pack Prototype
   Styles extracted from mockup.html and adapted for an
   interactive single-page prototype.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

@font-face { font-family: 'Mendl Serif Dusk'; font-weight: 600; src: url('fonts/Mendl-Serif-Dusk-SemiBold-CSoAu_iO.woff') format('woff'); }
@font-face { font-family: 'Mendl Serif Dusk'; font-weight: 700; src: url('fonts/Mendl-Serif-Dusk-Bold-Cx2PUkfl.woff') format('woff'); }
@font-face { font-family: 'Capitana'; font-weight: 500; src: url('fonts/Capitana-Medium-BmMGEMGR.woff') format('woff'); }
@font-face { font-family: 'Capitana'; font-weight: 600; src: url('fonts/Capitana-Semibold-BWd6ZSl5.woff') format('woff'); }
@font-face { font-family: 'Capitana'; font-weight: 700; src: url('fonts/Capitana-Bold-CknL2wRr.woff') format('woff'); }

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Capitana', 'Inter', sans-serif;
  background: #0c0820;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================================
   CONTROL BAR — prototype-only navigation
   ============================================================ */
.control-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 22px;
  background: linear-gradient(180deg, #1a1230 0%, rgba(15,10,32,0.96) 100%);
  border-bottom: 1px solid rgba(255,215,0,0.25);
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
  font-family: 'Capitana', sans-serif;
  flex-wrap: wrap;
}

.control-bar .brand {
  font-family: 'Mendl Serif Dusk', serif;
  font-size: 13px;
  color: rgba(255,215,0,0.85);
  letter-spacing: 2px;
  text-transform: uppercase;
  padding-right: 14px;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-group label {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
}

.control-group select {
  appearance: none;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: 1px solid rgba(255,215,0,0.35);
  border-radius: 5px;
  padding: 7px 28px 7px 12px;
  font-family: 'Capitana', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23ffd700' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 200px;
  transition: border-color 0.15s ease;
}

.control-group select:hover,
.control-group select:focus {
  outline: none;
  border-color: rgba(255,215,0,0.7);
}

.control-bar button.cb-btn {
  background: rgba(0,0,0,0.5);
  color: #ffd700;
  border: 1px solid rgba(255,215,0,0.35);
  border-radius: 5px;
  padding: 7px 14px;
  font-family: 'Capitana', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
}

.control-bar button.cb-btn:hover {
  background: rgba(255,215,0,0.15);
  border-color: rgba(255,215,0,0.7);
}

.prototype-meta {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.5px;
}

.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.state-pill .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
}

.state-pill.on { color: #ffd700; border-color: rgba(255,215,0,0.45); }
.state-pill.on .dot { background: #ffd700; box-shadow: 0 0 8px rgba(255,215,0,0.8); }

/* ============================================================
   SCENE CONTAINER
   ============================================================ */
.scene-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 24px;
  min-height: calc(100vh - 70px);
}

.scene {
  display: none;
  position: relative;
  width: 1280px;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  background: #271F47;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06);
  animation: scene-fade-in 0.28s ease;
}

.scene.active { display: block; }

@keyframes scene-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.help-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(8,5,18,0.85);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.help-overlay.active { display: flex; }
.help-card {
  width: 560px; max-width: 100%;
  padding: 36px 40px;
  background: linear-gradient(180deg, #2c2350, #1f1838);
  border: 1px solid rgba(255,215,0,0.35);
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
}
.help-card h2 {
  font-family: 'Mendl Serif Dusk', serif; font-size: 22px; color: #ffd700;
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 14px;
}
.help-card p, .help-card li { font-size: 13px; color: rgba(255,255,255,0.78); line-height: 1.6; }
.help-card ul { padding-left: 18px; margin: 8px 0 16px; }
.help-card .close-row { display: flex; justify-content: flex-end; margin-top: 12px; }
.help-card button {
  background: linear-gradient(135deg, #ffd700, #f5a623);
  color: #271F47; border: none; border-radius: 5px;
  padding: 9px 22px;
  font-family: 'Capitana', sans-serif; font-weight: 700; font-size: 12px;
  cursor: pointer; letter-spacing: 0.5px; text-transform: uppercase;
}

/* ============================================================
   HOME SCREEN
   ============================================================ */
.home-screen {
  width: 100%; height: 100%;
  background: url('art/home-screen-bg.png') center center / cover no-repeat;
  position: relative;
}

/* ============================================================
   CAROUSEL BANNER (bottom-right home tile)
   ============================================================ */
.carousel-banner {
  position: absolute; bottom: 24px; right: 24px;
  width: 280px; height: 150px;
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 0 16px rgba(200,160,60,0.4), 0 0 50px rgba(200,160,60,0.15);
  border: 2px solid rgba(255,215,0,0.6);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.carousel-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 22px rgba(200,160,60,0.55), 0 0 60px rgba(200,160,60,0.22);
}

.carousel-inner {
  width: 100%; height: 100%;
  background: url('art/carousel-banner.png') center center / cover no-repeat;
  position: relative; padding: 14px;
}
.carousel-inner::before {
  content: ''; position: absolute; top:0; left:0; right:0; bottom:0;
  background: linear-gradient(to right, transparent 0%, transparent 40%, rgba(10,5,25,0.6) 65%, rgba(10,5,25,0.78) 100%);
}
.carousel-badge {
  position: absolute; top: 0; right: 0;
  background: linear-gradient(135deg, #ff4444, #cc2200);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 3px 10px 3px 12px;
  border-radius: 0 8px 0 10px;
  letter-spacing: 0.4px; text-transform: uppercase;
  z-index: 2;
}
.carousel-text {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  z-index: 1; text-align: right; max-width: 60%;
}
.carousel-text h3 {
  font-family: 'Mendl Serif Dusk', serif; font-size: 16px; font-weight: 700;
  color: #ffd700; margin-bottom: 4px;
  text-shadow: 0 0 10px rgba(255,215,0,0.3), 0 2px 8px rgba(0,0,0,0.8);
}
.carousel-text p {
  font-size: 10px; color: rgba(255,255,255,0.85); line-height: 1.4;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}

/* Red notification pip */
.notification-pip {
  position: absolute; top: -7px; right: -7px; z-index: 6;
  width: 14px; height: 14px;
  background: #ff3838;
  border: 2px solid #1a1230;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255,56,56,0.7);
  animation: pip-pulse 2s ease-in-out infinite;
}
@keyframes pip-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(255,56,56,0.6); }
  50% { transform: scale(1.15); box-shadow: 0 0 16px rgba(255,56,56,0.9); }
}

/* ============================================================
   TOP WALLET + PROFILE BADGE (steam-connected closed-beta)
   ============================================================ */
.wallet-display {
  position: absolute; top: 24px; right: 24px; z-index: 12;
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.6); padding: 6px 14px;
  border: 1px solid rgba(255,215,0,0.35); border-radius: 18px;
  backdrop-filter: blur(8px);
}
.wallet-icon {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #c08020);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: #271F47; font-weight: 700; line-height: 1;
}
.wallet-count { font-family: 'Capitana', sans-serif; font-size: 16px; font-weight: 700; color: #ffd700; padding-right: 4px; }
.wallet-label { font-size: 10px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; }

.profile-badge-display {
  position: absolute; top: 24px; right: 195px; z-index: 12;
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.6); padding: 6px 14px 6px 8px;
  border: 1px solid rgba(255,215,0,0.45); border-radius: 18px;
  backdrop-filter: blur(8px);
}
.profile-badge-icon {
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #ffe680, #c08020 60%, #6b4310 100%);
  border: 1px solid rgba(255,215,0,0.85);
  box-shadow: 0 0 8px rgba(255,215,0,0.4);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Mendl Serif Dusk', serif; font-size: 12px; font-weight: 700; color: #271F47;
}
.profile-badge-label { font-family: 'Capitana', sans-serif; font-size: 12px; font-weight: 600; color: #ffd700; line-height: 1.1; }
.profile-badge-sub { font-size: 9px; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.5px; }

/* ============================================================
   LOCK POPUP (Section 01 / 02)
   ============================================================ */
.modal-overlay-bg {
  position: absolute; top:0; left:0; right:0; bottom:0; z-index: 40;
  background: rgba(10,5,20,0.78); backdrop-filter: blur(8px);
}

.lock-popup-content {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 720px; max-width: calc(100% - 60px);
  padding: 50px 60px;
  background: linear-gradient(180deg, rgba(44,35,80,0.96), rgba(31,24,56,0.96));
  border: 1px solid rgba(255,215,0,0.4); border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  text-align: center; z-index: 50;
}
.lock-popup-content h2 {
  font-family: 'Mendl Serif Dusk', serif; font-size: 28px; color: #ffd700;
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px;
}
.lock-popup-content .lede {
  font-size: 15px; color: rgba(255,255,255,0.85); line-height: 1.55;
  margin-bottom: 28px; max-width: 540px; margin-left: auto; margin-right: auto;
}
.lock-popup-content .lede p { margin: 0 0 10px; }
.lock-popup-content .lede p:last-child { margin-bottom: 0; }
.lock-popup-content .cta-row { display: flex; justify-content: center; gap: 14px; margin-top: 28px; }
.lock-popup-content .cta {
  padding: 12px 28px; border: none; border-radius: 6px;
  font-family: 'Capitana', sans-serif; font-size: 13px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
  cursor: pointer; transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.lock-popup-content .cta:hover { transform: translateY(-1px); }
.lock-popup-content .cta.primary {
  background: linear-gradient(135deg, #ffd700, #f5a623); color: #271F47;
  box-shadow: 0 4px 16px rgba(255,215,0,0.35);
}
.lock-popup-content .cta.primary:hover { box-shadow: 0 6px 22px rgba(255,215,0,0.5); }
.lock-popup-content .cta.secondary {
  background: transparent; color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.25);
}
.lock-popup-content .cta.secondary:hover { color: #fff; border-color: rgba(255,255,255,0.5); }

/* ============================================================
   STOREFRONT POPUP (Section 04-07)
   ============================================================ */
.popup {
  position: absolute; top:0; left:0; right:0; bottom:0; z-index: 50;
  background: #271F47; overflow: hidden;
}
.popup-bg {
  position: absolute; top:0; left:0; right:0; bottom:0; z-index: 0;
  background: url('art/hero-bg.png') left center / cover no-repeat;
}
.popup-bg::after {
  content: ''; position: absolute; top:0; left:0; right:0; bottom:0;
  background:
    linear-gradient(to bottom, rgba(39,31,71,0.15) 0%, rgba(39,31,71,0.05) 25%, rgba(39,31,71,0.4) 50%, rgba(39,31,71,0.9) 70%, rgba(39,31,71,0.97) 85%),
    linear-gradient(to right, rgba(39,31,71,0.1) 0%, transparent 25%, transparent 60%, rgba(39,31,71,0.3) 100%);
}
.popup-header {
  position: absolute; top: 28px; right: 36px; z-index: 10; text-align: right;
}
.popup-header h1 {
  font-family: 'Mendl Serif Dusk', serif; font-size: 32px; font-weight: 700;
  color: #ffd700; letter-spacing: 2px; text-transform: uppercase;
  text-shadow: 0 2px 20px rgba(255,215,0,0.3), 0 4px 40px rgba(0,0,0,0.6); line-height: 1.1;
}
.popup-subtitle {
  font-size: 13px; color: rgba(255,255,255,0.55); font-weight: 500;
  margin-top: 6px; text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}

.popup-banner {
  position: absolute; top: 28px; left: 36px; right: 240px; z-index: 10;
  padding: 14px 22px;
  background: rgba(20,12,40,0.85); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,215,0,0.45); border-radius: 8px;
  display: flex; align-items: center; gap: 14px;
}
.popup-banner-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: rgba(255,215,0,0.18); border: 1px solid rgba(255,215,0,0.5);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.popup-banner-text h4 { font-family: 'Mendl Serif Dusk', serif; font-size: 15px; color: #ffd700; letter-spacing: 1px; margin-bottom: 3px; }
.popup-banner-text p { font-size: 12px; color: rgba(255,255,255,0.78); line-height: 1.45; }

.top-banner-cta {
  background: linear-gradient(135deg, #ffd700, #f5a623); color: #271F47;
  border: none; border-radius: 5px; padding: 8px 16px;
  font-family: 'Capitana', sans-serif; font-weight: 700; font-size: 12px;
  cursor: pointer; letter-spacing: 0.5px; text-transform: uppercase;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.top-banner-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255,215,0,0.4); }

.esc-home {
  position: absolute; bottom: 18px; left: 24px; z-index: 20;
  display: flex; align-items: center; gap: 8px; opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.esc-home:hover { opacity: 1; }
.esc-key {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px; padding: 3px 7px;
  font-family: 'Capitana', sans-serif; font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,0.7); letter-spacing: 0.5px;
}
.esc-label { font-size: 11px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; }

/* ============================================================
   PACK CARDS
   ============================================================ */
.packs-row {
  position: absolute; bottom: 90px; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: center; align-items: flex-end; gap: 24px; padding: 0 32px;
}
.pack-card {
  width: 320px; height: 460px; flex-shrink: 0;
  border-radius: 10px;
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end;
  border: 1px solid rgba(255,255,255,0.1);
}
.pack-card-bg {
  position: absolute; top:0; left:0; right:0; bottom:0; z-index:0;
  background-size: cover; background-position: center top;
  border-radius: 10px; overflow: hidden;
}
.pack-card-bg::after {
  content: ''; position: absolute; top:0; left:0; right:0; bottom:0;
  background: linear-gradient(180deg, rgba(20,12,40,0) 0%, rgba(20,12,40,0) 28%, rgba(20,12,40,0.2) 45%, rgba(20,12,40,0.6) 65%, rgba(20,12,40,0.95) 88%);
}
.pack-card.squire { border-color: rgba(100,140,255,0.4); }
.pack-card.squire .pack-card-bg { background-image: url('art/pack-rare.png'); }
.pack-card.knight { border-color: rgba(180,80,255,0.45); }
.pack-card.knight .pack-card-bg { background-image: url('art/pack-epic.png'); }

.pack-tier-overlay {
  position: absolute; top: 0; left: 0; right: 0; padding: 14px 16px; z-index: 2;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
}
.pack-tier-name {
  font-family: 'Mendl Serif Dusk', serif; font-size: 22px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.9);
}
.squire .pack-tier-name { color: #8eaaff; }
.knight .pack-tier-name { color: #c87aff; }

.tile-grid {
  position: relative; z-index: 2;
  display: grid; gap: 6px; padding: 6px 14px 8px;
  grid-template-columns: repeat(3, 1fr);
}
.tile-item { display: flex; flex-direction: column; gap: 3px; }
.tile-item.tile-wide { grid-column: span 3; }
.tile-item.tile-wide .tile { aspect-ratio: 3 / 1; }
.tile {
  aspect-ratio: 1 / 1; width: 100%;
  background-size: contain; background-position: center; background-repeat: no-repeat;
  border-radius: 5px; position: relative; overflow: hidden;
  background-color: rgba(20,12,40,0.4);
}
.tile-item.rarity-epic .tile { border: 2px solid rgba(182,104,255,0.95); box-shadow: 0 0 6px rgba(168,85,247,0.4); }
.tile-item.rarity-rare .tile { border: 2px solid rgba(100,140,255,0.85); }
.tile-item.rarity-common .tile { border: 2px solid rgba(140,160,180,0.6); background-color: rgba(40,40,60,0.5); }
.tile-item.rarity-epic .tile-label { color: rgba(221,181,255,1); }
.tile-item.rarity-rare .tile-label { color: rgba(155,180,255,1); }
.tile-item.rarity-common .tile-label { color: rgba(180,190,210,0.85); }
.tile-label {
  font-family: 'Capitana', sans-serif; font-size: 9px; font-weight: 700; text-align: center;
  letter-spacing: 0.1px; line-height: 1.1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.95);
  padding-top: 1px; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.pack-bottom { position: relative; z-index: 2; padding: 6px 14px 14px; }
.buy-button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 11px 14px;
  border: none; border-radius: 6px;
  font-family: 'Capitana', sans-serif;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.buy-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.squire .buy-button { background: linear-gradient(135deg, #4060dd, #3050bb); color: #fff; box-shadow: 0 3px 14px rgba(60,80,220,0.35); }
.knight .buy-button { background: linear-gradient(135deg, #8040dd, #6030bb); color: #fff; box-shadow: 0 3px 14px rgba(120,50,220,0.35); }
.buy-button.claim-free { background: linear-gradient(135deg, #ffd700, #f5a623) !important; color: #271F47 !important; box-shadow: 0 3px 18px rgba(255,215,0,0.5) !important; }
.buy-button.gated { background: #2a2540 !important; color: rgba(255,255,255,0.45) !important; box-shadow: none !important; cursor: not-allowed; }

.pack-corner-tag {
  position: absolute; top: -10px; right: -8px; z-index: 5;
  background: linear-gradient(135deg, #22cc44, #18a035); color: #fff;
  font-family: 'Capitana', sans-serif; font-size: 10px; font-weight: 700;
  padding: 4px 10px; border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5); letter-spacing: 0.5px; text-transform: uppercase;
  transform: rotate(2deg);
  display: none;
}
.pack-corner-tag.gold { background: linear-gradient(135deg, #ffd700, #e6a200); color: #271F47; }
.pack-corner-tag.muted { background: rgba(80,80,100,0.85); color: rgba(255,255,255,0.7); }

/* Show the corner tag only when the pack is in claim-state="free" */
.pack-card[data-claim-state="free"] .pack-corner-tag { display: block; }

.buy-btn-strike { font-size: 12px; font-weight: 500; text-decoration: line-through; opacity: 0.55; }

.tile-more .tile {
  display: flex !important; align-items: center !important; justify-content: center !important;
  background: linear-gradient(135deg, rgba(60,40,100,0.5), rgba(40,30,80,0.6)) !important;
  border: 2px dashed rgba(255,215,0,0.5) !important;
  cursor: pointer;
}
.tile-more .tile-label { color: rgba(255,215,0,0.85) !important; }
.tile-more-inner {
  color: rgba(255,215,0,0.95);
  font-family: 'Mendl Serif Dusk', serif;
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
  text-align: center; line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.95);
}
.tile-more-inner .more-num { font-size: 22px; display: block; }

/* ============================================================
   STEAM CONNECT MODALS (Section 08a / 08b)
   ============================================================ */
.modal {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 50;
  width: 480px; max-width: calc(100% - 40px);
  padding: 36px 44px;
  background: linear-gradient(180deg, #2c2350, #1f1838);
  border: 1px solid rgba(255,215,0,0.3); border-radius: 10px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6);
  text-align: center;
}
.modal-icon { font-size: 42px; margin-bottom: 16px; }
.modal h2 { font-family: 'Mendl Serif Dusk', serif; font-size: 22px; color: #ffd700; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 10px; }
.modal p.modal-lede { font-size: 13px; color: rgba(255,255,255,0.78); line-height: 1.55; margin-bottom: 24px; }
.modal-cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: #1b2838; color: #fff;
  border: 1px solid rgba(102,192,244,0.4); border-radius: 6px;
  padding: 12px 24px;
  font-family: 'Capitana', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease;
}
.modal-cta:hover { transform: translateY(-1px); border-color: rgba(102,192,244,0.8); }
.modal-cta-secondary {
  margin-top: 14px; font-size: 12px; color: rgba(255,255,255,0.5);
  background: none; border: none; padding: 6px;
  cursor: pointer;
  font-family: 'Capitana', sans-serif;
  transition: color 0.15s ease;
}
.modal-cta-secondary:hover { color: rgba(255,255,255,0.9); }

.modal-progress {
  margin: 30px 0 12px; height: 4px;
  background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden;
}
.modal-progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #ffd700, #f5a623);
  border-radius: 2px;
  transition: width 1.3s linear;
}
.scene.active #verifying-bar { width: 100%; }
.modal-status { font-size: 11px; color: rgba(255,215,0,0.7); letter-spacing: 1px; text-transform: uppercase; margin-top: 10px; }

/* ============================================================
   ACHIEVEMENT REVEAL (Section 08c)
   ============================================================ */
.achievement-popup {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 580px; max-width: calc(100% - 60px);
  padding: 44px 56px;
  background: linear-gradient(180deg, rgba(44,35,80,0.96), rgba(31,24,56,0.96));
  border: 1px solid rgba(255,215,0,0.5); border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 60px rgba(255,215,0,0.15);
  text-align: center; z-index: 50;
}
.achievement-popup h2 {
  font-family: 'Mendl Serif Dusk', serif; font-size: 22px; color: rgba(255,215,0,0.85);
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px;
}
.achievement-popup .badge {
  width: 130px; height: 130px; margin: 24px auto;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #ffe680, #c08020 60%, #6b4310 100%);
  border: 4px solid rgba(255,215,0,0.85);
  box-shadow: 0 0 40px rgba(255,215,0,0.5), inset 0 0 30px rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Mendl Serif Dusk', serif; font-size: 42px; font-weight: 700; color: #271F47;
  text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}
.achievement-popup .tier-name {
  font-family: 'Mendl Serif Dusk', serif; font-size: 28px; color: #ffd700;
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px;
}
.achievement-popup .tier-sub {
  font-size: 12px; color: rgba(255,255,255,0.55);
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px;
}
.achievement-popup .tier-detail {
  font-size: 13px; color: rgba(255,255,255,0.78); line-height: 1.5;
  max-width: 380px; margin: 0 auto 24px;
}
.achievement-popup .achievement-subtitle {
  font-size: 11px; color: rgba(255,215,0,0.6);
  letter-spacing: 2.5px; text-transform: uppercase;
  margin-top: -2px; margin-bottom: 18px;
  font-family: 'Capitana', sans-serif; font-weight: 600;
}

.token-display {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 32px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,215,0,0.45);
  border-radius: 8px;
  margin: 20px 0;
}
.token-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #c08020);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; box-shadow: 0 0 18px rgba(255,215,0,0.4);
  color: #271F47; font-weight: 700;
}
.token-info-label { font-size: 11px; color: rgba(255,215,0,0.7); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 4px; }
.token-info-count { font-family: 'Mendl Serif Dusk', serif; font-size: 24px; color: #fff; font-weight: 700; }
.token-info-sub { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; }

.reveal-continue {
  background: linear-gradient(135deg, #ffd700, #f5a623);
  color: #271F47;
  border: none;
  margin-top: 14px;
  padding: 12px 30px;
  border-radius: 6px;
  font-family: 'Capitana', sans-serif; font-size: 13px; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255,215,0,0.35);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.reveal-continue:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(255,215,0,0.5); }

/* ============================================================
   CLAIM CONFIRMATION (Section 09)
   ============================================================ */
.claim-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin: 18px 0;
}
.claim-tile {
  aspect-ratio: 1/1; border-radius: 6px;
  background: rgba(0,0,0,0.4);
  border: 2px solid rgba(255,215,0,0.4);
  background-size: contain; background-position: center; background-repeat: no-repeat;
  position: relative;
}
.claim-tile-label {
  position: absolute; bottom: 3px; left: 0; right: 0; text-align: center;
  font-size: 8.5px; color: rgba(255,215,0,0.85); font-weight: 700;
  text-transform: uppercase; text-shadow: 0 1px 3px rgba(0,0,0,0.95);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1340px) {
  .scene { width: 100%; }
}
@media (max-width: 720px) {
  .control-bar { padding: 10px 14px; gap: 10px; }
  .control-group select { min-width: 150px; font-size: 11px; }
  .prototype-meta { display: none; }
  .pack-card { width: 240px; height: 360px; }
  .tile-label { font-size: 8px; }
  .popup-banner { right: 36px; }
  .popup-header { display: none; }
}
