/* Bayconti Tycoon — extracted from index.html inline <style> blocks. */

/* HTML [hidden] attribute respected globally. Without !important, any later
   class rule that sets `display: <anything>` would win over the UA default
   `[hidden] { display: none }` — causing badges/popups set via JS
   `el.hidden = true` to stay visible. Lost an afternoon to a stale "4" badge
   on the Görevler side button because of exactly this. */
[hidden] { display: none !important; }

:root {
  --navy-900: #060f24;
  --navy-800: #0a1830;
  --navy-700: #112247;
  --navy-600: #1a2c5e;
  --royal: #1659c4;
  --eblue: #2b7fff;
  --eblue-2: #4a9eff;
  --gold: #ffd86b;
  --gold-2: #c9a24e;
  --orange: #ff6a2c;
  --burgundy: #5b1620;
  --burgundy-2: #7a1f2a;
  --ivory: #fff5dc;
  --ink: #ffffff;
  --ink-soft: rgba(255, 255, 255, .72);
  --ink-mute: rgba(255, 255, 255, .5);
  --line: rgba(255, 255, 255, .08);
  --card: rgba(255, 255, 255, .06);
  --card-2: rgba(255, 255, 255, .09);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  font-family: 'Sora', system-ui, sans-serif;
  color: var(--ink);
  background: #060a18;
  overscroll-behavior: none;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(60% 50% at 50% 0%, #0e1c3a 0%, #06101f 60%, #02060f 100%);
}

body.floor-mode {
  overflow: hidden;
  height: 100dvh;
}

body.floor-mode .frame {
  overflow: hidden;
  height: 100dvh;
}

/* Mobile-shaped frame: fills the viewport edge-to-edge on phones (≤500px),
     caps at 500px on desktop so layout doesn't stretch and look broken. */
.frame {
  position: relative;
  width: 100%;
  /* Cap at tablet width so the layout doesn't stretch unboundedly on
     desktop — wider viewports get a centered column. */
  max-width: 768px;
  margin-inline: auto;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ---------- shared header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: calc(8px + var(--safe-top)) 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(6, 15, 36, .92) 0%, rgba(6, 15, 36, .6) 80%, rgba(6, 15, 36, 0));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand-title {
  line-height: 1.05;
}

.brand-title .t1 {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .02em;
}

.brand-title .t2 {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: .04em;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  color: var(--ink);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  border: 0;
  padding: 4px 6px;
}

/* ---------- bottom nav ---------- */
.bottomnav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(6px + var(--safe-bot));
  /* Match the .frame cap so the floating nav stays inside the column on
     wider viewports instead of stretching to the full screen width. */
  width: calc(100% - 16px);
  max-width: calc(768px - 16px);
  z-index: 60;
  background: rgba(8, 14, 30, .78);
  border: 1px solid rgba(255, 255, 255, .06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 16px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .4);
}

.navbtn {
  background: transparent;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 2px 5px;
  color: var(--ink-mute);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .01em;
  border-radius: 12px;
  transition: color .15s, background .15s;
}

.navbtn svg {
  width: 19px;
  height: 19px;
  opacity: .85;
}

.navbtn.active {
  color: var(--ink);
}

.navbtn.active svg {
  opacity: 1;
  color: var(--gold);
}

.navbtn:active {
  transform: scale(.96);
}

/* ===================================================================
     SCREEN: HOME
     =================================================================== */
.scene {
  display: none;
}

.scene.active {
  display: block;
}

.scene.home.active {
  display: flex;
}

.scene.home {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(80px + var(--safe-bot));
  flex-direction: column;
  background:
    /* darken top so userstrip + balance stay legible */
    linear-gradient(180deg, rgba(5, 8, 18, .78) 0%, rgba(5, 8, 18, .35) 28%, rgba(5, 8, 18, .15) 55%, rgba(5, 8, 18, .55) 90%, rgba(5, 8, 18, .85) 100%),
    url("assets/home_bg_street.png") center 30% / cover no-repeat,
    #060a18;
}

/* warm neon haze at the "B" sign area + subtle puddle shimmer */
.home::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(180px 120px at 82% 32%, rgba(255, 180, 80, .28), transparent 70%),
    radial-gradient(120% 50% at 50% 95%, rgba(43, 127, 255, .10), transparent 70%);
  mix-blend-mode: screen;
  opacity: .9;
  animation: drift 18s linear infinite;
}

@keyframes drift {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }

  100% {
    transform: translateY(0);
  }
}

.userstrip {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 14px;
  gap: 10px;
  flex-wrap: nowrap;
}

.user-pill,
.screen-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 0 1 auto;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(8px);
  cursor: pointer;
  color: inherit;
  text-align: left;
  /* Force button form to inherit typography from body so the pill looks
         identical on home (<div>) and on every other screen (<button>). */
  font: inherit;
  letter-spacing: inherit;
  margin: 0;
}

.user-pill .avatar-mark,
.screen-user .avatar-mark {
  flex-shrink: 0;
}

.userstrip .brand-tab {
  flex: 0 0 auto;
}

.userstrip .site-pill {
  flex: 0 0 auto;
}

.brand-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  background: rgba(6, 12, 28, .85);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
  position: relative;
  text-decoration: none;
}

.brand-tab .logo {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .14em;
  background: linear-gradient(180deg, #fff7d4, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .4);
  line-height: 1;
}

.brand-tab .crest {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff5c2, var(--gold) 55%, #8a6310);
  border: 1.5px solid #2a1a02;
  box-shadow: 0 0 10px rgba(255, 216, 107, .5);
  margin-bottom: 4px;
}

.faq-pill {
  justify-self: end;
  padding: 7px 14px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

/* big balance */
.balance-block {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 6px 16px 4px;
}

.balance-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
}

.coin {
  width: 50px;
  height: 50px;
  background-image: url('assets/atlas/C3_coin_b.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
  filter: drop-shadow(0 0 14px rgba(255, 216, 107, .5));
}

.balance-num {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 38px;
  letter-spacing: -.01em;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 0%, #cfe1ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 12px rgba(43, 127, 255, .35);
}

.currency-pills {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.cpill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 8px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.cpill .ic {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.cpill .ic.usd {
  background: radial-gradient(circle at 30% 30%, #2a1505, #000);
  color: var(--gold);
  font-weight: 800;
  font-size: 12px;
  border: 1px solid rgba(255, 216, 107, .4);
}

.cpill .ic.gem {
  background: linear-gradient(180deg, #6fb1ff, #1659c4);
  box-shadow: 0 0 6px rgba(43, 127, 255, .5);
}

.cpill .gem::before {
  content: "";
  width: 10px;
  height: 10px;
  background: linear-gradient(180deg, #cfe6ff, #6fb1ff);
  clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%);
}

.cpill .arrow {
  color: var(--ink-mute);
  font-size: 12px;
  margin-left: 2px;
}

.cpill .reddot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff3b3b;
  box-shadow: 0 0 6px rgba(255, 59, 59, .8);
  margin-left: 2px;
}

/* mascot stage — fills remaining vertical space, mascot anchored to bottom */
.mascot-stage {
  position: relative;
  z-index: 4;
  flex: 1 1 auto;
  min-height: 320px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  /* No bottom padding — feet need to align flush with the nav's top edge
     regardless of viewport height. */
  padding-bottom: 0;
}

.mascot-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(45% 38% at 50% 58%, rgba(255, 180, 80, .45) 0%, rgba(255, 140, 40, .18) 40%, transparent 72%);
  filter: blur(2px);
  pointer-events: none;
}

.mascot-floor {
  position: absolute;
  left: 50%;
  bottom: 6%;
  transform: translateX(-50%);
  width: 220px;
  height: 26px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
}

.mascot {
  /* Absolute-positioned so the mascot fills the entire stage height (feet
     flush with .mascot-stage bottom = nav top) regardless of viewport.
     Aspect ratio derives the width from the height. left/right + margin
     auto centers horizontally without using transform — the idle/tap
     keyframes animate transform freely without fighting positioning. */
  position: absolute;
  left: 0;
  right: 0;
  bottom: -20%;
  margin-inline: auto;
  aspect-ratio: 197 / 400;
  height: 120%;
  width: auto;
  max-width: 80%;
  cursor: pointer;
  will-change: transform;
  /* Force a dedicated GPU layer with sub-pixel precision so scale changes
     animate continuously instead of stepping at integer pixel boundaries
     (which produces a visible "tick tick" on the way back down). */
  transform: translateZ(0);
  backface-visibility: hidden;
  animation: idle 2s ease-in-out infinite;
  transform-origin: 50% 90%;
  filter:
    drop-shadow(0 18px 28px rgba(0, 0, 0, .55)) drop-shadow(0 0 24px rgba(43, 127, 255, .18));
}

.mascot .mascot-stack {
  pointer-events: auto;
}

.mascot .mascot-stack .ms-body,
.mascot .mascot-stack .ms-acc {
  pointer-events: none;
}

/* Breathing — uniform scale only, no translate. Single peak at 50% with
   ease-in-out so the inhale (0→1s) and exhale (1→2s) are mirror images.
   Each keyframe carries translateZ(0) so the composited GPU layer stays
   alive across the whole loop — without it the browser may drop the layer
   between frames and the on-the-way-down half goes ticky from sub-pixel
   rounding on the CPU compositor. */
@keyframes idle {
  0%, 100% { transform: scale(1)     translateZ(0); }
  50%      { transform: scale(1.006) translateZ(0); }
}

/* Tap recoil — looks like the mascot got poked, presses back/down briefly,
   then settles. Going DOWN + slight squish reads as "pushed away from the
   finger" rather than the previous bounce-up which fought the tap gesture. */
.mascot.tapped {
  animation: tap-recoil .32s cubic-bezier(.34, 1.6, .42, 1);
}

@keyframes tap-recoil {
  0%   { transform: translate3d(0, 0,    0) scale(1);           }
  18%  { transform: translate3d(0, 4px,  0) scale(.97, .94);    }   /* squish down */
  55%  { transform: translate3d(0, -1px, 0) scale(1.015, 1.02); }   /* small rebound */
  100% { transform: translate3d(0, 0,    0) scale(1);           }
}

/* tap pop coin */
.pop {
  position: absolute;
  pointer-events: none;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--gold);
  text-shadow: 0 2px 0 #6a4a0e, 0 0 12px rgba(255, 216, 107, .7);
  animation: popfloat 900ms ease-out forwards;
  z-index: 10;
}

@keyframes popfloat {
  0% {
    transform: translate(-50%, -50%) scale(.6);
    opacity: 0;
  }

  20% {
    transform: translate(-50%, -60%) scale(1.1);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -180%) scale(1);
    opacity: 0;
  }
}

.spark {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff5c2, var(--gold) 55%, #8a6310);
  box-shadow: 0 0 8px rgba(255, 216, 107, .8);
  pointer-events: none;
  z-index: 10;
}

/* side buttons */
.side {
  position: absolute;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side.left {
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.side.right {
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.sidebtn {
  background: transparent;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 500;
  width: 60px;
  text-align: center;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
  transition: transform .15s, color .15s;
  position: relative;
  cursor: pointer;
}

.sidebtn:active {
  transform: scale(.94);
}

.sidebtn:hover {
  color: var(--ink);
}

.sidebtn .iwrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(10, 24, 48, .55);
  border: 1px solid rgba(255, 255, 255, .08);
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  transition: border-color .15s, background .15s;
}

.sidebtn:hover .iwrap {
  border-color: rgba(255, 216, 107, .3);
  background: rgba(10, 24, 48, .7);
}

.sidebtn svg {
  width: 20px;
  height: 20px;
  color: var(--ink);
  opacity: .9;
}

.badge-red,
.badge-tag,
.badge-timer,
.badge-ai,
.badge-lock {
  position: absolute;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  pointer-events: none;
}

.badge-lock {
  top: -6px;
  right: -10px;
  background: rgba(0, 0, 0, .78);
  color: var(--gold);
  border: 1px solid rgba(255, 216, 107, .4);
  padding: 2px 6px;
  font-size: 9px;
  border-radius: 999px;
  letter-spacing: .04em;
}

.sidebtn.locked .iwrap {
  opacity: .55;
  filter: grayscale(.6);
}

.badge-red {
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff3b3b;
  color: #fff;
  font-size: 11px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--navy-800);
  box-shadow: 0 0 6px rgba(255, 59, 59, .6);
}

.badge-tag {
  top: -6px;
  right: -10px;
  padding: 2px 6px;
  background: linear-gradient(180deg, #ff8a4d, var(--orange));
  color: #fff;
  font-size: 9px;
  border-radius: 6px;
  letter-spacing: .04em;
  box-shadow: 0 4px 8px rgba(255, 106, 44, .4);
}

.badge-timer {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, .78);
  border: 1px solid rgba(255, 255, 255, .18);
  padding: 2px 7px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--gold);
  white-space: nowrap;
}

.badge-ai {
  position: absolute;
  top: -6px;
  right: -8px;
  padding: 2px 5px;
  background: linear-gradient(180deg, #6fb1ff, var(--eblue));
  color: #fff;
  font-size: 9px;
  border-radius: 6px;
  letter-spacing: .06em;
}

/* energy bar */
.energy {
  position: relative;
  z-index: 5;
  margin: 8px auto 0;
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  background: rgba(10, 24, 48, .7);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .4);
}

.energy .bolt {
  width: 18px;
  height: 18px;
  color: var(--gold);
  filter: drop-shadow(0 0 6px rgba(255, 216, 107, .6));
}

.energy .num {
  font-weight: 700;
  font-size: 14px;
}

.energy .num em {
  font-style: normal;
  color: var(--ink-mute);
  font-weight: 600;
}

/* ===================================================================
     SCREEN: CASINO FLOOR
     =================================================================== */
.floor {
  position: relative;
  min-height: 100vh;
  padding-bottom: 110px;
  background: linear-gradient(180deg, #0c1426 0%, #1a0d18 100%);
  overflow: hidden;
}

.stats-bar {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0 12px 10px;
}

.stat {
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.stat .ic {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.stat .ic.bal {
  background: radial-gradient(circle at 30% 30%, #fff5c2, var(--gold) 55%, #8a6310);
  color: #2a1a02;
  font-weight: 800;
  font-size: 11px;
}

.stat .ic.bal::after {
  content: "B";
}

.stat .ic.inc {
  background: radial-gradient(circle at 30% 30%, #2a1505, #000);
  border: 1px solid rgba(255, 216, 107, .4);
  color: var(--gold);
  font-weight: 800;
  font-size: 13px;
}

.stat .ic.inc::after {
  content: "$";
}

.stat .ic.cust {
  background: linear-gradient(180deg, #6fb1ff, var(--eblue));
}

.stat .ic.cust svg {
  width: 16px;
  height: 16px;
  color: #fff;
}

.stat .ic.cnt {
  background: radial-gradient(circle at 30% 30%, #d6c2ff, #6f3ff5 70%, #2a126a);
  border: 1px solid rgba(214, 194, 255, .55);
  color: #fff;
  font-weight: 800;
  font-size: 9px;
  letter-spacing: .04em;
  box-shadow: 0 0 12px rgba(143, 99, 255, .35);
}

.stat .ic.cnt::after {
  content: "C";
}

.stat .ic.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(180deg, #6a3a8a, #2a1430);
  border: 1.5px solid var(--gold);
  box-shadow: 0 0 0 2px rgba(255, 216, 107, .18), 0 2px 8px rgba(0, 0, 0, .5);
}

.stat .ic.avatar img {
  width: 140%;
  height: 140%;
  object-fit: cover;
  object-position: 50% 18%;
  margin: -10% 0 0 -20%;
  user-select: none;
  pointer-events: none;
}

.stat-player .val {
  color: var(--gold);
}

.stat .lbl {
  font-size: 10px;
  color: var(--ink-mute);
  line-height: 1;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.stat .val {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
}

.tier-row {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 4px 16px 12px;
}

.tier-row .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 216, 107, .55), transparent);
  max-width: 70px;
}

.tier-label {
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 216, 107, .35);
}

.tier-dots {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}

.tier-dots span {
  width: 22px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .12);
}

.tier-dots span.on {
  background: linear-gradient(90deg, var(--gold), #fff7d4);
  box-shadow: 0 0 8px rgba(255, 216, 107, .5);
}

/* room (FULL-BLEED isometric — fills entire screen between topbar and bottom nav) */
.scene.floor {
  position: absolute;
  top: var(--safe-top, 0);
  bottom: var(--bottomnav-h, 84px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.scene.floor .floor-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 14px 14px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .2) 75%, transparent 100%);
}

.scene.floor .floor-header #floorAvatarBtn {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.scene.floor .floor-stats {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  padding: 0;
  background: none;
  position: static;
}

.scene.floor .floor-stats .stat {
  flex: 0 1 auto;
  min-width: 0;
  padding: 6px 8px;
  gap: 6px;
}

.scene.floor .floor-stats .stat .ic {
  width: 22px;
  height: 22px;
  font-size: 9px;
}

.scene.floor .floor-stats .stat .lbl {
  font-size: 9px;
}

.scene.floor .floor-stats .stat .val {
  font-size: 13px;
}

.scene.floor .tier-row {
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0 16px;
}

.scene.floor .tier-dots {
  position: absolute;
  top: 92px;
  left: 0;
  right: 0;
  z-index: 10;
}

body.floor-mode .frame {
  position: relative;
}

.room {
  /* Wall is the top 25-30% (low ceiling vibe), floor fills the bottom 70-75%
       — gives a wide, deep room feel. */
  --horizon: 72%;
  position: absolute;
  inset: 0;
  border-radius: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(55% 28% at 50% 8%, rgba(255, 228, 179, .28) 0%, transparent 60%),
    linear-gradient(180deg, #2c1428 0%, #21102a 25%, #1a0e22 calc(100% - var(--horizon) - 4px), #1a0e22 calc(100% - var(--horizon)), #1a0e22 100%);
  border: none;
}

/* wall paneling — damask + dado rail at the configured horizon line */
.room::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  /* Wall area = top of room → horizon line (--horizon px from bottom) */
  --wall-h: calc(100% - var(--horizon));
  background:
    /* dado rail — thin gold trim exactly at horizon */
    linear-gradient(180deg, transparent calc(var(--wall-h) - 4px), rgba(255, 216, 107, .55) calc(var(--wall-h) - 2px), rgba(255, 216, 107, .9) var(--wall-h), rgba(255, 216, 107, .55) calc(var(--wall-h) + 2px), transparent calc(var(--wall-h) + 4px)),
    /* secondary thin trim ~12px above */
    linear-gradient(180deg, transparent calc(var(--wall-h) - 14px), rgba(255, 216, 107, .2) calc(var(--wall-h) - 12px), transparent calc(var(--wall-h) - 10px)),
    /* damask top fade */
    linear-gradient(180deg, rgba(255, 216, 107, .06) 0%, rgba(255, 216, 107, .04) calc(var(--wall-h) - 8px), transparent var(--wall-h)),
    /* damask diagonal patterns confined to wall */
    repeating-linear-gradient(135deg, rgba(255, 216, 107, .05) 0 6px, transparent 6px 18px),
    repeating-linear-gradient(45deg, rgba(255, 216, 107, .04) 0 6px, transparent 6px 18px);
  background-size:
    100% 100%,
    100% 100%,
    100% 100%,
    100% var(--wall-h),
    100% var(--wall-h);
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat;
  background-position:
    0 0,
    0 0,
    0 0,
    calc(var(--pan, 0px) * -0.35) top,
    calc(var(--pan, 0px) * -0.35) top;
}

.room {
  --pan: 0px;
}

/* wall sconces left/right */
.room::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(8% 6% at 12% 24%, rgba(255, 200, 120, .55), transparent 70%),
    radial-gradient(8% 6% at 88% 24%, rgba(255, 200, 120, .55), transparent 70%);
}

/* chandelier */
.chandelier {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 38px;
  background: linear-gradient(180deg, rgba(255, 216, 107, .7), transparent);
}

.chandelier::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 34px;
  transform: translateX(-50%);
  width: 56px;
  height: 32px;
  border-radius: 50% 50% 30% 30%;
  background: radial-gradient(50% 60% at 50% 30%, #fff7d4, var(--gold) 55%, #6a4a0e 90%);
  box-shadow:
    0 0 26px rgba(255, 228, 179, .6),
    0 0 70px rgba(255, 216, 107, .35);
}

/* warm light pools cast on floor */
.lightpool {
  position: absolute;
  bottom: 0;
  width: 240px;
  height: 140px;
  background: radial-gradient(50% 50% at 50% 100%, rgba(255, 228, 179, .25), transparent 70%);
  pointer-events: none;
}

.lightpool.l1 {
  left: -10%;
}

.lightpool.l2 {
  right: -10%;
}

.lightpool.l3 {
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 200px;
  opacity: .7;
}

/* floor plane — pinned to bottom; top edge sits exactly at the horizon line.
     We rotateX so the carpet recedes toward the horizon (real 3D perspective). */
.floor-plane {
  position: absolute;
  left: -20%;
  right: -20%;
  top: calc(100% - var(--horizon));
  bottom: -25%;
  background-image: url('assets/atlas/D2_carpet.png');
  background-size: 18px 18px;
  /* 5× denser tile — finer pattern repeating */
  background-repeat: repeat;
  background-color: #2a0a14;
  /* solid floor base — kills wall bleed-through */
  background-position-x: calc(var(--pan, 0px) * -0.7);
  /* Stronger perspective: shallower viewing distance + steeper rotation */
  transform: perspective(480px) rotateX(68deg);
  transform-origin: 50% 0%;
  /* Solid top edge — no fade — so wall doesn't peek through at horizon */
  -webkit-mask-image: none;
  mask-image: none;
  z-index: 0;
  will-change: background-position, transform;
}

/* perspective vanishing — trapezoid via clip-path so floor narrows toward horizon */
.floor-plane::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    /* horizon vignette + floor lighting toward viewer */
    radial-gradient(80% 50% at 50% 100%, rgba(255, 228, 179, .18), transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, .15) 30%, rgba(0, 0, 0, .0) 100%);
}

.floor-plane::before {
  content: "";
  position: absolute;
  inset: 0;
  /* perspective grid lines — converge to vanishing point at top center */
  background:
    linear-gradient(180deg, rgba(255, 216, 107, .15) 0%, transparent 8%),
    conic-gradient(from 270deg at 50% 0%,
      transparent 0deg 268deg,
      rgba(255, 216, 107, .06) 268.5deg 269deg,
      transparent 269deg 270.5deg,
      rgba(255, 216, 107, .04) 270.5deg 271deg,
      transparent 271deg 271.5deg,
      rgba(255, 216, 107, .06) 271.5deg 272deg,
      transparent 272deg 360deg);
}

/* slot grid — HORIZONTAL scroll, 2 rows.
     Top row = far/medium (sits ABOVE horizon line at 40%). Bottom row = near/large.
     Page itself does NOT scroll — only this scroller moves. */
.slot-scroller {
  position: absolute;
  left: 0;
  right: 0;
  /* Bottom row pinned just above the bottom nav. Top row sits above it,
       both lower in the floor area than before. */
  top: auto;
  bottom: 0;
  height: calc(var(--horizon, 290px) + 210px);
  z-index: 4;
  /* Camera mode: viewport clips, the inner .slot-camera owns pan + zoom via
     transforms. No native scroll — gives us proper inertia + pinch-zoom. */
  overflow: hidden;
  padding: 0;
  display: block;
  touch-action: none;
}

.slot-camera {
  position: absolute;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  height: 100%;
  /* Pan in CSS pixels via --cam-x (negative = panned right). */
  transform: translate3d(var(--cam-x, 0px), 0, 0);
  transform-origin: 50% 100%;
  will-change: transform;
  padding: 0 18px;
}

/* While the user is actively dragging, kill any animation. We re-enable smooth
   transitions for snap-to-bounds + focus pans. */
.slot-camera.smooth {
  transition: transform .25s cubic-bezier(.22, 1, .36, 1);
}

.slot-scroller::-webkit-scrollbar {
  display: none;
}

.slot-grid {
  display: grid;
  grid-template-rows: 160px 240px;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  column-gap: 14px;
  row-gap: 0;
  padding: 6px 8px;
  align-items: end;
  justify-items: center;
}

/* top row = 0.75x of bottom row (perspective: farther = smaller) */
.slot:nth-child(odd) {
  width: 200px;
  height: 240px;
  opacity: .92;
  filter: brightness(.95) saturate(.97);
}

.slot:nth-child(even) {
  width: 250px;
  height: 250px;
  transform: translateY(15%);
}

.slot {
  position: relative;
  border-radius: 14px;
  background: transparent;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: filter .18s, transform .18s;
  flex-shrink: 0;
}

.slot:active {
  filter: brightness(1.15);
}

.slot.empty .plus {
  font-size: 32px;
  color: rgba(255, 216, 107, .6);
  font-weight: 700;
  line-height: 1;
}

.slot.empty .lbl {
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9px;
  color: rgba(255, 216, 107, .45);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.slot.filled {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.slot.filled .eq {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  line-height: 1;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55));
  overflow: hidden;
}

.slot.filled .eq img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  transform: scale(1.6);
}

.slot.empty {
  background-color: transparent;
  border: 1.5px dashed rgba(255, 216, 107, .45);
  border-radius: 14px;
}

/* Translucent overlay on inactive slots (empty + locked). Kalkar masada item olunca. */
.slot.empty::before,
.slot.locked::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 30, 0.42);
  border-radius: 14px;
  pointer-events: none;
  z-index: 0;
}

.slot.empty>*,
.slot.locked>* {
  position: relative;
  z-index: 1;
}

/* Inner empty slot: smaller dashed box with centered "+", regardless of outer slot size */
.slot.empty .plus {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  font-size: 28px;
  color: rgba(255, 216, 107, .75);
  font-weight: 600;
  line-height: 1;
  text-align: center;
}

/* Override the larger nth-child sizing for empty slots — keep them compact */
.slot.empty:nth-child(odd),
.slot.empty:nth-child(even) {
  width: 96px;
  height: 96px;
  align-self: center;
  justify-self: center;
}

.slot.locked {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, .55);
  flex-direction: column;
  gap: 4px;
}

.slot.locked .lock-ic {
  font-size: 30px;
  line-height: 1;
  filter: grayscale(.5);
}

.slot.locked .req {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--gold);
  background: rgba(0, 0, 0, .5);
  padding: 2px 6px;
  border-radius: 6px;
}

.slot .lvl {
  position: absolute;
  /* sit just above the artwork, hugging the right edge of where the image renders */
  top: 14%;
  right: 10%;
  background: linear-gradient(180deg, #ffe392, var(--gold));
  color: #2a1a02;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 9px;
  border: 1px solid rgba(0, 0, 0, .4);
  line-height: 1;
  z-index: 2;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}

.slot .floatpop {
  position: absolute;
  left: 50%;
  top: -2px;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 700;
  color: #b6ffba;
  text-shadow: 0 1px 0 #001b06;
  opacity: 0;
  pointer-events: none;
}

.slot.filled.pulse .floatpop {
  animation: slotpop 1.4s ease-out;
}

@keyframes slotpop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(0);
  }

  20% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-22px);
  }
}

.slot.filled .glow {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  pointer-events: none;
  box-shadow: none;
}

/* glow rings removed — keep .glow as no-op so existing markup stays valid */
.slot.eq-slot .glow,
.slot.eq-roul .glow,
.slot.eq-bj .glow,
.slot.eq-poker .glow,
.slot.eq-bar .glow {
  box-shadow: none;
}

/* customer dots */
.npc {
  position: absolute;
  width: 8px;
  height: 14px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #6fb1ff 50%, #2a1505 50%);
  pointer-events: none;
  opacity: .7;
}

/* fab — floating action buttons inside .scene.floor (above bottom nav) */
.fab {
  position: absolute;
  bottom: 12px;
  z-index: 20;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(10, 24, 48, .78);
  border: 1px solid rgba(255, 216, 107, .3);
  border-radius: 18px;
  padding: 10px 14px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .5);
}

.fab.left {
  left: 14px;
}

.fab.right {
  right: 14px;
}

.fab svg {
  width: 22px;
  height: 22px;
}

.fab.left {
  color: var(--gold);
}

.fab.right {
  border-color: rgba(74, 158, 255, .4);
  color: #cfe6ff;
}

.build-hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 78px;
  z-index: 8;
  background: rgba(0, 0, 0, .7);
  border: 1px solid rgba(255, 216, 107, .35);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}

.build-hint.show {
  opacity: 1;
}

.room.build-mode .slot.empty {
  animation: buildPulse 1.1s ease-in-out infinite;
  border-color: rgba(255, 216, 107, .7);
}

@keyframes buildPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 216, 107, .5);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(255, 216, 107, 0);
  }
}

/* ===================================================================
     EQUIPMENT MODAL (slide-up)
     =================================================================== */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  z-index: 100;
}

.scrim.open {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: none;
  height: 88vh;
  background: linear-gradient(180deg, #0d1a36 0%, #07112a 100%);
  border-radius: 22px 22px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  z-index: 101;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sheet.open {
  transform: translateX(-50%) translateY(0);
}

.sheet .grab {
  width: 38px;
  height: 4px;
  background: rgba(255, 255, 255, .25);
  border-radius: 4px;
  margin: 8px auto 4px;
}

.sheet-head {
  padding: 6px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.sheet-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.filter-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.ftab {
  padding: 8px 14px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ftab.active {
  background: rgba(43, 127, 255, .18);
  border-color: rgba(74, 158, 255, .45);
  color: var(--ink);
}

.ftab svg {
  width: 14px;
  height: 14px;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.tier-mini {
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 11px;
}

.sheet-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px 24px;
}

.eq-card {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 10px;
  align-items: center;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  margin-bottom: 8px;
}

.eq-card.locked {
  opacity: .55;
}

.eq-thumb {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2c1f47, #0a1830);
  border: 1px solid rgba(255, 216, 107, .18);
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}

.eq-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.eq-thumb.lock-thumb {
  display: grid;
  place-items: center;
  font-size: 22px;
  color: rgba(255, 255, 255, .4);
}

.eq-thumb .star {
  position: absolute;
  top: 2px;
  left: 2px;
  color: var(--gold);
  font-size: 10px;
  text-shadow: 0 0 4px rgba(0, 0, 0, .5);
}

.eq-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

.eq-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.eq-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, .06);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
}

.eq-pill .ic {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
}

.eq-pill.income .ic {
  background: var(--gold);
  color: #2a1a02;
}

.eq-pill.delta {
  color: #6dffae;
  background: rgba(109, 255, 174, .08);
}

.upgrade-btn {
  background: linear-gradient(180deg, #4a9eff, var(--eblue) 60%, #1659c4);
  border: 0;
  padding: 10px 12px 10px 8px;
  border-radius: 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 6px 14px rgba(43, 127, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
  min-width: 84px;
  justify-content: center;
}

.upgrade-btn .coin-mini {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff5c2, var(--gold) 55%, #8a6310);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
  color: #2a1a02;
}

.upgrade-btn .coin-mini::after {
  content: "B";
}

.upgrade-btn.locked {
  background: rgba(255, 255, 255, .08);
  box-shadow: none;
  color: var(--ink-mute);
}

.upgrade-btn.locked .coin-mini {
  display: none;
}

/* purchase popup (slot detail) */
.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.92);
  background: linear-gradient(180deg, #14264a, #0a1830);
  border: 1px solid rgba(255, 216, 107, .3);
  border-radius: 18px;
  padding: 18px 18px 14px;
  width: 280px;
  max-width: 86%;
  z-index: 102;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  text-align: center;
}

.toast.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.toast .icon {
  font-size: 56px;
  margin-bottom: 8px;
  line-height: 1;
  min-height: 140px;
  display: grid;
  place-items: center;
}

.toast .icon img {
  width: 140px !important;
  height: 140px !important;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .55));
}

.toast h3 {
  margin: 0 0 12px;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toast h3 .modal-name {
  font-weight: 800;
}

.toast h3 .modal-lv {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(255, 216, 107, .12);
  border: 1px solid rgba(255, 216, 107, .35);
  padding: 2px 8px;
  border-radius: 999px;
}

.toast h3 .modal-lv-max {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-mute);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.toast p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 12px;
}

/* Cycle progress widget inside the modal */
.toast .modal-cycle {
  margin: 4px 4px 14px;
  text-align: left;
}

.toast .modal-cycle-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 6px;
}

.toast .modal-cycle-state {
  font-weight: 700;
  color: var(--ink-mute);
  letter-spacing: .04em;
}

.toast .modal-cycle-state.ready {
  color: #6dffae;
  text-transform: uppercase;
  font-size: 12px;
}

.toast .modal-cycle-yield {
  color: var(--gold);
  font-weight: 700;
}

.toast .modal-cycle-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}

.toast .modal-cycle-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #ffe392);
  border-radius: inherit;
  transition: width 1s linear;
}

.toast .modal-cycle-bar.ready > span {
  background: linear-gradient(90deg, #6dffae, #2dffa1);
  box-shadow: 0 0 12px rgba(109, 255, 174, .55);
}

.toast .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.toast .btn {
  padding: 10px;
  border-radius: 12px;
  border: 0;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.toast .btn.ghost {
  background: rgba(255, 255, 255, .06);
  color: var(--ink);
  border: 1px solid var(--line);
}

.toast .btn.primary {
  background: linear-gradient(180deg, #4a9eff, var(--eblue));
  color: #fff;
  box-shadow: 0 6px 14px rgba(43, 127, 255, .4);
}

.toast .btn.danger {
  background: linear-gradient(180deg, #ff7080, #c9243a);
  color: #fff;
  box-shadow: 0 6px 14px rgba(201, 36, 58, .4);
}

.toast .btn.cnt {
  background: linear-gradient(180deg, #8f63ff, #4a1fb5);
  color: #fff;
  box-shadow: 0 6px 14px rgba(143, 99, 255, .4);
}

.toast .btn.success {
  background: linear-gradient(180deg, #6dffae, #1ec97a);
  color: #002414;
  box-shadow: 0 6px 14px rgba(30, 201, 122, .4);
}

.toast .btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
}

.toast .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.toast .actions .btn {
  width: 100%;
  min-width: 0;
}

/* Top-right close X for the slot detail modal */
.toast .toast-x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--ink-soft);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  font-weight: 600;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  z-index: 2;
}

.toast .toast-x:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, .25);
}

/* tweaks toggle the brand strap visible state */
.hidden {
  display: none !important;
}

/* ===== Block 2 (added later) ===== */

/* ============================================================
     V1 game logic additions — progress bar, collect button,
     purchase panel, mini toast, stub screens.
     ============================================================ */

/* Slot grid container width cap — bounds horizontal scroll to ~1800px
     (8 cols × 198px + gaps + padding). No infinite scroll. */
.slot-grid {
  padding: 6px 16px 6px 8px;
  max-width: 1900px;
}

/* ===== Parallax — drag the slot scroller, room layers shift ===== */
/* Wall sconces (.room::after radial pools) drift slowest */
#room::after {
  transform: translate3d(calc(var(--pan, 0px) * -0.25), 0, 0);
  transition: transform .12s linear;
  will-change: transform;
}

#room .chandelier {
  transform: translate3d(calc(-50% + var(--pan, 0px) * -0.15), 0, 0);
  transition: transform .12s linear;
}

#room .lightpool.l1,
#room .lightpool.l2 {
  transform: translate3d(calc(var(--pan, 0px) * -0.5), 0, 0);
  transition: transform .12s linear;
}

#room .lightpool.l3 {
  transform: translate3d(calc(-50% + var(--pan, 0px) * -0.5), 0, 0);
  transition: transform .12s linear;
}

/* npc dots drift with floor */
#room .npc {
  transform: translate3d(calc(var(--pan, 0px) * -0.7), 0, 0);
  transition: transform .12s linear;
}

/* While actively dragging, kill transitions so movement tracks the cursor 1:1 */
#slotScroller.dragging~#room::after,
.room.panning::after {
  transition: none;
}

.room.panning .chandelier,
.room.panning .lightpool,
.room.panning .npc {
  transition: none;
}

.room.panning .floor-plane {
  transition: none;
}

/* Camera-mode scroller — pointer-driven, no native scroll. */
.slot-scroller {
  cursor: grab;
  touch-action: none;
}

.slot-scroller.dragging {
  cursor: grabbing;
}

/* ===== PNG scene layers — wall/floor/chandelier + decor with parallax ===== */
/* Hide legacy gradient layers — PNG scene takes over. */
.room::before,
.room::after {
  display: none;
}

.room .chandelier,
.room .lightpool,
.room .floor-plane,
.room .npc {
  display: none;
}

.room {
  background: #110713 !important;
}

/* Wall — pushed down ~12% from top, extends all the way to the horizon
     so there's no empty strip between wall and floor. */
.scene-wall {
  position: absolute;
  left: 0;
  top: 7%;
  width: 100%;
  height: calc(100% - var(--horizon, 290px) - 8% + 8px);
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position-x: calc(var(--pan, 0px) * -0.35);
  z-index: 1;
  pointer-events: none;
  user-select: none;
  will-change: background-position;
}

/* Soft dark fade above the chandelier — gives it a "hangs from darkness"
     ceiling. The chandelier sits in front of this layer. */
.scene-ceiling-fade {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 22%;
  background: linear-gradient(180deg, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .7) 35%, rgba(0, 0, 0, .3) 70%, rgba(0, 0, 0, 0) 100%);
  z-index: 4;
  pointer-events: none;
}

/* Floor — top edge exactly at horizon (no gap), extends below viewport so
     perspective rotation doesn't reveal a void. */
.scene-floor {
  position: absolute;
  left: -50%;
  top: calc(100% - var(--horizon, 290px));
  bottom: -10%;
  width: 2000px;
  background-size: 100px auto;
  background-repeat: repeat;
  z-index: 2;
  pointer-events: none;
  user-select: none;
  transform: perspective(620px) rotateX(56deg) translateX(calc(var(--pan, 0px) * -0.7));
  transform-origin: 50% 0%;
  will-change: transform;
}

.scene-chandelier {
  position: absolute;
  top: 0;
  left: 50%;
  width: 280px;
  max-width: 44%;
  height: auto;
  z-index: 5;
  /* in front of the ceiling-fade gradient */
  pointer-events: none;
  /* Chandelier's top half blends into the ceiling darkness via a soft mask */
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .5) 30%, #000 55%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .5) 30%, #000 55%);
  filter: drop-shadow(0 8px 36px rgba(255, 228, 179, .55));
  transform: translateX(calc(-50% + var(--pan, 0px) * -0.15));
  will-change: transform;
}

/* Decor on wall (paintings, sconces) — pan with wall, sit higher to avoid
     overlapping the red curtain drapery */
.scene-decor {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 3;
  will-change: transform;
}

.decor-painting-l,
.decor-painting-r,
.decor-sconce-l,
.decor-sconce-r {
  transform: translateX(calc(var(--pan, 0px) * -0.35));
}

.decor-painting-l {
  left: 26%;
  top: 4%;
  width: 13%;
  max-width: 120px;
}

.decor-painting-r {
  left: 61%;
  top: 4%;
  width: 13%;
  max-width: 120px;
}

.decor-sconce-l {
  left: 14%;
  top: 1%;
  width: 8%;
  max-width: 70px;
  filter: drop-shadow(0 0 20px rgba(255, 200, 120, .7));
}

.decor-sconce-r {
  left: 78%;
  top: 1%;
  width: 8%;
  max-width: 70px;
  filter: drop-shadow(0 0 20px rgba(255, 200, 120, .7)) scaleX(-1);
}

/* Curtains — div with background-image stretched from wall top to bottom
     of scene. Sit on the absolute leftmost and rightmost edges. */
.decor-curtain-l,
.decor-curtain-r {
  top: 12%;
  bottom: 0;
  width: 14%;
  max-width: 110px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: top center;
  z-index: 7;
}

.decor-curtain-l {
  left: 0;
  height: calc(1.8 * (100% - var(--horizon, 290px) - 12% + 8px));
  top: 0;
}

.decor-curtain-r {
  right: 0;
  height: calc(1.8 * (100% - var(--horizon, 290px) - 12% + 8px));
  top: 0;
}

.decor-rug {
  display: none;
}

/* Disable transitions during drag for crisp 1:1 motion */
.room.panning .scene-wall,
.room.panning .scene-floor,
.room.panning .scene-chandelier,
.room.panning .scene-decor {
  transition: none;
}

/* "Hepsini topla" sticky button — appears when 2+ slots ready */
.collect-all {
  position: absolute;
  top: 110px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  z-index: 30;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 14px;
  border: 1px solid rgba(0, 0, 0, .45);
  border-radius: 999px;
  background: linear-gradient(180deg, #6dffae, #1ec97a);
  color: #002414;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 8px 22px rgba(30, 201, 122, .5), inset 0 1px 0 rgba(255, 255, 255, .4);
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s, transform .2s;
}

.collect-all.show {
  display: inline-flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  animation: ready-pulse 1.8s ease-in-out infinite;
}

.collect-all strong {
  background: rgba(0, 0, 0, .18);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

/* Progress bar under filled slot — fills as cycle elapses. Sits just
   above the slot's lower edge so it overlays the bottom of the artwork
   (closer to where a real "machine display" would be). */
.slot .progress {
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 18px;
  height: 10px;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 216, 107, .25);
  border-radius: 999px;
  overflow: hidden;
  z-index: 2;
}

.slot .progress>span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffe392, var(--gold));
  box-shadow: 0 0 8px rgba(255, 216, 107, .5);
  transition: width .8s linear;
}

.slot .progress.ready>span {
  background: linear-gradient(90deg, #6dffae, #2dffa1);
  box-shadow: 0 0 10px rgba(109, 255, 174, .6);
}

/* Pending coin badge above slot when ready */
.slot .pending {
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #ffe392, var(--gold));
  color: #2a1a02;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .45);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .5), 0 0 12px rgba(255, 216, 107, .4);
  z-index: 3;
  white-space: nowrap;
  display: none;
}

.slot.ready .pending {
  display: block;
}

/* Collect button overlay — tap to claim */
.slot .collect-btn {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #6dffae, #1ec97a);
  color: #002414;
  border: 1px solid rgba(0, 0, 0, .45);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  box-shadow: 0 4px 12px rgba(30, 201, 122, .45), inset 0 1px 0 rgba(255, 255, 255, .4);
  z-index: 3;
  cursor: pointer;
  display: none;
  animation: ready-pulse 1.6s ease-in-out infinite;
}

.slot.ready .collect-btn {
  display: block;
}

@keyframes ready-pulse {

  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }

  50% {
    transform: translateX(-50%) scale(1.07);
  }
}

/* "Aç" button on slots that meet level but need payment */
.slot.unlock-ready {
  background-color: rgba(255, 216, 107, .06);
  border: 1px dashed rgba(255, 216, 107, .4);
}

/* Hide the "+" plus glyph when an unlock-cost button is shown instead */
.slot.unlock-ready .plus {
  display: none !important;
}

.slot .unlock-btn {
  background: linear-gradient(180deg, #ffe392, var(--gold));
  color: #2a1a02;
  border: 1px solid rgba(0, 0, 0, .4);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .4);
  cursor: pointer;
}

/* Purchase panel — slide-up sheet */
.purchase-panel {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  bottom: 0;
  width: 100%;
  max-width: none;
  max-height: 78vh;
  background: rgba(10, 16, 32, .96);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  border-radius: 22px 22px 0 0;
  z-index: 110;
  transition: transform .28s cubic-bezier(.2, .7, .2, 1);
  display: flex;
  flex-direction: column;
  padding-bottom: calc(16px + var(--safe-bot));
}

.purchase-panel.open {
  transform: translateX(-50%) translateY(0);
}

.purchase-panel .grab {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .2);
  margin: 8px auto 4px;
}

.pp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.pp-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.pp-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.pp-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pp-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  align-items: center;
}

.pp-card.locked {
  opacity: .55;
}

.pp-card .thumb {
  width: 56px;
  height: 56px;
  background: rgba(0, 0, 0, .3);
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.pp-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pp-card .meta .name {
  font-size: 13px;
  font-weight: 700;
}

.pp-card .meta .stats {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.pp-card .stats .pos {
  color: #6dffae;
}

.pp-card .buy-btn {
  background: linear-gradient(180deg, var(--eblue-2), var(--royal));
  color: #fff;
  border: 0;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(43, 127, 255, .35);
}

.pp-card .buy-btn:disabled {
  background: rgba(255, 255, 255, .08);
  color: var(--ink-mute);
  box-shadow: none;
  cursor: not-allowed;
}

.pp-card .buy-btn .lock-lbl {
  display: block;
  font-size: 10px;
  font-weight: 600;
}

/* Rewards popup (Ödülleri al) */
.rewards-popup {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  bottom: 0;
  width: 100%;
  max-width: none;
  max-height: 80vh;
  background: rgba(10, 16, 32, .96);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  border-radius: 22px 22px 0 0;
  z-index: 110;
  transition: transform .28s cubic-bezier(.2, .7, .2, 1);
  display: flex;
  flex-direction: column;
  padding-bottom: calc(16px + var(--safe-bot));
}

.rewards-popup.open {
  transform: translateX(-50%) translateY(0);
}

.rw-master {
  padding: 8px 14px 12px;
  border-bottom: 1px solid var(--line);
}

.claim-all {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #6dffae, #1ec97a);
  color: #002414;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(30, 201, 122, .3);
}

.claim-all:disabled {
  background: rgba(255, 255, 255, .06);
  color: var(--ink-mute);
  cursor: not-allowed;
  box-shadow: none;
}

.rw-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rw-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--ink-mute);
  font-size: 13px;
}

/* Daily login 28-day grid */
.daily-info {
  padding: 12px 14px 4px;
  font-size: 13px;
}

.daily-info strong {
  color: var(--gold);
}

.daily-info .sub {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 2px;
}

.daily-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 12px 14px;
}

.daily-cell {
  aspect-ratio: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--ink-mute);
  position: relative;
}

.daily-cell .day {
  font-weight: 700;
  font-size: 11px;
}

.daily-cell .reward {
  font-size: 9px;
  color: var(--gold);
}

.daily-cell.claimed {
  background: rgba(109, 255, 174, .12);
  border-color: rgba(109, 255, 174, .35);
  color: #6dffae;
}

.daily-cell.claimed::after {
  content: '✓';
  position: absolute;
  bottom: 4px;
  right: 6px;
  color: #6dffae;
  font-size: 11px;
  font-weight: 800;
}

.daily-cell.today {
  background: linear-gradient(180deg, rgba(255, 216, 107, .25), rgba(201, 162, 78, .15));
  border-color: rgba(255, 216, 107, .6);
  color: var(--gold);
  animation: daily-today-pulse 1.8s ease-in-out infinite;
}

@keyframes daily-today-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 216, 107, .5);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(255, 216, 107, .3);
  }
}

.daily-cell.milestone {
  background: linear-gradient(180deg, rgba(255, 106, 44, .18), rgba(195, 72, 0, .1));
  border-color: rgba(255, 106, 44, .4);
  color: #ffae42;
}

.daily-cell.mega {
  background: linear-gradient(180deg, rgba(255, 216, 107, .3), rgba(201, 162, 78, .2));
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 12px rgba(255, 216, 107, .3);
}

/* Mini toast — short messages, auto-dismiss */
.mini-toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 110px;
  background: rgba(20, 30, 55, .95);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .5);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}

.mini-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}

/* Stub screens (Klanlar, Oyunlar, Sıralama, Karakter, Görevler) */
.stub-screen {
  /* Match home's userstrip horizontal padding so the avatar lands at the
         same spot on every screen (no horizontal jitter when navigating). */
  padding: 12px 14px 100px;
  min-height: 100vh;
  /* Plain solid backdrop — the noir street photo was distracting on
         secondary screens (ranks / games / character). */
  background: #060a18;
}

.stub-screen .sub {
  color: var(--ink-soft);
  font-size: 13px;
  margin-bottom: 18px;
}

/* Shared screen header — avatar+name+level (left, click to home) + right title.
       0px top margin so the avatar's vertical position matches the home userstrip
       exactly (no jitter when navigating between scenes). */
.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 18px;
  gap: 12px;
  min-height: 42px;
}

/* .screen-user pill styling lives next to .user-pill for unified look. */
.screen-avatar {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.screen-avatar:active,
.screen-user:active {
  transform: scale(.97);
  transition: transform .15s;
}

.user-meta {
  line-height: 1.1;
  min-width: 0;
}

/* Single typography source for the avatar pill — rendered identically
       on the home screen and every other scene via userPillHTML(). */
.user-pill .uname,
.user-meta .uname {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
  font-family: inherit;
}

.user-pill .ulevel,
.user-meta .ulevel {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 3px;
  font-family: inherit;
}

.screen-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .02em;
  text-align: right;
}

.stub-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 10px;
}

.stub-card .ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 216, 107, .08);
  font-size: 22px;
}

.stub-card .info {
  flex: 1;
}

.stub-card .info .ttl {
  font-size: 14px;
  font-weight: 700;
}

.stub-card .info .desc {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 2px;
}

.stub-card .badge {
  background: rgba(255, 216, 107, .15);
  color: var(--gold);
  border: 1px solid rgba(255, 216, 107, .3);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Disable bottom nav Klanlar visually (semi-transparent) */
.navbtn[data-nav="clans"] {
  opacity: .55;
}

/* Five-button nav with subtly emphasized center Anasayfa */
.bottomnav.nav-5 {
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
}

.navbtn.navbtn-center {
  padding: 0 2px;
  position: relative;
  /* Pull the avatar up so it overlaps the nav rail — gives it a hero-coin
     feel and keeps the avatar fully visible above neighboring buttons. */
  margin-top: -14px;
}

.navbtn.navbtn-center .center-pill {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 216, 107, .10);
  color: var(--gold);
  border: 2px solid rgba(255, 216, 107, .55);
  transition: background .15s, border-color .15s;
  box-shadow: 0 0 0 4px rgba(8, 14, 30, .9), 0 6px 14px rgba(0, 0, 0, .5);
}

.navbtn.navbtn-center .center-pill .avatar-mark {
  /* The injected avatar already brings its own ring; drop redundant border
     so the image fills cleanly inside the gold halo. */
  border: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.navbtn.navbtn-center.active .center-pill {
  background: rgba(255, 216, 107, .18);
  border-color: rgba(255, 216, 107, .85);
  box-shadow: 0 0 0 4px rgba(8, 14, 30, .9), 0 0 18px rgba(255, 216, 107, .4);
}

.navbtn.navbtn-center.active {
  color: var(--gold);
}

/* Brand-tab as button (theme picker trigger) */
.brand-tab {
  cursor: pointer;
  border: 1px solid var(--line);
}

.brand-tab:active {
  transform: scale(.97);
}

.theme-picker {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 14, 30, .98);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  z-index: 250;
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .7);
  min-width: 180px;
}

.theme-picker .tp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background .15s, color .15s;
}

.theme-picker .tp-row:hover {
  background: rgba(255, 255, 255, .06);
  color: var(--ink);
}

.theme-picker .tp-row.active {
  background: rgba(255, 216, 107, .12);
  color: var(--gold);
}

.theme-picker .tp-icon {
  font-size: 18px;
  line-height: 1;
}

.settings-menu {
  left: 14px;
  transform: none;
}

/* Brand tab — accommodate img logo */
.brand-tab .brand-img {
  width: auto;
  height: 32px;
  max-width: 96px;
  display: block;
  object-fit: contain;
}

/* Replace FAQ pill style with site-pill (icon + label) */
.site-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}

.site-pill:hover {
  border-color: rgba(255, 216, 107, .3);
  color: var(--ink);
}

.site-pill:active {
  transform: scale(.96);
}

.site-pill svg {
  width: 12px;
  height: 12px;
  opacity: .8;
}

/* Sıralama — Top 3 podium */
.ranks-podium {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: end;
  gap: 8px;
  margin: 8px 0 18px;
}

.ranks-podium .podium-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  border: 1px solid var(--line);
  border-radius: 14px;
  position: relative;
}

.ranks-podium .podium-cell.pos-1 {
  background: linear-gradient(180deg, rgba(255, 216, 107, .18), rgba(201, 162, 78, .08));
  border-color: rgba(255, 216, 107, .45);
  padding-bottom: 22px;
}

.ranks-podium .podium-cell.pos-2 {
  background: linear-gradient(180deg, rgba(216, 216, 230, .14), rgba(180, 180, 200, .05));
  border-color: rgba(216, 216, 230, .4);
}

.ranks-podium .podium-cell.pos-3 {
  background: linear-gradient(180deg, rgba(205, 127, 50, .15), rgba(160, 90, 30, .05));
  border-color: rgba(205, 127, 50, .4);
}

.ranks-podium .podium-cell.me {
  box-shadow: 0 0 0 2px rgba(255, 216, 107, .4);
}

.ranks-podium .trophy {
  font-size: 22px;
  line-height: 1;
}

.ranks-podium .pos-1 .trophy {
  font-size: 28px;
}

.ranks-podium .podium-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranks-podium .pos-1 .podium-name {
  font-size: 13px;
}

.ranks-podium .podium-score {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
}

.ranks-podium .pos-1 .podium-score {
  font-size: 15px;
}

.ranks-podium .podium-reward {
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: .04em;
}

/* Sticky self row at the bottom of the rank list */
/* Pinned to the viewport (not sticky), because .frame has overflow:hidden
   which makes it a scroll container — sticky inside a non-scrolling
   container doesn't activate. fixed + matching the bottom-nav width keeps
   the self row on screen as the user scrolls the leaderboard. */
.ranks-self {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(70px + var(--safe-bot));
  width: calc(100% - 28px);
  max-width: calc(768px - 28px);
  z-index: 50;
  pointer-events: none;
}

.ranks-self .sticky-self {
  pointer-events: auto;
}

/* Ranks screen needs extra bottom padding so the last list rows aren't
   hidden behind the fixed self-rank bar above the nav. */
#screen-ranks.stub-screen {
  padding-bottom: calc(160px + var(--safe-bot));
}

.ranks-self .sticky-self {
  backdrop-filter: blur(14px);
  background: rgba(10, 24, 48, .92);
  border: 1px solid rgba(255, 216, 107, .45);
  box-shadow: 0 -6px 22px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 216, 107, .2);
}

/* Sıralama screen */
.ranks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ranks-tabs {
  display: flex;
  gap: 6px;
  margin: 4px 0 14px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
}

.ranks-tabs button {
  flex: 1;
  padding: 8px 14px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.ranks-tabs button.active {
  background: linear-gradient(180deg, rgba(43, 127, 255, .32), rgba(22, 89, 196, .22));
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.ranks-tabs button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.rank-row {
  display: grid;
  grid-template-columns: 32px 36px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.rank-row.me {
  background: linear-gradient(90deg, rgba(255, 216, 107, .12), rgba(255, 216, 107, .05));
  border-color: rgba(255, 216, 107, .35);
}

.rank-row .pos {
  font-weight: 800;
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
}

.rank-row .pos.gold {
  color: #ffd86b;
  font-size: 16px;
}

.rank-row .pos.silver {
  color: #d8d8e6;
}

.rank-row .pos.bronze {
  color: #e6914a;
}

.rank-row .av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), #c34800);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
}

.rank-row .pos {
  font-size: 14px;
}

.rank-row .nm {
  font-weight: 700;
  font-size: 13px;
}

.rank-row .lvl {
  font-size: 10px;
  color: var(--ink-mute);
  margin-top: 2px;
}

.rank-row .score {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
}

/* Home balance split + action buttons */
.balance-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px;
  margin-bottom: 8px;
}

/* 3-column variant kept for backward compat — current home uses 2-col now. */
.balance-split-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* CNT pill in the userstrip — replaces the old "Siteye git" link. Compact
   enough to fit alongside the avatar pill and brand tab on a 375px
   viewport, with the violet CNT brand color. */
.userstrip .cnt-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: rgba(143, 99, 255, .14);
  border: 1px solid rgba(214, 194, 255, .35);
  cursor: pointer;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

.userstrip .cnt-pill:active { transform: scale(.97); transition: transform .12s; }

.userstrip .cnt-pill .cnt-pill-orb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(70% 70% at 50% 30%, #d6c2ff 0%, #6f3ff5 70%, #2a126a 100%);
  border: 1.5px solid rgba(214, 194, 255, .6);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(143, 99, 255, .35);
}

.userstrip .cnt-pill .cnt-pill-num {
  font-weight: 800;
  font-size: 14px;
  color: #d6c2ff;
}

/* CNT button-form pill — clickable for the upcoming "convert to site bonus"
   modal. Same visual chrome as the other halves so the row reads as one unit. */
button.bal-half {
  border-color: var(--line);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
button.bal-half:active { transform: scale(.98); transition: transform .12s; }

.bal-half .cnt-orb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(70% 70% at 50% 30%, #d6c2ff 0%, #6f3ff5 70%, #2a126a 100%);
  border: 1.5px solid rgba(214, 194, 255, .65);
  color: #fff;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .04em;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(143, 99, 255, .35);
}

.bal-half .cnt-num {
  color: #d6c2ff;
}

.bal-half {
  background: rgba(10, 24, 48, .5);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(8px);
}

.bal-half .lbl {
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.bal-half .num {
  font-weight: 800;
  font-size: 18px;
  line-height: 1.1;
}

.bal-half .coin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(70% 70% at 50% 30%, #ffe392 0%, #c9a24e 70%, #6a4a0e 100%);
  border: 1.5px solid rgba(255, 228, 179, .6);
  flex-shrink: 0;
}

.bal-half .xp-orb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(70% 70% at 50% 30%, #b6ffce 0%, #1ec97a 70%, #064a25 100%);
  border: 1.5px solid rgba(182, 255, 206, .6);
  color: #002414;
  font-size: 9px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.xp-text .xp-of {
  color: var(--ink-mute);
  font-weight: 500;
  font-size: 11px;
}

.home-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px;
}

.home-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  position: relative;
}

.home-cta.gold {
  background: linear-gradient(180deg, #ffe392, var(--gold));
  color: #2a1a02;
  box-shadow: 0 4px 12px rgba(255, 216, 107, .25);
}

.home-cta.blue {
  background: linear-gradient(180deg, var(--eblue-2), var(--royal));
  color: #fff;
  box-shadow: 0 4px 12px rgba(43, 127, 255, .3);
}

.home-cta:active {
  transform: scale(.97);
}

.home-cta .badge-count {
  background: #ff3b3b;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 2px;
}

/* Mascot stack — single source of truth for the layered character.
       Body image fills the container; each accessory sits at a percentage
       anchor inside the same canvas so resizing scales every layer together
       and hats/glasses never drift away from the head.
       Used by: big home tap mascot, character-screen stage, large avatar
       circles. Container governs aspect ratio (197:400 = mascot canvas). */
.mascot-stack {
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.mascot-stack .ms-body {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  user-select: none;
}

.mascot-stack .ms-acc {
  position: absolute;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  /* width is set inline (per slot), height auto from intrinsic ratio */
}

.mascot-stack img.ms-acc {
  height: auto;
}

.mascot-stack .ms-acc-emoji {
  display: inline-block;
  text-align: center;
  line-height: 1;
  font-size: 72%;
}

/* Avatar mark — circular badge with portrait, frame ring, level chip. */
.avatar-mark {
  position: relative;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .10)),
    url('images/background/bg_noir.png') center/cover no-repeat,
    #0a1830;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid var(--frame-ring, rgba(255, 255, 255, .85));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .15),
    0 0 0 1px rgba(0, 0, 0, .4),
    0 0 14px var(--frame-glow, transparent);
  overflow: hidden;
}

.avatar-mark .letter {
  font-weight: 800;
  font-size: calc(0.4 * 100%);
}

/* Compact form (size < 56) — head crop, no accessories rendered */
.avatar-mark .av-head {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
  border-radius: 50%;
}


.avatar-mark .lvl-chip {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #ffe392, var(--gold));
  color: #2a1a02;
  font-weight: 800;
  font-size: 9px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .4);
  white-space: nowrap;
  z-index: 3;
}

/* Görevler (Quests) screen */
.quest-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  margin: 8px 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.quest-tabs::-webkit-scrollbar {
  display: none;
}

.quest-tabs button {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.quest-tabs button.active {
  background: linear-gradient(180deg, rgba(43, 127, 255, .32), rgba(22, 89, 196, .22));
  color: var(--ink);
}

.quest-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 8px;
  transition: border-color .15s;
}

.quest-row.complete {
  border-color: rgba(109, 255, 174, .4);
  background: rgba(109, 255, 174, .05);
}

.quest-row.claimed {
  opacity: .5;
}

.quest-row .ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 216, 107, .1);
  border: 1px solid rgba(255, 216, 107, .25);
  display: grid;
  place-items: center;
  color: var(--gold);
}

.quest-row .meta .ttl {
  font-size: 13px;
  font-weight: 600;
}

.cnt-chip {
  color: #d6c2ff;
  font-weight: 700;
  text-shadow: 0 0 6px rgba(143, 99, 255, .35);
}

/* ─── Onboarding tutorial ─────────────────────────────────────────────
   Spotlight ring + compact contextual tooltip. The ring's giant box-
   shadow paints the dimming everywhere outside it, but pointer-events
   stay `none` so clicks pass through to the real target underneath. */
/* Constrained to the centered .frame column (max 768px) so the dim only
   covers the actual game area on wide viewports — no dark bar beyond the
   frame that could be mistaken for a side panel. */
.onb-overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 768px;
  overflow: hidden;
  z-index: 9000;
  pointer-events: none;
}

.onb-ring {
  position: absolute;
  border: 2px solid var(--gold);
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, .62),
    0 0 18px rgba(255, 216, 107, .6),
    inset 0 0 18px rgba(255, 216, 107, .2);
  transition: left .3s ease, top .3s ease, width .3s ease, height .3s ease, border-radius .3s ease;
  animation: onbPulse 1.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes onbPulse {
  0%,100% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, .62), 0 0 14px rgba(255, 216, 107, .35), inset 0 0 14px rgba(255, 216, 107, .12); }
  50%     { box-shadow: 0 0 0 9999px rgba(0, 0, 0, .62), 0 0 26px rgba(255, 216, 107, .85), inset 0 0 26px rgba(255, 216, 107, .3); }
}

/* Compact tooltip — anchored next to the spotlight with a chat-bubble
   tail so it visually attaches to the target. */
.onb-tooltip {
  position: absolute;
  width: 220px;
  max-width: calc(100vw - 24px);
  background: linear-gradient(180deg, #15244a, #0a1530);
  border: 1px solid rgba(255, 216, 107, .55);
  border-radius: 12px;
  padding: 10px 12px 8px;
  color: var(--ink);
  pointer-events: auto;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .55);
  transition: left .25s ease, top .25s ease;
}

/* Arrow tail. Side-aware via data-side attribute set in JS. */
.onb-arrow {
  position: absolute;
  width: 12px;
  height: 12px;
  background: inherit;
  border: 1px solid rgba(255, 216, 107, .55);
  transform: rotate(45deg);
}
.onb-arrow[data-side="top"]    { top: -7px; border-right: 0; border-bottom: 0; }
.onb-arrow[data-side="bottom"] { bottom: -7px; border-left: 0; border-top: 0; }
.onb-arrow[data-side="left"]   { left: -7px; border-top: 0; border-right: 0; }
.onb-arrow[data-side="right"]  { right: -7px; border-bottom: 0; border-left: 0; }
/* Inherit the gradient color for the arrow */
.onb-arrow {
  background: #15244a;
}

.onb-step-num {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.onb-tooltip h4 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}

.onb-tooltip p {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.onb-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.onb-skip,
.onb-next {
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: .03em;
}

.onb-skip {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-mute);
}

.onb-skip:hover { color: var(--ink); border-color: rgba(255, 255, 255, .25); }

.onb-next {
  background: linear-gradient(180deg, #ffe392, var(--gold));
  border: 1px solid rgba(255, 216, 107, .8);
  color: #2a1a02;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(255, 216, 107, .35);
}

.onb-next:hover { filter: brightness(1.05); }

/* ─── Şehir (city) screen ─────────────────────────────────────────────
   Bird's-eye plots arranged on a faux-isometric grid. Each plot renders one
   of four states: built-current / built / ready-to-activate / locked. The
   isometric feel comes from a subtle ground gradient + a slight perspective
   tilt on the plot grid. Real isometric artwork can drop into the .plot
   elements later without changing markup. */
#screen-city.stub-screen {
  background:
    radial-gradient(120% 60% at 50% 100%, rgba(255, 180, 80, .14) 0%, transparent 60%),
    radial-gradient(80% 50% at 50% 0%, rgba(43, 127, 255, .08) 0%, transparent 70%),
    linear-gradient(180deg, #050912 0%, #0a162e 60%, #060a18 100%);
}

/* Faux isometric ground plate — the grid sits on a subtle perspective tilt
   so plots read as land parcels in a top-down view. */
.city-map {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 18px 0 30px;
  padding: 14px;
  border-radius: 22px;
  background:
    repeating-linear-gradient(45deg,
      rgba(255, 255, 255, .025) 0 18px,
      transparent 18px 36px),
    radial-gradient(140% 60% at 50% 50%, rgba(63, 100, 180, .25) 0%, transparent 70%),
    linear-gradient(160deg, #122347 0%, #0a162e 60%, #06101f 100%);
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: inset 0 8px 24px rgba(0, 0, 0, .45);
}

/* Casino is the city's anchor — full-width hero plot. */
.city-map .plot[data-theme="casino"] {
  grid-column: 1 / -1;
}

.plot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  background: linear-gradient(180deg, rgba(20, 35, 70, .65), rgba(8, 14, 32, .92));
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  padding: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .04);
  min-height: 200px;
}

.plot:not(:disabled):active { transform: scale(.98) translateY(2px); }

.plot.plot-built-current {
  border-color: rgba(255, 216, 107, .55);
  box-shadow: 0 0 0 2px rgba(255, 216, 107, .3), 0 14px 30px rgba(255, 180, 80, .22);
}

.plot.plot-locked {
  opacity: .7;
  filter: saturate(.45);
  cursor: not-allowed;
}

.plot.plot-ready-to-activate {
  border-color: rgba(109, 255, 174, .45);
  background:
    repeating-linear-gradient(45deg,
      rgba(109, 255, 174, .04) 0 8px,
      transparent 8px 16px),
    linear-gradient(180deg, rgba(20, 50, 35, .55), rgba(8, 20, 14, .9));
  animation: plotReady 2.4s ease-in-out infinite;
}

@keyframes plotReady {
  0%,100% { box-shadow: 0 10px 22px rgba(0, 0, 0, .45), 0 0 0 2px rgba(109, 255, 174, 0); }
  50%     { box-shadow: 0 10px 22px rgba(0, 0, 0, .45), 0 0 0 2px rgba(109, 255, 174, .35); }
}

/* Built parcel — full building artwork inside */
.plot-building {
  flex: 1;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  /* Slight isometric lift for the building stack */
  transform: perspective(800px) rotateX(2deg);
  transform-origin: 50% 100%;
}

.plot-building .building-roof {
  width: 60%;
  height: 8px;
  margin-bottom: 6px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(90deg, rgba(255, 216, 107, .55), #fff7d4, rgba(255, 216, 107, .55));
  box-shadow: 0 0 14px rgba(255, 216, 107, .35);
}

.plot.plot-built .building-roof {
  background: linear-gradient(90deg, rgba(143, 99, 255, .5), #d6c2ff, rgba(143, 99, 255, .5));
  box-shadow: 0 0 14px rgba(143, 99, 255, .3);
}

.plot-icon {
  font-size: 48px;
  line-height: 1;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .55));
  /* When the building asset PNG is present, .plot-icon shrinks its impact —
     the emoji fallback is `<span style="display:none">` until onerror flips. */
}

.plot-art {
  display: block;
  max-width: 100%;
  max-height: 140px;
  margin: 0 auto;
  /* Pre-rendered isometric building artwork; spec'd as bottom-anchored so
     this `object-position: bottom` keeps building feet flush with the
     plot ground regardless of canvas aspect. */
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .55));
}

.plot[data-theme="casino"] .plot-icon { font-size: 64px; }
.plot[data-theme="casino"] .plot-art { max-height: 200px; }

/* When the artist has delivered map_base.png the .city-map's CSS pattern
   layers should yield to the artwork — drop the synthetic gradient. */
.city-map.has-map-bg {
  background-image: var(--map-bg, none);
  background-color: #060a18;
}
.city-map.has-map-bg::before { display: none; }

.plot-name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .01em;
  color: #fff;
}

.plot-name.muted { color: var(--ink-mute); }

.plot-tagline {
  font-size: 11px;
  color: var(--ink-mute);
  line-height: 1.35;
  min-height: 30px;
  padding: 0 4px;
}

.plot-income {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
}

.plot-built-current .plot-income { color: var(--gold); }
.plot-built .plot-income { color: var(--ink-mute); font-weight: 500; }

.plot-pending {
  color: #4ade80;
  font-weight: 700;
  animation: plotPulse 1.6s ease-in-out infinite;
}
@keyframes plotPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

/* Empty plot — locked or ready-to-activate variant */
.plot-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 24px 14px;
  background:
    repeating-linear-gradient(45deg,
      rgba(255, 255, 255, .04) 0 10px,
      transparent 10px 20px);
  /* Slight inset/depression to read as "empty land". */
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .55);
}

.plot-empty-fence {
  font-size: 36px;
  opacity: .5;
}

.plot-empty.activatable .plot-empty-fence {
  font-size: 36px;
  font-weight: 800;
  color: #6dffae;
  opacity: 1;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(109, 255, 174, .55);
  border-radius: 16px;
  background: rgba(109, 255, 174, .06);
}

/* Footer CTA strip across the bottom of the plot */
.plot-cta,
.plot-lock {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-top: 1px solid rgba(255, 255, 255, .06);
  text-align: center;
}

.plot-cta.open {
  color: #2a1a02;
  background: linear-gradient(180deg, #ffe392, var(--gold));
}

.plot-cta.switch {
  color: #fff;
  background: linear-gradient(180deg, rgba(143, 99, 255, .55), rgba(74, 31, 181, .8));
}

.plot-cta.activate {
  color: #002414;
  background: linear-gradient(180deg, #6dffae, #1ec97a);
  box-shadow: 0 0 18px rgba(30, 201, 122, .35);
}

.plot-lock {
  color: rgba(255, 255, 255, .85);
  background: rgba(0, 0, 0, .45);
}

/* Casino hero plot — bigger horizontal layout */
.plot[data-theme="casino"] .plot-building {
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 18px 16px 12px;
}

.plot[data-theme="casino"] .plot-building > div:not(.building-roof) {
  text-align: left;
}

.plot[data-theme="casino"] .building-roof {
  width: 100%;
  margin-bottom: 0;
  position: absolute;
  top: 0;
  left: 0;
}

.plot[data-theme="casino"] .plot-tagline {
  min-height: 0;
}

/* CNT shortcut button on premium / level-locked shop cards. */
.shop-card .cnt-unlock {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 6px 8px;
  border: 1px solid rgba(214, 194, 255, .45);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(143, 99, 255, .25), rgba(60, 25, 145, .35));
  color: #d6c2ff;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(143, 99, 255, .25);
}

.shop-card .cnt-unlock:disabled {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
}

/* Energy refill button — sits inside the energy pill on home. */
.energy .energy-refill {
  margin-left: 8px;
  padding: 4px 10px;
  background: linear-gradient(180deg, rgba(143, 99, 255, .35), rgba(60, 25, 145, .55));
  border: 1px solid rgba(214, 194, 255, .4);
  border-radius: 999px;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 12px rgba(143, 99, 255, .25);
}

.energy .energy-refill .cnt-mini {
  color: #d6c2ff;
  font-weight: 800;
  letter-spacing: .03em;
}

.energy .energy-refill:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* CNT cüzdan popup */
.cnt-popup .cnt-balance-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.cnt-orb-lg {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(70% 70% at 50% 30%, #d6c2ff 0%, #6f3ff5 70%, #2a126a 100%);
  border: 2px solid rgba(214, 194, 255, .65);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(143, 99, 255, .5);
}

.cnt-balance-row .lbl {
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cnt-balance-row .num {
  font-size: 22px;
  font-weight: 800;
  color: #d6c2ff;
}

.cnt-help {
  font-size: 12px;
  color: var(--ink-mute);
  line-height: 1.45;
  margin-bottom: 16px;
}

.cnt-section {
  background: rgba(143, 99, 255, .07);
  border: 1px solid rgba(214, 194, 255, .18);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}

.cnt-section-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.cnt-rate {
  font-size: 11px;
  color: var(--ink-mute);
  margin-bottom: 10px;
}

.cnt-convert {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.cnt-convert input {
  flex: 1;
  background: rgba(0, 0, 0, .35);
  border: 1px solid var(--line);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
  min-width: 0;
}

.cnt-convert input:focus {
  outline: 2px solid rgba(143, 99, 255, .55);
  outline-offset: -2px;
}

.cnt-arrow {
  color: var(--ink-mute);
  font-size: 18px;
}

.cnt-tl-out {
  font-weight: 800;
  font-size: 16px;
  color: var(--gold);
  white-space: nowrap;
  min-width: 80px;
  text-align: right;
}

.cnt-action {
  display: block;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #8f63ff, #4a1fb5);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(143, 99, 255, .35);
}

.cnt-action:active { transform: scale(.98); }
.cnt-action:disabled {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
}

.cnt-receipt {
  background: linear-gradient(180deg, rgba(30, 201, 122, .1), rgba(0, 0, 0, .25));
  border: 1px solid rgba(109, 255, 174, .35);
  border-radius: 14px;
  padding: 12px;
  margin-top: 12px;
  text-align: center;
}

.cnt-receipt .lbl {
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}

.cnt-receipt code {
  display: block;
  font-family: 'SFMono-Regular', Menlo, monospace;
  font-size: 13px;
  font-weight: 700;
  color: #6dffae;
  letter-spacing: .04em;
  margin-bottom: 12px;
  word-break: break-all;
}

.quest-row .ladder-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(255, 216, 107, .12);
  border: 1px solid rgba(255, 216, 107, .35);
  border-radius: 999px;
  vertical-align: middle;
}

.quest-row .meta .rew {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 2px;
}

.quest-row .meta .rew strong {
  color: var(--gold);
  font-weight: 700;
}

.quest-row .meta .rew .xp {
  color: #6dffae;
  font-weight: 700;
}

.quest-row .pbar {
  margin-top: 6px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}

.quest-row .pbar>span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #ffe392);
  border-radius: inherit;
}

.quest-row .claim {
  border: 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #6dffae, #1ec97a);
  color: #002414;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(30, 201, 122, .3);
}

.quest-row .claim:disabled {
  background: rgba(255, 255, 255, .06);
  color: var(--ink-mute);
  box-shadow: none;
  cursor: not-allowed;
}

.quest-row .claim.site {
  background: linear-gradient(180deg, var(--eblue-2), var(--royal));
  color: #fff;
  box-shadow: 0 4px 10px rgba(43, 127, 255, .35);
}

/* Karakter (Character) screen */
.char-stage {
  position: relative;
  height: 285px;
  /* 75% of the original 380 — shop list sits closer */
  margin: 4px 7px 16px -8px;
  border-radius: 18px;
  overflow: hidden;
  /* clip-path also clips filter outputs (e.g. mascot drop-shadow) which
         overflow: hidden alone can let escape on some browsers. */
  clip-path: inset(0 round 18px);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .0) 0%, rgba(0, 0, 0, .5) 100%),
    url('assets/home_bg_street.png') center/cover no-repeat;
  display: grid;
  place-items: end center;
}

.char-stage.bg-noir {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .1) 0%, rgba(0, 0, 0, .5) 100%),
    url('assets/home_bg_street.png') center/cover no-repeat;
}

.char-stage.bg-velvet {
  background:
    linear-gradient(180deg, rgba(91, 22, 32, .5) 0%, rgba(40, 8, 20, .85) 100%);
}

.char-stage.bg-marble {
  background:
    linear-gradient(180deg, rgba(20, 30, 55, .4) 0%, rgba(8, 14, 32, .85) 100%),
    url('assets/atlas/D4_marble.png') center/cover no-repeat;
}

/* Mascot wrap inside char-stage — sized to the canvas aspect ratio so
       the layered stack renders at a fixed proportion regardless of the
       stage's outer height/width. align-self:end pins the feet to the
       stage floor. */
.char-stage .char-mascot-wrap {
  position: relative;
  aspect-ratio: 197 / 400;
  /* Slight bottom padding via height < 100% so feet (and the dropped
         shadow) cannot reach the rounded border — guarantees the mascot
         never visually escapes regardless of stage height. */
  height: 115%;
  max-width: 96%;
  align-self: end;
  justify-self: center;
  margin-bottom: 0;
  /* Lighter shadow so any spill is barely visible even if a future
         layout change widened the stage. */
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .55));
  z-index: 2;
  top: 15%;
}

.char-stage .stage-meta {
  position: absolute;
  bottom: 12px;
  left: 14px;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(6px);
  border-radius: 10px;
  padding: 6px 10px;
  z-index: 4;
}

.char-stage .stage-name {
  font-weight: 700;
  font-size: 13px;
}

.char-stage .stage-lvl {
  font-size: 11px;
  color: var(--gold);
  font-weight: 700;
}

.char-stage .ach-row {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.char-stage .ach-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 216, 107, .25), rgba(255, 216, 107, .1));
  border: 1px solid rgba(255, 216, 107, .5);
  color: var(--gold);
  white-space: nowrap;
}

.char-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 14px;
}

.char-tabs.char-tabs-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Accessory shop sections, grouped by slot */
.acc-slot-section {
  margin-bottom: 16px;
}

.acc-slot-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 4px 8px;
}

.shop-card.equipped .buy.equipped-acc {
  background: linear-gradient(180deg, #ff8a4d, #c34800);
  color: #fff;
}

.char-tabs button {
  padding: 9px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.char-tabs button.active {
  background: linear-gradient(180deg, rgba(255, 216, 107, .3), rgba(201, 162, 78, .18));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}

.shop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.shop-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-card.equipped {
  border-color: rgba(109, 255, 174, .5);
  background: rgba(109, 255, 174, .06);
}

.shop-card .pic {
  aspect-ratio: 1.2;
  border-radius: 10px;
  background: rgba(0, 0, 0, .3);
  display: grid;
  place-items: center;
  font-size: 36px;
  overflow: hidden;
}

.shop-card .pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-card .ttl {
  font-size: 12px;
  font-weight: 700;
}

.shop-card .desc {
  font-size: 10px;
  color: var(--ink-mute);
}

.shop-card .buy {
  margin-top: auto;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--eblue-2), var(--royal));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.shop-card .buy.owned {
  background: rgba(109, 255, 174, .18);
  color: #6dffae;
  border: 1px solid rgba(109, 255, 174, .4);
}

.shop-card .buy.locked {
  background: rgba(255, 255, 255, .06);
  color: var(--ink-mute);
  border: 1px solid rgba(255, 255, 255, .08);
}

.shop-card .buy.premium-locked {
  background: linear-gradient(180deg, rgba(255, 106, 44, .18), rgba(195, 72, 0, .1));
  color: #ffae42;
  border: 1px solid rgba(255, 106, 44, .45);
}

/* Rarity badges in the corner of the pic */
.shop-card .rarity-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 4;
}

.shop-card .rarity-badge.rare {
  background: linear-gradient(180deg, rgba(74, 158, 255, .2), rgba(43, 127, 255, .1));
  color: #6fb1ff;
  border: 1px solid rgba(74, 158, 255, .5);
}

.shop-card .rarity-badge.premium {
  background: linear-gradient(180deg, rgba(255, 106, 44, .2), rgba(195, 72, 0, .1));
  color: #ffae42;
  border: 1px solid rgba(255, 106, 44, .5);
}

.shop-card.rare {
  border-color: rgba(74, 158, 255, .3);
}

.shop-card.premium-only {
  border-color: rgba(255, 106, 44, .4);
}

.shop-card .pic {
  position: relative;
}

.shop-card .buy:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.shop-card.locked-by-level {
  opacity: .55;
}

.shop-card.locked-by-level .pic {
  filter: grayscale(.7);
  position: relative;
}

.shop-card.locked-by-level .pic .lvl-lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: rgba(0, 0, 0, .35);
  backdrop-filter: blur(2px);
}

/* Hide league timer if no league active (V1 stub) */
/* (left as-is in markup) */

/* Daily reward floating CTA — small badge over balance when available */
.daily-cta {
  position: absolute;
  top: 6px;
  right: 14px;
  background: linear-gradient(180deg, #ffe392, var(--gold));
  color: #2a1a02;
  border: 1px solid rgba(0, 0, 0, .4);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .4), 0 0 12px rgba(255, 216, 107, .3);
  z-index: 5;
  display: none;
}

.daily-cta.show {
  display: block;
  animation: ready-pulse 2s ease-in-out infinite;
}
/* ============================================================
   Level-up celebration popup
   ============================================================ */

.lvlup-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at center, rgba(20, 12, 60, .82), rgba(0, 0, 0, .92));
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.lvlup-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.lvlup-card {
  width: min(340px, 88vw);
  background: linear-gradient(165deg, #1a1f44 0%, #0e1230 100%);
  border: 1px solid rgba(255, 216, 107, .45);
  border-radius: 22px;
  padding: 22px 18px 18px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .08);
  transform: scale(.85);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.lvlup-overlay.open .lvlup-card {
  transform: scale(1);
}

.lvlup-eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 2px;
  margin-bottom: 8px;
  opacity: .85;
}

.lvlup-level {
  font-size: 64px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #ffd86b 0%, #ff8c42 60%, #ff5e62 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 4px 0 14px;
  text-shadow: 0 0 30px rgba(255, 216, 107, .35);
  animation: lvlup-pop .55s cubic-bezier(.34, 1.56, .64, 1) .1s both;
}
.lvlup-lv-prefix {
  font-size: 32px;
  vertical-align: top;
  margin-right: 4px;
}

@keyframes lvlup-pop {
  0%   { transform: scale(.5) rotate(-8deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

.lvlup-milestone-tag {
  display: inline-block;
  background: linear-gradient(135deg, #ffd86b, #ff8c42);
  color: #1a0e3a;
  padding: 3px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .5px;
  margin-bottom: 12px;
}

.lvlup-rewards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 14px;
}

.lvlup-reward {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  padding: 10px 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.lvlup-reward-icon {
  font-size: 22px;
  margin-bottom: 2px;
}
.lvlup-reward-amt {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}
.lvlup-reward-lbl {
  font-size: 9px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: .8px;
}

.lvlup-unlocks {
  margin: 4px 0 14px;
  text-align: left;
}
.lvlup-unlocks-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 1.2px;
  text-align: center;
  margin-bottom: 8px;
  opacity: .75;
}
.lvlup-unlock-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 6px;
}
.lvlup-unlock-row.mini { text-align: center; }
.lvlup-unlock-mini {
  font-size: 11px;
  color: #4ade80;
  font-weight: 700;
}
.lvlup-unlock {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  padding: 8px 10px;
}
.lvlup-unlock.theme {
  border-color: rgba(74, 222, 128, .35);
  background: rgba(74, 222, 128, .08);
}
.lvlup-unlock-icon {
  font-size: 22px;
  width: 32px;
  text-align: center;
}
.lvlup-unlock-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.lvlup-unlock-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.lvlup-unlock-sub {
  font-size: 10px;
  color: var(--ink-mute);
}

.lvlup-cta {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, var(--gold) 0%, #ff8c42 100%);
  color: #1a0e3a;
  border: 0;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .5px;
  cursor: pointer;
  margin-top: 6px;
  transition: transform .15s ease;
}
.lvlup-cta:active { transform: scale(.97); }

/* Confetti — 24 bits, each with its own color + drop trajectory */
.lvlup-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.lvlup-confetti-bit {
  position: absolute;
  top: -20px;
  left: calc(8% + (var(--i) * 3.6%));
  width: 8px;
  height: 14px;
  background: hsl(var(--h, 50), 80%, 60%);
  border-radius: 2px;
  opacity: 0;
  animation: lvlup-confetti-drop 2.8s linear infinite;
  animation-delay: calc(var(--i) * 0.06s);
}
@keyframes lvlup-confetti-drop {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

.lvlup-milestone .lvlup-card {
  border-color: rgba(255, 216, 107, .9);
  box-shadow: 0 20px 60px rgba(255, 140, 66, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
}

/* ============================================================
   Workplace item life — idle bob, ready pulse, collect overflow
   ============================================================ */

/* Idle: filled-but-not-ready slots breathe gently. Tiny scale + brightness
   pulse keeps the floor from feeling static. */
.slot.filled .eq {
  animation: slot-breathe 3.6s ease-in-out infinite;
  transform-origin: 50% 90%;
}
@keyframes slot-breathe {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50%      { transform: scale(1.02); filter: brightness(1.05); }
}

/* Ready: stronger pulse + golden glow ring + lift */
.slot.filled.ready .eq {
  animation: slot-ready-pulse 1.4s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(255, 216, 107, .65));
}
@keyframes slot-ready-pulse {
  0%, 100% { transform: scale(1.04) translateY(-2px); }
  50%      { transform: scale(1.09) translateY(-4px); }
}

.slot.filled.ready::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  border: 2px solid rgba(255, 216, 107, .55);
  box-shadow: 0 0 24px rgba(255, 216, 107, .35), inset 0 0 16px rgba(255, 216, 107, .12);
  pointer-events: none;
  animation: slot-ring-pulse 1.6s ease-in-out infinite;
}
@keyframes slot-ring-pulse {
  0%, 100% { opacity: .45; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.03); }
}

/* Floating coin emoji over a ready slot (looped, looks like overflow) */
.slot.filled.ready::before {
  content: '🪙';
  position: absolute;
  top: 8%;
  right: 16%;
  font-size: 18px;
  pointer-events: none;
  animation: slot-coin-float 2.2s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5));
}
@keyframes slot-coin-float {
  0%   { transform: translateY(0) rotate(-8deg); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(-26px) rotate(20deg); opacity: 0; }
}

/* Balance pill receives the coin shower */
#balance2.coin-receive,
#balance.coin-receive {
  animation: balance-pulse .55s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes balance-pulse {
  0%   { transform: scale(1);    color: var(--ink); }
  35%  { transform: scale(1.18); color: var(--gold); text-shadow: 0 0 16px rgba(255, 216, 107, .8); }
  100% { transform: scale(1);    color: var(--ink); text-shadow: none; }
}

/* Coin-fly glyphs already get inline styles + Web Animations API; the class
   is a hook for any future tweak (e.g. theme-specific glyph). */
.coin-fly {
  user-select: none;
  -webkit-user-select: none;
}

/* ============================================================
   Idle-return ("welcome back") popup
   ============================================================ */

.idle-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.idle-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.idle-card {
  width: min(320px, 86vw);
  background: linear-gradient(160deg, #16203c 0%, #0c122e 100%);
  border: 1px solid rgba(74, 222, 128, .35);
  border-radius: 20px;
  padding: 22px 18px 16px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  transform: translateY(20px) scale(.95);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.idle-overlay.open .idle-card { transform: translateY(0) scale(1); }

.idle-icon {
  font-size: 38px;
  line-height: 1;
  margin-bottom: 6px;
  animation: idle-wave 1.6s ease-in-out infinite;
  transform-origin: 70% 70%;
}
@keyframes idle-wave {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30%, 50% { transform: rotate(15deg); }
  20%, 40%      { transform: rotate(-10deg); }
}

.idle-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
.idle-sub {
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 14px;
}
.idle-sub b { color: var(--gold); }

.idle-pending {
  background: rgba(74, 222, 128, .08);
  border: 1px solid rgba(74, 222, 128, .3);
  border-radius: 14px;
  padding: 14px 12px;
  margin-bottom: 14px;
}
.idle-pending-amt {
  font-size: 30px;
  font-weight: 900;
  color: #4ade80;
  text-shadow: 0 0 18px rgba(74, 222, 128, .35);
  line-height: 1;
}
.idle-pending-lbl {
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 4px;
}

.idle-cta {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  color: #0a3614;
  border: 0;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease;
}
.idle-cta:active { transform: scale(.97); }

/* ============================================================
   Combo chip + crit feedback (mascot tap)
   ============================================================ */

.combo-chip {
  position: absolute;
  top: 14%;
  right: 6%;
  background: linear-gradient(135deg, #ff8c42, #ff5e62);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  line-height: 1;
  pointer-events: none;
  z-index: 30;
  opacity: 0;
  transform: scale(.7);
  transition: opacity .2s ease, transform .25s cubic-bezier(.34, 1.56, .64, 1);
  box-shadow: 0 4px 14px rgba(255, 140, 66, .55);
}
.combo-chip.show {
  opacity: 1;
  transform: scale(1);
}
.combo-chip.pulse .combo-num {
  animation: combo-pulse .35s ease-out;
}
@keyframes combo-pulse {
  0%   { transform: scale(1.6); }
  60%  { transform: scale(.92); }
  100% { transform: scale(1); }
}
.combo-num {
  font-size: 18px;
  font-weight: 900;
  display: block;
}
.combo-lbl {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.5px;
  opacity: .9;
}

/* Crit text floats up bigger, with a gradient + bounce */
.crit-text {
  position: absolute;
  font-size: 22px;
  font-weight: 900;
  color: var(--gold);
  pointer-events: none;
  z-index: 31;
  background: linear-gradient(135deg, #ffd86b, #ff5e62);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 12px rgba(255, 140, 66, .5);
  animation: crit-float .85s cubic-bezier(.34, 1.56, .64, 1) forwards;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}
@keyframes crit-float {
  0%   { transform: translate(-50%, -50%) scale(.4); opacity: 0; }
  20%  { transform: translate(-50%, -60%) scale(1.4); opacity: 1; }
  100% { transform: translate(-50%, -120%) scale(1); opacity: 0; }
}

/* Pop modifier when the tap was a crit — bigger, gold, longer life */
.pop.pop-crit {
  font-size: 28px;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(255, 216, 107, .8);
  font-weight: 900;
}

/* Brighter sparks for crits */
.spark.spark-crit {
  background: radial-gradient(circle, #fff5c8, #ffd86b 50%, #ff5e62 100%) !important;
  box-shadow: 0 0 10px rgba(255, 216, 107, .9);
  width: 12px !important;
  height: 12px !important;
}

/* Crit shake on the mascot */
#mascot.crit-shake {
  animation: crit-shake .35s ease-out;
}
@keyframes crit-shake {
  0%, 100% { transform: translate(0, 0); }
  15%      { transform: translate(-4px, 2px); }
  30%      { transform: translate(5px, -2px); }
  45%      { transform: translate(-3px, 3px); }
  60%      { transform: translate(3px, 1px); }
  80%      { transform: translate(-1px, -1px); }
}

/* Stage flashes briefly on crit */
#mascotStage.crit-flash::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255, 216, 107, .35), transparent 70%);
  animation: crit-flash .4s ease-out forwards;
  z-index: 25;
}
@keyframes crit-flash {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ============================================================
   Mascot mood states + hot-streak posture
   ============================================================ */

/* Charged: halo glow, slightly faster idle bob */
#mascot.mood-charged {
  filter: drop-shadow(0 0 24px rgba(255, 216, 107, .35));
}
#mascot.mood-charged .mascot-stack {
  animation: idle-charged 2s ease-in-out infinite;
}
/* Charged variant — same symmetric breathe, slightly wider chest expansion. */
@keyframes idle-charged {
  0%, 100% { transform: scale(1)    translateZ(0); }
  50%      { transform: scale(1.01) translateZ(0); }
}

/* Tired: dimmed, slower, slight forward droop, sweat drop */
#mascot.mood-tired {
  filter: brightness(.78) saturate(.85);
}
#mascot.mood-tired .mascot-stack {
  animation: idle-tired 5.2s ease-in-out infinite;
  transform-origin: 50% 100%;
}
@keyframes idle-tired {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-3px) rotate(1deg); }
}
#mascot.mood-tired::after {
  content: '💧';
  position: absolute;
  top: 18%;
  right: 18%;
  font-size: 18px;
  opacity: 0;
  animation: sweat-drip 4s ease-in-out infinite 1s;
  pointer-events: none;
}
@keyframes sweat-drip {
  0%, 60%, 100% { opacity: 0; transform: translateY(0); }
  10%, 35%      { opacity: 1; }
  20%           { transform: translateY(0); }
  50%           { transform: translateY(40px); opacity: 0; }
}

/* Hot streak: lean forward, golden rim glow, fast pulse */
#mascot.hot-streak {
  filter: drop-shadow(0 0 32px rgba(255, 140, 66, .55)) drop-shadow(0 0 8px rgba(255, 216, 107, .6));
}
#mascot.hot-streak .mascot-stack {
  animation: streak-lean 0.6s ease-in-out infinite;
}
@keyframes streak-lean {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-2px) rotate(2deg) scale(1.015); }
}
#mascot.hot-streak::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255, 140, 66, .25), transparent 65%);
  animation: streak-aura 1s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}
@keyframes streak-aura {
  0%, 100% { opacity: .55; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.1); }
}

/* ============================================================
   Random-event banner (top of screen, time-limited tap-to-claim)
   ============================================================ */

.revt-banner {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  width: min(420px, 92vw);
  background: linear-gradient(135deg, #2a1f5c, #1a0e3a);
  border: 1px solid rgba(255, 216, 107, .45);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 900;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .55);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.revt-banner.show {
  transform: translateX(-50%) translateY(0);
}

.revt-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
  animation: revt-icon-bob 1.4s ease-in-out infinite;
}
@keyframes revt-icon-bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-3px) rotate(3deg); }
}

.revt-text {
  flex: 1;
  min-width: 0;
}
.revt-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.revt-body {
  font-size: 11px;
  color: var(--ink-mute);
}

.revt-cta {
  background: linear-gradient(135deg, var(--gold), #ff8c42);
  color: #1a0e3a;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .15s ease;
}
.revt-cta:active { transform: scale(.94); }

.revt-progress {
  position: absolute;
  bottom: 0;
  left: 8px;
  right: 8px;
  height: 3px;
  background: rgba(255, 255, 255, .08);
  border-radius: 2px;
  overflow: hidden;
}
.revt-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #4ade80, var(--gold) 50%, #ff5e62);
  border-radius: 2px;
}

/* Per-event color hints */
.revt-whale  { border-color: rgba(56, 189, 248, .55); }
.revt-whale  .revt-title { color: #38bdf8; }
.revt-thief  { border-color: rgba(255, 94, 98, .55); }
.revt-thief  .revt-title { color: #ff5e62; }
.revt-thief  .revt-icon  { animation-duration: .6s; }
.revt-crowd  .revt-title { color: var(--gold); }

/* ============================================================
   Achievements list modal
   ============================================================ */

.ach-chip.ach-summary {
  background: linear-gradient(135deg, rgba(255, 216, 107, .25), rgba(255, 140, 66, .15));
  border: 1px solid rgba(255, 216, 107, .55);
  cursor: pointer;
  font-weight: 800;
}
.ach-chip.ach-summary:active { transform: scale(.94); }

.ach-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  padding: 20px;
}
.ach-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.ach-modal {
  width: min(420px, 100%);
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #16203c 0%, #0c122e 100%);
  border: 1px solid rgba(255, 216, 107, .35);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  transform: translateY(20px) scale(.96);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.ach-modal-overlay.open .ach-modal { transform: none; }

.ach-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  font-weight: 800;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-size: 15px;
  color: var(--gold);
}
.ach-modal-close {
  background: transparent;
  border: 0;
  color: var(--ink-mute);
  font-size: 20px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  transition: background .15s ease;
}
.ach-modal-close:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.ach-modal-body {
  overflow-y: auto;
  padding: 8px 12px 14px;
}

.ach-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.ach-item:last-child { border-bottom: 0; }

.ach-item-icon {
  font-size: 28px;
  text-align: center;
  filter: grayscale(.6) brightness(.8);
}
.ach-item.ach-done .ach-item-icon { filter: none; }

.ach-item-body { min-width: 0; }
.ach-item-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1px;
}
.ach-item.ach-done .ach-item-name { color: var(--gold); }
.ach-item-desc {
  font-size: 10px;
  color: var(--ink-mute);
  margin-bottom: 4px;
}
.ach-item-bar {
  height: 4px;
  background: rgba(255, 255, 255, .07);
  border-radius: 2px;
  overflow: hidden;
}
.ach-item-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #ff8c42);
  border-radius: 2px;
  transition: width .3s ease;
}
.ach-item.ach-done .ach-item-bar > span {
  background: linear-gradient(90deg, #4ade80, #22c55e);
}

.ach-item-prog {
  text-align: right;
  flex-shrink: 0;
}
.ach-item-frac {
  font-size: 10px;
  color: var(--ink-mute);
  font-weight: 700;
}
.ach-item-tick {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4ade80, #22c55e);
  color: #052911;
  font-weight: 900;
  text-align: center;
  line-height: 28px;
}

/* ============================================================
   Settings menu toggles + workplace empty-state hint
   ============================================================ */

.tp-row .tp-label {
  flex: 1;
}
.tp-row .tp-toggle {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  background: rgba(74, 222, 128, .15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, .35);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: auto;
}
.tp-row[data-action="haptic-toggle"] {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Empty-workplace hint — shows when no slot has an item. Centered on the
   floor area, fades out the moment the player buys their first table. */
.wp-empty-hint {
  position: absolute;
  bottom: calc(var(--bottom-nav-h, 64px) + 90px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(6px);
  border: 1px dashed rgba(255, 216, 107, .45);
  border-radius: 999px;
  padding: 8px 16px 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  z-index: 5;
  pointer-events: none;
  animation: wp-hint-bob 2.2s ease-in-out infinite;
}
@keyframes wp-hint-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-4px); }
}
.wp-empty-arrow {
  font-size: 18px;
  font-weight: 900;
  display: inline-block;
  animation: wp-hint-arrow 1s ease-in-out infinite;
}
@keyframes wp-hint-arrow {
  0%, 100% { transform: translateY(0); opacity: .6; }
  50%      { transform: translateY(4px); opacity: 1; }
}

/* ============================================================
   Boost pill (top of screen) + boost purchase modal
   ============================================================ */

.boost-pill {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #ff8c42, #ff5e62);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px 6px 8px;
  font-weight: 800;
  font-size: 12px;
  box-shadow: 0 6px 18px rgba(255, 140, 66, .45);
  animation: boost-shimmer 2.4s linear infinite;
}
@keyframes boost-shimmer {
  0%, 100% { box-shadow: 0 6px 18px rgba(255, 140, 66, .45); }
  50%      { box-shadow: 0 8px 26px rgba(255, 140, 66, .75); }
}
.boost-pill .boost-icon {
  font-size: 16px;
  animation: boost-rocket 1.8s ease-in-out infinite;
}
@keyframes boost-rocket {
  0%, 100% { transform: translateY(0) rotate(-12deg); }
  50%      { transform: translateY(-2px) rotate(12deg); }
}
.boost-pill .boost-mult {
  font-size: 14px;
  font-weight: 900;
}
.boost-pill .boost-time {
  font-size: 11px;
  opacity: .9;
  margin-left: 2px;
}
.boost-pill.boost-near-end {
  background: linear-gradient(135deg, #ff5e62, #c2410c);
}

/* Boost purchase modal */
.boost-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  padding: 20px;
}
.boost-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.boost-modal {
  width: min(380px, 100%);
  background: linear-gradient(160deg, #1a0e3a 0%, #0c122e 100%);
  border: 1px solid rgba(255, 140, 66, .55);
  border-radius: 18px;
  padding: 18px 16px 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  transform: translateY(20px) scale(.95);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.boost-modal-overlay.open .boost-modal { transform: none; }

.boost-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 800;
  color: #ff8c42;
  margin-bottom: 4px;
}
.boost-modal-close {
  background: transparent;
  border: 0;
  color: var(--ink-mute);
  font-size: 18px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 6px;
}
.boost-modal-close:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.boost-modal-sub {
  font-size: 11px;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.boost-modal-balance {
  font-size: 11px;
  color: var(--ink-mute);
  margin-bottom: 12px;
  text-align: right;
}
.boost-modal-balance b { color: var(--cnt, #c084fc); }

.boost-modal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.boost-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  color: #fff;
}
.boost-opt:hover:not(:disabled) {
  background: rgba(255, 140, 66, .12);
  border-color: rgba(255, 140, 66, .45);
}
.boost-opt:active:not(:disabled) { transform: scale(.97); }
.boost-opt:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.boost-opt-label {
  font-size: 13px;
  font-weight: 700;
}
.boost-opt-cost {
  font-size: 13px;
  font-weight: 800;
  color: #c084fc;
}

/* ============================================================
   Weekly limited-time offer card
   ============================================================ */

.offer-card {
  margin: 14px 16px 4px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .06));
  border: 1px solid var(--offer-accent, var(--gold));
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}
.offer-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, var(--offer-accent), transparent 70%);
  opacity: .12;
  pointer-events: none;
}
.offer-card.offer-claimed { opacity: .55; }

.offer-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
  display: grid;
  place-items: center;
  font-size: 26px;
}
.offer-text { min-width: 0; }
.offer-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--offer-accent, var(--gold));
  color: #0c122e;
  margin-bottom: 2px;
}
.offer-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}
.offer-body {
  font-size: 11px;
  color: var(--ink-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offer-cta {
  background: var(--offer-accent, var(--gold));
  color: #0c122e;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease;
}
.offer-cta:active:not(:disabled) { transform: scale(.94); }
.offer-cta:disabled {
  background: rgba(74, 222, 128, .15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, .35);
  cursor: not-allowed;
}

/* ============================================================
   Character live-preview badge
   ============================================================ */

.preview-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 216, 107, .92);
  color: #1a0e3a;
  border: 0;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .8px;
  cursor: pointer;
  z-index: 6;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .35);
  animation: preview-pulse 1.5s ease-in-out infinite;
}
@keyframes preview-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

/* ============================================================
   Slot construction state — timer + speed-up button
   ============================================================ */

.slot.constructing .eq img {
  filter: grayscale(.8) brightness(.55) saturate(.5);
  animation: none;
  opacity: .55;
}
.slot.constructing::after,
.slot.constructing::before {
  display: none;     /* hide ready-state ring + overflow coin */
}

.construct-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 0 6px 14px;
  pointer-events: none;
  z-index: 4;
}
/* Browser default [hidden]{display:none} loses the cascade fight with our
   display:flex above. Restore it explicitly so the construction overlay
   actually disappears once the slot finishes building. */
.construct-overlay[hidden] { display: none; }

.construct-timer {
  display: inline-block;
  background: rgba(0, 0, 0, .72);
  border: 1px solid rgba(255, 216, 107, .35);
  color: var(--gold);
  border-radius: 10px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.skip-btn {
  pointer-events: auto;
  background: linear-gradient(135deg, var(--gold), #ff8c42);
  color: #1a0e3a;
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(255, 140, 66, .55);
  animation: skip-pulse 1.6s ease-in-out infinite;
}
.skip-btn:active { transform: scale(.93); }
@keyframes skip-pulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 4px 12px rgba(255, 140, 66, .55); }
  50%      { transform: scale(1.06); box-shadow: 0 6px 18px rgba(255, 140, 66, .85); }
}
.skip-btn .skip-icon {
  font-size: 13px;
  line-height: 1;
}
.skip-btn b {
  font-weight: 900;
}
/* Free skip glows green so the player notices the freebie */
.skip-btn.skip-free {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  color: #052911;
  box-shadow: 0 4px 12px rgba(74, 222, 128, .55);
}
.skip-btn.skip-free:hover { box-shadow: 0 6px 18px rgba(74, 222, 128, .8); }

/* Construction modal hint line */
.construct-modal-hint {
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 8px;
  text-align: center;
}
.construct-modal-hint b { color: var(--gold); }

/* ============================================================
   City building constructing state
   ============================================================ */

.plot.plot-constructing {
  border-color: rgba(255, 140, 66, .5);
}
.plot-construct {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 6px;
}
.plot-construct .plot-icon-wrap {
  position: relative;
  filter: grayscale(.85) brightness(.55);
  opacity: .6;
}
.plot-construct-timer {
  background: rgba(0, 0, 0, .72);
  border: 1px solid rgba(255, 140, 66, .55);
  color: #ff8c42;
  border-radius: 10px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Settings menu slider row (ses seviyesi)
   ============================================================ */

.tp-row.tp-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default;
}

.tp-slider {
  flex: 1;
  margin-left: auto;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(255, 255, 255, .1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  max-width: 110px;
}
.tp-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(255, 216, 107, .25);
}
.tp-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
}

/* ============================================================
   "Yeni" badge for recently-acquired cosmetics
   ============================================================ */

.shop-card .new-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: linear-gradient(135deg, #4ade80, #22c55e);
  color: #052911;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 3px 7px;
  border-radius: 999px;
  z-index: 4;
  box-shadow: 0 2px 8px rgba(74, 222, 128, .55);
  animation: new-badge-pulse 1.6s ease-in-out infinite;
}
@keyframes new-badge-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
/* The pic container needs relative for the badge to anchor */
.shop-card .pic { position: relative; }

/* ============================================================
   Cosmetic set bonus chip
   ============================================================ */

.ach-chip.set-bonus {
  background: linear-gradient(135deg, rgba(192, 132, 252, .25), rgba(74, 222, 128, .15));
  border: 1px solid rgba(192, 132, 252, .55);
  color: #d8b4fe;
  font-weight: 800;
}

/* ============================================================
   Player profile / stats modal
   ============================================================ */

.profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  padding: 20px;
}
.profile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.profile-modal {
  width: min(420px, 100%);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #16203c 0%, #0c122e 100%);
  border: 1px solid rgba(255, 216, 107, .35);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  transform: translateY(20px) scale(.96);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.profile-overlay.open .profile-modal { transform: none; }

.profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 4px;
}
.profile-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--gold);
}
.profile-close {
  background: transparent;
  border: 0;
  color: var(--ink-mute);
  font-size: 18px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.profile-close:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.profile-sub {
  padding: 0 16px 12px;
  font-size: 11px;
  color: var(--ink-mute);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.profile-grid {
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
}

.profile-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px;
  padding: 10px;
  min-height: 56px;
}
.profile-stat-icon {
  font-size: 22px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.profile-stat-meta { min-width: 0; }
.profile-stat-value {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-stat-label {
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: .3px;
}

/* ============================================================
   Mascot speech bubble
   ============================================================ */

.mascot-speech {
  position: absolute;
  top: 18%;
  left: 8%;
  background: rgba(255, 255, 255, .96);
  color: #1a0e3a;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 16px;
  max-width: 64%;
  pointer-events: none;
  z-index: 25;
  opacity: 0;
  transform: translateY(8px) scale(.85);
  transition: opacity .28s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.mascot-speech.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.mascot-speech::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 24px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 9px solid rgba(255, 255, 255, .96);
}

/* ============================================================
   Scene swap fade-in (replaces the visible blink between renders)
   ============================================================ */

/* Each scene activation animates content in. The keyframe is short — just
   enough to mask the moment between class flip and dynamic render. */
.scene.active:not(#screen-home):not(#screen-casino) {
  animation: scene-fade-in .22s ease;
}
@keyframes scene-fade-in {
  0%   { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Generic shimmer skeleton — used by renderers while async data loads.
   Shows a striped placeholder card. Currently used by the city scene
   while it pre-fetches non-active theme item maps. */
.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, .04);
  border-radius: 12px;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent);
  animation: skeleton-shimmer 1.4s infinite linear;
  transform: translateX(-100%);
}
@keyframes skeleton-shimmer {
  100% { transform: translateX(100%); }
}
