/* NEON SINS — design system. Deep night, pink/cyan neon, glass panels. */

:root {
  --bg: #0b0b1a;
  --bg2: #12122a;
  --panel: rgba(24, 24, 52, 0.72);
  --panel-solid: #181834;
  --line: rgba(168, 85, 247, 0.25);
  --pink: #ff2e88;
  --pink-glow: rgba(255, 46, 136, 0.55);
  --cyan: #22d3ee;
  --violet: #a855f7;
  --gold: #fbbf24;
  --text: #f3f2fb;
  --muted: #9a97c0;
  --danger: #ff5470;
  --ok: #34d399;
  --radius: 18px;
  --dock-h: 66px;
  --top-h: 52px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  overflow: hidden;
  user-select: none;
}
#app { height: 100dvh; width: 100vw; position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(168,85,247,.18), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(255,46,136,.14), transparent 60%),
    radial-gradient(700px 500px at 95% 90%, rgba(34,211,238,.10), transparent 60%),
    var(--bg);
}
@media (min-width: 700px) {
  #app { max-width: 480px; margin: 0 auto; box-shadow: 0 0 120px rgba(168,85,247,.25); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

.hidden { display: none !important; }
.row { display: flex; align-items: center; }
.gap { gap: 12px; }

/* ————— gates (age / auth) ————— */
.gate { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; z-index: 50;
  background: radial-gradient(800px 500px at 50% -20%, rgba(255,46,136,.22), transparent 60%), var(--bg); }
.gate-card { width: min(400px, 92vw); background: var(--panel); border: 1px solid var(--line); border-radius: 24px;
  padding: 28px 24px; backdrop-filter: blur(14px); text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.logo-block { margin-bottom: 18px; }
.logo-block.small { margin-bottom: 8px; }
.logo-neon { font-size: 44px; font-weight: 900; letter-spacing: 4px; line-height: 1;
  color: #fff; text-shadow: 0 0 12px var(--pink-glow), 0 0 40px var(--pink-glow); }
.logo-neon span { color: var(--pink); text-shadow: 0 0 14px var(--pink-glow), 0 0 50px var(--pink-glow); }
.logo-block.small .logo-neon { font-size: 30px; }
.logo-tag { color: var(--cyan); font-size: 13px; letter-spacing: 3px; text-transform: uppercase; margin-top: 8px; text-shadow: 0 0 10px rgba(34,211,238,.6); }
.gate-text { color: var(--muted); font-size: 14px; }
.gate-q { font-weight: 700; margin: 14px 0; }
.fine { color: var(--muted); font-size: 11px; margin-top: 16px; }
.fine a { color: var(--cyan); }

/* ————— buttons / inputs ————— */
.btn { border: 0; border-radius: 999px; padding: 13px 22px; font-size: 15px; font-weight: 800; cursor: pointer;
  transition: transform .08s ease, filter .15s ease; font-family: inherit; }
.btn:active { transform: scale(.96); }
.btn-primary { background: linear-gradient(135deg, var(--pink), #ff5aa5); color: #fff;
  box-shadow: 0 6px 24px var(--pink-glow), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-cyan { background: linear-gradient(135deg, #0ea5c4, var(--cyan)); color: #04222b; box-shadow: 0 6px 20px rgba(34,211,238,.4); }
.btn-gold { background: linear-gradient(135deg, #d97706, var(--gold)); color: #221602; box-shadow: 0 6px 20px rgba(251,191,36,.4); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--text); }
.btn[disabled] { filter: grayscale(.8) brightness(.6); cursor: not-allowed; }
.wide { width: 100%; }
.input { width: 100%; background: rgba(10,10,26,.8); color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 14px; font-size: 15px; margin-bottom: 10px; outline: none; font-family: inherit; }
.input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255,46,136,.15); }
.err { color: var(--danger); font-size: 13px; margin-bottom: 8px; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; background: rgba(10,10,26,.6); border-radius: 999px; padding: 4px; }
.tab { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 10px; border-radius: 999px; font-weight: 700; cursor: pointer; font-family: inherit; }
.tab.active { background: linear-gradient(135deg, var(--pink), #ff5aa5); color: #fff; }

/* ————— topbar (compact resource chips, CoC/Royal-Match density) ————— */
#topbar { position: absolute; top: 0; left: 0; right: 0; height: var(--top-h); z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 6px 8px;
  background: linear-gradient(180deg, rgba(11,11,26,.95), rgba(11,11,26,.6) 80%, transparent); }
/* the pill row is the ONLY thing allowed to shrink/scroll — top-right (stars +
   settings) must never be pushed off-screen or clipped by #app's overflow:hidden.
   A right-edge fade signals "more" instead of looking like a broken cut-off. */
.currencies { display: flex; gap: 4px; flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden;
  -ms-overflow-style: none; scrollbar-width: none; padding: 3px 6px 3px 2px;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 16px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 calc(100% - 16px), transparent 100%); }
.currencies::-webkit-scrollbar { display: none; }
.cur { flex-shrink: 0; display: flex; align-items: center; gap: 3px; cursor: pointer; font-family: inherit;
  appearance: none; -webkit-appearance: none; margin: 0;
  background: linear-gradient(180deg, #262250, #171433); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 7px 3px 3px; font-size: 10.5px; font-weight: 800; color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 6px rgba(0,0,0,.3); transition: transform .1s; }
.cur:active { transform: scale(.95); }
.cur-badge { position: relative; flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #3a3670, #14122c 72%); border: 1px solid rgba(255,255,255,.2);
  display: grid; place-items: center; font-size: 9.5px; box-shadow: inset 0 1px 2px rgba(255,255,255,.15); }
.cur-badge .ico-img, .cur-badge .ico-svg { width: 11px; height: 11px; }
.cur-val { letter-spacing: 0; white-space: nowrap; }
.cur-add { color: var(--pink); font-size: 11px; margin-left: -2px; text-shadow: 0 0 6px var(--pink-glow); }
.cur-gems { border-color: rgba(34,211,238,.45); }
.cur-gems .cur-badge { border-color: rgba(34,211,238,.55); }
/* energy's fill ring rides behind its badge — reads at a glance, no long text */
.cur-ring { position: absolute; width: 20px; height: 20px; left: -2px; top: 50%; transform: translateY(-50%) rotate(-90deg); }
.cur-ring circle { fill: none; stroke-width: 2; }
.cur-ring .track { stroke: rgba(255,255,255,.12); }
.cur-ring .fill { stroke: #fbbf24; stroke-linecap: round; stroke-dasharray: 53.4; stroke-dashoffset: 53.4;
  transition: stroke-dashoffset .4s ease; filter: drop-shadow(0 0 3px rgba(251,191,36,.7)); }
#cur-energy { position: relative; padding-left: 4px; }
#cur-energy .cur-badge { position: relative; z-index: 1; }
.top-right { display: flex; gap: 5px; align-items: center; flex-shrink: 0; }
.stars-pill { position: relative; display: flex; align-items: center; gap: 3px; background: linear-gradient(180deg, #2c2410, #1a1608);
  border: 1px solid rgba(251,191,36,.4); border-radius: 999px; padding: 3px 8px 3px 3px; font-size: 10.5px; font-weight: 800; }
.stars-pill .cur-badge.sb { width: 16px; height: 16px; background: radial-gradient(circle at 32% 28%, #6a4e10, #241c06 72%); }
.icon-btn { background: linear-gradient(180deg, #232048, #171433); border: 1px solid var(--line); border-radius: 50%;
  width: 32px; height: 32px; font-size: 14px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 3px 8px rgba(0,0,0,.35); }

/* ————— screens & dock ————— */
#screen { position: absolute; inset: var(--top-h) 0 var(--dock-h) 0; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: var(--violet) transparent; }
#dock { position: absolute; bottom: 0; left: 0; right: 0; height: var(--dock-h); z-index: 20;
  display: flex; justify-content: space-around; align-items: stretch; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(9,9,22,.98), rgba(9,9,22,.85)); border-top: 1px solid var(--line); }
.dock-btn { position: relative; flex: 1; border: 0; background: transparent; color: var(--muted); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 14px; font-family: inherit; }
.dock-btn .d-ico { font-size: 22px; filter: grayscale(.6) brightness(.8); transition: all .15s; }
.dock-btn .d-label { font-size: 10px; font-weight: 700; letter-spacing: .4px; }
.dock-btn.active { color: var(--text); }
.dock-btn.active .d-ico { filter: none; transform: translateY(-2px) scale(1.15); text-shadow: 0 0 14px var(--pink-glow); }
.dot { position: absolute; top: 6px; right: 24%; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 8px var(--danger); }

/* ————— generic panels ————— */
.screen-pad { padding: 14px 14px 24px; }
.h1 { font-size: 22px; font-weight: 900; margin: 6px 0 2px; letter-spacing: .5px; }
.sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; backdrop-filter: blur(10px); }
.card-tap { cursor: pointer; transition: transform .1s ease, border-color .15s; }
.card-tap:active { transform: scale(.98); }
.card-tap:hover { border-color: var(--pink); }

/* ————— city map ————— */
.district { position: relative; overflow: hidden; min-height: 110px; display: flex; flex-direction: column; justify-content: flex-end; }
.district .bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .85; transition: transform .3s; }
.district:hover .bg { transform: scale(1.04); }
.district .shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(9,9,22,.92) 10%, rgba(9,9,22,.15) 70%); }
.district .info { position: relative; padding: 12px 14px; }
.district .name { font-size: 18px; font-weight: 900; text-shadow: 0 0 12px rgba(0,0,0,.8); }
.district .blurb { color: var(--muted); font-size: 12px; }
.district .meta { display: flex; gap: 8px; margin-top: 6px; align-items: center; flex-wrap: wrap; }
.chip { background: rgba(10,10,26,.75); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 700; }
.chip.lock { border-color: rgba(255,84,112,.5); color: #ffb3c0; }
.chip.go { border-color: rgba(52,211,153,.5); color: #b9f5df; }
.face-row { display: flex; margin-top: 6px; }
.face { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--pink); margin-right: -8px; background: #221; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,.6); }

/* ————— level select ————— */
.lvl-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.lvl { aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--line); background: var(--panel);
  display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; font-weight: 900; position: relative; }
.lvl .n { font-size: 16px; }
.lvl .st { font-size: 9px; letter-spacing: 1px; }
.lvl.cleared { border-color: rgba(52,211,153,.4); }
.lvl.current { border-color: var(--pink); box-shadow: 0 0 18px rgba(255,46,136,.35); animation: pulse 1.6s infinite; }
.lvl.locked { opacity: .38; cursor: default; }
.lvl.boss { border-color: rgba(251,191,36,.55); }
.lvl.boss .n::after { content: "👑"; font-size: 10px; position: absolute; top: 4px; right: 6px; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 12px rgba(255,46,136,.25);} 50% { box-shadow: 0 0 26px rgba(255,46,136,.55);} }

/* ————— puzzle overlay ————— */
#puzzle { position: absolute; inset: 0; z-index: 30; background: var(--bg2); display: flex; flex-direction: column; }
#puzzle .pz-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; gap: 8px; }
#puzzle .goals { display: flex; gap: 8px; }
.goal { display: flex; align-items: center; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 800; }
.goal.done { border-color: rgba(52,211,153,.6); }
.goal .gi { font-size: 15px; }
.moves-pill { font-size: 18px; font-weight: 900; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.moves-pill.low { color: var(--danger); border-color: var(--danger); animation: pulse 1s infinite; }
.pz-girl { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.pz-girl img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; display: block;
  transform-origin: 50% 100%; }
.pz-girl .pz-shade { position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg2) 0%, transparent 30%); }
.pz-bubble { position: absolute; left: 12px; bottom: 14px; max-width: 72%; background: rgba(255,255,255,.96);
  color: #2a1435; font-weight: 700; font-size: 14px; padding: 10px 14px; border-radius: 16px 16px 16px 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,.45); opacity: 0; transform: translateY(8px) scale(.9); }
.pz-bubble.show { animation: bubblein .3s cubic-bezier(.2,.9,.3,1.3) forwards; }
@keyframes bubblein { to { opacity: 1; transform: none; } }
.pz-girl .pz-name { position: absolute; right: 10px; bottom: 12px; background: rgba(9,9,22,.7); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 800; color: var(--cyan); }
#board-wrap { flex: 0 0 auto; display: grid; place-items: center; padding: 4px 8px 12px; }
#board-canvas { border-radius: 16px; touch-action: none; }

/* ————— girls ————— */
.girl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.girl-card { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 3/4; cursor: pointer; background: var(--panel-solid); }
.girl-card img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.girl-card .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 44px;
  background: linear-gradient(160deg, #2a1440, #12122a); }
.girl-card .gshade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(9,9,22,.95) 0%, transparent 45%); }
.girl-card .gname { position: absolute; bottom: 26px; left: 10px; font-weight: 900; font-size: 16px; text-shadow: 0 1px 6px #000; }
.girl-card .grole { position: absolute; bottom: 10px; left: 10px; font-size: 11px; color: var(--muted); }
.girl-card .aff { position: absolute; top: 8px; left: 8px; }
.girl-card.locked img, .girl-card.locked .ph { filter: grayscale(1) brightness(.4); }
.girl-card .locktxt { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: var(--muted); text-align: center; padding: 10px; }
.aff { background: rgba(9,9,22,.8); border: 1px solid rgba(255,46,136,.5); color: #ffd7e8; border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 800; }
.badge-new { position: absolute; top: 8px; right: 8px; background: var(--pink); color: #fff; border-radius: 999px; padding: 3px 8px; font-size: 10px; font-weight: 900; animation: pulse 1.4s infinite; }

/* ————— girl detail ————— */
.gd-hero { position: relative; height: 46vh; min-height: 300px; border-radius: 0 0 26px 26px; overflow: hidden; background: var(--panel-solid); }
.gd-hero img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.gd-hero .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 90px; background: linear-gradient(160deg, #2a1440, #12122a); }
.gd-hero .shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11,11,26,.95), transparent 40%); }
.gd-hero .back { position: absolute; top: 10px; left: 10px; }
.gd-hero .stage-dots { position: absolute; top: 12px; right: 12px; display: flex; gap: 5px; }
.sdot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px;
  background: rgba(9,9,22,.75); border: 1px solid var(--line); cursor: pointer; }
.sdot.on { border-color: var(--pink); box-shadow: 0 0 10px var(--pink-glow); }
.sdot.lock { opacity: .5; cursor: default; }
.gd-name { position: absolute; bottom: 46px; left: 16px; font-size: 26px; font-weight: 900; text-shadow: 0 2px 10px #000; }
.gd-role { position: absolute; bottom: 24px; left: 16px; color: var(--cyan); font-size: 13px; font-weight: 700; }
.gd-body { padding: 14px; }
.bar { height: 12px; border-radius: 999px; background: rgba(10,10,26,.8); border: 1px solid var(--line); overflow: hidden; position: relative; }
.bar > i { position: absolute; inset: 0; width: 0%; background: linear-gradient(90deg, var(--pink), var(--violet)); border-radius: 999px; transition: width .5s ease; }
.bar-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: 6px 2px; }

/* ————— chat ————— */
.chat-wrap { padding: 12px 12px 20px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45; animation: msgin .25s ease; }
.msg.girl { align-self: flex-start; background: var(--panel-solid); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.you { align-self: flex-end; background: linear-gradient(135deg, var(--pink), #d6237a); border-bottom-right-radius: 6px; color: #fff; }
.msg.narrator { align-self: center; background: transparent; border: 1px dashed var(--line); color: var(--muted); font-style: italic; font-size: 13px; max-width: 92%; }
.msg .who { font-size: 11px; font-weight: 800; color: var(--cyan); margin-bottom: 3px; }
@keyframes msgin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.choice-box { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; }
.choice-btn { text-align: left; }
.typing { align-self: flex-start; color: var(--muted); font-size: 13px; padding: 6px 14px; }
.typing i { animation: blink 1s infinite; font-style: normal; }
@keyframes blink { 0%,100% { opacity: .2; } 50% { opacity: 1; } }

/* ————— juice: transitions, floating hearts, fly chips ————— */
.screen-enter { animation: screenIn .28s cubic-bezier(.2,.8,.25,1); }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.float-heart { position: absolute; z-index: 55; pointer-events: none; will-change: transform, opacity;
  animation: floatUp 1.3s ease-out forwards; filter: drop-shadow(0 0 6px var(--pink-glow)); }
@keyframes floatUp { 0% { opacity: 0; transform: translateY(0) scale(.5); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-120px) scale(1.2) rotate(20deg); } }
.fly-chip { position: absolute; z-index: 60; pointer-events: none; font-size: 22px; transform: translate(-50%,-50%); filter: drop-shadow(0 0 6px rgba(255,255,255,.5)); }

/* ————— phone hub ————— */
.phone-tabs { display: flex; gap: 6px; margin: 6px 0 14px; background: rgba(10,10,26,.6); border-radius: 999px; padding: 4px; }
.ptab { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 10px; border-radius: 999px; font-weight: 800; cursor: pointer; font-family: inherit; font-size: 14px; }
.ptab.active { background: linear-gradient(135deg, var(--violet), var(--pink)); color: #fff; }
.msg-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; cursor: pointer; }
.msg-row:active { transform: scale(.99); }
.mr-ava { position: relative; width: 52px; height: 52px; flex: 0 0 52px; }
.mr-ava img, .mr-ava .ph { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--pink); font-size: 22px; }
.mr-badge { position: absolute; top: -1px; right: -1px; width: 13px; height: 13px; border-radius: 50%; background: var(--danger); border: 2px solid var(--bg); box-shadow: 0 0 8px var(--danger); }
.mr-mid { flex: 1; min-width: 0; }
.mr-name { font-weight: 900; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.mr-new { background: var(--pink); color: #fff; font-size: 9px; font-weight: 900; padding: 2px 6px; border-radius: 999px; }
.mr-prev { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-aff { font-size: 12px; font-weight: 800; color: #ffb3d0; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo { aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); cursor: pointer; position: relative; background: var(--panel-solid); }
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.photo.locked { cursor: default; }
.photo-lock { position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; background: linear-gradient(160deg,#1a1030,#0e0e22); color: var(--muted); }

/* ————— date scene (Chat 2.0) ————— */
#date { position: absolute; inset: 0; z-index: 35; overflow: hidden; background: var(--bg2); cursor: pointer; }
#date .d-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
#date .d-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,5,14,.88) 0%, rgba(5,5,14,.15) 45%, rgba(5,5,14,.35) 100%); }
#date .d-girl { position: absolute; right: -4%; bottom: 0; height: 78%; max-width: 70%; object-fit: contain; object-position: bottom;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.6)); transform-origin: 50% 100%; }
#date .d-title { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: rgba(9,9,22,.7);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 16px; font-size: 12px; font-weight: 800; color: var(--cyan); white-space: nowrap; }
#date .d-close { position: absolute; top: 8px; left: 8px; z-index: 3; }
#date .d-box { position: absolute; left: 10px; right: 10px; bottom: 12px; z-index: 2;
  background: rgba(14,14,34,.92); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px 14px;
  backdrop-filter: blur(8px); box-shadow: 0 12px 40px rgba(0,0,0,.5); min-height: 92px; }
#date .d-who { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
#date .d-who img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--pink); object-fit: cover; }
#date .d-who .n { font-weight: 900; font-size: 14px; color: var(--pink); }
#date .d-who .n.you { color: var(--cyan); }
#date .d-text { font-size: 15px; line-height: 1.5; min-height: 44px; }
#date .d-text.narr { font-style: italic; color: var(--muted); }
#date .d-next { position: absolute; right: 14px; bottom: 10px; color: var(--muted); font-size: 12px; animation: blink 1.2s infinite; }
#date .d-choices { position: absolute; left: 12px; right: 12px; bottom: 120px; z-index: 3; display: flex; flex-direction: column; gap: 8px; }
#date .d-rewards { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* ————— shop ————— */
.sku-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sku { position: relative; text-align: center; padding: 18px 10px 14px; }
.sku .big { font-size: 34px; }
.sku .amount { font-weight: 900; font-size: 17px; margin: 6px 0 2px; }
.sku .bonus { color: var(--ok); font-size: 11px; font-weight: 800; }
.sku .price { margin-top: 10px; }
.sku .ribbon { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #221602;
  font-size: 10px; font-weight: 900; border-radius: 999px; padding: 3px 10px; white-space: nowrap; box-shadow: 0 3px 12px rgba(251,191,36,.5); }
.sku.featured { border-color: rgba(251,191,36,.6); box-shadow: 0 0 24px rgba(251,191,36,.15); }

/* ————— roulette ————— */
.wheel-wrap { display: grid; place-items: center; padding: 10px 0 4px; position: relative; }
#wheel { transition: transform 4s cubic-bezier(.12,.75,.15,1); }
.wheel-pointer { position: absolute; top: 2px; font-size: 26px; z-index: 2; filter: drop-shadow(0 2px 6px #000); }

/* ————— modal & toast ————— */
.overlay { position: absolute; inset: 0; z-index: 40; background: rgba(5,5,14,.75); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px; animation: fadein .2s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(420px, 94vw); max-height: 86dvh; overflow-y: auto; background: var(--panel-solid);
  border: 1px solid var(--line); border-radius: 22px; padding: 20px; animation: modalin .25s ease; }
@keyframes modalin { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
.modal h3 { margin: 0 0 8px; font-size: 19px; }
.modal .x { position: sticky; float: right; top: 0; }
#toast-root { position: absolute; top: calc(var(--top-h) + 8px); left: 0; right: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px;
  font-size: 14px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: toastin .25s ease; }
.toast.err { border-color: var(--danger); }
.toast.win { border-color: var(--ok); }
@keyframes toastin { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

/* ————— celebration (stage unlock / win) ————— */
.celebrate { position: absolute; inset: 0; z-index: 45; display: grid; place-items: center;
  background: radial-gradient(600px 400px at 50% 40%, rgba(255,46,136,.25), rgba(5,5,14,.9)); animation: fadein .3s; }
.celebrate .c-card { text-align: center; padding: 20px; }
.celebrate img { max-height: 60dvh; max-width: 90vw; border-radius: 20px; box-shadow: 0 0 60px var(--pink-glow); animation: revealin .6s cubic-bezier(.2,.9,.3,1.2); }
.celebrate .c-title { font-size: 26px; font-weight: 900; margin: 14px 0 4px; text-shadow: 0 0 20px var(--pink-glow); }
@keyframes revealin { from { opacity: 0; transform: scale(.85); filter: brightness(3) blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* streak / quests */
.streak-row { display: flex; gap: 6px; }
.streak-day { flex: 1; text-align: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px 2px; font-size: 11px; background: var(--panel); }
.streak-day.claimed { opacity: .45; }
.streak-day.today { border-color: var(--pink); box-shadow: 0 0 12px rgba(255,46,136,.3); }
.streak-day .r { font-size: 15px; }
.quest { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.quest .q-bar { flex: 1; }

.inv-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.inv-item { position: relative; aspect-ratio: 1; display: grid; place-items: center; font-size: 24px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.inv-item .qty { position: absolute; bottom: 2px; right: 5px; font-size: 10px; font-weight: 900; color: var(--cyan); }
.inv-item.liked { border-color: var(--pink); box-shadow: 0 0 10px rgba(255,46,136,.25); }

/* ————— meta2: achievements / race / event / offers / crafting ————— */
.ach { padding: 10px 12px; }
.ach-ico { font-size: 26px; width: 40px; height: 40px; display: grid; place-items: center;
  background: rgba(255,255,255,.05); border-radius: 12px; flex-shrink: 0; }
.ach-ready { border-color: var(--gold); box-shadow: 0 0 14px rgba(255,200,60,.25); }

.lb-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; font-size: 14px; }
.lb-row:nth-child(even) { background: rgba(255,255,255,.03); }
.lb-row.me { border: 1px solid var(--cyan); box-shadow: 0 0 10px rgba(34,211,238,.2); background: rgba(34,211,238,.06); }
.lb-rank { width: 38px; font-weight: 900; flex-shrink: 0; }
.lb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.lb-league { flex-shrink: 0; }
.lb-stars { flex-shrink: 0; font-weight: 900; color: var(--gold); }

.ev-hero { position: relative; height: 180px; border-radius: 16px; overflow: hidden; margin: 10px 0 12px;
  border: 1px solid var(--line); }
.ev-hero img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.ev-hero .shade { position: absolute; inset: 0; background: linear-gradient(180deg,transparent 30%,rgba(11,11,26,.92)); }
.ev-hero-txt { position: absolute; left: 14px; right: 14px; bottom: 10px; }
.ev-hero .ph { height: 100%; display: grid; place-items: center; font-size: 54px; background: linear-gradient(160deg,#40101c,#1b1030); }

.inv-item.craftable { border-color: var(--violet); box-shadow: 0 0 12px rgba(168,85,247,.35); cursor: pointer; }
.inv-item.craftable::after { content: '⚗️'; position: absolute; top: 2px; right: 4px; font-size: 11px; }

.input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(10,10,26,.7); color: var(--text); font-size: 15px; font-family: inherit; }
.input:focus { outline: none; border-color: var(--cyan); }

/* ————— chat 3.0 ————— */
.chat-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: rgba(11,11,26,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
.ch-ava { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  border: 2px solid var(--pink); box-shadow: 0 0 10px rgba(255,46,136,.35); }
.ch-ava img { width: 100%; height: 100%; object-fit: cover; }
.ch-ava .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 20px; }
.ch-mid { flex: 1; min-width: 0; }
.ch-name { font-weight: 900; font-size: 16px; }
.ch-sub { font-size: 11.5px; color: var(--muted); }
.chat-day { display: flex; justify-content: center; margin: 6px 0 2px; }
.chat-day span { font-size: 11px; color: var(--muted); background: rgba(255,255,255,.05);
  padding: 3px 12px; border-radius: 999px; }
.msg.typing { display: inline-flex; gap: 5px; padding: 14px 18px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: tybl 1.2s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .2s; }
.msg.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes tybl { 0%,60%,100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* ————— FTUE coach tip ————— */
.ftue-tip { position: fixed; left: 50%; bottom: calc(var(--dock-h) + 14px); transform: translateX(-50%);
  z-index: 40; display: flex; align-items: center; gap: 8px; max-width: 88vw;
  background: linear-gradient(135deg, rgba(255,46,136,.95), rgba(168,85,247,.95));
  color: #fff; font-weight: 800; font-size: 14px; padding: 12px 18px; border-radius: 999px;
  box-shadow: 0 8px 30px rgba(255,46,136,.45); cursor: pointer; animation: tipin .4s ease; }
.ftue-hand { display: inline-block; animation: handbob 1.1s ease-in-out infinite; }
@keyframes handbob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes tipin { from { opacity: 0; transform: translateX(-50%) translateY(14px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ————— accessibility ————— */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ————— chat message avatars ————— */
.msg-girl-row { display: flex; align-items: flex-end; gap: 8px; max-width: 88%; align-self: flex-start; }
.msg-girl-row .msg.girl { max-width: 100%; }
.chat-msg-ava { width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--line); flex-shrink: 0; margin-bottom: 2px; }
.icon-btn.ava-btn { padding: 0; overflow: hidden; }
.icon-btn.ava-btn img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ————— in-level boosters ————— */
.pz-boosters { position: absolute; right: 8px; bottom: 8px; z-index: 3; display: flex; gap: 6px; }
.pz-boost { border: 1px solid var(--line); background: rgba(9,9,22,.85); color: var(--text);
  border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 800; cursor: pointer; font-family: inherit; }
.pz-boost.armed { border-color: var(--gold); box-shadow: 0 0 12px rgba(251,191,36,.5); background: rgba(60,45,10,.9); }
.pz-boost[disabled] { opacity: .4; cursor: not-allowed; }

/* ————— pass milestone strip ————— */
.pass-strip { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.pass-node { flex: 1; min-width: 58px; text-align: center; border: 1px solid var(--line);
  border-radius: 12px; padding: 6px 4px; background: rgba(255,255,255,.03); font-size: 12px; }
.pn-lvl { font-weight: 900; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.pn-free { color: var(--text); }
.pn-prem { color: var(--gold); border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 3px; }
.pn-prem.locked { opacity: .45; }

/* ————— juice: confetti, card stagger, celebrate shine ————— */
.confetti { position: fixed; top: -12px; z-index: 60; pointer-events: none;
  animation: confallin linear forwards; }
@keyframes confallin { 0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(105vh) rotate(560deg); opacity: .7; } }

.screen-enter > .card, .screen-enter .girl-card { animation: cardIn .34s cubic-bezier(.2,.8,.25,1) backwards; }
.screen-enter > .card:nth-child(2), .screen-enter .girl-card:nth-child(1) { animation-delay: .03s; }
.screen-enter > .card:nth-child(3), .screen-enter .girl-card:nth-child(2) { animation-delay: .07s; }
.screen-enter > .card:nth-child(4), .screen-enter .girl-card:nth-child(3) { animation-delay: .11s; }
.screen-enter > .card:nth-child(5), .screen-enter .girl-card:nth-child(4) { animation-delay: .15s; }
.screen-enter > .card:nth-child(6), .screen-enter .girl-card:nth-child(5) { animation-delay: .19s; }
.screen-enter > .card:nth-child(n+7), .screen-enter .girl-card:nth-child(n+6) { animation-delay: .22s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

.celebrate .c-card { position: relative; overflow: hidden; }
.celebrate .c-card::after { content: ''; position: absolute; top: -60%; bottom: -60%; width: 46%;
  left: -70%; transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: shinesweep 1.6s ease-out .3s 2; }
@keyframes shinesweep { to { left: 140%; } }

/* ═════════ DESKTOP STAGE — full-bleed production framing ═════════ */
#stage-bg { position: fixed; inset: 0; z-index: -2; display: none; overflow: hidden; }
#stage-bg .sb-img { position: absolute; inset: -6%; background-size: cover; background-position: center;
  filter: saturate(1.15) brightness(.75); animation: kenburns 46s ease-in-out infinite alternate; }
#stage-bg::after { content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(1100px 700px at 50% 115%, rgba(255,46,136,.28), transparent 60%),
    radial-gradient(900px 600px at 8% -10%, rgba(34,211,238,.22), transparent 55%),
    radial-gradient(closest-side at 50% 50%, transparent 55%, rgba(5,5,14,.78) 100%),
    linear-gradient(180deg, rgba(5,5,14,.55), rgba(5,5,14,.35) 40%, rgba(5,5,14,.72));
}
@keyframes kenburns { from { transform: scale(1) translateX(0); } to { transform: scale(1.09) translateX(-2.5%); } }

/* floating neon motes */
#stage-bg .mote { position: absolute; bottom: -3vh; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,.9), rgba(255,46,136,.35) 55%, transparent 70%);
  animation: motefloat linear infinite; opacity: 0; }
@keyframes motefloat { 0% { transform: translateY(0) translateX(0); opacity: 0; }
  12% { opacity: .55; } 85% { opacity: .35; }
  100% { transform: translateY(-108vh) translateX(6vw); opacity: 0; } }

.stage-girl { position: fixed; bottom: 0; z-index: -1; display: none; height: min(88vh, 980px);
  filter: drop-shadow(0 0 34px rgba(255,46,136,.28)) drop-shadow(0 22px 24px rgba(0,0,0,.55)); }
.stage-girl img { height: 100%; width: auto; animation: stagebreathe 4.2s ease-in-out infinite; transform-origin: bottom center; }
.stage-girl::after { content: ''; position: absolute; left: 8%; right: 8%; bottom: -2px; height: 26px;
  background: radial-gradient(closest-side, rgba(255,46,136,.5), transparent); filter: blur(6px); }
#stage-left { left: max(12px, calc(50vw - 240px - 46vh)); }
#stage-right { right: max(12px, calc(50vw - 240px - 46vh)); }
@keyframes stagebreathe { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(1.011) scaleX(1.004); } }
.stage-girl.enter img { animation: stagein .9s cubic-bezier(.2,.8,.25,1) backwards, stagebreathe 4.2s ease-in-out .9s infinite; }
@keyframes stagein { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }

@media (min-width: 1000px) {
  #stage-bg, .stage-girl { display: block; }
  #app { max-width: 480px; border-radius: 26px; margin: 12px auto; height: calc(100dvh - 24px);
    border: 1px solid rgba(255,46,136,.35);
    box-shadow: 0 0 0 1px rgba(34,211,238,.18), 0 0 90px rgba(255,46,136,.30), 0 30px 80px rgba(0,0,0,.6);
    overflow: hidden; }
}

/* ═════════ GATES — storefront-grade first impression ═════════ */
.gate { background: transparent; }
.gate::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(180deg, rgba(6,6,16,.72), rgba(6,6,16,.55) 45%, rgba(6,6,16,.85)),
    var(--gate-bg, url('/assets/scenes/club.webp'));
  background-size: cover; background-position: center; filter: saturate(1.1); }
.gate .gate-host { position: absolute; bottom: 0; height: min(72vh, 620px); z-index: 0;
  right: calc(50% + min(180px, 22vw)); pointer-events: none;
  filter: drop-shadow(0 0 26px rgba(168,85,247,.4)); animation: stagein 1s cubic-bezier(.2,.8,.25,1) both; }
.gate .gate-host img { height: 100%; animation: stagebreathe 4.4s ease-in-out infinite; transform-origin: bottom center; }
@media (max-width: 699px) { .gate .gate-host { display: none; } }
.gate-card { position: relative; z-index: 1; background: rgba(16,14,36,.78);
  border: 1px solid rgba(255,46,136,.35);
  box-shadow: 0 0 60px rgba(255,46,136,.22), 0 24px 70px rgba(0,0,0,.6); }
.logo-neon { animation: logopulse 3.2s ease-in-out infinite; }
@keyframes logopulse { 0%,100% { text-shadow: 0 0 12px var(--pink-glow), 0 0 40px var(--pink-glow); }
  50% { text-shadow: 0 0 18px var(--pink-glow), 0 0 64px var(--pink-glow), 0 0 110px rgba(255,46,136,.35); } }

/* ═════════ screens get an art layer under the UI ═════════ */
#screen::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(180deg, rgba(11,11,26,.86), rgba(11,11,26,.92) 55%, rgba(11,11,26,.97)),
    url('/assets/bg/district_sanctum.webp');
  background-size: cover; background-position: center top; opacity: .9; }

/* ═════════ city hero (host welcome) ═════════ */
.city-hero { position: relative; height: 168px; border-radius: 18px; overflow: hidden; margin: 8px 0 14px;
  border: 1px solid rgba(255,46,136,.3); box-shadow: 0 10px 34px rgba(0,0,0,.4); }
.city-hero .ch-bg { position: absolute; inset: 0; background-size: cover; background-position: center;
  animation: kenburns 30s ease-in-out infinite alternate; }
.city-hero .ch-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,8,20,.15), rgba(8,8,20,.78) 70%); }
.city-hero .ch-girl { position: absolute; left: -6px; bottom: 0; height: 118%; pointer-events: none;
  filter: drop-shadow(0 0 14px rgba(255,46,136,.35)); }
.city-hero .ch-girl img { height: 100%; animation: stagebreathe 4s ease-in-out infinite; transform-origin: bottom center; }
.city-hero .ch-txt { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 58%; text-align: right; }
.city-hero .ch-name { font-weight: 900; font-size: 20px; text-shadow: 0 0 14px var(--pink-glow); }
.city-hero .ch-line { color: #d9d6f2; font-size: 12.5px; font-style: italic; margin-top: 4px; line-height: 1.45; }

/* puzzle board sits on scene glass, not flat navy */
#board-wrap { background: linear-gradient(180deg, rgba(10,10,24,.72), rgba(10,10,24,.88)),
  var(--pz-bg, none) center/cover; border-top: 1px solid rgba(168,85,247,.25); }

/* fix: on desktop, #app gets a transform so the fixed art layer (#screen::before)
   is contained+clipped to the column instead of veiling the whole viewport */
@media (min-width: 1000px) {
  #app { transform: translateZ(0); }
}
/* district card text must survive bright backgrounds */
.district .shade { background: linear-gradient(180deg, rgba(8,8,20,.18) 0%, rgba(8,8,20,.55) 55%, rgba(8,8,20,.88) 100%) !important; }
.district .info .name, .district .blurb { text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 0 12px rgba(0,0,0,.6); }
.district .blurb { color: #e6e3f7; }

/* ————— rendered icon set ————— */
.ico-img { width: 16px; height: 16px; object-fit: contain; vertical-align: -3px; display: inline-block; }
.ico-svg svg { width: 100%; height: 100%; display: block; }
.cur .ico .ico-img { width: 15px; height: 15px; }
.d-ico { display: inline-flex; align-items: center; justify-content: center; height: 26px; }
.d-img { width: 26px; height: 26px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.gi .ico-img { width: 18px; height: 18px; }
.pz-boost .ico-img { width: 17px; height: 17px; }
.stars-pill .ico-img { width: 14px; height: 14px; }
/* tips never sit over gameplay overlays */
#overlay-root:has(#puzzle) .ftue-tip, #overlay-root:has(#date) .ftue-tip { display: none; }

/* ————— loading screen ————— */
.load-bar { height: 12px; border-radius: 999px; background: rgba(255,255,255,.08);
  border: 1px solid var(--line); overflow: hidden; margin: 18px 0 10px; }
.load-bar i { display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--violet), var(--cyan));
  background-size: 200% 100%; animation: loadshimmer 1.6s linear infinite;
  transition: width .25s ease; box-shadow: 0 0 14px var(--pink-glow); }
@keyframes loadshimmer { to { background-position: -200% 0; } }

/* ————— HUD spotlight tutorial ————— */
.tut-layer { position: absolute; inset: 0; z-index: 55; }
/* Guided-tap layers (real click-through to the spotlighted element) must NOT
   let their own full-size box swallow clicks over the hole gap — only the
   shading rects and skip button should capture. Info/HUD tours (no .tut-guided
   class) keep the default blocking so Next/Skip stays the only way through. */
.tut-layer.tut-guided { pointer-events: none; }
.tut-layer.tut-guided .tut-shade, .tut-layer.tut-guided .tut-skip { pointer-events: auto; }
.tut-hole { position: absolute; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(5,5,14,.86), 0 0 22px var(--pink-glow);
  border: 2px solid var(--pink); transition: all .35s cubic-bezier(.2,.8,.25,1);
  animation: tuthole-pulse 1.6s ease-in-out infinite; }
@keyframes tuthole-pulse { 0%, 100% { border-color: var(--pink); } 50% { border-color: var(--cyan); } }
.tut-bubble { position: absolute; width: 260px; background: var(--panel-solid); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.55); pointer-events: auto;
  transition: all .35s cubic-bezier(.2,.8,.25,1); animation: tutbubblein .3s cubic-bezier(.2,.8,.25,1); }
@keyframes tutbubblein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tut-title { font-weight: 900; font-size: 15px; color: var(--pink); margin-bottom: 4px; }
.tut-text { font-size: 12.5px; color: var(--text); line-height: 1.45; margin-bottom: 10px; }
.tut-dots { display: flex; gap: 5px; justify-content: center; margin-bottom: 10px; }
.tut-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--line); display: block; }
.tut-dots span.on { background: var(--pink); box-shadow: 0 0 6px var(--pink-glow); }
.tut-actions { display: flex; gap: 8px; }
.tut-actions .btn { flex: 1; padding: 9px; font-size: 13px; }

/* ————— intro splash (studio-bumper style, shown on every cold boot) ————— */
#intro { z-index: 60; overflow: hidden; cursor: pointer;
  background: radial-gradient(1100px 700px at 50% 28%, rgba(168,85,247,.28), transparent 62%), var(--bg); }
#intro::before { content: ''; position: absolute; inset: 0; opacity: .32; filter: saturate(1.2);
  background-image: linear-gradient(180deg, rgba(6,6,16,.35), rgba(6,6,16,.9)), url('/assets/bg/district_sanctum.webp');
  background-size: cover; background-position: center; animation: kenburns 14s ease-in-out infinite alternate; }
#intro .mote { position: absolute; bottom: -3vh; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,.9), rgba(255,46,136,.35) 55%, transparent 70%);
  animation: motefloat linear infinite; opacity: 0; }
#intro.intro-out { opacity: 0; transform: scale(1.03); transition: opacity .26s ease, transform .26s ease; pointer-events: none; }
.intro-inner { position: relative; z-index: 1; text-align: center; }
.intro-logo { font-size: 52px; opacity: 0;
  animation: introLogoIn 1s cubic-bezier(.2,.8,.25,1) .15s forwards, logopulse 3.2s ease-in-out 1.3s infinite; }
@keyframes introLogoIn { 0% { opacity: 0; transform: scale(.7) translateY(18px); filter: blur(10px); }
  55% { opacity: 1; filter: blur(0); } 100% { opacity: 1; transform: none; } }
.intro-tagline { opacity: 0; animation: fadein .6s ease .9s forwards; }
.intro-tap { margin-top: 46px; opacity: 0; color: var(--cyan); font-size: 12px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; text-shadow: 0 0 10px rgba(34,211,238,.6);
  animation: fadein .5s ease 1.7s forwards, blink 1.6s ease-in-out 1.7s infinite; }

/* ————— guided-tap tutorial (forced real interaction) ————— */
.tut-shade { position: absolute; background: rgba(5,5,14,.86); pointer-events: auto; cursor: default; }
.tut-hole-guided { box-shadow: 0 0 22px var(--pink-glow); }   /* darkening comes from .tut-shade, not the spread trick */
.tut-tap-hint { font-size: 11.5px; font-weight: 800; color: var(--cyan); text-shadow: 0 0 8px rgba(34,211,238,.6);
  animation: handbob 1s ease-in-out infinite; }
.tut-skip { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(9,9,22,.75);
  border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; pointer-events: auto;
  border-radius: 999px; padding: 6px 12px; cursor: pointer; font-family: inherit; }
.tut-skip:active { transform: scale(.96); }
