:root {
  --gold: #E8B84A;
  --blush: #F2A6B8;
  --purple: #2A1B3D;
  --cream: #FFF6E8;
  --coral: #FF8F7A;
  --purple-deep: #1a1028;
  --purple-mid: #3d2a55;
  --gold-dim: #c49a3a;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --frame-max: 420px;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0,0,0,.35);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--purple-deep);
  color: var(--cream);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  overflow: hidden;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 50% 0%, #3d2a55 0%, transparent 55%),
    var(--purple-deep);
}

.phone-frame {
  position: relative;
  width: min(100vw, var(--frame-max));
  height: min(100dvh, 860px);
  background: linear-gradient(180deg, #2f1f45 0%, var(--purple) 40%, #1e1230 100%);
  overflow: hidden;
  box-shadow: var(--shadow);
}

@media (min-width: 480px) {
  .phone-frame {
    border-radius: 28px;
    border: 2px solid rgba(232,184,74,.25);
    max-height: calc(100dvh - 24px);
  }
}

.screen {
  display: none;
  flex-direction: column;
  height: 100%;
  padding: 16px 18px calc(16px + var(--safe-bottom));
  overflow-y: auto;
  animation: fadeIn .28s ease;
}
.screen.active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.hidden { display: none !important; }

/* —— Age gate —— */
#screen-age {
  align-items: center;
  justify-content: center;
  text-align: center;
}
.age-card {
  width: 100%;
  max-width: 340px;
  padding: 24px 18px;
  background: rgba(42,27,61,.65);
  border: 1px solid rgba(232,184,74,.35);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}
.logo-lg {
  width: 140px;
  height: auto;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 4px 20px rgba(232,184,74,.2);
}
.age-card h1, .menu-title {
  font-size: 1.75rem;
  color: var(--gold);
  letter-spacing: .02em;
  font-weight: 700;
}
.tagline {
  color: var(--blush);
  font-size: .95rem;
  margin: 4px 0 18px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
}
.age-copy {
  font-size: .92rem;
  line-height: 1.5;
  color: var(--cream);
  opacity: .92;
  margin-bottom: 20px;
}
.age-copy .hint { font-size: .8rem; opacity: .7; }
.age-exit-msg {
  text-align: center;
  padding: 40px 20px;
  color: var(--blush);
}

.btn-row { display: flex; flex-direction: column; gap: 10px; }

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 20px;
  border-radius: 12px;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-wide { width: 100%; }
.btn-gold {
  background: linear-gradient(180deg, #f0c965, var(--gold));
  color: var(--purple);
  box-shadow: 0 4px 16px rgba(232,184,74,.35);
}
.btn-blush {
  background: linear-gradient(180deg, #f8bcc9, var(--blush));
  color: var(--purple);
}
.btn-coral {
  background: linear-gradient(180deg, #ffa894, var(--coral));
  color: var(--purple);
}
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(255,246,232,.35);
}
.btn-purple {
  background: var(--purple-mid);
  color: var(--cream);
  border: 1px solid rgba(232,184,74,.3);
}

.btn-icon {
  appearance: none;
  border: none;
  background: rgba(255,246,232,.08);
  color: var(--cream);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.25rem;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-icon:active { background: rgba(255,246,232,.16); }

/* —— Menu —— */
#screen-menu {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
}
.logo-menu {
  width: min(72vw, 220px);
  border-radius: 16px;
  margin-bottom: 8px;
  box-shadow: 0 8px 28px rgba(232,184,74,.22);
}

/* —— Companion pick (menu) —— */
.tease-pick {
  width: 100%;
  max-width: 280px;
  margin-top: 14px;
  text-align: center;
}
.tease-pick-label {
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blush);
  opacity: .9;
  margin-bottom: 8px;
  font-weight: 700;
}
.tease-pick-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.btn-tease-pick {
  appearance: none;
  border: 1.5px solid rgba(255,246,232,.22);
  background: rgba(0,0,0,.28);
  color: var(--cream);
  border-radius: 12px;
  padding: 10px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  font: inherit;
}
.btn-tease-pick .pick-name {
  font-weight: 800;
  font-size: .95rem;
  color: var(--cream);
}
.btn-tease-pick .pick-tag {
  font-size: .68rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .7;
  color: var(--blush);
}
.btn-tease-pick.is-selected {
  border-color: rgba(232,184,74,.7);
  background: rgba(232,184,74,.14);
  box-shadow: 0 0 14px rgba(232,184,74,.25);
}
.btn-tease-pick.is-selected .pick-name { color: var(--gold); }
.btn-tease-pick:active { transform: scale(.97); }

.btn-hud-swap {
  appearance: none;
  border: 1px solid rgba(232,184,74,.35);
  background: rgba(255,246,232,.08);
  color: var(--gold);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  align-self: center;
}
.btn-hud-swap:active { background: rgba(255,246,232,.16); }

.menu-nav { margin-top: 12px; }

.menu-nav {
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.menu-meta {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.key-pill {
  background: rgba(232,184,74,.15);
  border: 1px solid rgba(232,184,74,.4);
  color: var(--gold);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
}
.vip-badge {
  background: linear-gradient(90deg, var(--gold), var(--coral));
  color: var(--purple);
  font-weight: 800;
  font-size: .75rem;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: 6px;
}

/* —— Game HUD —— */
.hud {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.hud-stats {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: rgba(0,0,0,.25);
  border-radius: 12px;
  padding: 8px 6px;
  border: 1px solid rgba(232,184,74,.2);
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}
.stat-label {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--blush);
  opacity: .9;
}
.stat span:last-child {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--gold);
}
.goal-text {
  text-align: center;
  font-size: .82rem;
  color: var(--cream);
  opacity: .85;
  margin-bottom: 8px;
}

/* —— HUD character tease —— */
.hud-tease {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(0,0,0,.28);
  border: 2px solid rgba(232,184,74,.35);
  box-shadow: 0 0 0 0 rgba(232,184,74,0);
  transition: border-color .35s ease, box-shadow .35s ease, background .35s ease, transform .25s ease;
}
.hud-tease[data-heat="0"],
.hud-tease[data-heat="1"] {
  border-color: rgba(232,184,74,.55);
  box-shadow: 0 0 12px rgba(232,184,74,.2);
  background: rgba(20,12,30,.4);
}
.hud-tease[data-heat="2"] {
  border-color: rgba(242,166,184,.7);
  box-shadow: 0 0 22px rgba(242,166,184,.45), inset 0 0 18px rgba(242,166,184,.08);
  background: rgba(72,28,55,.48);
}
.hud-tease[data-heat="3"] {
  border-color: rgba(255,200,120,.95);
  box-shadow:
    0 0 28px rgba(242,166,184,.55),
    0 0 14px rgba(232,184,74,.45),
    inset 0 0 22px rgba(232,184,74,.12);
  background: rgba(90,36,62,.55);
  transform: translateZ(0) scale(1.01);
}
.hud-tease-art {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  flex-shrink: 0;
  width: 56px;
}
.hud-tease-portrait {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(232,184,74,.5);
  background: var(--purple-mid);
  transition: border-color .3s ease, box-shadow .3s ease, filter .3s ease;
}
.hud-tease[data-heat="1"] .hud-tease-portrait {
  border-color: rgba(232,184,74,.55);
  box-shadow: 0 0 8px rgba(232,184,74,.25);
}
.hud-tease[data-heat="2"] .hud-tease-portrait {
  border-color: rgba(242,166,184,.85);
  box-shadow: 0 0 14px rgba(242,166,184,.5);
}
.hud-tease[data-heat="3"] .hud-tease-portrait {
  border-color: rgba(255,220,140,1);
  box-shadow: 0 0 18px rgba(232,184,74,.65), 0 0 10px rgba(242,166,184,.5);
}
.hud-tease-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter .35s ease, transform .35s ease;
}
.hud-tease-portrait.is-blurred img,
.hud-tease-portrait.is-blurred .css-placeholder {
  filter: blur(5px) brightness(.78) saturate(1.05);
  transform: scale(1.12);
}
.hud-tease-portrait.is-blurred::after {
  content: '🔒';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  background: rgba(20,10,30,.22);
  pointer-events: none;
}
.hud-tease-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255,246,232,.12);
  overflow: hidden;
  border: 1px solid rgba(232,184,74,.25);
}
.hud-tease-bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--blush));
  box-shadow: 0 0 8px rgba(232,184,74,.55);
  transition: width .35s ease, background .35s ease;
}
.hud-tease[data-heat="2"] .hud-tease-bar-fill {
  background: linear-gradient(90deg, var(--blush), #ff8f7a);
}
.hud-tease[data-heat="3"] .hud-tease-bar-fill {
  background: linear-gradient(90deg, #ffd27a, var(--blush), #ff8f7a);
  box-shadow: 0 0 10px rgba(255,200,120,.7);
}
.hud-tease-portrait .css-placeholder {
  position: absolute;
  inset: 0;
  padding-bottom: 10%;
}
.hud-tease-portrait .sil-body {
  width: 48%;
  height: 70%;
}
.hud-tease-portrait .sil-label {
  display: none;
}
/* Leo heat stubs — louder silhouette tint per heat */
.hud-tease-portrait.heat-leo-1 .css-placeholder-leo {
  background: linear-gradient(160deg, #3a2a55, #1e1430);
}
.hud-tease-portrait.heat-leo-2 .css-placeholder-leo {
  background: linear-gradient(160deg, #5a3458, #2a1838);
  box-shadow: inset 0 0 18px rgba(242,166,184,.35);
}
.hud-tease-portrait.heat-leo-3 .css-placeholder-leo {
  background: linear-gradient(160deg, #7a4060, #3a2040 55%, #2a1830);
  box-shadow: inset 0 0 22px rgba(232,184,74,.4), inset 0 0 12px rgba(242,166,184,.35);
}
.hud-tease-portrait.heat-leo-2 .sil-head,
.hud-tease-portrait.heat-leo-3 .sil-head {
  background: #f0c4b0;
}
.hud-tease-portrait.heat-leo-3 .sil-torso {
  background: linear-gradient(180deg, #e8b84a, #c48a3a);
}
.hud-tease-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.hud-tease-kicker {
  font-size: .65rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: .95;
  font-weight: 700;
}
.hud-tease[data-heat="2"] .hud-tease-kicker {
  color: var(--blush);
}
.hud-tease[data-heat="3"] .hud-tease-kicker {
  color: #ffd27a;
  text-shadow: 0 0 8px rgba(232,184,74,.45);
}
.hud-tease-name {
  font-weight: 800;
  font-size: .95rem;
  color: var(--cream);
}
.hud-tease-progress {
  font-size: .78rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: .02em;
}
.hud-tease[data-heat="2"] .hud-tease-progress,
.hud-tease[data-heat="3"] .hud-tease-progress {
  color: #ffe0a0;
}
.hud-tease-caption {
  font-size: .78rem;
  color: var(--blush);
  opacity: .95;
}
.game-hint {
  text-align: center;
  font-size: .78rem;
  color: var(--blush);
  margin-top: 10px;
  opacity: .8;
}

/* —— Board —— */
.board {
  --cols: 8;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: 4px;
  width: 100%;
  aspect-ratio: 1;
  max-width: 100%;
  margin: 0 auto;
  background: rgba(0,0,0,.28);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(232,184,74,.22);
  touch-action: manipulation;
}
.tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(14px, 4.5vw, 22px);
  transition: transform .15s ease, box-shadow .15s ease, opacity .2s ease;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 2px 4px rgba(0,0,0,.2);
  border: 1.5px solid rgba(255,255,255,.18);
}
.tile:active { transform: scale(.94); }
.tile.selected {
  transform: scale(1.08);
  box-shadow: 0 0 0 2px var(--cream), 0 0 14px rgba(232,184,74,.55);
  z-index: 2;
}
.tile.matching {
  animation: popClear .32s ease forwards;
}
.tile.falling {
  transition: transform .22s cubic-bezier(.2,.8,.2,1);
}
.tile.spawn {
  animation: spawnIn .28s ease;
}
@keyframes popClear {
  0% { transform: scale(1); opacity: 1; }
  60% { transform: scale(1.25); opacity: .6; }
  100% { transform: scale(0); opacity: 0; }
}
@keyframes spawnIn {
  from { transform: scale(0) translateY(-40%); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.tile-type-0 { background: linear-gradient(145deg, #f5d078, var(--gold)); color: #5a3a10; }
.tile-type-1 { background: linear-gradient(145deg, #f9c4d0, var(--blush)); color: #6b3040; }
.tile-type-2 { background: linear-gradient(145deg, #ffb4a4, var(--coral)); color: #6b3020; }
.tile-type-3 { background: linear-gradient(145deg, #fffaf0, var(--cream)); color: #6a5530; border-color: rgba(232,184,74,.35); }
.tile-type-4 { background: linear-gradient(145deg, #5a3d78, #3d2a55); color: var(--gold); border-color: rgba(232,184,74,.3); }

.tile .glyph {
  font-weight: 800;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.15));
  pointer-events: none;
}

/* —— Gallery —— */
.sub-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.sub-header h2 {
  flex: 1;
  font-size: 1.35rem;
  color: var(--gold);
}
.gallery-intro {
  font-size: .85rem;
  opacity: .8;
  margin-bottom: 14px;
  color: var(--blush);
}
.tier-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 20px;
}
.tier-card {
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(232,184,74,.28);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s;
}
.tier-card.unlocked { border-color: rgba(232,184,74,.55); }
.tier-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--purple-mid);
  overflow: hidden;
}
.tier-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.tier-preview.locked img {
  filter: blur(14px) brightness(.45) saturate(.6);
  transform: scale(1.08);
}
.tier-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(26,16,40,.45);
  text-align: center;
  padding: 16px;
}
.tier-lock-overlay .lock-ico { font-size: 2rem; }
.tier-lock-overlay p { font-size: .9rem; color: var(--cream); }
.tier-meta {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tier-meta h3 {
  flex: 1;
  font-size: 1rem;
  color: var(--cream);
}
.tier-meta .tier-cost {
  font-size: .85rem;
  color: var(--gold);
  font-weight: 700;
}
.coming-soon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 220px;
  background:
    radial-gradient(circle at 50% 40%, rgba(232,184,74,.15), transparent 60%),
    var(--purple-mid);
  padding: 24px;
  text-align: center;
}
.coming-soon-card .pine { font-size: 3rem; transform: rotate(180deg); margin-bottom: 8px; }
.coming-soon-card h4 { color: var(--gold); margin-bottom: 6px; }
.coming-soon-card p { font-size: .85rem; opacity: .85; line-height: 1.4; }

/* —— Modal —— */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,6,18,.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
  animation: fadeIn .2s ease;
}
.modal {
  width: 100%;
  max-width: 320px;
  background: linear-gradient(180deg, #3a2850, var(--purple));
  border: 1px solid rgba(232,184,74,.4);
  border-radius: var(--radius);
  padding: 22px 18px;
  box-shadow: var(--shadow);
  text-align: center;
}
.modal h3 {
  color: var(--gold);
  font-size: 1.25rem;
  margin-bottom: 10px;
}
.modal-body {
  font-size: .92rem;
  line-height: 1.45;
  margin-bottom: 18px;
  color: var(--cream);
}
.modal-body .big-num {
  font-size: 2rem;
  color: var(--gold);
  font-weight: 800;
  display: block;
  margin: 8px 0;
}
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.score-pop {
  position: absolute;
  pointer-events: none;
  color: var(--gold);
  font-weight: 800;
  font-size: .9rem;
  animation: scoreFloat .7s ease forwards;
  z-index: 10;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
@keyframes scoreFloat {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-28px); }
}


/* —— Post-win reveal card —— */
.reveal-overlay {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  background: rgba(10,6,18,.82);
  animation: fadeIn .28s ease;
}
.reveal-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 18px calc(22px + var(--safe-bottom));
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(232,184,74,.18), transparent 50%),
    linear-gradient(180deg, #3a2850 0%, var(--purple) 55%, #1a1028 100%);
  overflow-y: auto;
}
.reveal-kicker {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blush);
  font-weight: 700;
}
.reveal-art {
  position: relative;
  width: min(72%, 260px);
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(232,184,74,.45);
  box-shadow: 0 12px 36px rgba(0,0,0,.4), 0 0 24px rgba(232,184,74,.2);
  background: var(--purple-mid);
  margin: 6px 0 4px;
}
.reveal-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.reveal-art.is-tease-locked img,
.reveal-art.is-tease-locked .css-placeholder {
  filter: blur(10px) brightness(.72) saturate(.9);
  transform: scale(1.08);
}
.reveal-art .css-placeholder {
  position: absolute;
  inset: 0;
}
.reveal-art .reveal-lock-badge {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(20,12,30,.28);
  z-index: 2;
  pointer-events: none;
}
.reveal-art .reveal-lock-badge span {
  font-size: 1.6rem;
}
.reveal-art .reveal-lock-badge p {
  font-size: .8rem;
  color: var(--cream);
  opacity: .9;
  max-width: 80%;
}
.reveal-card h3 {
  color: var(--gold);
  font-size: 1.35rem;
  margin-top: 4px;
}
.reveal-keys {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 2px 12px rgba(232,184,74,.35);
}
.reveal-copy {
  font-size: .88rem;
  line-height: 1.45;
  color: var(--cream);
  opacity: .9;
  max-width: 300px;
  margin-bottom: 8px;
}
.reveal-actions {
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

/* —— Menu soft copy —— */
.menu-sub {
  font-size: .82rem;
  color: var(--cream);
  opacity: .75;
  max-width: 280px;
  line-height: 1.4;
  margin-top: -6px;
}
.menu-wink {
  margin-top: 18px;
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--gold);
  opacity: .55;
}

/* —— Gallery lanes / shelves —— */
.gallery-lanes {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-bottom: 28px;
}
.gallery-lane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lane-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}
.lane-title {
  font-size: 1.05rem;
  color: var(--cream);
  font-weight: 700;
}
.lane-tag {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--blush);
  opacity: .9;
  white-space: nowrap;
}

/* Leo CSS silhouette placeholder */
.css-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 18%;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(242,166,184,.22), transparent 55%),
    linear-gradient(160deg, #4a3568 0%, #2a1b3d 55%, #1a1028 100%);
}
.css-placeholder-leo {
  background:
    radial-gradient(ellipse at 40% 15%, rgba(232,184,74,.2), transparent 50%),
    linear-gradient(165deg, #3d2a55 0%, #243a55 45%, #1a2030 100%);
}
.css-placeholder.is-locked {
  filter: brightness(.7);
}
.sil-body {
  position: relative;
  width: 42%;
  height: 58%;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: .85;
}
.sil-head {
  width: 38%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(145deg, #c9b8a0, #8a7a68);
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  margin-bottom: 6%;
}
.sil-torso {
  width: 72%;
  height: 38%;
  border-radius: 18px 18px 10px 10px;
  background: linear-gradient(180deg, #5a6a88, #3a4860);
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.15);
}
.sil-legs {
  width: 58%;
  height: 28%;
  margin-top: 4%;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, #2e3848, #1c2430);
}
.sil-label {
  margin-top: 12px;
  font-weight: 700;
  font-size: .9rem;
  color: var(--gold);
  letter-spacing: .04em;
}

/* Coming-soon shelf cards (couples / groups) */
.shelf-card {
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(232,184,74,.28);
  border-radius: var(--radius);
  overflow: hidden;
}
.shelf-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--purple-mid);
}
.shelf-blur {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(circle at 30% 40%, rgba(242,166,184,.45), transparent 45%),
    radial-gradient(circle at 70% 50%, rgba(232,184,74,.35), transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(255,143,122,.3), transparent 45%),
    linear-gradient(135deg, #3d2a55, #1a1028);
  filter: blur(18px) brightness(.55) saturate(.85);
  transform: scale(1.15);
}
.shelf-mf .shelf-blur {
  background:
    radial-gradient(circle at 35% 45%, rgba(242,166,184,.5), transparent 42%),
    radial-gradient(circle at 65% 45%, rgba(90,110,160,.45), transparent 42%),
    linear-gradient(135deg, #3d2a55, #1a1028);
}
.shelf-ffm .shelf-blur {
  background:
    radial-gradient(circle at 25% 50%, rgba(242,166,184,.55), transparent 38%),
    radial-gradient(circle at 50% 40%, rgba(255,143,122,.4), transparent 38%),
    radial-gradient(circle at 75% 50%, rgba(232,184,74,.4), transparent 38%),
    linear-gradient(135deg, #3d2a55, #1a1028);
}
.shelf-mmf .shelf-blur {
  background:
    radial-gradient(circle at 25% 50%, rgba(90,110,160,.5), transparent 38%),
    radial-gradient(circle at 50% 40%, rgba(242,166,184,.45), transparent 38%),
    radial-gradient(circle at 75% 50%, rgba(70,90,130,.5), transparent 38%),
    linear-gradient(135deg, #3d2a55, #1a1028);
}
.shelf-silhouettes {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 18% 40% at 38% 60%, rgba(20,12,28,.55), transparent 70%),
    radial-gradient(ellipse 18% 42% at 62% 58%, rgba(20,12,28,.55), transparent 70%);
  opacity: .9;
  pointer-events: none;
}
.shelf-ffm .shelf-silhouettes,
.shelf-mmf .shelf-silhouettes {
  background:
    radial-gradient(ellipse 14% 36% at 28% 62%, rgba(20,12,28,.55), transparent 70%),
    radial-gradient(ellipse 14% 38% at 50% 55%, rgba(20,12,28,.55), transparent 70%),
    radial-gradient(ellipse 14% 36% at 72% 62%, rgba(20,12,28,.55), transparent 70%);
}
.shelf-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  background: rgba(26,16,40,.35);
  gap: 4px;
}
.gold-lock {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 8px rgba(232,184,74,.55));
  margin-bottom: 4px;
}
.shelf-lock h4 {
  color: var(--gold);
  font-size: 1rem;
}
.shelf-lock p {
  font-size: .82rem;
  opacity: .88;
  max-width: 240px;
  line-height: 1.35;
  color: var(--cream);
}
.shelf-vip {
  margin-top: 6px !important;
  font-size: .72rem !important;
  color: var(--gold) !important;
  opacity: .95 !important;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 700;
}


/* —— Tutorial overlay —— */
.tutorial-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 6, 18, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 16px calc(18px + var(--safe-bottom));
  z-index: 60;
  animation: fadeIn .22s ease;
}

.tutorial-card {
  width: 100%;
  max-width: 340px;
  max-height: 100%;
  overflow-y: auto;
  background: linear-gradient(180deg, #3a2850 0%, var(--purple) 100%);
  border: 1px solid rgba(232, 184, 74, 0.45);
  border-radius: var(--radius);
  padding: 20px 18px 16px;
  box-shadow: var(--shadow);
  text-align: center;
}

.tutorial-kicker {
  color: var(--blush);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
}

.tutorial-card h3 {
  color: var(--gold);
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.tutorial-steps {
  list-style: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
}

.tutorial-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 246, 232, 0.05);
  border: 1px solid rgba(242, 166, 184, 0.18);
  border-radius: 12px;
  padding: 10px 12px;
}

.tutorial-steps .step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f0c965, var(--gold));
  color: var(--purple);
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.tutorial-steps .step-text {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--cream);
  opacity: 0.95;
}

.tutorial-skip {
  margin-top: 10px;
}

.link-soft {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--blush);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 8px 10px;
  opacity: 0.9;
}

.link-soft:active {
  opacity: 0.7;
}

#screen-menu .link-soft {
  margin-top: 10px;
}


/* —— Type Pack / Type Remix banner —— */
.type-remix-banner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin: 2px 0 6px;
  padding: 14px 14px 16px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(232, 184, 74, 0.22), rgba(242, 166, 184, 0.18)),
    rgba(0, 0, 0, 0.18);
  border: 1.5px solid rgba(232, 184, 74, 0.55);
  box-shadow: 0 0 0 1px rgba(242, 166, 184, 0.2), 0 6px 18px rgba(0, 0, 0, 0.22);
}
.type-remix-banner.is-unlocked {
  border-color: rgba(242, 166, 184, 0.55);
  background:
    linear-gradient(135deg, rgba(242, 166, 184, 0.2), rgba(232, 184, 74, 0.14)),
    rgba(0, 0, 0, 0.16);
}
.type-remix-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.type-remix-banner-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--gold);
  line-height: 1.25;
}
.type-remix-banner.is-unlocked .type-remix-banner-title {
  color: var(--blush);
}
.type-remix-banner-sub {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.35;
}
.type-remix-banner-hint {
  margin: 2px 0 0;
  font-size: 0.75rem;
  opacity: 0.82;
  color: var(--cream);
  line-height: 1.35;
}
.type-remix-banner-btn {
  width: 100%;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 11px 14px;
}
.gallery-tip {
  margin: -6px 0 14px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--cream);
  opacity: 0.78;
}
.remix-unlocked-badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2a1b3d;
  background: linear-gradient(135deg, var(--gold), #f2c96a);
}
.remix-locked-hint {
  display: inline-block;
  margin: 6px 0 10px;
  font-size: 0.72rem;
  opacity: 0.75;
  color: var(--blush);
}
.remix-lead {
  margin: 0 0 4px;
  line-height: 1.4;
  font-size: 0.92rem;
}
.remix-group {
  margin-top: 12px;
}
.remix-group-label {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--gold);
}
.remix-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.remix-chip {
  appearance: none;
  border: 1px solid rgba(242, 166, 184, 0.45);
  background: rgba(0, 0, 0, 0.22);
  color: var(--cream);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.remix-chip:hover:not(:disabled) {
  border-color: var(--gold);
}
.remix-chip.is-selected {
  background: rgba(232, 184, 74, 0.28);
  border-color: var(--gold);
  color: #fff6e8;
  font-weight: 700;
}
.remix-chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.remix-paywall-line {
  margin: 14px 0 4px;
  font-weight: 600;
  color: var(--blush);
  font-size: 0.9rem;
}
.remix-proto,
.remix-sticky-note {
  margin: 0;
  font-size: 0.72rem;
  opacity: 0.7;
}
.remix-thanks {
  margin: 0 0 10px;
  font-size: 0.9rem;
  line-height: 1.4;
}
