/* ==========================================================================
   FORMIKARIUM — motyw "terrarium nocą"
   ========================================================================== */
:root {
  --bg: #140f08;
  --bg2: #1c1509;
  --panel: #241b0e;
  --panel2: #2e2311;
  --line: #4a3a1c;
  --line2: #63512a;
  --ink: #f3e7cf;
  --muted: #b8a483;
  --accent: #d9a441;
  --accent2: #f0c96b;
  --good: #6fd28a;
  --warn: #f0b455;
  --bad: #e8776a;
  --sand: #c9a86a;
  --soil: #6b4f2a;
  --banner-h: 52px;
  --nav-h: 62px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: radial-gradient(120% 80% at 50% 0%, #241a0d 0%, var(--bg) 55%, #0d0905 100%);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  overflow: hidden;
  height: 100%;
  overscroll-behavior: none;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.center { text-align: center; }
.pad { padding: 18px; }
.wide { width: 100%; }

.app {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  max-width: 720px; margin: 0 auto;
  border-left: 1px solid #2a2012; border-right: 1px solid #2a2012;
}

/* ── boot ─────────────────────────────────────────────────────────────────── */
.boot { display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100vh; gap: 10px; }
.boot-logo { font-size: 64px; animation: crawl 2.4s ease-in-out infinite; }
.boot-title { font-size: 26px; font-weight: 700; letter-spacing: 2px; color: var(--accent2); }
.boot-sub { color: var(--muted); font-size: 14px; }
@keyframes crawl { 0%,100% { transform: translateX(-10px) rotate(-6deg) } 50% { transform: translateX(10px) rotate(6deg) } }

/* ── topbar ───────────────────────────────────────────────────────────────── */
.topbar {
  padding: 8px 10px 6px;
  background: linear-gradient(180deg, #2b2010 0%, #20170a 100%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(0,0,0,.45);
  z-index: 20;
  flex-shrink: 0;
}
.topbar-slot { flex-shrink: 0; z-index: 20; }
.nav-slot { flex-shrink: 0; z-index: 25; }

/* ── fizyczne formikarium (canvas + HUD) ─────────────────────────────────── */
.farm-layer { position: relative; flex: 1; min-height: 0; overflow: hidden;
  background: #0b0704; }
.scene-canvas { position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; touch-action: manipulation; cursor: pointer; }

.farm-hud { position: absolute; inset: 0; pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between; }
.farm-hud button, .farm-hud .btn { pointer-events: auto; }

.hud-top { padding: 8px; display: flex; flex-direction: column; gap: 5px; }
.hud-strip { display: flex; gap: 5px; }
.hs { flex: 1; background: rgba(20,14,7,.82); border: 1px solid #4a3a1c; border-radius: 9px;
  padding: 5px 6px; text-align: center; backdrop-filter: blur(4px); }
.hs b { display: block; font-size: 14px; color: var(--accent2); line-height: 1.1; }
.hs small { font-size: 9.5px; color: var(--muted); }
.hud-res { display: flex; gap: 5px; flex-wrap: wrap; }
.hr { font-size: 11.5px; background: rgba(20,14,7,.82); border: 1px solid #4a3a1c;
  border-radius: 999px; padding: 3px 9px; backdrop-filter: blur(4px); }
.hud-cap { background: rgba(20,14,7,.82); border: 1px solid #4a3a1c; border-radius: 9px;
  padding: 6px 8px; backdrop-filter: blur(4px); }
.hud-cap-t { font-size: 10.5px; color: var(--muted); display: block; margin-top: 4px; }
.hud-hunger { font-size: 11.5px; font-weight: 700; color: #ffd0c0;
  background: rgba(90,26,16,.9); border: 1px solid #b6452c; border-radius: 9px;
  padding: 6px 9px; backdrop-filter: blur(4px); animation: pulse 1.6s ease-in-out infinite; }

.hud-bottom { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.hud-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

/* ── przełącznik kolonii (strzałki ‹ ›) ───────────────────────────────────── */
.colony-nav { display: flex; align-items: center; gap: 6px;
  background: rgba(20,14,7,.86); border: 1px solid #4a3a1c; border-radius: 11px;
  padding: 4px 5px; backdrop-filter: blur(4px); }
.cn-arrow { width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px;
  background: linear-gradient(180deg, #2e2311, #1a1207); border: 1px solid var(--line2);
  color: var(--accent2); font-size: 20px; line-height: 1; font-weight: 800; cursor: pointer;
  font-family: inherit; display: flex; align-items: center; justify-content: center; }
.cn-arrow:active { transform: scale(.94); }
.cn-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; }
.cn-emoji { font-size: 20px; }
.cn-txt { min-width: 0; }
.cn-txt b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cn-txt small { font-size: 10px; color: var(--muted); }

/* ── kółka reklamowe: 4 OBOK SIEBIE, na środku prawej strony ─────────────── */
.ad-fabs { position: absolute; right: 8px; top: 46%; transform: translateY(-50%);
  display: flex; flex-direction: row; gap: 7px; align-items: center;
  z-index: 12; pointer-events: none; }
.ad-fab { position: relative; pointer-events: auto; }
.ad-fab-btn { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 34% 30%, #9c5f16, #5c3410);
  border: 1.5px solid #c98a2c; color: #ffeac4; font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(0,0,0,.55); font-family: inherit;
  transition: transform .12s, box-shadow .12s; }
.ad-fab-btn:active { transform: scale(.92); }
.ad-fab.open .ad-fab-btn { box-shadow: 0 0 0 2px #f0c96b, 0 4px 14px rgba(0,0,0,.6);
  transform: scale(1.06); }
/* panel z opisem: rozwija się POD kółkiem (jedno naraz) */
.ad-fab-panel { position: absolute; top: calc(100% + 9px); right: 0;
  width: 212px; opacity: 0; pointer-events: none; transform: translateY(-6px) scale(.97);
  transform-origin: top right;
  background: rgba(24,17,8,.98); border: 1px solid var(--line2); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.6);
  transition: opacity .18s ease, transform .18s ease; }
.ad-fab.open .ad-fab-panel { opacity: 1; pointer-events: auto; padding: 10px 11px;
  transform: none; }
.ad-fab-title { font-size: 12.5px; font-weight: 700; color: var(--accent2); margin-bottom: 4px; }
.ad-fab-desc { font-size: 11px; color: var(--muted); margin: 0 0 9px; line-height: 1.35; }
.ad-fab-desc b { color: var(--sand); }

/* ── tryb podglądu ────────────────────────────────────────────────────────── */
.topbar-right { display: flex; align-items: center; gap: 6px; }
.preview-btn { background: #1a1207; border: 1px solid var(--line2); color: var(--sand);
  font-size: 11px; padding: 6px 9px; border-radius: 999px; cursor: pointer;
  font-family: inherit; white-space: nowrap; }
.preview-btn.on { background: #3a2411; border-color: var(--accent); color: var(--accent2); }
.active-chip { background: #1a1207; border: 1px solid var(--line2); border-radius: 9px;
  padding: 7px 10px; margin-top: 7px; font-size: 12.5px; }
.hud-meta { display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap;
  font-size: 10.5px; color: var(--muted); background: rgba(20,14,7,.75);
  border: 1px solid #3a2c14; border-radius: 9px; padding: 5px 9px; }

.farm-hint { position: absolute; left: 50%; transform: translateX(-50%); bottom: 84px;
  font-size: 11.5px; color: #f5d9a8; background: rgba(58,36,17,.9);
  border: 1px solid #6b4a1e; border-radius: 999px; padding: 6px 14px; cursor: pointer;
  font-family: inherit; backdrop-filter: blur(4px); animation: pulse 2.4s ease-in-out infinite; }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand-emoji { font-size: 26px; }
.brand-name { font-weight: 700; font-size: 15px; line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.brand-sub { font-size: 10.5px; color: var(--muted); font-style: italic; }
.cash { font-weight: 700; color: var(--accent2); font-size: 17px; white-space: nowrap;
  background: #1a1207; border: 1px solid var(--line2); padding: 5px 10px; border-radius: 999px; }

.wallets { display: flex; gap: 6px; margin-top: 7px; }
.wallet { flex: 1; background: #1a1207; border: 1px solid #3a2c14; border-radius: 8px;
  padding: 4px 6px; display: flex; align-items: center; gap: 4px; min-width: 0; }
.w-ico { font-size: 13px; }
.w-val { font-size: 12px; font-weight: 700; white-space: nowrap; }
.w-bar { flex: 1; min-width: 18px; }

.bar { height: 5px; background: #0f0a04; border-radius: 99px; overflow: hidden; border: 1px solid #3a2c14; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #8a6a2a, var(--accent)); transition: width .4s ease; }
.bar.good > i { background: linear-gradient(90deg, #3e8f57, var(--good)); }
.bar.warn > i { background: linear-gradient(90deg, #a8792c, var(--warn)); }
.bar.bad  > i { background: linear-gradient(90deg, #8f3b32, var(--bad)); }

.envline { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.env { font-size: 11px; padding: 3px 7px; border-radius: 999px; background: #1a1207;
  border: 1px solid #3a2c14; color: var(--muted); }
.env.ok { color: var(--good); border-color: #2f5a3c; }
.env.warn { color: var(--warn); border-color: #6b5122; }
.env.good { color: var(--good); border-color: #2f5a3c; }
.env.comfort.good, .env.comfort.ok { color: var(--good); }
.env.comfort.bad { color: var(--bad); }
.env.season { color: var(--sand); }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .55 } }

/* ── view / cards ─────────────────────────────────────────────────────────── */
.view { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 10px 4px;
  -webkit-overflow-scrolling: touch; }
.card { background: linear-gradient(180deg, var(--panel) 0%, #1e1609 100%);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.card h2 { font-size: 15px; margin: 0; font-weight: 700; letter-spacing: .3px; }
.card p { margin: 4px 0; font-size: 13px; line-height: 1.45; }
.pill { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: #1a1207;
  border: 1px solid var(--line2); color: var(--sand); white-space: nowrap; }
.pill.good { color: var(--good); border-color: #2f5a3c; }
.pill.bad { color: var(--bad); border-color: #6b2f2a; }

.alert { background: #3a2411; border: 1px solid #6b4a1e; border-left: 3px solid var(--warn);
  border-radius: 8px; padding: 8px 10px; font-size: 12.5px; margin: 8px 0; color: #f5d9a8; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 8px 0; }
.kv { background: #1a1207; border: 1px solid #3a2c14; border-radius: 8px; padding: 7px 9px;
  display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
.kv span { color: var(--muted); }
.kv b { color: var(--ink); }

.stat { background: #1a1207; border: 1px solid #3a2c14; border-radius: 8px; padding: 7px 9px;
  display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
.st-label { color: var(--muted); }
.st-value { font-weight: 700; }
.st-value.good { color: var(--good); }
.st-value.bad { color: var(--bad); }

.mini-row { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.progress { margin: 8px 0; }

/* ── kolonia ──────────────────────────────────────────────────────────────── */
.pop-row { display: flex; gap: 12px; align-items: center; margin: 6px 0 10px; }
.pop-main { text-align: center; min-width: 86px; }
.pop-num { font-size: 30px; font-weight: 800; color: var(--accent2); line-height: 1; }
.pop-lbl { font-size: 11px; color: var(--muted); }
.pop-stages { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.stage { background: #1a1207; border: 1px solid #3a2c14; border-radius: 8px; padding: 5px 7px;
  display: flex; align-items: center; gap: 5px; font-size: 12px; }
.stage b { margin-left: auto; }
.stage small { color: var(--muted); font-size: 10px; }
.st-ico { font-size: 14px; }
.cap-line { margin-top: 6px; }
.cap-text { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.btn-ad { background: linear-gradient(180deg, #7a4a12 0%, #5c3410 100%); border-color: #a8681c;
  color: #ffeac4; }
.btn-ad small { display: block; font-size: 10px; opacity: .8; font-weight: 400; }

/* ── buttons ──────────────────────────────────────────────────────────────── */
.btn { border: 1px solid var(--line2); background: linear-gradient(180deg, var(--panel2), #241b0e);
  color: var(--ink); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: transform .08s, filter .15s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary { background: linear-gradient(180deg, #3f8f57, #2c6b3f); border-color: #57b072; color: #eafff0; }
.btn-warn { background: linear-gradient(180deg, #b8801f, #8f5f13); border-color: #d9a441; color: #fff6e2; }
.btn-danger { background: linear-gradient(180deg, #8f3b32, #6b2a23); border-color: #b8553f; color: #ffe8e4; }
.btn-ghost { background: #1a1207; }
.btn.small { padding: 7px 9px; font-size: 12px; }
.btn.btn-ad.small { padding: 7px 10px; }

/* ── moduły ───────────────────────────────────────────────────────────────── */
.modlist { display: flex; flex-direction: column; gap: 8px; }
.mod { background: #1a1207; border: 1px solid #3a2c14; border-radius: 11px; padding: 10px; }
.mod.owned { border-color: #4d3d1c; background: #201708; }
.mod.locked { opacity: .68; }
.mod-top { display: flex; align-items: center; gap: 8px; }
.mod-emoji { font-size: 22px; }
.mod-name { flex: 1; min-width: 0; }
.mod-name b { font-size: 13.5px; display: block; }
.mod-name small { color: var(--muted); font-size: 11px; }
.mod-desc { font-size: 11.5px; color: var(--muted); margin: 5px 0; }
.mod-stat { font-size: 12px; color: var(--sand); margin-bottom: 6px; }
.mod-req { font-size: 11px; margin-bottom: 5px; }
.mod-req.ok { color: var(--good); }
.mod-req.no { color: var(--bad); }
.mod-btns { display: flex; gap: 7px; align-items: stretch; }
.mod-btns .btn { flex: 1; }

/* ── gatunki ──────────────────────────────────────────────────────────────── */
.species-list { display: flex; flex-direction: column; gap: 8px; }
.species { background: #1a1207; border: 1px solid #3a2c14; border-radius: 11px; padding: 10px; }
.species.owned { border-color: #4d3d1c; }
.species.active { border-color: var(--accent); box-shadow: 0 0 0 1px #d9a44144 inset; }
.species.locked { opacity: .66; }
.sp-top { display: flex; align-items: center; gap: 8px; }
.sp-emoji { font-size: 24px; }
.sp-name { flex: 1; min-width: 0; }
.sp-name b { font-size: 13.5px; display: block; }
.sp-name small { color: var(--muted); font-size: 11px; }
.rarity { font-size: 10px; padding: 3px 8px; border-radius: 999px; text-transform: uppercase;
  letter-spacing: .5px; background: #241b0e; border: 1px solid var(--line2); white-space: nowrap; }
.r-common { color: #b8a483; } .r-uncommon { color: #7fd2a0; } .r-rare { color: #6cb4e8; }
.r-epic { color: #c58fe8; } .r-legendary { color: #f0b455; }
.sp-desc { font-size: 11.5px; color: var(--muted); margin: 6px 0; }
.sp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; font-size: 11px; color: var(--sand);
  margin-bottom: 6px; }
.sp-owned { font-size: 12px; color: var(--good); margin-bottom: 6px; }

/* ── mącznik ──────────────────────────────────────────────────────────────── */
.mw-art { display: flex; align-items: center; justify-content: center; gap: 14px;
  font-size: 34px; margin: 10px 0; }
.mw-arrow { font-size: 20px; color: var(--accent); }
.mw-btns { display: flex; gap: 7px; margin-top: 9px; }
.mw-btns .btn { flex: 1; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid #2e2311; font-size: 13px; }
.toggle-row:last-child { border-bottom: none; }
.switch { width: 46px; height: 26px; border-radius: 99px; background: #2e2311; border: 1px solid var(--line2);
  position: relative; cursor: pointer; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  border-radius: 50%; background: #6b5a38; transition: transform .2s, background .2s; }
.switch.on { background: #2f5a3c; border-color: #57b072; }
.switch.on::after { transform: translateX(20px); background: var(--good); }
.switch:disabled { opacity: .5; }

/* ── sklep ────────────────────────────────────────────────────────────────── */
.shop-list, .sell-list { display: flex; flex-direction: column; gap: 7px; margin-top: 8px; }
.shop-item { display: flex; align-items: center; gap: 8px; background: #1a1207;
  border: 1px solid #3a2c14; border-radius: 10px; padding: 9px 10px; }
.si-name { flex: 1; min-width: 0; }
.si-name b { font-size: 13px; display: block; }
.si-name small { color: var(--muted); font-size: 11px; }
.si-btns { display: flex; gap: 6px; }
.iap-box { display: flex; align-items: center; gap: 10px; background: #1a1207;
  border: 1px solid var(--line2); border-radius: 10px; padding: 10px; margin-top: 6px; }
.iap-box > div { flex: 1; }
.select { background: #1a1207; color: var(--ink); border: 1px solid var(--line2);
  border-radius: 8px; padding: 7px 9px; font-family: inherit; font-size: 12.5px; }
.danger-zone { border-color: #5a2f28; }

/* ── ranking ──────────────────────────────────────────────────────────────── */
.rank-list { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; }
.rank-row { display: flex; align-items: center; gap: 9px; background: #1a1207;
  border: 1px solid #3a2c14; border-radius: 9px; padding: 8px 10px; font-size: 13px; }
.rank-row.me { border-color: var(--accent); background: #241a08; }
.rank-pos { width: 24px; text-align: center; font-weight: 800; color: var(--accent2); }
.rank-name { flex: 1; min-width: 0; }
.rank-name small { display: block; color: var(--muted); font-size: 10.5px; }
.rank-score { font-weight: 700; color: var(--good); }

/* ── nav ──────────────────────────────────────────────────────────────────── */
.navbar { display: flex; background: linear-gradient(180deg, #241b0e, #170f06);
  border-top: 1px solid var(--line); padding: 5px 4px; z-index: 25;
  padding-bottom: calc(5px + env(safe-area-inset-bottom)); }
.navbtn { flex: 1; background: none; border: none; color: var(--muted); font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 2px;
  cursor: pointer; border-radius: 9px; font-size: 10.5px; font-weight: 600; }
.nav-ico { font-size: 18px; }
.navbtn.active { color: var(--accent2); background: #2e2311; }
.nav-spacer { height: var(--banner-h); flex-shrink: 0; }

/* ── banner reklamowy (na dole ekranu) ────────────────────────────────────── */
.ad-banner { position: fixed; left: 0; right: 0; bottom: 0; height: var(--banner-h);
  background: linear-gradient(180deg, #0f0a04, #1a1207); border-top: 1px solid var(--line2);
  z-index: 40; display: flex; align-items: center; }
.ad-banner-inner { display: flex; align-items: center; gap: 9px; width: 100%; max-width: 720px;
  margin: 0 auto; padding: 0 10px; }
.ad-tag { font-size: 9px; letter-spacing: .8px; background: var(--accent); color: #241b0e;
  padding: 2px 6px; border-radius: 4px; font-weight: 800; }
.ad-banner-text { flex: 1; font-size: 12px; color: var(--muted); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.ad-banner-note { font-size: 10px; opacity: .6; }
.ad-banner-remove { background: #2e2311; border: 1px solid var(--line2); color: var(--sand);
  font-size: 11px; padding: 5px 9px; border-radius: 8px; cursor: pointer; font-family: inherit; white-space: nowrap; }

/* ── modale ───────────────────────────────────────────────────────────────── */
.modal-root { position: fixed; inset: 0; background: rgba(8,5,2,.82); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  backdrop-filter: blur(3px); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal-card { background: linear-gradient(180deg, var(--panel) 0%, #1b1307 100%);
  border: 1px solid var(--line2); border-radius: 16px; width: 100%; max-width: 420px;
  box-shadow: 0 18px 50px rgba(0,0,0,.6); overflow: hidden; animation: rise .25s ease; }
@keyframes rise { from { transform: translateY(14px) scale(.98); opacity: 0 } to { transform: none; opacity: 1 } }
.modal-head { display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-x { background: none; border: none; color: var(--muted); font-size: 17px; cursor: pointer; }
.modal-body { padding: 14px; font-size: 13px; line-height: 1.5; }
.modal-foot { padding: 12px 14px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.modal-foot.col { flex-direction: column; }
.modal-foot .btn { flex: 1; }

.off-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 10px 0; }
.off-item { background: #1a1207; border: 1px solid #3a2c14; border-radius: 9px; padding: 9px;
  display: flex; align-items: center; gap: 7px; font-size: 14px; }
.off-item b { margin-left: auto; color: var(--accent2); }
.off-value { text-align: center; font-size: 13px; margin-top: 8px; }
.off-value b { color: var(--good); font-size: 16px; }

.ad-modal-head { display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ad-modal-left { font-size: 12px; color: var(--accent2); font-weight: 700; }
.ad-modal-body { padding: 16px; text-align: center; }
.ad-modal-art { font-size: 46px; margin-bottom: 6px; }
.ad-modal-body h3 { margin: 4px 0; font-size: 15px; }
.ad-modal-body p { font-size: 13px; margin: 6px 0; }
.ad-progress { height: 4px; background: #0f0a04; }
.ad-progress > i { display: block; height: 100%; background: var(--accent); transition: width 1s linear; }

.iap-perks { background: #1a1207; border: 1px solid #3a2c14; border-radius: 9px; padding: 10px;
  margin: 10px 0; font-size: 12.5px; display: flex; flex-direction: column; gap: 5px; }

/* ── toasty ───────────────────────────────────────────────────────────────── */
.toast-root { position: fixed; left: 0; right: 0; bottom: calc(var(--banner-h) + var(--nav-h) + 8px);
  z-index: 70; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { background: #2e2311; border: 1px solid var(--line2); color: var(--ink);
  font-size: 12.5px; padding: 8px 14px; border-radius: 999px; opacity: 0;
  transform: translateY(8px); transition: all .25s ease; max-width: 90%; text-align: center; }
.toast.in { opacity: 1; transform: none; }
.toast-good { border-color: #2f5a3c; color: var(--good); }
.toast-warn { border-color: #6b5122; color: var(--warn); }

/* ── scrollbar ────────────────────────────────────────────────────────────── */
.view::-webkit-scrollbar { width: 6px; }
.view::-webkit-scrollbar-thumb { background: #3a2c14; border-radius: 99px; }

@media (max-width: 380px) {
  .pop-stages { grid-template-columns: 1fr; }
  .actions { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
}
