/* ===== فونت وزیرمتن — خودمیزبان (فارسی + عربی)، آفلاین و داخل APK ===== */
@font-face {
  font-family:'Vazirmatn';
  src:local('Vazirmatn'), url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight:400; font-style:normal; font-display:swap;
}
@font-face {
  font-family:'Vazirmatn';
  src:local('Vazirmatn Bold'), url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight:700; font-style:normal; font-display:swap;
}

/* ===== پالت کارآگاه: ذغالی #101418 / کهربای چراغ بازجویی #b8860b / طلاییِ پول #e8b93b ===== */
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; user-select:none; }
html,body { width:100%; height:100%; overflow:hidden; background:#101418;
  font-family:'Vazirmatn','Segoe UI',Tahoma,sans-serif; color:#e8e4da; }

.screen { position:absolute; inset:0; display:none; flex-direction:column; }
.screen.active { display:flex; }

/* ===== دکمه‌ها ===== */
.btn { border:none; border-radius:14px; padding:12px 26px; margin:6px auto; font-size:18px; font-weight:bold;
  background:#1d3a5f; color:#fff; cursor:pointer; box-shadow:0 4px 0 #0d1b2d; display:block; font-family:inherit; }
.btn:active { transform:translateY(3px); box-shadow:0 1px 0 #0d1b2d; }
.btn.gold { background:linear-gradient(#e8b93b,#c98f1c); color:#3a2503; box-shadow:0 4px 0 #8a5f0e; }
.btn.big { font-size:24px; padding:16px 46px; }
.btn.small { font-size:14px; padding:8px 18px; }
.btn.tiny { font-size:12px; padding:4px 12px; margin:4px 0 0; }
.btn.icon { width:46px; height:46px; padding:0; font-size:22px; margin:0; border-radius:12px; }
.btn.ghost { background:rgba(255,255,255,.12); box-shadow:0 4px 0 rgba(0,0,0,.3); }
.btn:disabled { filter:grayscale(.6); opacity:.7; }
.btn.pulse { animation:pulse 1.1s infinite; }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.06)} }
.help-btn { background:rgba(184,134,11,.25); border:1px solid #b8860b; }

/* ===== منو: گرادیان ذغالی → آبی پلیسی ===== */
#scr-menu { align-items:center; justify-content:center; }
.menu-bg { position:absolute; inset:0; z-index:-1;
  background:linear-gradient(#0a0d10 0%, #101418 35%, #16222f 65%, #1d3a5f 100%); }
.menu-inner { text-align:center; padding:20px; position:relative; }
.logo-dome { font-size:72px; filter:drop-shadow(0 0 24px rgba(184,134,11,.55)); }
h1 { font-size:30px; text-shadow:0 3px 6px rgba(0,0,0,.7); margin:8px 0 2px; color:#f3ead3; }
.menu-sub { color:#d9a92c; margin-bottom:22px; font-size:17px; }
.menu-row { display:flex; gap:8px; justify-content:center; }
.menu-row .btn { margin:5px 0; flex:1; }
.offer-badge { position:absolute; top:-10px; inset-inline-end:-4px; font-size:30px;
  background:linear-gradient(#e8b93b,#c98f1c); border:none; border-radius:50%; width:58px; height:58px;
  cursor:pointer; box-shadow:0 4px 12px rgba(0,0,0,.5); animation:pulse 1.1s infinite; display:none; }

.wallet { display:flex; gap:12px; justify-content:center; margin-top:14px; font-size:17px; font-weight:bold; }
.wallet span { background:rgba(0,0,0,.45); border-radius:20px; padding:5px 14px; }
.lives-chip { background:rgba(0,0,0,.45); border-radius:20px; padding:5px 14px; font-size:16px; font-weight:bold;
  display:inline-block; margin-top:10px; }
.lives-chip small { color:#d9a92c; font-size:12px; }

/* ===== نوار بالا ===== */
.topbar { display:flex; align-items:center; justify-content:space-between; padding:10px 12px; gap:8px; z-index:5; flex-wrap:wrap; }
.topbar .lives-chip, .topbar .wallet { margin-top:0; }
.goal-chip { background:rgba(0,0,0,.5); border:1px solid rgba(184,134,11,.4); border-radius:20px;
  padding:7px 14px; font-size:14px; font-weight:bold; }

/* ===== نقشه = تابلوی چوب‌پنبه‌ای با نخ قرمز 🧵 ===== */
#scr-map { background:
  radial-gradient(rgba(0,0,0,.22) 12%, transparent 13%) 0 0/22px 22px,
  linear-gradient(#4a3421, #3b2a1a); }
.map-title { text-align:center; font-size:22px; color:#f3ead3; margin:4px 0 10px;
  text-shadow:0 2px 4px rgba(0,0,0,.7); }
.map-path { flex:1; overflow-y:auto; padding:10px 0 40px; display:flex; flex-direction:column; align-items:center; gap:18px;
  background:linear-gradient(#c0392b,#c0392b) center top/3px 100% no-repeat; }
.chapter-label { background:#e8dcc0; color:#4a3421; border:2px solid #b8860b; border-radius:6px;
  padding:6px 20px; font-size:15px; font-weight:bold; margin-top:6px; transform:rotate(-1.5deg);
  box-shadow:0 4px 8px rgba(0,0,0,.45); }
.map-node { width:84px; height:84px; border-radius:8px; display:flex; flex-direction:column; align-items:center;
  justify-content:center; font-size:26px; background:#efe6cd; color:#3a2f20;
  box-shadow:0 5px 10px rgba(0,0,0,.5); cursor:pointer; position:relative; }
.map-node .pin { position:absolute; top:-12px; font-size:18px; }
.map-node .lvl-num { font-size:13px; font-weight:bold; color:#8a5f0e; }
.map-node.locked { background:#8d8373; filter:grayscale(.7); }
.map-node.done { background:linear-gradient(#e8b93b,#c98f1c); }
.map-node.done .lvl-num { color:#3a2503; }
.map-node .stars { font-size:11px; letter-spacing:-2px; }
.map-node:nth-child(odd) { transform:translateX(-58px) rotate(-2deg); }
.map-node:nth-child(even) { transform:translateX(58px) rotate(2deg); }
.chapter-label:nth-child(odd), .chapter-label:nth-child(even) { transform:rotate(-1.5deg) }
/* نخ قرمز از کارت به خط مرکز */
.map-node::before { content:''; position:absolute; top:50%; width:58px; height:3px; background:#c0392b; z-index:-1; }
.map-node:nth-child(odd)::before { inset-inline-start:100%; }
.map-node:nth-child(even)::before { inset-inline-end:100%; }

/* ===== حباب گفتگو (صحنه + بازجویی) ===== */
.dt-bubble { margin:4px 14px; background:rgba(0,0,0,.55); border:1px solid #b8860b; border-radius:14px;
  padding:10px 14px; font-size:15px; font-weight:bold; min-height:44px; line-height:1.6; }
.dt-bubble:empty { visibility:hidden; }

/* ===== صحنه‌ی جرم ===== */
.game-screen { background:linear-gradient(#101418 0%, #161c24 60%, #101418 100%); }
.sc-stage { flex:1; position:relative; margin:8px 14px; border-radius:18px; overflow:hidden;
  border:2px solid rgba(184,134,11,.35); box-shadow:inset 0 0 60px rgba(0,0,0,.6); }
.sc-stage.grad0 { background:linear-gradient(#1a1206,#3a2a10,#141014); }
.sc-stage.grad1 { background:linear-gradient(#2a3a4a,#4a5a3a,#3a2f20); }
.sc-stage.grad2 { background:linear-gradient(#20262e,#39424e,#181c22); }
.sc-stage.grad3 { background:linear-gradient(#241a2e,#3c2a44,#141018); }
.sc-stage.grad4 { background:linear-gradient(#101418,#1e2a1e,#0c0e10); }
.sc-item { position:absolute; transform:translate(-50%,-50%); background:none; border:none; cursor:pointer;
  font-size:40px; font-family:inherit; filter:drop-shadow(0 4px 6px rgba(0,0,0,.6)); transition:transform .15s; }
.sc-item:active { transform:translate(-50%,-50%) scale(.86); }
.sc-item.found { animation:clueGlow .6s; filter:drop-shadow(0 0 14px rgba(126,232,160,.95)); pointer-events:none; opacity:.85; }
@keyframes clueGlow { 0%{transform:translate(-50%,-50%) scale(1)} 50%{transform:translate(-50%,-50%) scale(1.45)} 100%{transform:translate(-50%,-50%) scale(1)} }
.sc-item.nope { animation:shakeX .12s 3; }
@keyframes shakeX { 0%,100%{margin-left:0} 50%{margin-left:6px} }
.sc-folder { display:flex; gap:8px; justify-content:center; align-items:center; padding:8px 12px 18px;
  font-size:18px; font-weight:bold; }
.sc-folder .fchip { background:rgba(0,0,0,.5); border:1px dashed rgba(184,134,11,.6); border-radius:10px;
  width:40px; height:40px; display:flex; align-items:center; justify-content:center; font-size:20px; }
.sc-folder .fchip.got { border-style:solid; border-color:#7fe8a0; background:rgba(126,232,160,.12); }

/* ===== بازجویی: اتاق تاریک + چراغ کهربایی ===== */
.iv-bars { display:flex; flex-direction:column; gap:6px; padding:4px 14px; }
.iv-bar { position:relative; height:26px; background:rgba(0,0,0,.55); border-radius:13px; overflow:hidden;
  border:1px solid rgba(255,255,255,.15); }
.iv-fill { position:absolute; inset-block:0; inset-inline-start:0; width:0%; transition:width .4s; border-radius:13px; }
.iv-fill.confess { background:linear-gradient(90deg,#b8860b,#e8b93b); }
.iv-fill.trust { background:linear-gradient(90deg,#1d3a5f,#3f6fa8); }
.iv-bar span { position:relative; z-index:2; display:block; text-align:center; font-size:13px; font-weight:bold;
  line-height:24px; text-shadow:0 1px 3px rgba(0,0,0,.8); }
.iv-room { flex:1; position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center;
  margin:6px 14px; border-radius:18px; overflow:hidden;
  background:radial-gradient(ellipse 65% 55% at 50% 28%, rgba(184,134,11,.34), rgba(16,20,24,.05) 60%), #0b0e11;
  border:2px solid rgba(184,134,11,.3); }
.iv-lamp { position:absolute; top:0; left:50%; transform:translateX(-50%); width:0; height:0;
  border-left:14px solid transparent; border-right:14px solid transparent; border-top:22px solid #b8860b;
  filter:drop-shadow(0 0 12px rgba(232,185,59,.8)); }
.iv-suspect { font-size:74px; line-height:1; filter:drop-shadow(0 8px 14px rgba(0,0,0,.7)); }
.iv-suspect.shake { animation:suspectShake .3s; }
.iv-suspect.daze { animation:dazeSpin 1s; }
@keyframes suspectShake { 0%,100%{transform:translateX(0)} 30%{transform:translateX(-5px)} 60%{transform:translateX(5px)} }
@keyframes dazeSpin { 0%{transform:rotate(0)} 30%{transform:rotate(-12deg)} 60%{transform:rotate(12deg)} 100%{transform:rotate(0)} }
.iv-name { font-size:15px; font-weight:bold; color:#d9a92c; margin-top:6px; text-align:center; }
.iv-say { max-width:92%; margin-top:8px; }
.iv-actions { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; padding:6px 14px 18px; }
.iv-actions .btn { margin:0; font-size:14px; padding:11px 4px; }
.iv-panel { position:absolute; inset:0; background:rgba(0,0,0,.72); z-index:30; display:flex;
  align-items:center; justify-content:center; }
.iv-panel.hidden { display:none; }
.iv-panel-card { background:linear-gradient(#1a222c,#101418); border:2px solid #b8860b; border-radius:18px;
  padding:18px; width:92%; max-width:380px; max-height:76%; display:flex; flex-direction:column; }
.iv-panel-card h3 { text-align:center; color:#d9a92c; margin-bottom:10px; font-size:17px; }
.iv-panel-list { overflow-y:auto; display:flex; flex-direction:column; gap:8px; margin-bottom:8px; }
.iv-opt { margin:0; font-size:14px; text-align:start; padding:11px 14px; background:#22303e; box-shadow:0 3px 0 #101820; }
.iv-opt.sel { outline:2px solid #e8b93b; }
.single-choice .iv-opt { display:flex; align-items:center; gap:12px; width:100%; }
.choice-dot { width:22px; height:22px; flex:0 0 22px; border-radius:50%; border:2px solid #8ba0b6;
  background:#101820; box-shadow:inset 0 0 0 5px #101820; transition:.18s ease; }
.iv-opt.sel .choice-dot { border-color:#ffd45f; background:#ffd45f; box-shadow:inset 0 0 0 5px #24303c,0 0 14px rgba(255,212,95,.55); }
.iv-confirm { position:sticky; bottom:0; width:100%; margin:6px 0 0; background:linear-gradient(#f0c54e,#be8416); color:#211607;
  box-shadow:0 4px 0 #76500d; }
.iv-confirm:disabled { filter:grayscale(1); opacity:.42; cursor:not-allowed; }
.iv-opt.gold { background:linear-gradient(#e8b93b,#c98f1c); color:#3a2503; }
.iv-opt.sus { display:flex; align-items:center; gap:10px; font-size:15px; }
.iv-opt.sus .cface { font-size:34px; }
.sus-info { display:flex; flex-direction:column; text-align:start; }
.sus-info small { color:#c9bfa8; font-weight:normal; }

/* ===== اتاق مدارک (جفت‌سازی) ===== */
.ev-board { flex:1; display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:10px; align-content:center;
  padding:10px 16px 26px; }
.ev-card { position:relative; aspect-ratio:3/4; border:none; border-radius:12px; cursor:pointer;
  background:linear-gradient(#22303e,#16202a); box-shadow:0 4px 0 #0d141b; font-size:30px; font-family:inherit; }
.ev-card .face { display:none; }
.ev-card .back { display:block; }
.ev-card.up .face, .ev-card.ok .face { display:block; animation:cardIn .18s; }
.ev-card.up .back, .ev-card.ok .back { display:none; }
.ev-card.up { background:linear-gradient(#e8dcc0,#cbbfa0); }
.ev-card.ok { background:linear-gradient(#2e7d4f,#1d5a36); box-shadow:0 0 12px rgba(126,232,160,.6); pointer-events:none; }
@keyframes cardIn { from{transform:scale(.6)} to{transform:scale(1)} }

/* ===== چهره‌ی شخصیت (img/chars/<id>.png → ایموجی) ===== */
.cface { position:relative; display:inline-flex; align-items:center; justify-content:center;
  width:1.35em; height:1.35em; }
.cface img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; display:none; }
.cface.has-img img { display:block; }
.cface.has-img .cf-em { visibility:hidden; }

/* پرداخت بصری نسخهٔ جدید: نور، عمق و خوانایی بهتر شخصیت‌ها */
.menu-inner::after { content:''; position:absolute; inset:auto -12% -30% auto; width:72%; aspect-ratio:2/3;
  background:url('../assets/generated/detective-hero.png') center bottom/contain no-repeat; opacity:.2;
  filter:drop-shadow(0 0 28px rgba(72,162,226,.35)); pointer-events:none; z-index:0; }
.menu-inner > * { position:relative; z-index:1; }
.iv-suspect,.care-char,.cface { filter:drop-shadow(0 8px 14px rgba(0,0,0,.72)) drop-shadow(0 0 9px rgba(232,185,59,.16)); }
.iv-room { box-shadow:inset 0 -70px 90px rgba(0,0,0,.72),0 16px 36px rgba(0,0,0,.38); }
.sc-stage { box-shadow:inset 0 0 95px rgba(0,0,0,.7),0 15px 34px rgba(0,0,0,.32); }

/* ===== صحنه‌ی کمک: اتاق کارآگاه ===== */
#scr-care { background:linear-gradient(#16222f 0%, #101418 60%, #241a10 100%); }
.care-stage { flex:1; position:relative; display:flex; align-items:flex-end; justify-content:center; }
.care-house { font-size:110px; line-height:1; filter:drop-shadow(0 8px 10px rgba(0,0,0,.5)); }
.care-char { position:absolute; bottom:8px; inset-inline-start:18%; font-size:62px; transition:transform .3s; }
.care-char.shiver { animation:shiver .15s infinite; }
.care-char.happy { animation:hop .5s 3; }
@keyframes shiver { 0%{transform:translateX(-2px)} 50%{transform:translateX(2px)} 100%{transform:translateX(-2px)} }
@keyframes hop { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-24px)} }
.care-bubble { position:absolute; top:12%; inset-inline-start:10%; background:#efe6cd; color:#3a2f20; border-radius:16px;
  padding:10px 16px; font-size:16px; font-weight:bold; max-width:74%; box-shadow:0 4px 10px rgba(0,0,0,.4); }
.care-bubble:empty { display:none; }
.care-question { text-align:center; font-size:18px; font-weight:bold; color:#d9a92c; padding:8px 16px; }
.care-options { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; padding:0 12px 22px; }
.care-opt { flex:1; max-width:126px; background:#e8dcc0; color:#3a2f20; border:none; border-radius:16px;
  padding:12px 6px; font-size:14px; font-weight:bold; cursor:pointer; box-shadow:0 5px 0 #9a8a68; font-family:inherit; }
.care-opt .em { font-size:34px; display:block; }
.care-opt .price { display:block; color:#8a5f0e; margin-top:4px; }
.care-opt:active { transform:translateY(3px); }
.care-opt.wrong { animation:shiver .12s 4; background:#d98a7a; }
.care-opt.sel { outline:3px solid #e8b93b; background:#fff1c8; transform:translateY(-3px); box-shadow:0 8px 0 #9a7221,0 0 18px rgba(232,185,59,.35); }
.care-confirm { flex:1 0 100%; width:100%; border:0; border-radius:14px; padding:13px 12px; margin-top:3px;
  background:linear-gradient(#e8b93b,#c98f1c); color:#2d1c02; font:900 15px/1 Vazirmatn,Tahoma,sans-serif;
  box-shadow:0 5px 0 #75500e; cursor:pointer; }
.care-confirm:disabled { filter:grayscale(1); opacity:.42; cursor:not-allowed; }

/* ===== فروشگاه = اتاق مدارک ===== */
.shop-items { flex:1; overflow-y:auto; padding:10px 18px 30px; display:flex; flex-direction:column; gap:12px; }
.shop-card { background:rgba(255,255,255,.07); border:1px solid rgba(184,134,11,.2); border-radius:16px;
  padding:14px 18px; display:flex; align-items:center; gap:14px; }
.shop-card .em { font-size:36px; }
.shop-card .info { flex:1; }
.shop-card .info b { font-size:16px; }
.shop-card .info small { display:block; color:#c9bfa8; }
.shop-card.starter { border:2px solid #e8b93b; background:rgba(232,185,59,.13); animation:glow 1.4s infinite; }
.shop-card.piggy { border:1px solid #3f6fa8; background:rgba(63,111,168,.14); }
.shop-card .timer { color:#d9a92c; font-weight:bold; }
@keyframes glow { 0%,100%{box-shadow:0 0 4px rgba(232,185,59,.4)} 50%{box-shadow:0 0 18px rgba(232,185,59,.8)} }

/* ===== پرونده‌ی محرمانه (پس) ===== */
.pass-progress { text-align:center; font-size:17px; font-weight:bold; color:#d9a92c; margin:2px 0 6px; }
#pass-gold-btn { margin:0 auto 8px; }
.pass-items { flex:1; overflow-y:auto; padding:4px 14px 30px; display:flex; flex-direction:column; gap:8px; }
.pass-row { display:flex; gap:8px; align-items:stretch; }
.pass-row.locked { opacity:.45; }
.pass-tier { width:64px; background:rgba(255,255,255,.1); border-radius:12px; display:flex; flex-direction:column;
  align-items:center; justify-content:center; font-size:18px; }
.pass-tier small { font-size:10px; color:#c9bfa8; }
.pass-cell { flex:1; border-radius:12px; padding:8px; text-align:center; font-size:15px; font-weight:bold;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; }
.pass-cell.free { background:rgba(29,58,95,.5); }
.pass-cell.gold { background:rgba(232,185,59,.18); border:1px solid #c98f1c; }
.pass-cell.claimed { opacity:.55; }
.pass-cell b { color:#7fe8a0; }

/* ===== گردونه‌ی سرنخ ===== */
#scr-wheel { align-items:center; }
.wheel-logo { font-size:52px; margin-top:6px; filter:drop-shadow(0 0 12px rgba(184,134,11,.7)); }
.wheel-grid { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:10px; margin:14px auto; width:100%; max-width:350px; }
.wheel-cell { width:100%; aspect-ratio:1; min-width:0; background:rgba(255,255,255,.07); border-radius:16px; display:flex;
  flex-direction:column; align-items:center; justify-content:center; font-weight:bold; border:2px solid transparent; }
.wheel-cell .em { font-size:28px; }
.wheel-cell small { color:#d9a92c; }
.wheel-cell.hot { border-color:#e8b93b; background:rgba(232,185,59,.3); transform:scale(1.08); }

/* ===== ورود روزانه ===== */
.login-days { display:grid; grid-template-columns:repeat(4, 1fr); gap:8px; margin:10px 0 14px; }
.login-day { background:rgba(255,255,255,.08); border-radius:12px; padding:8px 4px; text-align:center; font-size:14px;
  font-weight:bold; border:2px solid transparent; }
.login-day small { display:block; color:#c9bfa8; font-size:11px; }
.login-day.today { border-color:#e8b93b; background:rgba(232,185,59,.25); animation:pulse 1.1s infinite; }
.login-day.past { opacity:.4; }

/* ===== بوسترها ===== */
.prep-list { display:flex; flex-direction:column; gap:8px; margin:10px 0 14px; }
.boost-card { display:flex; align-items:center; gap:10px; background:rgba(255,255,255,.08); border:2px solid transparent;
  border-radius:14px; padding:10px 14px; color:#e8e4da; font-family:inherit; font-size:14px; font-weight:bold; cursor:pointer; }
.boost-card .em { font-size:26px; }
.boost-card .bn { flex:1; text-align:start; }
.boost-card .price { color:#d9a92c; }
.boost-card.sel { border-color:#e8b93b; background:rgba(232,185,59,.2); }

/* ===== اورلی‌ها ===== */
.overlay { position:absolute; inset:0; background:rgba(0,0,0,.72); display:flex; align-items:center; justify-content:center; z-index:50; }
.overlay.hidden { display:none; }
.overlay-card, .story-card { background:linear-gradient(#1a222c,#0e1319); border:2px solid #b8860b; border-radius:22px;
  padding:26px 30px; text-align:center; max-width:88%; width:360px; box-shadow:0 12px 40px rgba(0,0,0,.6); }
.ov-emoji { font-size:56px; }
.overlay-card h2 { color:#d9a92c; margin:6px 0; font-size:24px; }
.overlay-card h2:empty { display:none; }
.overlay-card p, .story-card p { font-size:16px; line-height:1.8; margin:8px 0 14px; }
.overlay-card p:empty { display:none; }
.ov-reward { font-size:20px; font-weight:bold; margin-bottom:12px; }
.ov-reward:empty { display:none; }
#ov-btn2:empty { display:none; }
.cont-card { border-color:#e85a3a; }
.ad-card { border-color:#3f6fa8; }

/* ===== بنر تبلیغ (با provider واقعی visible می‌شه) ===== */
#ad-banner { position:fixed; bottom:0; inset-inline:0; height:50px; background:#0a0d10;
  border-top:1px solid rgba(184,134,11,.4); z-index:40; }
#ad-banner[hidden] { display:none; }
body:has(#ad-banner:not([hidden])) .screen { padding-bottom:50px; }

/* ===== حاشیه‌ی امن دستگاه — موبایل‌فرست ===== */
.topbar       { padding-top:    calc(10px + env(safe-area-inset-top, 0px)); }
.menu-inner   { padding-top:    calc(20px + env(safe-area-inset-top, 0px));
                padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
.map-path     { padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
.shop-items,
.pass-items   { padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px)); }
.care-options { padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
.iv-actions   { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
.ev-board     { padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px)); }
.sc-folder    { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }

/* ===== راهنمای گام‌به‌گام (فلش‌دار) — از _kit/tutor.css ===== */
/* توجه: همه‌ی انیمیشن‌ها CSS خالصه (نه RAF) — تو پنل مخفی هم کار می‌کنه. GAME-DESIGN §۷ */
.tut { position:fixed; inset:0; z-index:80; display:none; pointer-events:none; }
.tut.on { display:block; }
.tut-mask  { position:fixed; background:rgba(0,0,0,.72); pointer-events:auto; }
.tut-ring  { position:fixed; border:3px solid #ffd97a; border-radius:16px; pointer-events:none;
             box-shadow:0 0 18px rgba(255,217,122,.9); animation:tutPulse 1.1s infinite; }
.tut-ring.dim { border-color:rgba(255,217,122,.55); box-shadow:none; animation:none; }
@keyframes tutPulse { 0%,100%{transform:scale(1); opacity:1} 50%{transform:scale(1.06); opacity:.75} }
.tut-arrow { position:fixed; width:28px; height:28px; pointer-events:none; color:#ffd97a;
             font-size:28px; line-height:28px; text-align:center; animation:tutBob .9s infinite; }
.tut-arrow::before { content:'▼'; }
@keyframes tutBob { 0%,100%{ margin-top:0 } 50%{ margin-top:8px } }
.tut-hand { position:fixed; font-size:34px; pointer-events:none;
            filter:drop-shadow(0 3px 5px rgba(0,0,0,.6)); }
.tut-hand.tap  { animation:tutTap 1.2s infinite; }
.tut-hand.drag { animation:tutDrag 1.8s infinite; }
@keyframes tutTap  { 0%,100%{ transform:scale(1) } 45%{ transform:scale(.78) } }
@keyframes tutDrag { 0%{ transform:translate(0,0) scale(1) }
                     15%{ transform:translate(0,0) scale(.8) }
                     70%{ transform:translate(var(--dx),var(--dy)) scale(.8) }
                     85%,100%{ transform:translate(var(--dx),var(--dy)) scale(1); opacity:0 } }
.tut-bubble { position:fixed; width:240px; background:#fff; color:#222; border-radius:14px;
              padding:10px 14px; font-size:16px; font-weight:bold; text-align:center;
              pointer-events:none; box-shadow:0 6px 18px rgba(0,0,0,.5); }
.tut-skip { position:fixed; bottom:14px; inset-inline-end:14px; background:rgba(255,255,255,.16);
            color:#fff; border:none; border-radius:12px; padding:7px 14px; font-size:13px;
            font-family:inherit; cursor:pointer; pointer-events:auto; }

/* ═════ هنرِ کارفرما — پس‌زمینه‌ی صحنه‌ها (ALL-GAMES §۱۷.۲) — ساختِ _kit/art-all.py ═════
   متغیرِ --art-bg را js/art.js فقط وقتی ست می‌کند که فایل واقعاً لود شده باشد.
   نبودِ فایل ⇒ متغیر خالی ⇒ همان پس‌زمینه‌ی قبلی (بازی نمی‌شکند). */
.screen::before, [id^="scr-"]::before {
  content:''; position:absolute; inset:0; z-index:0; pointer-events:none;
  background-image:var(--art-bg, none); background-size:cover; background-position:center;
  opacity:.38;
}
.screen > *, [id^="scr-"] > * { position:relative; z-index:1; }
