/* فونت یکان بخ: اگر روی سیستم نصب باشد از آن استفاده می‌شود؛ یا فایل‌های مجاز آن را در پوشهٔ fonts کنار برنامه بگذارید */
@font-face { font-family: 'Yekan Bakh'; font-weight: 400; font-display: swap; src: local('Yekan Bakh'), local('YekanBakh-Regular'), local('Yekan Bakh FaNum'), url('fonts/YekanBakh-Regular.woff2') format('woff2'), url('fonts/YekanBakh-Regular.woff') format('woff'); }
@font-face { font-family: 'Yekan Bakh'; font-weight: 500; font-display: swap; src: local('Yekan Bakh Medium'), local('YekanBakh-Medium'), url('fonts/YekanBakh-Medium.woff2') format('woff2'), url('fonts/YekanBakh-Medium.woff') format('woff'); }
@font-face { font-family: 'Yekan Bakh'; font-weight: 700; font-display: swap; src: local('Yekan Bakh Bold'), local('YekanBakh-Bold'), url('fonts/YekanBakh-Bold.woff2') format('woff2'), url('fonts/YekanBakh-Bold.woff') format('woff'); }
@font-face { font-family: 'Yekan Bakh'; font-weight: 800; font-display: swap; src: local('Yekan Bakh Heavy'), local('YekanBakh-Heavy'), local('Yekan Bakh ExtraBold'), url('fonts/YekanBakh-Heavy.woff2') format('woff2'), url('fonts/YekanBakh-Heavy.woff') format('woff'); }
/* تخته‌نرد دوستانه — هویت بصری مستقل: جوهری تیره + فیروزه‌ای + طلایی */
:root {
  --bg: #0b1322; --bg2: #0f1a2e; --card: #16233b; --card2: #1d2c48; --line: #263a5c;
  --ink: #eef3fb; --ink2: #a9b6cf; --muted: #7c8aa6;
  --turq: #1fb6a6; --turq2: #128c80; --gold: #f2b84b; --blue: #3a6df0; --purple: #7b4fe0; --orange: #f08a2c;
  --red: #e5484d; --green: #2fbf71;
  --r: 14px; --font: 'Yekan Bakh', 'YekanBakh', 'Yekan', 'B Yekan', 'Vazirmatn', Tahoma, 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); }
body { overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { opacity: .45; cursor: default; }
input, select { font: inherit; color: var(--ink); background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--turq); outline-offset: 2px; }
code { background: #0006; padding: 1px 6px; border-radius: 6px; direction: ltr; unicode-bidi: embed; }
svg { display: block; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }

#app { min-height: 100%; }
.screen { max-width: 540px; margin: 0 auto; padding: 14px 16px 104px; }

/* ---------- عناصر مشترک ---------- */
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--card); position: relative; }
.icon-btn svg { width: 24px; height: 24px; fill: none; stroke: var(--ink2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.ghost { background: none; }
.icon-btn .badge { position: absolute; top: -4px; left: -4px; background: var(--red); color: #fff; font-size: 11px; border-radius: 10px; padding: 1px 6px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.topbar h1 { font-size: 20px; margin: 0; }
.btn { background: var(--card2); border-radius: 12px; padding: 11px 18px; font-weight: 700; transition: transform .1s, filter .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(180deg, #24c9b8, var(--turq2)); color: #04211e; }
.btn.danger { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.block { width: 100%; display: block; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.card { background: var(--card); border-radius: var(--r); padding: 14px; margin-bottom: 14px; }
.card h3 { margin: 4px 0 10px; font-size: 15px; color: var(--ink2); }
.demo-badge { display: inline-block; font-size: 11px; background: #f2b84b22; color: var(--gold); border: 1px solid #f2b84b55; border-radius: 20px; padding: 2px 10px; }
.avatar { --av: #1fb6a6; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--av) 70%, #fff), var(--av) 55%, color-mix(in srgb, var(--av) 60%, #000)); color: #fff; font-weight: 800; font-size: 17px; flex: none; box-shadow: 0 0 0 3px #ffffff1a; text-shadow: 0 1px 2px #0005; }
svg.coin { width: 18px; height: 18px; display: inline-block; vertical-align: -4px; }
svg.rt { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; stroke: #5b8cff; fill: none; }

/* ---------- خانه ---------- */
.profile-bar { display: flex; gap: 10px; align-items: stretch; margin-bottom: 14px; }
.profile { flex: 1; display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: var(--r); padding: 8px 10px; text-align: right; }
.pinfo { display: flex; flex-direction: column; gap: 3px; }
.pinfo b { font-size: 17px; }
.stats-line { display: flex; gap: 14px; color: var(--ink2); font-size: 14px; }
.stats-line span { display: inline-flex; gap: 4px; align-items: center; }
.rt-v { color: #7fa6ff; } .coin-v { color: var(--gold); }
.bell { width: 58px; height: auto; }
.cta-row { display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; margin-bottom: 14px; }
.cta { border-radius: var(--r); padding: 12px 14px; display: flex; align-items: center; gap: 10px; justify-content: center; text-align: right; min-height: 64px; }
.cta svg { width: 34px; height: 34px; fill: #fff; flex: none; }
.cta span { display: flex; flex-direction: column; }
.cta b { font-size: 17px; } .cta small { opacity: .8; }
.cta.purple { background: linear-gradient(135deg, #8c5cf0, #5b2fc2); }
.cta.orange { background: linear-gradient(180deg, #f59a3c, #e0661c); color: #3a1600; }
.cta.orange b { font-size: 19px; }
.menu-card { background: linear-gradient(180deg, #121d33, #0f182b); border-radius: var(--r); padding: 6px; margin-bottom: 14px; }
.menu-item { width: 100%; display: flex; align-items: center; gap: 14px; padding: 13px 12px; border-radius: 12px; text-align: right; font-size: 17px; }
.menu-item:hover { background: #ffffff08; }
.menu-item small { color: var(--muted); font-size: 12px; margin-inline-start: auto; }
.menu-item .mi-ic { width: 38px; height: 38px; display: grid; place-items: center; flex: none; }
.menu-item .mi-ic svg { width: 34px; height: 34px; }
.menu-item.sub .mi-ic svg { width: 28px; height: 28px; }
.mi-ic.bot svg, .menu-item.sub .mi-ic svg[viewBox="0 0 24 24"]:not(.coin):not(.rt) { fill: none; stroke: #9fb3d9; stroke-width: 2; }
.menu-item.sub .mi-ic svg.rt { stroke: #5b8cff; stroke-width: 3; }
.submenu { display: none; padding-inline-start: 18px; }
.submenu.open { display: block; animation: drop .2s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.chev { margin-inline-start: auto; width: 10px; height: 10px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.chev.up { transform: rotate(-135deg); }
.soon { margin-inline-start: auto; font-size: 11px; background: #ffffff14; color: var(--ink2); padding: 2px 8px; border-radius: 10px; }
.promo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.promo { background: var(--card); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 6px; text-align: right; position: relative; min-height: 132px; }
.promo .tag { position: absolute; top: 8px; left: 8px; background: var(--green); color: #032; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 8px; }
.promo .mini-board { width: 100%; max-height: 70px; }
.promo b { font-size: 14px; }
.challenge { justify-content: center; align-items: center; text-align: center; background: linear-gradient(160deg, #1a2440, #24123a); }
.challenge .big { font-size: 34px; font-weight: 800; color: #ff7aa8; }
.challenge .bar { width: 80%; height: 6px; background: #ffffff1a; border-radius: 6px; overflow: hidden; }
.challenge .bar i { display: block; height: 100%; background: #ff7aa8; }
.quick-play { width: 100%; background: linear-gradient(180deg, #3b6df2, #2348c9); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; align-items: center; box-shadow: 0 6px 24px #2348c955; }
.quick-play b { font-size: 21px; } .quick-play small { opacity: .85; }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-around; align-items: center; background: #0a1120f0; backdrop-filter: blur(8px); border-top: 1px solid #ffffff10; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 5; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); min-width: 56px; padding: 4px; }
.nav-item svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.on { color: var(--ink); }
.bonus-btn { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 6px; background: linear-gradient(180deg, #6b3d10, #4a2808); border: 2px solid var(--gold); border-radius: 12px; padding: 4px 14px; color: var(--gold); }
.bonus-btn svg { width: 26px; height: 26px; grid-row: span 2; }
.bonus-btn b { font-size: 19px; line-height: 1.1; } .bonus-btn small { font-size: 10px; grid-column: 2; }
.bonus-btn.ready { animation: glow 1.6s infinite; }
.bonus-btn.wait { filter: saturate(.5); }
@keyframes glow { 50% { box-shadow: 0 0 18px #f2b84b88; } }

/* ---------- انتخاب سطح ---------- */
.tier-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 14px; }
.tier { background: var(--card); border-radius: 10px; padding: 10px; display: flex; gap: 8px; align-items: center; color: var(--muted); }
.tier .box { width: 18px; height: 18px; border-radius: 4px; background: #0008; border: 1px solid var(--line); }
.tier.on { color: var(--ink); } .tier.on .box { background: var(--turq); }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.level { background: linear-gradient(180deg, #1b2747, #121a30); border-radius: 12px; padding: 8px 6px 0; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 2px solid transparent; position: relative; overflow: hidden; opacity: .55; }
.level.tier-on { opacity: 1; }
.level.on { border-color: var(--turq); opacity: 1; box-shadow: 0 0 0 3px #1fb6a633; }
.level .lv { font-size: 12px; font-weight: 700; color: var(--ink2); }
.level .lc { display: flex; gap: 3px; align-items: center; color: var(--gold); font-weight: 800; font-size: 18px; }
.level .mini-board { width: 100%; margin-top: 4px; border-radius: 6px 6px 0 0; }
.level .lock { position: absolute; inset: auto 0 0 0; background: #000b; font-size: 11px; padding: 4px; color: var(--ink2); }
.footer-cta { position: sticky; bottom: 12px; margin-top: 16px; }
.footer-cta .btn { padding: 15px; font-size: 18px; background: linear-gradient(180deg, #3b6df2, #2348c9); color: #fff; }

/* ---------- تنظیم بازی ---------- */
.seg { display: flex; gap: 6px; background: var(--bg2); padding: 4px; border-radius: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.seg button { flex: 1; padding: 9px 6px; border-radius: 9px; color: var(--ink2); font-weight: 600; }
.seg button.on { background: var(--turq); color: #04211e; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.join-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.join-row input { text-transform: uppercase; letter-spacing: 3px; text-align: center; }
.chk { display: flex; gap: 8px; align-items: center; margin-top: 10px; color: var(--ink2); font-size: 14px; }
.chk input { width: auto; }
.room-code { font-size: 40px; font-weight: 800; letter-spacing: 8px; text-align: center; color: var(--gold); display: block; margin: 8px auto; }

/* ---------- رتبه‌بندی ---------- */
.lb-filter { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.lb-filter select { flex: 1; background: #eef1f8; color: #111; font-weight: 700; }
.pills { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line); border-radius: 20px; padding: 7px 16px; color: var(--ink2); }
.pill.on { background: #eef1f8; color: #111; border-color: transparent; font-weight: 700; }
.pill i { font-style: normal; background: var(--red); color: #fff; border-radius: 10px; padding: 0 6px; font-size: 11px; }
.reset { background: var(--card); border-radius: 10px; padding: 6px 10px; font-size: 13px; color: var(--muted); }
.reset b { color: var(--green); }
.lb-card { background: var(--card); border-radius: var(--r); overflow: hidden; margin-bottom: 14px; }
.lb-head { display: flex; gap: 8px; align-items: center; padding: 14px; font-size: 16px; }
.lb-head svg { width: 22px; height: 22px; }
.lb-row { display: grid; grid-template-columns: 44px 30px 1fr auto; gap: 8px; align-items: center; padding: 9px 14px; }
.lb-row.me { background: #1fb6a614; }
.lb-row .rk { color: var(--ink2); font-weight: 700; } .lb-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .vl { color: #7fa6ff; font-weight: 700; }
.lb-card.coins .vl { color: var(--gold); }
.lb-more { width: 100%; background: var(--card2); padding: 12px; font-weight: 700; }

/* ---------- آمار ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.tile { background: var(--card); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.tile small { color: var(--muted); } .tile b { font-size: 26px; } .tile span { font-size: 12px; color: var(--ink2); }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.chart-head .seg { margin: 0; width: 150px; }
.chart { position: relative; margin-top: 10px; }
.line-chart { width: 100%; height: auto; touch-action: pan-y; }
.line-chart .grid { stroke: #ffffff14; stroke-width: 1; }
.line-chart .axis { fill: var(--muted); font-size: 12px; font-family: var(--font); }
.line-chart .line { fill: none; stroke-width: 2.2; stroke-linejoin: round; }
.line-chart .line.coins { stroke: var(--gold); } .line-chart .line.rating { stroke: #5b8cff; }
.line-chart .area.coins { fill: #f2b84b1c; } .line-chart .area.rating { fill: #5b8cff1c; }
.line-chart .cross { stroke: #ffffff44; stroke-dasharray: 3 3; }
.line-chart .dot { stroke: var(--card); stroke-width: 2; } .line-chart .dot.coins { fill: var(--gold); } .line-chart .dot.rating { fill: #5b8cff; }
.tip { position: absolute; transform: translate(-50%, -125%); background: #0b1322f2; border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; pointer-events: none; white-space: nowrap; display: flex; flex-direction: column; font-size: 13px; }
.tip small { color: var(--muted); }
.game-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid #ffffff0d; text-align: right; }
.game-row .res { font-weight: 800; width: 40px; flex: none; } .game-row .res.w { color: var(--green); } .game-row .res.l { color: var(--red); }
.game-row .gi { flex: 1; display: flex; flex-direction: column; min-width: 0; } .game-row .gi small { color: var(--muted); }
.game-row .gc.up { color: var(--green); } .game-row .gc.down { color: var(--red); }
.game-row .ge { font-size: 11px; background: #ffffff10; padding: 2px 6px; border-radius: 8px; color: var(--ink2); }

/* ---------- دوستان ---------- */
.search input { padding: 12px 14px; margin-bottom: 12px; background: var(--card); }
.tabs4 .pill { flex: 1; text-align: center; padding: 7px 4px; }
.list { padding: 6px 12px; }
.person { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #ffffff0d; text-align: right; }
.person .pn { flex: 1; display: flex; flex-direction: column; min-width: 0; } .person .pn small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .pa { display: flex; gap: 6px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 0; }
.chat-box { max-height: 300px; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px; }
.msg { align-self: flex-end; background: var(--card2); padding: 7px 12px; border-radius: 12px; max-width: 80%; }
.msg.me { align-self: flex-start; background: var(--turq2); }
.chat-input { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }

/* ---------- فروشگاه ---------- */
.notice { background: #f2b84b14; border: 1px solid #f2b84b44; color: #f7d48a; border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.pack { width: 100%; display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: var(--r); padding: 10px; margin-bottom: 10px; text-align: right; position: relative; overflow: hidden; }
.pack svg { width: 92px; height: 92px; flex: none; border-radius: 10px; }
.pack .pk { display: flex; flex-direction: column; gap: 2px; }
.pack .pk b { font-size: 17px; } .pack .coins { color: var(--gold); font-weight: 800; font-size: 20px; } .pack small { color: var(--muted); }
.ribbon { position: absolute; left: 0; bottom: 14px; background: #e23b5d; color: #fff; font-size: 11px; font-weight: 800; padding: 3px 12px 3px 10px; clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%); }
.pack-big { width: 140px; height: 140px; margin: 0 auto 10px; border-radius: 16px; }

/* ---------- تحلیل ---------- */
.replay-board { background: #000; border-radius: 12px; overflow: hidden; margin-bottom: 10px; }
.replay-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.scrub { width: 100%; padding: 0; margin-bottom: 12px; accent-color: var(--turq); }
.ri-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.ri-head .dot { width: 14px; height: 14px; border-radius: 50%; } .dot.p0 { background: #f4f1e8; } .dot.p1 { background: #4c6aa8; }
.ri-move { margin-bottom: 6px; }
.ri-judge { padding: 6px 10px; border-radius: 8px; margin-bottom: 8px; font-size: 14px; }
.ri-judge.good, .ri-judge.ok { background: #2fbf7122; color: #7fe0a8; } .ri-judge.inacc { background: #f2b84b22; color: #f7d48a; }
.ri-judge.error, .ri-judge.blunder { background: #e5484d22; color: #ff9a9d; }
.ri-actions { display: flex; gap: 8px; }
.about-ai p { margin: 6px 0 12px; }

/* ---------- تنظیمات ---------- */
.profile-edit { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.profile-edit input { text-align: center; font-size: 18px; font-weight: 700; max-width: 260px; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; }
.sw.on { border-color: #fff; }
.pstats { display: flex; gap: 16px; color: var(--ink2); }
.pstats span { display: flex; gap: 4px; align-items: center; }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #ffffff0d; cursor: pointer; }
.toggle span { display: flex; flex-direction: column; } .toggle small { color: var(--muted); font-size: 12px; }
.toggle input { display: none; }
.toggle i { width: 46px; height: 26px; border-radius: 20px; background: #33415f; position: relative; flex: none; transition: background .2s; }
.toggle i::after { content: ''; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: right .2s; }
.toggle input:checked + i { background: var(--turq); } .toggle input:checked + i::after { right: 23px; }
.links button { display: block; width: 100%; text-align: right; padding: 12px 4px; border-bottom: 1px solid #ffffff0d; }
.links .danger { color: var(--red); }

/* ---------- مودال و پیام ---------- */
.modal-wrap { position: fixed; inset: 0; background: #02060fcc; display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .18s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--card); border-radius: 18px; padding: 18px; width: 100%; max-width: 420px; max-height: calc(100% - 16px); overflow: auto; box-shadow: 0 20px 60px #000a; animation: pop .2s ease; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.modal h3 { margin: 0 0 12px; font-size: 19px; text-align: center; }
.modal-body p { line-height: 1.8; margin: 6px 0; }
.modal-actions { display: flex; gap: 8px; margin-top: 14px; }
.modal-actions .btn { flex: 1; white-space: nowrap; padding-inline: 10px; }
.rules p { line-height: 1.9; margin: 0 0 8px; font-size: 14px; }
.rules-modal { max-width: 560px; }
#toasts { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast { background: #1d2c48f5; border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; box-shadow: 0 8px 24px #0008; animation: pop .2s; text-align: center; font-size: 14px; }
.toast.err { border-color: var(--red); } .toast.ok { border-color: var(--green); } .toast.warn { border-color: var(--gold); }
.toast.out { opacity: 0; transition: opacity .4s; }
.notifs { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; }
.notif { background: var(--bg2); border-radius: 10px; padding: 8px 12px; } .notif.new { border-inline-start: 3px solid var(--turq); }
.notif p { margin: 0 0 2px; font-size: 14px; } .notif small { color: var(--muted); }
.tips-pager { text-align: center; } .tips-pager h4 { font-size: 18px; margin: 8px 0; } .tip-n { color: var(--muted); font-size: 13px; }

/* جست‌وجوی حریف */
.matchmaking { text-align: center; }
.matchmaking .vs { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 10px 0 16px; }
.matchmaking .vs > span:nth-child(2) { color: var(--ink2); font-weight: 700; }
.opp-slot { width: 96px; min-height: 96px; display: flex; flex-direction: column; align-items: center; gap: 4px; justify-content: center; }
.opp-slot small { color: var(--muted); }
.spinner { width: 84px; height: 84px; border-radius: 50%; border: 4px solid #ffffff1a; border-top-color: #cfd8ea; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mm-info { color: var(--gold); font-size: 14px; margin-bottom: 12px; }
.tip-card { background: linear-gradient(180deg, #c9d3e6, #9fb0cc); color: #1b2440; border-radius: 12px; padding: 16px; min-height: 110px; }
.tip-card b { font-size: 18px; } .tip-card p { margin: 6px 0 0; line-height: 1.7; }
.dots { display: flex; gap: 6px; justify-content: center; margin: 10px 0 14px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: #ffffff33; } .dots i.on { background: #fff; }

/* ---------- صفحهٔ بازی ---------- */
body.in-game { overflow: hidden; }
.game-root { position: fixed; inset: 0; background: radial-gradient(ellipse at center, #111a2c, #05080f); direction: ltr; user-select: none; -webkit-user-select: none; touch-action: none; }
.game { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 1.2vmin; padding: 1.4vmin calc(1.4vmin + env(safe-area-inset-right)) 1.4vmin calc(1.4vmin + env(safe-area-inset-left)); }
.g-side { width: 19%; max-width: 210px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; direction: rtl; text-align: center; }
.pcard { display: flex; flex-direction: column; align-items: center; gap: .4vmin; position: relative; width: 100%; }
.pcard.bottom { flex-direction: column-reverse; }
.pc-av { position: relative; padding: 4px; }
.pc-av .avatar { width: 13vmin !important; height: 13vmin !important; font-size: 5.5vmin !important; max-width: 84px; max-height: 84px; }
.pc-av .ring { position: absolute; inset: -3px; border-radius: 50%; border: 3px solid transparent; }
.pcard.active .ring { border-color: var(--accent, #ffd166); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.pc-name { font-weight: 800; font-size: clamp(12px, 3.4vmin, 18px); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-meta { display: flex; gap: 8px; align-items: center; font-size: clamp(11px, 2.8vmin, 15px); color: var(--ink2); }
.pc-meta .pip { color: var(--muted); }
.pcard.thinking .pc-name::after { content: ' …'; animation: pulse 1s infinite; }
.pcard.offline { opacity: .5; }
.bubble { position: absolute; top: 0; left: 50%; transform: translate(-50%, -10%) scale(.6); background: #fff; color: #111; padding: 4px 10px; border-radius: 12px; font-size: 13px; font-weight: 700; white-space: nowrap; opacity: 0; transition: .2s; pointer-events: none; z-index: 3; }
.bubble.show { opacity: 1; transform: translate(-50%, -30%) scale(1); }
.g-info { font-size: clamp(11px, 2.9vmin, 15px); color: var(--ink2); display: flex; flex-direction: column; gap: 2px; border-top: 1px solid #ffffff1a; border-bottom: 1px solid #ffffff1a; padding: 1vmin 0; width: 90%; }
.g-info b { color: #9aa6c4; margin-inline-end: 4px; }
.crawford-tag { color: var(--gold); font-size: 11px; }
.g-clocks { width: 9vmin; min-width: 46px; display: flex; flex-direction: column; justify-content: space-between; align-items: stretch; gap: .8vmin; }
.g-clocks .score { background: #eef1fb; color: #111827; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: clamp(16px, 5.5vmin, 30px); aspect-ratio: 1; }
.g-clocks.no-score .score { visibility: hidden; }
.g-clocks .bank, .g-clocks .delay { background: #2a4fd6; color: #fff; display: grid; place-items: center; font-size: clamp(11px, 2.9vmin, 16px); font-weight: 700; padding: .6vmin 0; }
.g-clocks .bank.top { border-radius: 8px 8px 0 0; margin-top: auto; } .g-clocks .bank.bottom { border-radius: 0 0 8px 8px; margin-bottom: auto; }
.g-clocks .delay { background: #101a3a; margin: -.8vmin 0; font-size: clamp(13px, 3.4vmin, 20px); border-inline: 3px solid #2a4fd6; }
.g-clocks .bank.run { background: #e0567a; } .g-clocks .bank.low { animation: pulse 1s infinite; }
.g-clocks.off .bank, .g-clocks.off .delay { opacity: .35; }
.g-board { flex: 1; display: flex; align-items: center; justify-content: center; min-width: 0; }
.board-svg { width: 100%; height: 100%; max-height: 100%; touch-action: none; font-family: var(--font); }
.g-tools { width: 7vmin; min-width: 40px; display: flex; flex-direction: column; justify-content: center; gap: 1.6vmin; }
.tool { background: #2a4fd6; border-radius: 10px; aspect-ratio: 1; display: grid; place-items: center; }
.tool svg { width: 70%; height: 70%; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tool.locked { background: #1d2846; } .tool.locked svg { stroke: #6b7795; }
.g-layer { direction: rtl; }
.g-layer .modal-wrap { position: absolute; }
.game-root.opening-active .g-side,
.game-root.opening-active .g-clocks,
.game-root.opening-active .g-tools { position: relative; z-index: 19; }
.game-root.opening-active .g-tools { pointer-events: auto; }
.opening-roll-card { position: absolute; z-index: 18; top: clamp(10px, 3.2vh, 28px); left: 50%; transform: translateX(-50%); width: min(520px, 68vw); padding: 10px 18px; border: 1px solid #d9aa55aa; border-radius: 14px; background: linear-gradient(145deg, #26170ff2, #0b1319f5); color: #fff4df; box-shadow: 0 10px 36px #000b, inset 0 1px 0 #fff2; text-align: center; pointer-events: none; }
.opening-roll-card b, .opening-roll-card span { display: block; }
.opening-roll-card b { color: #f2c56b; font-size: clamp(14px, 3.5vmin, 21px); }
.opening-roll-card span { margin-top: 3px; font-size: clamp(11px, 2.7vmin, 15px); line-height: 1.55; }
.opening-roll-card.rolling { animation: openingCardPulse .8s ease-in-out infinite alternate; }
.opening-roll-card.result { border-color: #42d6bd99; box-shadow: 0 10px 36px #000b, 0 0 22px #42d6bd2e; }
@keyframes openingCardPulse { to { transform: translateX(-50%) scale(1.025); filter: brightness(1.12); } }

/* عناصر SVG تخته */
.checker.movable circle:first-child { stroke: var(--accent, #ffd166) !important; stroke-width: 4; }
.checker.selected { filter: drop-shadow(0 0 8px var(--accent, #ffd166)); }
.checker.selected circle:first-child { stroke: var(--accent, #ffd166) !important; stroke-width: 5; }
.checker.dragging { opacity: .35; }
.checker.flying { filter: none; }
.pulse { animation: pulse 1.1s infinite; }
.bbtn rect { fill: #101a3aee; stroke: #ffffff33; stroke-width: 1.5; }
.bbtn text { fill: #fff; }
.bbtn.primary rect { fill: #eef1fb; stroke: none; } .bbtn.primary text { fill: #101a3a; }
.bbtn { cursor: pointer; } .bbtn:hover rect { filter: brightness(1.15); }
.banner rect { fill: #0b1322e6; stroke: var(--accent, #ffd166); stroke-width: 1.5; }
.banner text { fill: #fff; }
.cube.offered { animation: pulse .8s infinite; }
.die { filter: drop-shadow(0 3px 3px #0007); }

.cube-offer { text-align: center; }
.big-cube { width: 72px; height: 72px; margin: 4px auto 10px; background: #f7f7fb; color: #111827; border: 4px solid var(--gold); border-radius: 14px; display: grid; place-items: center; font-size: 34px; font-weight: 800; }
.menu-list { display: flex; flex-direction: column; gap: 6px; }
.menu-list button { background: var(--bg2); padding: 12px; border-radius: 10px; text-align: right; }
.menu-list .danger { color: #ff8a8d; }
.hint-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.hint-row { display: grid; grid-template-columns: 28px 1fr auto; grid-template-areas: 'r m e' 'r w w'; gap: 0 8px; background: var(--bg2); border-radius: 10px; padding: 8px 10px; text-align: right; align-items: center; }
.hint-row .rank { grid-area: r; font-weight: 800; color: var(--turq); } .hint-row .mv { grid-area: m; font-weight: 700; justify-self: start; }
.hint-row .eq { grid-area: e; color: var(--ink2); font-size: 13px; } .hint-row .wp { grid-area: w; font-size: 12px; color: var(--muted); }
.hint-row.played { outline: 2px solid var(--gold); }
.emotes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.emotes button { background: var(--bg2); padding: 12px 6px; border-radius: 10px; }
.result-modal h3 { font-size: 26px; }
.result-modal.win h3 { color: var(--gold); } .result-modal.lose h3 { color: #ff8a8d; }
.result-modal .modal-body > div { text-align: center; margin: 8px 0; }
.res-type { font-size: 16px; }
.delta { font-size: 22px; font-weight: 800; display: flex; gap: 6px; justify-content: center; align-items: center; }
.delta svg { width: 24px; height: 24px; }
.delta.up { color: var(--green); } .delta.down { color: #ff8a8d; }
.err-rate { color: var(--ink2); font-size: 14px; }

/* صفحهٔ بارگذاری */
.loading-screen { display: grid; place-items: center; direction: rtl; }
.ld-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(70vw, 360px); }
.ld-logo svg { width: 84px; height: 84px; }
.ld-inner b { font-size: 22px; }
.ld-bar { width: 100%; height: 8px; background: #ffffff14; border-radius: 8px; overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--turq), var(--blue)); transition: width 1s ease; }

/* گوشی عمودی: کل صفحهٔ بازی ۹۰ درجه می‌چرخد تا تخته افقی نمایش داده شود */
/* چرخش افقی بازی روی موبایل/تبلت: پایین فایل («صفحهٔ بازی بر اساس دستگاه») */
@media (max-height: 420px) and (orientation: landscape) {
  .g-info { display: none; }
}
@media (min-width: 900px) and (orientation: landscape) {
  .game { padding: 2vmin 3vmin; }
}

/* =================== نسخهٔ ۱٫۱: ظاهر جذاب‌تر و تاس سه‌بعدی =================== */
body { background:
  radial-gradient(1200px 600px at 85% -10%, #1fb6a62a, transparent 60%),
  radial-gradient(900px 500px at -10% 30%, #7b4fe025, transparent 60%),
  radial-gradient(800px 600px at 50% 120%, #f2b84b14, transparent 60%), var(--bg);
  background-attachment: fixed; }
.screen { animation: screenIn .35s cubic-bezier(.2,.8,.3,1); }
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } }
.card, .menu-card, .lb-card, .tile, .promo, .profile, .pack, .icon-btn:not(.ghost) {
  background: linear-gradient(160deg, #ffffff12, #ffffff05) , var(--card);
  border: 1px solid #ffffff14; box-shadow: 0 10px 30px #00000040, inset 0 1px 0 #ffffff12; }
.menu-item { transition: background .2s, transform .15s; }
.menu-item:active { transform: scale(.98); }
.menu-item .mi-ic { background: linear-gradient(145deg, #ffffff14, #ffffff04); border-radius: 12px; box-shadow: inset 0 1px 0 #ffffff1a; }
.btn, .cta, .quick-play, .pack, .level, .tier, .pill { transition: transform .15s, box-shadow .2s, filter .2s; }
.btn:hover, .cta:hover, .quick-play:hover, .pack:hover, .level:hover { filter: brightness(1.08); }
.btn.primary, .cta, .quick-play, .footer-cta .btn { position: relative; overflow: hidden; }
.btn.primary::after, .cta::after, .quick-play::after, .footer-cta .btn::after {
  content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, #ffffff40 50%, transparent 70%);
  transform: translateX(-120%); animation: shine 3.8s ease-in-out infinite; pointer-events: none; }
@keyframes shine { 60%, 100% { transform: translateX(120%); } }
.quick-play { background: linear-gradient(135deg, #4f7cff, #2443c9 55%, #1b2f99); box-shadow: 0 10px 30px #2348c977, inset 0 1px 0 #ffffff40; }
.cta.purple { box-shadow: 0 8px 24px #6a3fd055; } .cta.orange { box-shadow: 0 8px 24px #e0661c55; }
.avatar { box-shadow: 0 0 0 3px #ffffff1f, 0 6px 16px #0007; }

/* هیرو خانه */
.hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; padding: 18px 16px; border-radius: 20px; overflow: hidden;
  background: radial-gradient(circle at 15% 50%, #1fb6a655, transparent 55%), linear-gradient(135deg, #13414c, #1b2a4a 60%, #2b1d4a); border: 1px solid #ffffff1a; box-shadow: 0 14px 40px #0006; }
.hero::before { content: ''; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background: repeating-linear-gradient(60deg, #fff 0 1px, transparent 1px 22px), repeating-linear-gradient(-60deg, #fff 0 1px, transparent 1px 22px); }
.hero-text { position: relative; z-index: 1; }
.hero-kicker { font-size: 12px; color: #7ff0e2; }
.hero h2 { margin: 2px 0 4px; font-size: 25px; font-weight: 800; }
.hero h2 em { font-style: normal; background: linear-gradient(90deg, #ffd166, #ff9a5a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0; font-size: 13px; color: var(--ink2); }
.hero-dice { position: relative; width: 120px; height: 90px; flex: none; perspective: 500px; --ds: 46px; }
.hero-dice .die3d { position: absolute; margin: 0; }
.hero-dice .spin-a { left: 8px; top: 8px; } .hero-dice .spin-b { left: 62px; top: 36px; }
.hero-dice .spin-a .dcube { animation: heroSpinA 7s linear infinite; }
.hero-dice .spin-b .dcube { animation: heroSpinB 9s linear infinite; }
.hero-dice .dbody { animation: bob 3s ease-in-out infinite; } .hero-dice .spin-b .dbody { animation-delay: -1.5s; }
@keyframes heroSpinA { from { transform: rotateX(-20deg) rotateY(0) rotateZ(10deg); } to { transform: rotateX(340deg) rotateY(720deg) rotateZ(10deg); } }
@keyframes heroSpinB { from { transform: rotateX(30deg) rotateY(360deg) rotateZ(-15deg); } to { transform: rotateX(-330deg) rotateY(0) rotateZ(-15deg); } }
@keyframes bob { 50% { transform: translateY(-8px); } }

/* تاس سه‌بعدی */
.g-board, .replay-board { position: relative; }
.dice-layer { position: absolute; pointer-events: none; z-index: 2; }
.dice-layer .die3d { perspective: calc(var(--ds) * 9); }
.die3d { position: absolute; width: var(--ds); height: var(--ds); margin: calc(var(--ds) / -2) 0 0 calc(var(--ds) / -2); transform-style: preserve-3d; transition: opacity .35s, filter .35s; }
.die3d.used { opacity: .4; filter: grayscale(.7) brightness(.85); }
.die3d.landed .dbody { animation: settle .25s ease-out; }
@keyframes settle { 40% { transform: scale(1.06, .94); } }
.dshadow { position: absolute; left: 4%; right: -6%; top: 22%; bottom: -16%; border-radius: 40%; background: radial-gradient(closest-side, #000000b0, transparent); opacity: .55; filter: blur(2px); }
.dbody, .dcube { position: absolute; inset: 0; transform-style: preserve-3d; }
.dface { position: absolute; inset: 0; border-radius: 19%; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 15%; gap: 4%;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--fbg);
  box-shadow: inset 0 0 calc(var(--ds) * .14) #0000002e, inset calc(var(--ds) * -.04) calc(var(--ds) * -.05) calc(var(--ds) * .08) #00000026, inset calc(var(--ds) * .04) calc(var(--ds) * .04) calc(var(--ds) * .06) #ffffffb0; }
.dface i { border-radius: 50%; }
.dface i.p { background: radial-gradient(circle at 38% 35%, var(--pip2), var(--pip) 70%); box-shadow: inset 0 calc(var(--ds) * .02) calc(var(--ds) * .03) #00000080, 0 1px 0 #ffffff55; }
.dface.front { transform: translateZ(calc(var(--ds) / 2)); }
.dface.back { transform: rotateY(180deg) translateZ(calc(var(--ds) / 2)); }
.dface.right { transform: rotateY(90deg) translateZ(calc(var(--ds) / 2)); }
.dface.left { transform: rotateY(-90deg) translateZ(calc(var(--ds) / 2)); }
.dface.top { transform: rotateX(90deg) translateZ(calc(var(--ds) / 2)); }
.dface.bottom { transform: rotateX(-90deg) translateZ(calc(var(--ds) / 2)); }
.dcore { position: absolute; inset: 4%; background: var(--core); }
.dcore.c2 { transform: rotateY(90deg); } .dcore.c3 { transform: rotateX(90deg); }
.skin-0 { --fbg: linear-gradient(145deg, #ffffff, #f1ebdc 55%, #ddd3bd); --pip: #141a30; --pip2: #4b5578; --core: #d8cfb8; }
.skin-1 { --fbg: linear-gradient(145deg, color-mix(in srgb, var(--d1, #3d5fd0) 55%, #fff), var(--d1, #3d5fd0) 55%, color-mix(in srgb, var(--d1, #3d5fd0) 70%, #000)); --pip: #e9eeff; --pip2: #ffffff; --core: color-mix(in srgb, var(--d1, #3d5fd0) 80%, #000); }
.hero-dice .skin-1 { --d1: #5b7be6; }

/* صفحهٔ بازی */
.game-root { background:
  radial-gradient(ellipse at 50% 45%, color-mix(in srgb, var(--accent, #1fb6a6) 10%, #16223a), #070b14 75%); }
.game-root::before { content: ''; position: absolute; inset: 0; opacity: .05; pointer-events: none;
  background: repeating-linear-gradient(45deg, #fff 0 1px, transparent 1px 18px), repeating-linear-gradient(-45deg, #fff 0 1px, transparent 1px 18px); }
.board-svg { filter: none; }
.pcard { background: linear-gradient(160deg, #ffffff10, #ffffff03); border: 1px solid #ffffff12; border-radius: 16px; padding: 1vmin .6vmin; }
.pcard.active { border-color: color-mix(in srgb, var(--accent, #ffd166) 55%, transparent); box-shadow: 0 0 22px color-mix(in srgb, var(--accent, #ffd166) 25%, transparent); }
.g-clocks .score { box-shadow: 0 6px 16px #0007, inset 0 -3px 0 #0002; }
.g-clocks .bank, .g-clocks .delay { box-shadow: 0 6px 16px #0006; }
.tool { background: linear-gradient(160deg, #3a63f0, #2241c4); box-shadow: 0 6px 16px #0007, inset 0 1px 0 #ffffff40; transition: transform .15s; }
.tool:active { transform: scale(.92); }
.bbtn rect { filter: drop-shadow(0 6px 10px #0009); }
.checker.movable .ck-shadow { opacity: .55; }
.checker.selected { filter: drop-shadow(0 0 10px var(--accent, #ffd166)) drop-shadow(0 6px 6px #0008); }
.modal { background: linear-gradient(160deg, #ffffff10, #ffffff04), var(--card); border: 1px solid #ffffff1a; }
.result-modal.win h3 { text-shadow: 0 0 24px #f2b84b88; }

/* =====================================================================
   نسخهٔ ۱٫۲ — سیستم طراحی یکپارچه (چیدمان مطابق مرجع، ظاهر حرفه‌ای)
   ===================================================================== */
:root { --sp: 8px; --rad: 16px; --rad-s: 12px; --stroke: #ffffff12; --stroke2: #ffffff1f; --shadow: 0 10px 28px #0000004d; --muted: #8b97b1; --ink2: #b6c1d6; }
html, body, button, input, select, textarea { font-family: var(--font); }
body { background: radial-gradient(900px 420px at 50% -120px, color-mix(in srgb, var(--blue) 22%, transparent), transparent 70%), var(--bg); background-attachment: fixed; -webkit-font-smoothing: antialiased; }
.screen { padding: 18px 16px 112px; }
.card, .menu-card, .lb-card, .tile, .promo, .profile, .pack, .icon-btn:not(.ghost) { background: var(--card); border: 1px solid var(--stroke); box-shadow: var(--shadow); }
.boot { min-height: 100vh; display: grid; place-items: center; } .boot svg { width: 72px; height: 72px; animation: pulse 1.2s infinite; }

/* ---- خانه: مطابق چیدمان مرجع ---- */
.profile-bar { gap: 10px; margin-bottom: 12px; }
.profile { border-radius: var(--rad); padding: 10px 12px; gap: 14px; }
.profile .avatar { box-shadow: 0 0 0 3px var(--blue), 0 0 0 6px #ffffff14; }
.pinfo b { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pid { font-size: 11px; font-weight: 700; color: var(--turq); background: color-mix(in srgb, var(--turq) 14%, transparent); border: 1px solid color-mix(in srgb, var(--turq) 35%, transparent); padding: 1px 7px; border-radius: 20px; font-style: normal; }
.stats-line { font-size: 15px; font-weight: 700; }
.bell { width: 62px; border-radius: var(--rad); }
.cta-row { grid-template-columns: 1.3fr 1fr; gap: 10px; margin-bottom: 14px; }
.cta { min-height: 70px; border-radius: var(--rad-s); padding: 10px 14px; box-shadow: none; }
.cta.purple { background: linear-gradient(135deg, var(--promo1, #8c5cf0), var(--promo2, #5b2fc2)); }
.cta.orange { background: linear-gradient(180deg, var(--buy1, #f59a3c), var(--buy2, #e0661c)); color: #3a1600; font-size: 20px; font-weight: 800; }
.cta.orange b { font-size: 20px; }
.cta svg { width: 38px; height: 38px; filter: drop-shadow(0 2px 4px #0003); }
.cta b { font-size: 19px; font-weight: 800; letter-spacing: -.2px; } .cta small { font-size: 14px; opacity: .85; }
.menu-card { padding: 8px 8px; border-radius: var(--rad); background: linear-gradient(180deg, color-mix(in srgb, var(--card) 92%, #fff 0%), color-mix(in srgb, var(--card) 80%, #000)); }
.menu-item { padding: 15px 12px; font-size: 18px; border-radius: 12px; gap: 16px; text-decoration: none; color: inherit; }
.menu-item b { font-weight: 700; }
.menu-item .mi-ic { width: 44px; height: 44px; background: none; box-shadow: none; }
.menu-item .mi-ic svg { width: 40px; height: 40px; }
.menu-item.sub { padding: 11px 12px; font-size: 16.5px; }
.menu-item.sub .mi-ic { width: 38px; height: 38px; }
.menu-item.sub .mi-ic svg { width: 30px; height: 30px; }
.menu-item.sub .mi-ic svg.line { fill: none; stroke: #a8b8d8; stroke-width: 2; }
.submenu { padding-inline-start: 26px; border-inline-start: 2px solid var(--stroke); margin-inline-start: 34px; }
.menu-item .beta { margin-inline-start: 4px; background: #e23b5d; color: #fff; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 6px; }
.dot-ic { display: block; width: 22px; height: 22px; border-radius: 7px; margin: auto; box-shadow: inset 0 -3px 0 #0003; }
.mini-dice { position: relative; }
.mini-dice .hero-dice { --ds: 19px; width: 44px; height: 40px; perspective: 260px; }
.mini-dice .hero-dice .spin-a { left: 2px; top: 3px; } .mini-dice .hero-dice .spin-b { left: 21px; top: 17px; }
.mini-dice .dshadow { display: none; }
.promo-row { display: flex; gap: 12px; margin-bottom: 16px; }
.promo { width: 150px; aspect-ratio: 1; min-height: 0; border-radius: var(--rad-s); padding: 10px; flex: none; }
.promo.tips-card { background: linear-gradient(180deg, #c5cde0, #8f9bb8); color: #111a2e; align-items: center; justify-content: space-between; }
.promo.tips-card .mini-board { width: 100%; max-height: 82px; border-radius: 8px; box-shadow: 0 6px 14px #0004; }
.promo.tips-card b { font-size: 13px; text-align: center; }
.promo .tag { top: 8px; left: 8px; font-size: 11px; }
.challenge { background: linear-gradient(160deg, #141c33, #1d1233); gap: 2px; }
.challenge > b { font-size: 14px; } .ch-goal { font-size: 12px; color: var(--muted); }
.challenge .big { font-size: 38px; line-height: 1.1; color: #ff6fa0; font-weight: 800; } .challenge .big small { font-size: 16px; color: var(--muted); }
.ch-reward { display: flex; align-items: center; gap: 4px; color: var(--gold); font-weight: 800; }
.ch-done { color: var(--green); font-size: 13px; font-weight: 700; }
.ch-timer { margin-top: 2px; background: #0b3b24; color: #39e58c; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 20px; direction: ltr; }
.quick-play { background: linear-gradient(180deg, var(--quick1, #4f7cff), var(--quick2, #1b2f99)); border-radius: var(--rad-s); padding: 16px; box-shadow: 0 10px 26px color-mix(in srgb, var(--quick1, #4f7cff) 40%, transparent), inset 0 1px 0 #ffffff40; }
.quick-play b { font-size: 24px; font-weight: 800; } .quick-play small { font-size: 15px; }
.bottom-nav { background: color-mix(in srgb, var(--bg) 94%, #000); border-top: 1px solid var(--stroke); padding-top: 8px; }
.nav-item { font-size: 12.5px; gap: 4px; color: #7d89a3; }
.nav-item svg { width: 28px; height: 28px; stroke-width: 1.9; } .nav-item svg .fill { fill: currentColor; stroke: none; }
.nav-item.on { color: var(--ink); }
.bonus-btn { border-radius: 12px; padding: 5px 16px; background: linear-gradient(180deg, #5a2f0b, #3b1d05); }

/* ---- آگهی‌ها ---- */
.ad-banner { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--rad-s); color: #fff; text-decoration: none; position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--a1, #263a5c), var(--a2, #101a2e)); border: 1px solid #ffffff1c; box-shadow: var(--shadow); min-height: 74px; }
.ad-banner img { width: 86px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; box-shadow: 0 4px 12px #0006; }
.ad-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ad-tx b { font-size: 16px; font-weight: 800; } .ad-tx p { margin: 0; font-size: 13px; opacity: .85; line-height: 1.6; }
.ad-label { align-self: flex-start; font-size: 10px; font-weight: 700; background: #ffffff26; padding: 1px 7px; border-radius: 6px; }
.ad-cta { flex: none; background: #fff; color: #111a2e; font-weight: 800; font-size: 13px; padding: 8px 14px; border-radius: 10px; }
.home-ad { margin-bottom: 14px; }
.ld-ad { position: absolute; left: 50%; bottom: 6vh; transform: translateX(-50%); width: min(92vw, 560px); direction: rtl; animation: drop .4s ease; }
.ld-ad .ad-banner { min-height: 96px; } .ld-ad .ad-banner img { width: 120px; height: 80px; }

/* ---- ورود ---- */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding-bottom: 40px; }
.login-brand { text-align: center; }
.login-logo svg { width: 84px; height: 84px; margin: 0 auto 10px; filter: drop-shadow(0 12px 24px #0008); }
.login-brand h1 { margin: 0; font-size: 28px; font-weight: 800; }
.login-brand p { margin: 6px 0 0; color: var(--ink2); }
.login-card { background: var(--card); border: 1px solid var(--stroke); border-radius: 20px; padding: 22px 18px; box-shadow: var(--shadow); }
.login-card h2 { margin: 0 0 4px; font-size: 20px; } .login-card .muted { margin: 0 0 16px; font-size: 14px; line-height: 1.8; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field > span { font-size: 13px; color: var(--ink2); font-weight: 600; }
.field input, .field select, .field textarea, .admin textarea { background: var(--bg); border: 1px solid var(--stroke2); border-radius: 12px; padding: 12px 14px; font-size: 16px; color: var(--ink); width: 100%; }
.field input:focus, .field select:focus, textarea:focus { border-color: var(--turq); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--turq) 22%, transparent); }
#phone { font-size: 20px; letter-spacing: 1px; text-align: center; font-weight: 700; }
.btn.lg { padding: 15px; font-size: 17px; border-radius: 14px; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 6px 0 16px; }
.otp input { text-align: center; font-size: 26px; font-weight: 800; padding: 12px 0; border-radius: 12px; background: var(--bg); border: 1px solid var(--stroke2); color: var(--ink); }
.otp input:focus { border-color: var(--turq); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--turq) 25%, transparent); }
.otp.filled input { border-color: color-mix(in srgb, var(--turq) 55%, transparent); }
.otp.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.otp-foot { display: flex; justify-content: space-between; margin-top: 12px; }
.link { color: var(--turq); font-weight: 600; font-size: 14px; padding: 4px; }
.link:disabled { color: var(--muted); }
.login-foot, .version { text-align: center; color: var(--muted); font-size: 12px; margin: 0; }
.version { margin-top: 18px; user-select: none; cursor: default; }
.sms { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 120; width: min(94vw, 440px); display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: color-mix(in srgb, var(--card) 92%, #fff); border: 1px solid var(--stroke2); border-radius: 16px; box-shadow: 0 16px 40px #000a; animation: smsIn .35s cubic-bezier(.2, .9, .3, 1.2); }
.sms.out { opacity: 0; transform: translate(-50%, -20px); transition: .35s; }
@keyframes smsIn { from { transform: translate(-50%, -40px); opacity: 0; } }
.sms-ic svg { width: 38px; height: 38px; } .sms-tx { flex: 1; display: flex; flex-direction: column; font-size: 14px; } .sms-tx b { font-size: 12px; color: var(--muted); }
.sms-code { font-size: 20px; font-weight: 800; letter-spacing: 3px; color: var(--gold); }
.admin-login { min-height: 100vh; display: grid; place-items: center; }
.admin-login .login-card { width: 100%; max-width: 400px; text-align: center; }
.lock-ic svg { width: 54px; height: 54px; margin: 0 auto 8px; fill: none; stroke: var(--turq); stroke-width: 1.8; }
.pw { position: relative; } .pw .link { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); }
.back-link { margin-top: 10px; }

/* ---- فروشگاه ---- */
.wallet { display: flex; align-items: center; gap: 8px; justify-content: center; background: var(--card); border: 1px solid var(--stroke); border-radius: 30px; padding: 8px 18px; width: max-content; margin: 0 auto 14px; }
.wallet svg.coin { width: 22px; height: 22px; } .wallet b { font-size: 20px; color: var(--gold); } .wallet span { color: var(--muted); font-size: 13px; }
.toman-wallet { margin-top: -8px; border-color: color-mix(in srgb, var(--primary) 45%, var(--stroke)); }
.toman-wallet b { color: var(--primary); }
.id-request, .id-orders { margin-block: 14px; }
.id-request .row-btn { max-width: 620px; margin-inline: auto; }
.shop-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; } .shop-tabs .pill { white-space: nowrap; }
.notice.teal { background: color-mix(in srgb, var(--turq) 10%, transparent); border-color: color-mix(in srgb, var(--turq) 35%, transparent); color: var(--ink); }
.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.shop-item { background: var(--card); border: 1px solid var(--stroke); border-radius: var(--rad-s); padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; box-shadow: var(--shadow); }
.shop-item.equipped { border-color: color-mix(in srgb, var(--turq) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--turq) 20%, transparent), var(--shadow); }
.shop-item b { font-size: 15px; } .shop-item .btn { width: 100%; display: inline-flex; gap: 6px; justify-content: center; align-items: center; }
.si-prev { height: 92px; width: 100%; display: grid; place-items: center; }
.si-prev .mini-board { width: 100%; max-height: 92px; border-radius: 8px; }
.si-on { color: var(--turq); font-weight: 700; font-size: 13px; padding: 7px; }
.shop-dice { --ds: 54px; display: block; width: 70px; height: 70px; position: relative; perspective: 400px; }
.shop-dice .die3d { left: 50%; top: 50%; }
.shop-dice .dcube { transform: rotateX(-24deg) rotateY(32deg); animation: heroSpinA 9s linear infinite; }
.buy-prev { display: grid; place-items: center; min-height: 110px; margin-bottom: 8px; }
.buy-prev .mini-board { width: 200px; }
.frame-prev .avatar, .avatar.framed { box-shadow: 0 0 0 3px var(--fr1), 0 0 0 6px var(--fr2), 0 0 18px color-mix(in srgb, var(--fr1) 60%, transparent) !important; }
.eq-frame .avatar.me { box-shadow: 0 0 0 3px var(--fr1), 0 0 0 6px var(--fr2), 0 0 18px color-mix(in srgb, var(--fr1) 60%, transparent) !important; }
.ids-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.id-card { background: var(--card); border: 1px solid var(--stroke); border-radius: var(--rad-s); padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.id-big { font-size: 30px; font-weight: 800; letter-spacing: 1px; background: linear-gradient(90deg, var(--gold), #ff9a5a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.id-big.sm { font-size: 20px; } .id-card small { color: var(--muted); }

/* ---- تاس: رنگ‌ها از تنظیمات و کالای خریداری‌شده (انیمیشن دست‌نخورده) ---- */
.skin-0 { --fbg: linear-gradient(145deg, color-mix(in srgb, var(--d0face, #fbf8f0) 60%, #fff), var(--d0face, #fbf8f0) 55%, color-mix(in srgb, var(--d0face, #fbf8f0) 82%, #000)); --pip: var(--d0pip, #141a30); --pip2: color-mix(in srgb, var(--d0pip, #141a30) 70%, #fff); --core: color-mix(in srgb, var(--d0face, #fbf8f0) 85%, #000); }
.dice-custom .skin-1 { --d1: var(--d1face-custom); --pip: var(--d1pip, #fff); --pip2: var(--d1pip, #fff); }
.eq-dice .die3d.mine { --fbg: linear-gradient(145deg, color-mix(in srgb, var(--dme-face) 62%, #fff), var(--dme-face) 55%, color-mix(in srgb, var(--dme-face) 75%, #000)); --pip: var(--dme-pip); --pip2: color-mix(in srgb, var(--dme-pip) 70%, #fff); --core: color-mix(in srgb, var(--dme-face) 80%, #000); }

/* ---- پنل مدیریت ---- */
body.in-admin { background: var(--bg); }
.admin { max-width: 1180px; margin: 0 auto; padding: 14px 16px 120px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; background: var(--card); border: 1px solid var(--stroke); border-radius: var(--rad); margin-bottom: 12px; }
.at-brand { display: flex; align-items: center; gap: 10px; } .at-brand svg { width: 40px; height: 40px; }
.at-brand b { font-size: 18px; display: block; } .at-brand small { color: var(--muted); font-size: 12px; }
.at-user { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.op-chip { display: flex; gap: 6px; align-items: center; background: var(--bg); border-radius: 20px; padding: 5px 12px; font-size: 14px; }
.role { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #3a6df033; color: #9bb6ff; }
.role.superadmin { background: #f2b84b26; color: var(--gold); }
.admin-warn { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: #e5484d1f; border: 1px solid #e5484d66; color: #ffb3b5; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; scrollbar-width: thin; }
.atab { white-space: nowrap; padding: 9px 16px; border-radius: 10px; background: var(--card); border: 1px solid var(--stroke); color: var(--ink2); font-weight: 600; }
.atab.on { background: var(--turq); color: #04211e; border-color: transparent; }
.acard { background: var(--card); border: 1px solid var(--stroke); border-radius: var(--rad); padding: 16px; margin-bottom: 12px; }
.acard h3 { margin: 0 0 10px; font-size: 16px; } .ah { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; } .ah h3 { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpi { background: var(--card); border: 1px solid var(--stroke); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.kpi small { color: var(--muted); } .kpi b { font-size: 26px; font-weight: 800; } .kpi.ok b { color: var(--green); } .kpi.bad b { color: #ff8a8d; }
.quick-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.quick-links button { background: var(--bg); border: 1px solid var(--stroke); border-radius: 12px; padding: 12px; text-align: right; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; } .toolbar input { flex: 1; min-width: 140px; background: var(--bg); }
.ptable, .adstats { display: flex; flex-direction: column; gap: 2px; }
.prow { display: grid; grid-template-columns: 2.4fr 1fr 1fr 1.4fr .9fr; gap: 8px; align-items: center; padding: 9px 10px; border-radius: 10px; text-align: right; width: 100%; background: transparent; }
.prow:not(.head):hover { background: #ffffff08; } .prow.head { color: var(--muted); font-size: 12px; } .prow.blocked { opacity: .6; }
.pu { display: flex; align-items: center; gap: 10px; min-width: 0; } .pu small { display: block; color: var(--muted); }
.gold { color: var(--gold); font-weight: 700; }
.tag { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #ffffff14; color: var(--ink2); white-space: nowrap; }
.tag.ok { background: #2fbf7126; color: #7fe0a8; } .tag.bad { background: #e5484d26; color: #ff9a9d; } .tag.gold { background: #f2b84b26; color: var(--gold); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.a-right { display: flex; justify-content: flex-end; margin-top: 6px; }
.modal.wide { max-width: 560px; }
.eu-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; } .eu-head small { display: block; color: var(--muted); font-size: 12px; }
.quick-coins { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 10px; }
.codes { display: flex; flex-direction: column; gap: 4px; }
.code-row { display: grid; grid-template-columns: 1.3fr 1fr 1.5fr auto; gap: 8px; align-items: center; padding: 8px 10px; background: var(--bg); border-radius: 10px; }
.code-row b { font-size: 18px; letter-spacing: 2px; color: var(--gold); }
.ops .op-row, .pool-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px; border-radius: 10px; background: var(--bg); margin-bottom: 6px; }
.pool-row .pa, .op-row .btn:first-of-type { margin-inline-start: auto; } .pool-row .pa { display: flex; gap: 6px; flex-wrap: wrap; }
.cz { display: grid; grid-template-columns: 230px 1fr; gap: 12px; align-items: start; }
.cz-nav { position: sticky; top: 10px; display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--stroke); border-radius: var(--rad); padding: 8px; max-height: calc(100vh - 40px); overflow: auto; }
.cz-nav button { text-align: right; padding: 9px 12px; border-radius: 10px; color: var(--ink2); font-size: 14px; }
.cz-nav button.on { background: color-mix(in srgb, var(--turq) 18%, transparent); color: var(--ink); font-weight: 700; }
.cz-main { min-width: 0; } .cz-form { background: var(--card); border: 1px solid var(--stroke); border-radius: var(--rad); padding: 16px; }
.cz-form h3 { margin: 0 0 14px; }
.cz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; }
.cz-grid .field textarea { min-height: 70px; resize: vertical; }
.cz-bool { grid-column: span 1; border: 1px solid var(--stroke); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.cz-item { border: 1px solid var(--stroke2); border-radius: 14px; padding: 12px; margin-bottom: 10px; background: color-mix(in srgb, var(--bg) 60%, var(--card)); }
.cz-ih { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cz-prev .mini-board { width: 90px; border-radius: 6px; }
.cz-ia { margin-inline-start: auto; display: flex; gap: 4px; } .cz-ia button { width: 32px; height: 32px; border-radius: 8px; background: var(--card); border: 1px solid var(--stroke); } .cz-ia .bad { color: #ff8a8d; }
.colorf { display: flex; gap: 6px; align-items: center; }
.colorf input[type=color] { width: 46px; height: 44px; padding: 3px; border-radius: 10px; border: 1px solid var(--stroke2); background: var(--bg); flex: none; }
.colorf .hex { flex: 1; text-transform: lowercase; }
.imgf { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .imgf input[type=text], .imgf input:not([type]) { flex: 1; min-width: 120px; }
.imgf img { width: 100%; max-height: 120px; object-fit: contain; border-radius: 10px; background: #0003; }
.cz-bar { position: sticky; bottom: 10px; z-index: 5; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 12px; padding: 10px 14px; border-radius: var(--rad);
  background: color-mix(in srgb, var(--card) 92%, #000); border: 1px solid var(--stroke2); box-shadow: 0 -8px 30px #0008; }
.cz-bar .muted { margin-inline-end: auto; }
.ad-test .ad-banner { margin-top: 6px; }
@media (max-width: 760px) {
  .cz { grid-template-columns: 1fr; } .cz-nav { position: static; flex-direction: row; overflow-x: auto; max-height: none; } .cz-nav button { white-space: nowrap; }
  .prow { grid-template-columns: 2fr 1fr 1fr; } .prow > span:nth-child(4), .prow > span:nth-child(5) { display: none; }
  .row3 { grid-template-columns: 1fr; } .code-row { grid-template-columns: 1fr 1fr; }
}

/* ---- پروفایل ---- */
.profile-edit { gap: 12px; } .pe-fields { width: 100%; }
.row-btn { display: flex; gap: 8px; } .row-btn input { flex: 1; }
.profile-edit input { text-align: right; font-size: 16px; font-weight: 600; max-width: none; }
.profile-edit input.ltr { text-align: left; direction: ltr; }

/* ---- نسخهٔ ۱٫۳: تاس اول، جابه‌جایی تاس، بازی خودکار، نمای سه‌بعدی بیشتر ---- */
.g-board { transform: perspective(1500px) rotateX(var(--tilt, 12deg)); transform-origin: 50% 60%; transform-style: preserve-3d; }
.board-svg { filter: none; }
.game-root::after { content: ''; position: absolute; inset: auto 0 0 0; height: 38%; pointer-events: none;
  background: linear-gradient(180deg, transparent, #00000059); }
.die3d.lead::after { content: ''; position: absolute; left: 18%; right: 18%; bottom: calc(var(--ds) * -0.28); height: 4px; border-radius: 4px;
  background: var(--accent, #ffd166); box-shadow: 0 0 10px var(--accent, #ffd166); }
.swap-zone { cursor: pointer; }
.tool.on { background: linear-gradient(160deg, #24c9b8, #128c80); box-shadow: 0 0 16px #1fb6a688, inset 0 1px 0 #ffffff50; }
.dice-layer .die3d { transition: opacity .35s, filter .35s, left .28s cubic-bezier(.3,.8,.3,1), top .28s; }

/* ---- جلوهٔ دابل (نسخهٔ کوبنده) ---- */
.double-fx { position: absolute; inset: 0; z-index: 60; pointer-events: none; display: grid; place-items: center; direction: rtl; overflow: hidden; }
.dfx-dark { position: absolute; inset: 0; background: radial-gradient(circle, #0000 20%, #000c 75%); animation: dfxDark 3s ease forwards; }
.dfx-rays { position: absolute; width: 0; height: 0; animation: dfxRays 3s linear forwards; }
.dfx-rays i { position: absolute; left: -40px; top: -60vmax; width: 80px; height: 60vmax; transform-origin: 50% 100%; transform: rotate(var(--r));
  background: linear-gradient(0deg, #ffd16655, #ffd16600 85%); clip-path: polygon(30% 0, 70% 0, 52% 100%, 48% 100%); }
.dfx-flash { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, #fffbe8 0, #ffcf6dcc 16%, #ff7a2f44 34%, transparent 60%); opacity: 0; animation: dfxFlash .9s ease-out .26s forwards; }
.dfx-ring { position: absolute; width: 60px; height: 60px; border-radius: 50%; border: 12px solid #ffd166; box-shadow: 0 0 50px #ff9a3c, inset 0 0 30px #ff9a3c; opacity: 0; animation: dfxRing 1s cubic-bezier(.1,.7,.3,1) .26s forwards; }
.dfx-ring.r2 { border-color: #fff; border-width: 5px; animation-delay: .36s; }
.dfx-ring.r3 { border-color: #ff6a3d; border-width: 8px; animation-delay: .5s; animation-duration: 1.3s; }
.dfx-sparks { position: absolute; width: 0; height: 0; }
.dfx-sparks i { position: absolute; width: var(--s); height: var(--s); margin: calc(var(--s) / -2); border-radius: 50%; background: #fff2b0; box-shadow: 0 0 12px #ff8a3c, 0 0 4px #fff;
  opacity: 0; transform: rotate(var(--a)) translateX(0); animation: dfxSpark var(--t) cubic-bezier(.1,.8,.3,1) .26s forwards; }
.dfx-embers { position: absolute; inset: 0; }
.dfx-embers i { position: absolute; left: var(--x); bottom: -10px; width: 6px; height: 6px; border-radius: 50%; background: #ffb347; box-shadow: 0 0 10px #ff7a2f; opacity: 0;
  animation: dfxEmber var(--dur) ease-out var(--dl) forwards; }
.dfx-text { position: relative; display: flex; flex-direction: column; align-items: center; opacity: 0; animation: dfxSlam 2.75s cubic-bezier(.2,1.5,.35,1) .26s forwards; }
.dfx-text b { position: relative; font-size: clamp(60px, 22vmin, 170px); font-weight: 900; line-height: 1;
  background: linear-gradient(180deg, #fffbe6 8%, #ffd166 40%, #ff8a2f 70%, #c2410c); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 3px #5a1a00; text-shadow: 0 0 0 transparent; }
.dfx-text b::after { content: attr(data-t); position: absolute; inset: 0; color: transparent; -webkit-text-stroke: 0; background: linear-gradient(100deg, transparent 35%, #ffffffcc 50%, transparent 65%) -200% 0 / 200% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text; animation: dfxShine 1.2s ease .9s forwards; }
.dfx-text b { filter: drop-shadow(0 8px 0 #4a1500) drop-shadow(0 0 34px #ff9a3c); }
.dfx-cube { margin-top: 10px; perspective: 600px; }
.dfx-cube span { display: inline-block; direction: ltr; font-size: clamp(32px, 10vmin, 76px); font-weight: 900; color: #111827; background: linear-gradient(160deg, #ffffff, #e6e8f2); border: 6px solid #ffd166;
  border-radius: 18px; padding: 4px 26px; box-shadow: 0 14px 34px #000c, 0 0 40px #ffd166aa; transform: rotateY(720deg) scale(0); animation: dfxCube .9s cubic-bezier(.2,1.6,.4,1) .62s forwards; }
.dfx-text small { margin-top: 14px; font-size: clamp(14px, 3.8vmin, 24px); font-weight: 800; color: #fff; text-shadow: 0 2px 10px #000, 0 0 18px #ff9a3c88; opacity: 0; animation: dfxFade .5s ease 1s forwards; }
@keyframes dfxDark { 0% { opacity: 0; } 8% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes dfxRays { 0% { opacity: 0; transform: rotate(0) scale(.6); } 15% { opacity: 1; transform: rotate(8deg) scale(1); } 85% { opacity: .9; } 100% { opacity: 0; transform: rotate(40deg) scale(1.1); } }
@keyframes dfxFlash { 0% { opacity: 0; } 10% { opacity: 1; } 100% { opacity: 0; } }
@keyframes dfxRing { 0% { transform: scale(.2); opacity: 1; } 100% { transform: scale(12); opacity: 0; } }
@keyframes dfxSpark { 0% { transform: rotate(var(--a)) translateX(0) scale(1.4); opacity: 1; } 100% { transform: rotate(var(--a)) translateX(var(--d)) scale(.2); opacity: 0; } }
@keyframes dfxEmber { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-70vh) translateX(20px); } }
@keyframes dfxSlam { 0% { transform: scale(5) rotate(-8deg); opacity: 0; } 9% { transform: scale(.82) rotate(2deg); opacity: 1; } 15% { transform: scale(1.1) rotate(-1deg); } 21% { transform: scale(.97); } 27%, 84% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes dfxCube { to { transform: rotateY(0) scale(1) rotate(-6deg); } }
@keyframes dfxShine { to { background-position: 200% 0; } }
@keyframes dfxFade { to { opacity: 1; } }
.game-root.shake .game { animation: dfxShake .7s cubic-bezier(.36,.07,.19,.97); }   /* فقط جلوهٔ دابل؛ پرتاب تاس صفحه را تکان نمی‌دهد */
@keyframes dfxShake { 0% { transform: scale(1.04); } 10%, 90% { transform: translate(-3px, 2px); } 20%, 80% { transform: translate(8px, -5px); } 30%, 50%, 70% { transform: translate(-14px, 6px) rotate(-.4deg); } 40%, 60% { transform: translate(14px, -6px) rotate(.4deg); } 100% { transform: none; } }
.game-root.fx-on .banner { opacity: 0; transition: opacity .2s; }

/* ---- کارایی: ۶۰ فریم — فقط transform/opacity متحرک می‌شوند و فیلترهای سنگین حذف شده‌اند ---- */
.g-board { will-change: transform; contain: layout style; }
.dice-layer { will-change: transform; }
.board-shadow { position: absolute; pointer-events: none; border-radius: 2.2%; box-shadow: 0 24px 46px #000000c0, 0 6px 0 #00000055; }
.checker.selected { filter: none; }
.die3d .dbody, .die3d .dcube { will-change: transform; }
.double-fx, .double-fx * { will-change: transform, opacity; }
/* ---- فلش‌های تحلیل ---- */
.arrow-legend { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 14px; }
.arrow-legend .lg { width: 26px; height: 6px; border-radius: 4px; flex: none; }
.lg.green { background: #2fdc7f; box-shadow: 0 0 8px #2fdc7f88; } .lg.red { background: #ff4d5a; box-shadow: 0 0 8px #ff4d5a88; }
.hint-row[data-pick] { cursor: pointer; } .hint-row.picked { outline: 2px solid #ffd166; }
.arrows .arrow-path { stroke-dasharray: 600; stroke-dashoffset: 600; animation: drawArrow .6s ease-out forwards; }
@keyframes drawArrow { to { stroke-dashoffset: 0; } }

/* ---- نسخهٔ ۱٫۴: فونت Arial، دابل مربعی، اجرای روان ---- */
:root { --font: Arial, 'Helvetica Neue', Helvetica, Tahoma, sans-serif; }
html, body, button, input, select, textarea, .board-svg, .line-chart .axis { font-family: var(--font); }
.g-board { transform-style: flat; }
.fly-ck { position: absolute; left: 0; top: 0; border-radius: 50%; border: 2px solid; box-shadow: 0 10px 14px #00000080, inset 0 -4px 0 #0000002e, inset 0 3px 0 #ffffff55; pointer-events: none; will-change: transform; z-index: 3; }
/* دابل: کاشی مربعی مثل مکعب دابل */
.dfx-text b.dfx-tile { display: grid; place-items: center; width: clamp(150px, 42vmin, 300px); height: clamp(150px, 42vmin, 300px); border-radius: 12%;
  font-family: 'Arial Black', Arial, sans-serif; font-weight: 900; font-size: clamp(54px, 15vmin, 110px); letter-spacing: 0;
  background: linear-gradient(160deg, #ffffff, #e9ebf5 55%, #c9cde0); -webkit-background-clip: border-box; background-clip: border-box; color: #111827;
  -webkit-text-stroke: 0; border: 8px solid #ffd166; box-shadow: 0 0 0 4px #7a3d00, 0 22px 40px #000d, 0 0 60px #ffb347cc, inset 0 -10px 0 #0000001f;
  filter: none; transform: rotate(-4deg); }
.dfx-text b.dfx-tile::after { content: none; }
.dfx-text { animation-duration: 2.05s !important; }
.dfx-dark, .dfx-rays { animation-duration: 2.3s !important; }
.dfx-cube span { animation-delay: .5s !important; }

.game-root.flat .g-board { transform: none; }
.game-root.flat .checker > circle:nth-child(2) { display: none; }

/* ---- نسخهٔ ۱٫۵: فونت وزیرمتن (OFL، داخل بسته؛ بدون اینترنت) ---- */
@font-face { font-family: 'Vazirmatn'; src: url('../fonts/Vazirmatn.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
:root { --font: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif; }
body { font-feature-settings: 'ss01'; letter-spacing: 0; }
.dfx-text b.dfx-tile { font-family: 'Vazirmatn', 'Arial Black', sans-serif; font-weight: 900; }

/* ---- تحلیل: متن و دکمه‌های بزرگ‌تر ---- */
.replay .replay-board { margin: 0 -8px 12px; }
.replay-nav .btn { padding: 12px 22px; font-size: 17px; border-radius: 12px; }
.replay-nav .ix { font-size: 18px; font-weight: 800; }
.replay-info { font-size: 17px; line-height: 1.9; }
.replay-info .ri-head { font-size: 19px; }
.replay-info .ri-move, .arrow-legend { font-size: 17px; }
.arrow-legend .lg { width: 34px; height: 8px; }
.ri-judge { font-size: 16px; padding: 10px 12px; }
.ri-actions { flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.ri-actions .btn { padding: 13px 16px; font-size: 16px; border-radius: 12px; flex: 1 1 140px; }
.ana-out { font-size: 16px; } .ana-out .small { font-size: 15px; }
.ana-out .hint-row { padding: 12px 14px; grid-template-columns: 34px 1fr auto; }
.ana-out .hint-row .mv { font-size: 18px; } .ana-out .hint-row .eq { font-size: 15px; } .ana-out .hint-row .wp { font-size: 14px; }
.analysis .game-row .gi b { font-size: 16px; }

/* ---- گزارش رویدادها ---- */
.audit-list { display: flex; flex-direction: column; gap: 6px; }
.audit-row { background: var(--bg); border: 1px solid var(--stroke); border-radius: 12px; padding: 10px 12px; }
.audit-row.bad { border-color: #e5484d55; background: #e5484d0d; }
.ar-h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .ar-h b { font-size: 15px; }
.ar-b { margin-top: 4px; font-size: 14px; color: var(--ink2); }
.ar-d { margin-top: 6px; font-size: 13px; line-height: 1.9; } .ar-d s { color: #ff9a9d; } .ar-d b { color: #7fe0a8; }
.verify { padding: 10px 14px; border-radius: 12px; margin-bottom: 10px; font-weight: 700; }
.verify.ok { background: #2fbf7122; color: #7fe0a8; } .verify.bad { background: #e5484d22; color: #ff9a9d; }

/* ===== v1.7: آپلود تصویر/فونت، بنر تمام‌تصویر، تختهٔ تصویری ===== */
.ad-banner.ad-img { padding: 0; display: block; min-height: 0 !important; aspect-ratio: 3 / 1; background: #0006; }
.ad-banner.ad-img img { width: 100% !important; height: 100% !important; object-fit: cover; border-radius: inherit; box-shadow: none; display: block; }
.ad-banner.ad-img .ad-label { position: absolute; top: 8px; inset-inline-start: 10px; background: #000a; padding: 2px 8px; border-radius: 99px; font-size: 11px; }
.ad-banner.ad-img .ad-cta { position: absolute; bottom: 10px; inset-inline-end: 12px; }
.ad-ed .ad-prev { max-width: 560px; margin: 6px 0 12px; }
.field.wide { grid-column: 1 / -1; }
.dimhint { font-style: normal; font-size: 11.5px; color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, transparent); padding: 1px 8px; border-radius: 99px; margin-inline-start: 6px; white-space: nowrap; }
.imgprev { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.imgprev img { width: 100%; max-height: 180px; object-fit: contain; border-radius: 10px; background: repeating-conic-gradient(#ffffff10 0 25%, transparent 0 50%) 0 0 / 16px 16px, #0004; }
.font-sample { display: block; width: 100%; font-family: var(--font); font-size: 18px; padding: 10px 12px; border-radius: 10px; background: #0003; }
.font-sample.big { font-size: 24px; margin: 6px 0 8px; }
.shop-img { width: 96px; height: 96px; object-fit: contain; border-radius: 14px; display: block; margin: auto; }
.frame-prev, .avatar.framed, .eq-frame .avatar.me { position: relative; }
.eq-frimg .eq-frame .avatar.me::after, .frame-prev.fr-img .avatar::after {
  content: ''; position: absolute; inset: -22%; background: var(--fr-img) center / contain no-repeat; pointer-events: none; }
.frame-prev.fr-img .avatar, .eq-frimg .eq-frame .avatar.me { box-shadow: none !important; }

/* ===== ورود با گوگل ===== */
.gsi-box { display: grid; justify-items: center; gap: 8px; margin: 14px 0 6px; min-height: 52px; }
.gsi-btn { min-height: 44px; display: flex; justify-content: center; width: 100%; }
.gsi-msg:empty { display: none; }
.login .or { display: flex; align-items: center; gap: 10px; color: var(--muted, #8a97b0); font-size: 13px; margin: 10px 0; }
.login .or::before, .login .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.login-logo { cursor: default; -webkit-tap-highlight-color: transparent; }
.remember { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 10px; margin: 12px 0 4px; cursor: pointer; text-align: start; }
.remember input { width: 20px; height: 20px; accent-color: var(--turq); grid-row: span 2; margin: 0; }
.remember span { font-weight: 700; } .remember small { color: var(--muted, #8a97b0); font-size: 12px; }

/* ===== مکالمهٔ صوتی ===== */
.voice-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 8px 14px; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 800; font-size: 13px; color: #fff; cursor: pointer; transition: transform .15s, background .2s; -webkit-tap-highlight-color: transparent; }
.voice-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.voice-btn.ok { background: linear-gradient(135deg, #22c55e, #15803d); box-shadow: 0 0 0 4px #22c55e33, 0 6px 16px #15803d66; }
.voice-btn.no { background: linear-gradient(135deg, #ef4444, #b91c1c); box-shadow: 0 0 0 4px #ef444433; }
.voice-btn.wait, .voice-btn.send { background: #ffffff1f; }
.voice-btn.rec { background: #ef4444; animation: vpulse .8s ease-in-out infinite; }
.voice-btn:active { transform: scale(.94); }
@keyframes vpulse { 50% { box-shadow: 0 0 0 10px #ef444400, 0 0 0 4px #ef444466; transform: scale(1.05); } }
.pcard.talking .pc-av { animation: vtalk .5s ease-in-out infinite alternate; }
@keyframes vtalk { to { filter: drop-shadow(0 0 10px #22c55e); transform: scale(1.06); } }
.pass-prev { display: grid; justify-items: center; gap: 6px; padding: 14px 18px; border-radius: 16px; background: linear-gradient(135deg, var(--p1), var(--p2)); color: #fff; }
.pass-prev svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.pass-prev b { font-size: 13px; }
.voice-card h3 { display: flex; align-items: center; gap: 8px; }
.vdot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.vdot.vs-ok { background: #22c55e; box-shadow: 0 0 10px #22c55e; } .vdot.vs-mid { background: #f2b84b; box-shadow: 0 0 10px #f2b84b; } .vdot.vs-bad { background: #ef4444; box-shadow: 0 0 10px #ef4444; }
.vseg { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 8px 0; }
.seg-b { min-width: 0; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: #0003; color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.seg-b.on.vs-ok { background: #16a34a; border-color: #22c55e; color: #fff; } .seg-b.on.vs-mid { background: #b7791f; border-color: #f2b84b; color: #fff; } .seg-b.on.vs-bad { background: #b91c1c; border-color: #ef4444; color: #fff; }
.ok-t { color: #22c55e; } .bad-t { color: #ef4444; }
.g-alt { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 360px; height: 46px; border-radius: 999px; background: #fff; color: #1f1f1f; font-weight: 700; font-size: 15px; border: 1px solid #dadce0; box-shadow: 0 2px 8px #0003; }
.g-alt svg { width: 22px; height: 22px; } .g-alt:active { transform: scale(.98); }
.g-card .g-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.g-manual summary { cursor: pointer; font-weight: 700; margin: 8px 0; } .g-manual ol { padding-inline-start: 18px; line-height: 2; } .g-manual textarea { width: 100%; }

/* ===== بی‌سیم (کنار تخته) ===== */
.tool.voice-tool { position: relative; transition: background .2s, transform .15s; }
.tool.voice-tool svg { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; }
.tool.voice-tool.ok { background: linear-gradient(135deg, #22c55e, #15803d) !important; box-shadow: 0 0 0 3px #22c55e44, 0 6px 14px #15803d66; }
.tool.voice-tool.no { background: linear-gradient(135deg, #ef4444, #b91c1c) !important; box-shadow: 0 0 0 3px #ef444433; }
.tool.voice-tool.wait, .tool.voice-tool.send { background: #64748b !important; }
.tool.voice-tool.rec { background: #ef4444 !important; animation: vpulse .8s ease-in-out infinite; }
.tool.voice-tool .v-count { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #fff; color: #b91c1c; font: 800 12px/20px var(--font); font-style: normal; box-shadow: 0 2px 6px #0006; }
.tool.voice-tool .v-count:empty { display: none; }
.wait-actions { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); z-index: 30; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; width: max-content; max-width: 92%; }
.wait-actions .btn { padding: 12px 22px; border-radius: 999px; font-weight: 800; box-shadow: 0 8px 22px #0007; }
.invite-modal .room-code { font-size: 34px; letter-spacing: 6px; text-align: center; font-weight: 900; margin: 4px 0 10px; }
.inv-link { display: flex; gap: 8px; margin-bottom: 12px; } .inv-link input { flex: 1; min-width: 0; font-size: 13px; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-bottom: 8px; }
.inv-b { display: grid; justify-items: center; gap: 4px; padding: 12px 6px; border-radius: 14px; color: #fff; font-weight: 800; font-size: 13px; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; }
.inv-b b { font-size: 22px; line-height: 1; }
.inv-b.tg { background: linear-gradient(135deg, #2aabee, #1d8fcb); } .inv-b.wa { background: linear-gradient(135deg, #25d366, #128c4a); }
.inv-b.sms { background: linear-gradient(135deg, #8b5cf6, #6d28d9); } .inv-b.share { background: linear-gradient(135deg, #f59e0b, #d97706); } .inv-b.eitaa { background: linear-gradient(135deg, #64748b, #475569); }
.invite-note { margin-bottom: 10px; }
/* کد اتاق و لینک با ارقام لاتین (برای تایپ/کپی بدون اشتباه) */
.room-code, .inv-link input, #code { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Courier New', monospace !important; font-variant-numeric: normal; }
.storage-bad { border: 2px solid #ef4444; background: #ef444418; } .storage-bad h3 { color: #ef4444; }

/* ===== دوستان واقعی ===== */
.social.live .card { margin-bottom: 12px; }
.me-status .ms-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.me-status .toggle.sm { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; background: #ffffff12; border: 1px solid var(--line); color: var(--ink); font: inherit; font-size: 12.5px; cursor: pointer; }
.chip:active { transform: scale(.96); }
.add-friend .row-btn, .me-status .row-btn { display: flex; gap: 8px; margin-top: 6px; } .add-friend input, .me-status input { flex: 1; min-width: 0; }
.find-res .person { margin-top: 10px; }
.av-wrap { position: relative; display: inline-block; flex: none; }
.av-wrap .dot { position: absolute; bottom: 1px; inset-inline-end: 1px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--card); }
.dot.on { background: #22c55e; box-shadow: 0 0 8px #22c55e; } .dot.off { background: #64748b; }
.pills.tabs3 { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 10px; }
.pills i { font-style: normal; background: var(--gold); color: #1b1300; border-radius: 99px; padding: 0 6px; font-size: 11px; }
.pills i:empty { display: none; }
.person .pa { display: flex; gap: 6px; align-items: center; }
.nav-badge { position: absolute; top: 2px; inset-inline-end: 18%; min-width: 16px; height: 16px; border-radius: 8px; background: #ef4444; color: #fff; font-size: 10px; line-height: 16px; text-align: center; padding: 0 4px; }
/* آیدی‌ها با ارقام لاتین (همان چیزی که کاربر تایپ می‌کند) */
.handle, .pid, #fh, #phandle, .id-big { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif !important; }

/* ===== رتبه‌بندی واقعی ===== */
.pills.tabs2 { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 10px; } .pills .m-lbl { font-weight: 400; opacity: .8; }
.rk-row { display: grid; grid-template-columns: 34px 38px 1fr auto auto; align-items: center; gap: 8px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.rk-row:last-child { border-bottom: 0; }
.rk-n { text-align: center; font-weight: 900; font-size: 18px; }
.rk-pn { display: grid; min-width: 0; } .rk-pn b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rk-pn small { color: var(--muted, #8a97b0); }
.rk-st { display: grid; justify-items: center; } .rk-st b { color: var(--gold); font-size: 18px; } .rk-st small, .rk-wg small { font-size: 11px; color: var(--muted, #8a97b0); }
.rk-row.top1 { background: linear-gradient(90deg, #f2b84b22, transparent); } .rk-row.me { background: color-mix(in srgb, var(--turq) 16%, transparent); border-radius: 10px; }
.rk-you { font-style: normal; font-size: 11px; background: var(--turq); color: #04211e; border-radius: 99px; padding: 0 6px; }

/* ===== فونت کمی بزرگ‌تر (صفحه‌های بازیکن) ===== */
.screen .small, .screen small { font-size: 13.5px; }
.menu-item { font-size: 18.5px; } .menu-item small { font-size: 13px; }
.cta b { font-size: 18.5px; } .cta.orange b { font-size: 20.5px; } .cta small { font-size: 13.5px; }
.pinfo b { font-size: 18.5px; } .stats-line { font-size: 15px; }
.promo b { font-size: 15.5px; } .quick-play b { font-size: 23px; } .quick-play small { font-size: 14px; }
.bottom-nav span, .bottom-nav small { font-size: 12.5px; }
.toast { font-size: 15px; } .rules p { font-size: 15px; } .notif p { font-size: 15px; }
.person .pn b, .rk-pn b, .lb-row .nm { font-size: 15.5px; }
.modal p { font-size: 15.5px; }

/* ===== صفحهٔ اول: دقیقاً یک صفحه، بدون اسکرول، خودتنظیم با اندازهٔ دستگاه ===== */
:root { --navh: 64px; }
.screen.home { height: 100vh; height: 100dvh; box-sizing: border-box; overflow: hidden; display: flex; flex-direction: column;
  gap: clamp(6px, 1.3vh, 14px); padding: clamp(8px, 1.6vh, 14px) 16px calc(var(--navh) + env(safe-area-inset-bottom) + clamp(6px, 1.2vh, 12px)); }
.screen.home > * { flex: none; margin-top: 0 !important; margin-bottom: 0 !important; }
.screen.home .cta-row .cta { min-height: 0; height: clamp(50px, 8.2vh, 76px); padding-block: 0; }
.screen.home .menu-card { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.screen.home .menu-card > .menu-item, .screen.home .submenu.open > .menu-item { flex: 1 1 0; min-height: 0; max-height: 72px; padding-block: 0; }
.screen.home .submenu.open { display: flex; flex-direction: column; flex: 4 1 0; min-height: 0; }
.screen.home .menu-item .mi-ic { height: auto; max-height: 100%; }
.screen.home .menu-item .mi-ic svg { width: clamp(24px, 4.2vh, 34px); height: clamp(24px, 4.2vh, 34px); }
.screen.home .promo-row { flex: 0 1 clamp(92px, 19vh, 170px); min-height: 0; }
.screen.home .promo-row > * { min-height: 0; height: 100%; overflow: hidden; box-sizing: border-box; }
.screen.home .promo .mini-board { max-height: 55%; }
.screen.home .home-ad { flex: 0 1 auto; max-height: clamp(0px, 11vh, 100px); overflow: hidden; }
.screen.home .home-ad .ad-banner { max-height: 100%; }
.screen.home .quick-play { height: clamp(52px, 8.5vh, 78px); padding-block: 0; justify-content: center; }
/* صفحه‌های کوتاه: اول تبلیغ و بعد کاشی‌ها کنار می‌روند تا چیزی بیرون نزند */
@media (max-height: 700px) { .screen.home .home-ad { display: none !important; } }
@media (max-height: 600px) { .screen.home .promo-row { display: none; } .screen.home .profile-bar .stats-line { display: none; } }
/* وقتی منوی «بازی» باز است کاشی‌ها کوچک‌تر شوند */
/* منوی «بازی» باز: کاشی‌ها کنار می‌روند و همهٔ گزینه‌ها یک‌خطی و هم‌اندازه می‌شوند */
.screen.home:has(.submenu.open) .promo-row { display: none; }
.screen.home .menu-item b, .screen.home .menu-item small, .screen.home .menu-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.screen.home .submenu.open > .menu-item { font-size: clamp(14.5px, 2.1vh, 18px); }
.screen.home .submenu.open > .menu-item small { font-size: clamp(11.5px, 1.6vh, 13px); }
.screen.home .submenu.open > .menu-item .mi-ic svg { width: clamp(20px, 3.4vh, 30px); height: clamp(20px, 3.4vh, 30px); }
.screen.home:has(.submenu.open) .home-ad { display: none !important; }
html:has(.screen.home), html:has(.screen.home) body { overflow: hidden; }

/* ===== صفحهٔ بازی بر اساس دستگاه =====
   موبایل/تبلتِ عمودی (لمسی): بازی افقی می‌چرخد. کامپیوتر: همان‌طور، تمام‌پنجره. */
@media (orientation: portrait) and (pointer: coarse), (orientation: portrait) and (max-width: 600px) {
  .game-root { inset: auto; top: 0; left: 0; width: 100vh; height: 100vw; width: 100dvh; transform-origin: top left; transform: rotate(90deg) translateY(-100%); }
}
@media (orientation: portrait) and (pointer: fine) and (min-width: 601px) {
  .game-root { inset: 0; width: auto; height: auto; transform: none; }
}
.screen.home .menu-item b { flex: none; } .screen.home .menu-item small { flex: 0 1 auto; min-width: 0; }
@media (max-width: 420px) { .screen.home .submenu.open > .menu-item small { display: none; } }

/* ===== ۲٫۸ — منوی همبرگری، صفحهٔ اول خلوت، آیکون‌های متحرک ===== */
:root { --navh: 0px; }
.bottom-nav { display: none !important; }
.profile-bar { display: flex; gap: 10px; align-items: stretch; }
.profile-bar .profile { flex: 1 1 auto; min-width: 0; }
.icon-btn.burger { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; flex: none; }
.icon-btn.burger i { display: block; width: 22px; height: 2.5px; border-radius: 2px; background: currentColor; transition: transform .25s; }
.icon-btn.burger i:nth-child(2) { width: 16px; align-self: center; }
.icon-btn.burger .dot { position: absolute; top: 8px; left: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 #f2b84b88; animation: dotPulse 1.6s infinite; }
@keyframes dotPulse { 70% { box-shadow: 0 0 0 8px #f2b84b00; } 100% { box-shadow: 0 0 0 0 #f2b84b00; } }
.drawer { position: fixed; inset: 0; z-index: 40; direction: rtl; }
.drawer .dr-back { position: absolute; inset: 0; background: #0009; opacity: 0; transition: opacity .25s; backdrop-filter: blur(2px); }
.drawer .dr-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(84vw, 340px); background: linear-gradient(180deg, #121c33, #0b1222); border-inline-end: 0; border-right: 1px solid #ffffff14;
  box-shadow: 10px 0 40px #0008; transform: translateX(-102%); transition: transform .26s cubic-bezier(.2,.8,.3,1); display: flex; flex-direction: column; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom)); overflow-y: auto; }
.drawer.open .dr-back { opacity: 1; } .drawer.open .dr-panel { transform: none; }
.dr-head { display: flex; align-items: center; justify-content: space-between; } .dr-head b { font-size: 20px; }
.dr-x { font-size: 18px; }
.dr-bonus { width: 100%; padding: 10px 14px; justify-content: start; grid-template-columns: auto 1fr; text-align: right; }
.dr-bonus b { font-size: 22px; } .dr-bonus small { font-size: 13px; }
.dr-list { display: flex; flex-direction: column; gap: 4px; }
.dr-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 12px; border-radius: 12px; font-size: 17px; color: var(--text); text-align: right; background: #ffffff06; }
.dr-item:hover, .dr-item:active { background: #ffffff12; }
.dr-item svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; color: var(--turq); }
.dr-item svg .fill { fill: currentColor; stroke: none; }
.dr-ad { margin-top: auto; } .dr-ad .ad-banner { border-radius: 14px; }

/* --- آیکون‌های متحرک منو --- */
.mi-ic svg, .ani-star { overflow: visible; }
.ani-trophy svg { transform-origin: 50% 90%; animation: aTrophy 2.8s ease-in-out infinite; }
@keyframes aTrophy { 0%, 60%, 100% { transform: rotate(0) translateY(0); } 70% { transform: rotate(-8deg) translateY(-2px); } 80% { transform: rotate(7deg) translateY(-2px); } 90% { transform: rotate(-3deg); } }
.ani-trophy svg path:first-child { animation: aShine 2.8s ease-in-out infinite; }
@keyframes aShine { 0%, 60%, 100% { filter: none; } 75% { filter: brightness(1.45) drop-shadow(0 0 3px #ffd27a); } }
.ani-mag svg { animation: aMag 3.2s ease-in-out infinite; }
@keyframes aMag { 0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-2px, -2px) rotate(-8deg); } 50% { transform: translate(2px, -1px) rotate(4deg); } 75% { transform: translate(1px, 2px) rotate(-3deg); } }
.ani-mag svg circle:nth-child(2) { animation: aLens 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes aLens { 0%, 100% { transform: scale(1); } 50% { transform: scale(.7); fill: #5ea0ff; } }
.ani-online svg path:nth-child(-n+3) { stroke-dasharray: 14 6; animation: aSpeed .9s linear infinite; }
.ani-online svg path:nth-child(2) { animation-duration: .7s; } .ani-online svg path:nth-child(3) { animation-duration: 1.1s; }
@keyframes aSpeed { to { stroke-dashoffset: 20; } }
.ani-online svg path:last-child { transform-box: view-box; transform-origin: 22px 16px; animation: aHand 2.4s linear infinite; }
@keyframes aHand { to { transform: rotate(360deg); } }
.ani-single svg { animation: aCoin 2.6s ease-in-out infinite; }
@keyframes aCoin { 0%, 55%, 100% { transform: rotateY(0); } 75% { transform: rotateY(180deg); } 95% { transform: rotateY(360deg); } }
.ani-matchSetup svg path { stroke-dasharray: 16; animation: aBars 2.4s ease-in-out infinite; }
@keyframes aBars { 0%, 100% { stroke-dashoffset: 0; } 45% { stroke-dashoffset: 10; } 70% { stroke-dashoffset: 0; } }
.ani-practice svg circle { transform-box: fill-box; transform-origin: center; animation: aBlink 3s infinite; }
@keyframes aBlink { 0%, 44%, 52%, 100% { transform: scaleY(1); } 48% { transform: scaleY(.1); } }
.ani-practice svg path { animation: aAntenna 1.4s ease-in-out infinite; transform-box: view-box; transform-origin: 12px 8px; }
@keyframes aAntenna { 50% { transform: rotate(14deg); } }
.ani-friendPlay svg { animation: aWave 2.6s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes aWave { 0%, 60%, 100% { transform: none; } 70% { transform: translateY(-2px) rotate(-6deg); } 85% { transform: translateY(-1px) rotate(5deg); } }
.ani-star { animation: aStar 3s ease-in-out infinite; transform-origin: center; }
@keyframes aStar { 0%, 70%, 100% { transform: scale(1) rotate(0); } 80% { transform: scale(1.18) rotate(-12deg); filter: drop-shadow(0 0 6px #fff8); } 90% { transform: scale(1) rotate(8deg); } }
.profile-bar .bell svg { transform-origin: 50% 10%; animation: aBell 6s ease-in-out infinite; }
@keyframes aBell { 0%, 88%, 100% { transform: none; } 90% { transform: rotate(14deg); } 93% { transform: rotate(-12deg); } 96% { transform: rotate(6deg); } }

/* --- تختهٔ «در حال بازی» کارت نکته‌ها --- */
.mini-board.playing .pb-ck { animation: 4.8s ease-in-out infinite; }
.mini-board.playing .pb-a { animation-name: pbA; }
.mini-board.playing .pb-b { animation-name: pbB; }
@keyframes pbA { 0%, 18% { transform: translate(0, 0); } 26% { transform: translate(-14px, -9px); } 34%, 84% { transform: translate(-28px, 0); } 92% { transform: translate(-14px, -9px); } 100% { transform: translate(0, 0); } }
.mini-board.playing .pb-b { animation-name: pbB2; }
@keyframes pbB2 { 0%, 8% { transform: translate(28px, 0); } 16% { transform: translate(14px, 9px); } 24%, 50% { transform: translate(0, 0); } 58% { transform: translate(14px, 9px); } 66%, 100% { transform: translate(28px, 0); } }
.mini-board.playing .pb-die { transform-box: fill-box; transform-origin: center; animation: pbDie 2.4s ease-in-out infinite; }
.mini-board.playing .pb-die.d2 { animation-delay: .12s; }
@keyframes pbDie { 0%, 100% { transform: rotate(0) translateY(0); } 6% { transform: rotate(-90deg) translateY(-5px); } 12% { transform: rotate(-180deg) translateY(0); } 16% { transform: rotate(-200deg); } 20%, 99% { transform: rotate(-180deg); } }
@media (prefers-reduced-motion: reduce) {
  .mi-ic svg, .mi-ic svg *, .ani-star, .profile-bar .bell svg, .mini-board.playing *, .ach-ic { animation: none !important; }
}
.drawer .nav-item.dr-item { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 13px 14px; font-size: 17px; color: var(--text); min-height: 0; }
.drawer .nav-item.dr-item span { font-size: 17px; }
.drawer .dr-bonus { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.drawer .dr-bonus svg { grid-row: span 2; width: 32px; height: 32px; } .drawer .dr-bonus small { grid-column: 2; }
/* صفحهٔ اول بدون نوار پایین: منو اندازهٔ طبیعی، کاشی‌ها فضای باقی‌مانده را می‌گیرند */
.screen.home .menu-card { flex: 0 1 auto; }
.screen.home .menu-card > .menu-item { flex: 0 1 auto; height: clamp(44px, 7.2vh, 66px); }
.screen.home:has(.submenu.open) .menu-card { flex: 1 1 auto; }
.screen.home:has(.submenu.open) .menu-card > .menu-item { flex: 1 1 0; height: auto; }
.screen.home .promo-row { flex: 1 1 0; max-height: 300px; min-height: 0; }
.screen.home .quick-play { margin-top: auto !important; }
.screen.home { padding-bottom: calc(env(safe-area-inset-bottom) + clamp(10px, 1.6vh, 16px)); }

/* ===== ۲٫۹ — زنگوله کوچک کنار منو، پاداش در صفحهٔ اول، فروش تخته‌نرد، تمام‌صفحه در لپ‌تاپ ===== */
.pb-tools { display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; flex: none; }
.pb-tools .icon-btn.burger { width: 46px; height: 46px; }
.pb-tools .icon-btn.bell.sm { width: 38px; height: 34px; padding: 0; }
.pb-tools .icon-btn.bell.sm svg { width: 18px; height: 18px; }
.pb-tools .icon-btn.bell.sm .badge { top: -5px; right: -5px; min-width: 16px; height: 16px; font-size: 10px; line-height: 16px; padding: 0 4px; }
.screen.home .home-bottom { display: flex; gap: 10px; align-items: stretch; margin-top: auto !important; flex: none; }
.screen.home .home-bottom .quick-play { flex: 1 1 auto; margin-top: 0 !important; }
.home-bonus { flex: none; height: clamp(52px, 8.5vh, 78px); padding: 0 14px; border-radius: 16px; }
.home-bonus b { font-size: clamp(17px, 2.4vh, 22px); }
.dr-item.off { opacity: .75; } .dr-item .soon { font-style: normal; margin-inline-start: auto; font-size: 12px; background: #ffffff14; color: var(--muted); border-radius: 99px; padding: 2px 10px; }

/* لپ‌تاپ/کامپیوتر: استفاده از کل عرض صفحه */
@media (min-width: 900px) {
  .screen { max-width: min(1180px, calc(100vw - 48px)); }
  .screen.home { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 18px;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto; grid-template-areas: "pb pb" "friend friend" "cta promo" "menu promo" "bottom bottom";
    padding-inline: 24px; max-width: none; width: 100%; }
  .screen.home > .profile-bar { grid-area: pb; }
  .screen.home > .home-friend-requests { grid-area: friend; }
  .screen.home > .cta-row { grid-area: cta; }
  .screen.home > .menu-card { grid-area: menu; }
  .screen.home > .promo-row { grid-area: promo; max-height: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .screen.home > .home-bottom { grid-area: bottom; }
  .screen.home:has(.submenu.open) .promo-row { display: grid; }
  .screen.home .promo .mini-board { max-height: 62%; width: 90%; }
  .screen.home .menu-card > .menu-item { height: auto; flex: 1 1 0; max-height: 84px; }
}
.pb-tools .icon-btn.bell.sm .badge { left: auto; right: -6px; top: -6px; width: auto; }
.screen.home .promo-row { display: flex; }
.screen.home .promo-row > .promo { flex: 1 1 0; width: auto; aspect-ratio: auto; }
.screen.home .promo .mini-board { width: 100%; max-height: 62%; }
@media (min-width: 900px) {
  .screen.home > .promo-row, .screen.home:has(.submenu.open) .promo-row { display: flex; }
  .screen.home .promo { padding: 16px; }
  .screen.home .promo b { font-size: 19px; }
  .screen.home .promo .big { font-size: 34px; }
}
@media (min-width: 900px) {
  .screen.home .menu-item { font-size: 22px; gap: 18px; padding-inline: 18px; }
  .screen.home .menu-item .mi-ic { width: 52px; height: 52px; }
  .screen.home .menu-item .mi-ic svg { width: 42px; height: 42px; }
  .screen.home .submenu.open > .menu-item { font-size: 19px; } .screen.home .submenu.open > .menu-item small { font-size: 14px; }
  .screen.home .cta b { font-size: 22px; } .screen.home .cta small { font-size: 15px; }
  .screen.home .cta-row .cta { height: 82px; }
  .screen.home .quick-play, .home-bonus { height: 84px; } .screen.home .quick-play b { font-size: 28px; } .screen.home .quick-play small { font-size: 16px; }
  .screen.home .pinfo b { font-size: 22px; } .screen.home .stats-line { font-size: 17px; }
  .screen.home .promo .ch-goal, .screen.home .promo .ch-timer { font-size: 15px; }
}
@media (min-width: 900px) {
  .screen:not(.home) { max-width: min(960px, calc(100vw - 48px)); }
  .screen.single .levels { max-width: 720px; margin-inline: auto; }
}

/* حریف قطع شد (مهلت یک دقیقه) */
.away-banner { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 30; direction: rtl; display: flex; flex-direction: column; gap: 2px; align-items: center; text-align: center;
  background: #2a1414ee; border: 1px solid #ff6b6b88; color: #ffd9d9; border-radius: 14px; padding: 8px 16px; box-shadow: 0 8px 30px #0008; max-width: min(92%, 460px); animation: awayPulse 2s ease-in-out infinite; pointer-events: none; }
.away-banner b { font-size: 15px; } .away-banner span { font-size: 12.5px; opacity: .9; } .away-banner i { font-style: normal; font-weight: 800; color: #fff; }
@keyframes awayPulse { 50% { border-color: #ff6b6bff; } }
.live-bar { position: fixed; z-index: 25; bottom: calc(env(safe-area-inset-bottom) + 96px); left: 50%; transform: translateX(-50%); width: min(92vw, 480px); display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(90deg, #0f5f4a, #12806a); color: #eafff8; border: 1px solid #3ee0b488; box-shadow: 0 6px 20px #0006; flex: none; text-align: right; }
.live-bar b { flex: 1; font-size: 15.5px; } .live-bar .go { font-weight: 800; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #5dffb0; box-shadow: 0 0 0 0 #5dffb088; animation: dotPulse 1.4s infinite; flex: none; }
/* موج برخورد تاس با تخته */
.die3d .dimpact { position: absolute; left: -10%; right: -10%; top: 30%; bottom: -30%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, transparent 55%, #ffffff55 70%, transparent 100%); opacity: 0; }

/* زمان انتظار: گزینه‌های حریف و مهلتش */
.opp-preview { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 20; direction: rtl; pointer-events: none;
  width: min(360px, 62%); background: #0b1322e6; border: 1px solid #ffd16655; border-radius: 14px; padding: 7px 12px; box-shadow: 0 8px 26px #0009;
  animation: opIn .35s cubic-bezier(.2,.8,.3,1); font-size: 13px; color: #e8edf8; }
@keyframes opIn { from { opacity: 0; transform: translate(-50%, -8px); } }
.opp-preview .op-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.opp-preview .op-h b { font-size: 14px; }
.opp-preview .op-t { font-weight: 800; color: #ffd166; font-variant-numeric: tabular-nums; } .opp-preview .op-t i { font-style: normal; color: #5ab8ff; }
.opp-preview .op-t.low { color: #ff6b6b; animation: lowBlink 1s infinite; } @keyframes lowBlink { 50% { opacity: .45; } }
.opp-preview .op-n { color: #aab6d3; font-size: 12.5px; margin-top: 2px; }
.opp-preview .op-list { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.opp-preview .op-list li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 8px; border-radius: 8px; opacity: .55; transition: opacity .3s, background .3s; }
.opp-preview .op-list li b { font-size: 12.5px; font-weight: 700; } .opp-preview .op-list li span { font-size: 11.5px; color: #c9d3ea; white-space: nowrap; }
.opp-preview .op-list li.on { opacity: 1; background: #ffffff14; }
.opp-preview .op-list li:nth-child(1).on { box-shadow: inset 3px 0 0 #ffd166; } .opp-preview .op-list li:nth-child(2).on { box-shadow: inset 3px 0 0 #b28dff; } .opp-preview .op-list li:nth-child(3).on { box-shadow: inset 3px 0 0 #5ab8ff; }
.op-dots i { display: inline-block; width: 4px; height: 4px; margin-inline-start: 3px; border-radius: 50%; background: currentColor; animation: opDot 1.2s infinite; }
.op-dots i:nth-child(2) { animation-delay: .2s; } .op-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes opDot { 0%, 60%, 100% { opacity: .2; } 30% { opacity: 1; } }
.g-layer:has(.away-banner) .opp-preview { display: none; }
/* گوشی افقی/صفحهٔ کوتاه: یک خط جمع‌وجور تا روی مهره‌ها را نگیرد */
@media (max-height: 520px) {
  .opp-preview { width: auto; max-width: 70%; padding: 4px 10px; display: flex; align-items: center; gap: 10px; opacity: .94; }
  .opp-preview .op-h b { font-size: 12.5px; white-space: nowrap; } .opp-preview .op-n { display: none; }
  .opp-preview .op-list { margin: 0; } .opp-preview .op-list li:not(.on) { display: none; } .opp-preview .op-list li { padding: 1px 6px; }
  .opp-preview .op-h { order: 2; } .opp-preview .op-list { order: 1; }
  .opp-preview .op-n.st { display: block; order: 1; }
}

/* ===== ۳٫۲ — هیچ نوشته‌ای روی تخته نیست: پیام‌ها در ستون کنار، بین کارت دو بازیکن ===== */
.g-mid { flex: 1 1 auto; min-height: 0; width: 94%; display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 6px; margin: 6px 0; overflow: hidden; }
.g-mid .g-info { width: 100%; }
.g-preview:empty, .g-msg:empty { display: none; }
.g-preview .opp-preview, .g-preview .away-banner { position: static; transform: none; width: auto; max-width: none; margin: 0; left: auto; top: auto; animation: opIn2 .3s ease; }
@keyframes opIn2 { from { opacity: 0; transform: translateY(-4px); } }
.g-preview .opp-preview { display: block; padding: 6px 8px; border-radius: 12px; font-size: clamp(10.5px, 2.6vmin, 13px); text-align: right; opacity: 1; }
.g-preview .opp-preview .op-h { display: flex; flex-wrap: wrap; justify-content: space-between; order: 0; }
.g-preview .opp-preview .op-h b { font-size: clamp(11px, 2.8vmin, 14px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.g-preview .opp-preview .op-t { font-size: clamp(11px, 2.8vmin, 14px); }
.g-preview .opp-preview .op-n { display: block; font-size: clamp(10px, 2.4vmin, 12px); }
.g-preview .opp-preview .op-list { margin-top: 3px; order: 0; }
.g-preview .opp-preview .op-list li { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 2px 6px; }
.g-preview .opp-preview .op-list li:not(.on) { display: flex; }
.g-preview .opp-preview .op-list li b { font-size: clamp(10px, 2.5vmin, 12.5px); }
.g-preview .opp-preview .op-list li span { font-size: clamp(9.5px, 2.3vmin, 11.5px); }
.g-preview .opp-preview .op-list li.c0.on { box-shadow: inset -3px 0 0 #ffd166; } .g-preview .opp-preview .op-list li.c1.on { box-shadow: inset -3px 0 0 #b28dff; } .g-preview .opp-preview .op-list li.c2.on { box-shadow: inset -3px 0 0 #5ab8ff; }
@media (max-height: 420px) { .g-preview .opp-preview .op-list li:not(.on) { display: none; } .g-preview .opp-preview .op-n { display: none; } .g-preview .opp-preview .op-n.st { display: block; } }
.g-preview .away-banner { padding: 6px 8px; border-radius: 12px; }
.g-preview .away-banner b { font-size: clamp(11px, 2.8vmin, 14px); } .g-preview .away-banner span { font-size: clamp(10px, 2.5vmin, 12.5px); }
.g-msg { display: flex; flex-direction: column; gap: 4px; }
.g-msg .gm-status, .g-msg .gm-item { background: #0b1322e0; border: 1px solid #ffffff1c; border-radius: 10px; padding: 5px 8px; font-size: clamp(10.5px, 2.6vmin, 13px); line-height: 1.5; color: #e8edf8; text-align: center; animation: opIn2 .3s ease; }
.g-msg .gm-status { border-color: #ffd16666; font-weight: 700; }
.g-msg .gm-item.err { border-color: #ff6b6b88; color: #ffd9d9; } .g-msg .gm-item.ok { border-color: #3ee0b488; }
.g-msg .gm-item.out { opacity: 0; transition: opacity .45s; }

/* ===== ۳٫۳ — تاس روی اندروید: زیر تاس سیاه دیده می‌شد =====
   علت: سایهٔ سیاه (با blur) داخل همان فضای سه‌بعدی تاس بود؛ کروم اندروید آن را جلوی نیمهٔ پایین تاس می‌کشید.
   حالا لایهٔ بیرونی تخت است (سایه همیشه زیر تاس)، فقط بدنه و مکعب سه‌بعدی‌اند، و رنگ‌ها جایگزین بدون color-mix دارند. */
.die3d { transform-style: flat; }
.dshadow { filter: none; background: radial-gradient(closest-side, #00000080, #00000040 55%, transparent); transform: translateZ(0); }
.dbody { z-index: 1; }
.die3d .dimpact { z-index: 0; }
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .skin-0 { --fbg: linear-gradient(145deg, #ffffff, #f4efe3 55%, #ddd5c2); --pip: #141a30; --pip2: #4b5578; --core: #d8cfb8; }
  .skin-1 { --fbg: linear-gradient(145deg, #8fa5ee, #3d5fd0 55%, #24398a); --pip: #e9eeff; --pip2: #ffffff; --core: #2c449a; }
}

/* جفت: دو تاس، هر کدام دو بار — نقطه‌های زیر تاس = دفعه‌های باقی‌مانده */
.die3d .dleft { display: none; position: absolute; left: 50%; bottom: calc(var(--ds) * -0.34); transform: translateX(-50%); gap: calc(var(--ds) * .12); z-index: 2; }
.die3d[data-left] .dleft { display: flex; }
.die3d .dleft b { width: calc(var(--ds) * .14); height: calc(var(--ds) * .14); border-radius: 50%; background: #ffffff26; box-shadow: inset 0 0 0 1.5px #ffffff55; transition: background .25s; }
.die3d[data-left="1"] .dleft b:first-child, .die3d[data-left="2"] .dleft b { background: #ffd166; box-shadow: 0 0 6px #ffd16699; }
.die3d.lead[data-left]::after { display: none; }
/* پنل: گزینه‌های رادیویی (فقط یکی فعال) */
.cz-radio { display: flex; flex-direction: column; gap: 6px; }
.cz-radio > span { font-weight: 700; margin-bottom: 2px; }
.radio-opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #ffffff08; border: 1px solid #ffffff14; cursor: pointer; }
.radio-opt.on { border-color: var(--turq); background: #1fb6a61c; }
.radio-opt input { margin-top: 3px; accent-color: var(--turq); width: 18px; height: 18px; flex: none; }

/* ===== دستاوردها ===== */
.ach-sum { margin: 6px 0 12px; } .ach-sum b { color: var(--gold); font-size: 18px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ach-grid.sm { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.ach { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 12px 8px 10px; border-radius: 14px;
  background: linear-gradient(160deg, #ffffff0c, #ffffff03); border: 1px solid #ffffff14; filter: grayscale(.85); opacity: .7; }
.ach.done { filter: none; opacity: 1; border-color: #ffd16666; background: linear-gradient(160deg, #ffd1661a, #ffffff05); box-shadow: 0 0 18px #ffd16622; }
.ach-ic { font-size: 34px; line-height: 1.1; transform-origin: 50% 80%; animation: achFloat 3.2s ease-in-out infinite; }
.ach:nth-child(3n+2) .ach-ic { animation-name: achSwing; animation-delay: -.7s; }
.ach:nth-child(3n) .ach-ic { animation-name: achPulse; animation-delay: -1.4s; }
.ach.done .ach-ic { filter: drop-shadow(0 0 7px #ffd16666); }
@keyframes achFloat { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(-4deg); } }
@keyframes achSwing { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-4px) rotate(6deg); } }
@keyframes achPulse { 0%, 100% { transform: scale(1) translateY(0); } 50% { transform: scale(1.12) translateY(-3px); } }
.ach b { font-size: 14.5px; } .ach small { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.ach em { font-style: normal; font-size: 11.5px; color: #aab6d3; } .ach .ach-ok { color: #5dffb0; }
.ach-bar { display: block; width: 86%; height: 6px; border-radius: 6px; background: #ffffff14; overflow: hidden; margin-top: 4px; }
.ach-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--turq), var(--gold)); border-radius: 6px; }
.ach-rw { margin-top: 3px; font-size: 11.5px; font-weight: 700; color: var(--gold); }
.ach-grid.sm .ach { padding: 9px 6px; } .ach-grid.sm .ach-ic { font-size: 28px; } .ach-grid.sm .ach b { font-size: 13px; }
.pf-head { display: flex; align-items: center; gap: 12px; } .pf-head div { display: flex; flex-direction: column; gap: 2px; }
.pf-head b { font-size: 18px; } .pf-st { font-size: 12.5px; color: var(--muted); }
.pf-h { margin: 14px 0 8px; font-size: 15px; }
.rk-row, .fr-list .person { cursor: pointer; }
.pcard.top { cursor: pointer; }
.ach-cat { margin: 16px 2px 8px; font-size: 16px; display: flex; align-items: center; gap: 8px; } .ach-cat small { color: var(--gold); font-size: 13px; }
.rank .rk-scope, .rank .rk-period { justify-content: center; flex-wrap: wrap; } .rank .rk-title { margin: 4px 0 10px; } .rank .rk-title { color: var(--gold); font-weight: 700; }
.rank .pills.rk-scope, .rank .pills.rk-period { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 6px; } .rank .rk-scope .pill, .rank .rk-period .pill { padding: 8px 4px; font-size: 13.5px; }

/* ===== ۴٫۰ — هیچ صفحه‌ای اسکرول نمی‌خورد: هر صفحه دقیقاً یک صفحه؛ فهرست‌های بلند صفحه‌بندی می‌شوند ===== */
html, body { overflow: hidden; height: 100%; }
#app { height: 100%; overflow: hidden; }
.screen:not(.home):not(.admin) { height: 100vh; height: 100dvh; box-sizing: border-box; overflow: hidden; display: flex; flex-direction: column;
  padding-top: calc(env(safe-area-inset-top) + 10px); padding-bottom: calc(env(safe-area-inset-bottom) + 10px); }
.screen:not(.home) > * { flex-shrink: 0; }
.screen:not(.home) > [data-pager], .screen:not(.home) .fill { flex: 1 1 0; min-height: 0; overflow: hidden; }
.screen:not(.home) .fill { display: flex; flex-direction: column; }
.screen:not(.home) .fill > [data-pager] { flex: 1 1 0; min-height: 0; overflow: hidden; }
.screen:not(.home) [data-pager] { align-content: start; }
.screen:not(.home) > .topbar { margin-bottom: 8px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 0 2px; flex: none; direction: rtl; }
.pager .btn { min-width: 84px; } .pager .btn:disabled { opacity: .35; }
.pager .pg-ix { font-weight: 800; color: var(--muted); min-width: 52px; text-align: center; }
/* پنل مدیریت (ابزار مدیر) همچنان اسکرول دارد */
html:has(body.in-admin), body.in-admin, body.in-admin #app { overflow: auto; height: auto; }

/* مرور و تحلیل بازی: همه‌چیز یک نوبت در یک صفحه (تخته کوچک‌تر، بدون اسکرول) */
.screen.replay .replay-main { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.screen.replay .replay-board { flex: 1 1 0; min-height: 140px; max-height: 46vh; margin: 0; display: flex; align-items: center; justify-content: center; background: transparent; }
.screen.replay .replay-board .board-svg { width: 100%; height: 100%; }
.screen.replay .replay-side { flex: none; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.screen.replay .replay-nav { margin: 0; } .screen.replay .replay-nav .btn { padding: 8px 18px; font-size: 15px; }
.screen.replay .scrub { margin: 0; }
.screen.replay .replay-info, .screen.replay .ana-out { padding: 8px 12px; font-size: 14px; line-height: 1.7; margin: 0; }
.screen.replay .replay-info .ri-head { font-size: 15.5px; } .screen.replay .replay-info .ri-move, .screen.replay .arrow-legend { font-size: 14px; }
.screen.replay .ri-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; } .screen.replay .ri-actions .btn { padding: 6px 10px; font-size: 13px; }
.screen.replay .hint-row { padding: 5px 8px; } .screen.replay .ana-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
/* افقی/کامپیوتر: تخته سمت چپ، توضیحات سمت راست */
@media (min-aspect-ratio: 1/1) {
  .screen.replay .replay-main { flex-direction: row; }
  .screen.replay .replay-board { flex: 1.6 1 0; max-height: none; height: 100%; }
  .screen.replay .replay-side { flex: 1 1 0; max-width: 420px; justify-content: center; }
}
/* تنظیمات: سه زبانه */
.more-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.more-tabs .pill { padding: 9px 4px; font-size: 14px; }
.screen.more .mpane[hidden] { display: none !important; }
.screen.more .profile-edit { padding: 12px; } .screen.more .profile-edit .field { margin-bottom: 6px; }
.ach-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; } .ach-tabs .pill { padding: 7px 2px; font-size: 13px; } .ach-tabs small { color: var(--gold); }
.screen.achs .ach-grid { grid-auto-rows: max-content; }
.topbar .home-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand-logo { display:block; width:100%; height:100%; object-fit:contain; }
.login-logo .brand-logo,.ld-logo .brand-logo,.sms-ic .brand-logo,.boot .brand-logo { max-height:160px; }
.at-brand > .brand-logo { width:48px; height:48px; flex:none; }
.brand-hero { position:relative; isolation:isolate; display:flex; align-items:center; justify-content:center; min-height:52px; height:clamp(58px,9vh,92px); flex-shrink:0; margin:0 auto 8px; width:min(100%,520px); overflow:hidden; border-radius:16px; background:var(--card); }
.brand-float { position:relative; z-index:1; width:min(88%,420px); height:88%; animation:brand-float var(--logo-seconds,6s) ease-in-out infinite; }
.brand-orbit { position:absolute; width:70%; height:80%; border-radius:50%; background:radial-gradient(ellipse,var(--turq),transparent 70%); opacity:.2; animation:brand-glow var(--logo-seconds,6s) ease-in-out infinite; }
.brand-shine { position:absolute; z-index:2; inset:-50%; pointer-events:none; background:linear-gradient(110deg,transparent 42%,rgba(255,255,255,.14) 49%,transparent 56%); animation:brand-shine calc(var(--logo-seconds,6s) * 2) ease-in-out infinite; }
.logo-preview { height:240px; max-width:100%; margin:16px auto; padding:12px; background:var(--bg); border-radius:16px; }
.logo-card { max-width:760px; margin:auto; }
.logo-card .btn { margin-bottom:8px; }
@keyframes brand-float { 0%,100% { transform:translateY(2px); } 50% { transform:translateY(-3px); } }
@keyframes brand-glow { 0%,100% { opacity:.12; transform:scale(.94); } 50% { opacity:.28; transform:scale(1.06); } }
@keyframes brand-shine { 0%,30% { transform:translateX(-75%); opacity:0; } 45% { opacity:1; } 65%,100% { transform:translateX(75%); opacity:0; } }
.logo-motion-off .brand-hero * { animation:none; }
.logo-motion-off .brand-shine { display:none; }
@media (prefers-reduced-motion:reduce) { .brand-hero * { animation:none; } .brand-shine { display:none; } }
@media (min-width:900px) {
 .screen.home { grid-template-rows:auto auto auto minmax(0,1fr) auto; grid-template-areas:"logo logo" "pb pb" "cta promo" "menu promo" "bottom bottom"; }
 .screen.home > .brand-hero { grid-area:logo; width:min(62vw,560px); }
}
.home-friend-requests { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -5px 0 10px; padding: 9px 12px;
  border: 1px solid #f2b84b88; border-radius: 15px; background: linear-gradient(120deg, #3b2415ee, #172d2cee); box-shadow: 0 8px 22px #0006, inset 0 1px #fff2; }
.home-friend-requests[hidden] { display: none !important; }
.hfr-person { display: flex; align-items: center; gap: 9px; min-width: 0; }
.hfr-person > span { display: flex; flex-direction: column; min-width: 0; }
.hfr-person b { color: #fff3d2; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hfr-person small { color: var(--muted); font-size: 11px; }
.hfr-actions { display: flex; gap: 6px; flex: none; }
.hfr-actions .btn { min-height: 34px; padding: 5px 10px; }
.game-friend-request { display: flex; align-items: center; gap: 14px; text-align: right; }
.game-friend-request > div { display: flex; flex-direction: column; }
.game-friend-request p { margin: 6px 0 0; }
@media (max-width: 520px) {
  .home-friend-requests { align-items: stretch; flex-direction: column; }
  .hfr-actions .btn { flex: 1 1 auto; }
}
@media (max-height:650px) { .brand-hero { height:50px; min-height:42px; margin-bottom:5px; } }

.brand-hero:not(:has(.brand-logo)) { display:none; }

/* ===== ۴٫۱ — هویت بصری باشگاه تخته‌نرد =====
   پالت نفتی، چوب گردویی، برنجی و عاجی؛ سطوح آرام و جزئیات دست‌ساز به‌جای رنگ‌های نئونی پراکنده. */
:root {
  --club-ink: #f1e8d5;
  --club-cream: #d9cdb7;
  --club-brass: #d4a85f;
  --club-brass-dark: #8a632b;
  --club-petrol: #2f8a7e;
  --club-rust: #b86048;
  --club-walnut: #39271f;
  --club-deep: #071419;
  --club-surface: #10272d;
  --club-surface-2: #163239;
  --club-line: #d4a85f2b;
  --r: 11px;
  --rad: 12px;
  --rad-s: 9px;
  --shadow: 0 14px 38px #00000052;
}

html, body {
  background-color: var(--bg);
  color: var(--ink);
}
body {
  background-image:
    radial-gradient(900px 440px at 50% -170px, color-mix(in srgb, var(--turq) 20%, transparent), transparent 72%),
    linear-gradient(115deg, transparent 0 48%, #ffffff05 49%, transparent 50% 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 88%, #132c31), var(--bg));
  background-size: auto, 42px 42px, auto;
  background-attachment: fixed;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .18;
  background: repeating-linear-gradient(92deg, transparent 0 28px, #ffffff08 29px, transparent 31px 76px);
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}

/* سطوح اصلی */
.card, .menu-card, .lb-card, .tile, .promo, .profile, .pack, .acard,
.admin-top, .login-card, .notif, .person-card, .rank-card, .ach, .ad-banner {
  background: linear-gradient(145deg, color-mix(in srgb, var(--card) 94%, #fff), color-mix(in srgb, var(--card) 92%, #000));
  border: 1px solid color-mix(in srgb, var(--gold) 18%, transparent);
  box-shadow: 0 10px 28px #00000035, inset 0 1px 0 #ffffff08;
  border-radius: var(--rad);
}
.card h3, .acard h3, .pf-h, .rank .rk-title {
  color: var(--gold);
  letter-spacing: -.15px;
}
.card h3::after, .acard h3::after {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  margin-inline-start: 9px;
  vertical-align: middle;
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* کنترل‌ها */
input, select, textarea, .field input, .field select, .field textarea, .admin textarea {
  background: color-mix(in srgb, var(--bg) 82%, #000);
  border-color: color-mix(in srgb, var(--gold) 20%, var(--line));
  border-radius: 8px;
  box-shadow: inset 0 2px 8px #00000026;
}
input:focus, select:focus, textarea:focus, .field input:focus, .field select:focus {
  border-color: var(--turq);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--turq) 18%, transparent), inset 0 2px 8px #0003;
}
.btn {
  border-radius: 8px;
  border: 1px solid #ffffff0d;
  background: color-mix(in srgb, var(--card) 78%, #fff);
  box-shadow: inset 0 1px 0 #ffffff0b;
}
.btn.primary, .footer-cta .btn {
  color: #071b19;
  background: linear-gradient(180deg, color-mix(in srgb, var(--turq) 78%, #fff), var(--turq));
  border-color: color-mix(in srgb, var(--turq) 75%, #fff);
  box-shadow: 0 5px 14px color-mix(in srgb, var(--turq) 23%, transparent), inset 0 1px 0 #ffffff4d;
}
.btn.danger { background: var(--club-rust); border-color: #e49a8755; }
.btn.ghost { border-color: color-mix(in srgb, var(--gold) 25%, transparent); }
.pill {
  border-radius: 7px;
  border-color: color-mix(in srgb, var(--gold) 20%, var(--line));
  background: #ffffff03;
}
.pill.on, .seg button.on {
  color: #172019;
  background: var(--gold);
  border-color: color-mix(in srgb, var(--gold) 80%, #fff);
  box-shadow: inset 0 1px 0 #ffffff66;
}
.icon-btn:not(.ghost) {
  border-radius: 9px;
  background: color-mix(in srgb, var(--card) 88%, #fff);
  border-color: var(--club-line);
  box-shadow: none;
}

/* عنوان صفحه‌ها */
.topbar {
  min-height: 50px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--club-line);
}
.topbar h1 {
  font-size: 19px;
  font-weight: 800;
  color: var(--club-ink);
}
.topbar h1::before {
  content: '◆';
  color: var(--gold);
  font-size: 9px;
  margin-inline-end: 8px;
  vertical-align: 2px;
}

/* صفحهٔ خانه */
.brand-hero {
  background:
    radial-gradient(ellipse at center, color-mix(in srgb, var(--gold) 13%, transparent), transparent 65%),
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--card) 80%, #000), transparent);
  border: 0;
  border-bottom: 1px solid var(--club-line);
  border-radius: 0;
}
.brand-orbit { background: radial-gradient(ellipse, color-mix(in srgb, var(--gold) 42%, transparent), transparent 70%); }
.profile {
  border-inline-start: 3px solid var(--gold);
  background: linear-gradient(110deg, color-mix(in srgb, var(--card) 96%, #fff), var(--card));
}
.profile .avatar { box-shadow: 0 0 0 2px var(--gold), 0 4px 12px #0006; }
.stats-line { color: var(--club-cream); }
.rt-v { color: color-mix(in srgb, var(--turq) 75%, #fff); }
.cta { border-radius: 9px; border: 1px solid #ffffff13; box-shadow: 0 7px 18px #0004; }
.cta.purple {
  color: var(--club-ink);
  background: linear-gradient(135deg, var(--promo1, #397e77), var(--promo2, #1b4848));
  box-shadow: 0 7px 18px color-mix(in srgb, var(--turq) 15%, transparent);
}
.cta.orange {
  color: #2c1c09;
  background: linear-gradient(180deg, var(--buy1, #e4c077), var(--buy2, #b8873e));
  box-shadow: 0 7px 18px color-mix(in srgb, var(--gold) 16%, transparent);
}
.menu-card {
  padding: 5px 10px;
  background: color-mix(in srgb, var(--card) 96%, #000);
}
.menu-item {
  border-radius: 0;
  border-bottom: 1px solid #ffffff0b;
}
.menu-card > .menu-item:last-child, .submenu > .menu-item:last-child { border-bottom: 0; }
.menu-item:hover, .menu-item:active { background: color-mix(in srgb, var(--turq) 10%, transparent); }
.menu-item .mi-ic {
  color: var(--gold);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.promo { border-radius: 10px; }
.promo.tips-card {
  color: var(--club-ink);
  background: linear-gradient(145deg, color-mix(in srgb, var(--turq) 38%, var(--card)), var(--card));
  padding: 8px;
  overflow: hidden;
}
.tips-board-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #081a21;
  box-shadow: 0 6px 14px #0004;
  isolation: isolate;
}
.tips-board-frame::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 45% 0 0;
  background: linear-gradient(180deg, transparent, #06151be8 78%);
  pointer-events: none;
}
.promo.tips-card .tips-board-frame .mini-board {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 8px;
  box-shadow: none;
}
.tips-board-frame .tag {
  z-index: 2;
  top: 7px;
  left: auto;
  inset-inline-start: 7px;
}
.promo.tips-card .tips-board-frame b {
  position: absolute;
  z-index: 2;
  inset-inline: 7px;
  bottom: 7px;
  margin: 0;
  color: #fff7e6;
  font-size: clamp(11px, 1.75vh, 14px);
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 2px 5px #000;
}
.promo .tag { color: #1d170a; background: var(--gold); border-radius: 4px; }
.challenge {
  background: linear-gradient(145deg, color-mix(in srgb, var(--club-walnut) 72%, var(--card)), var(--card));
  min-width: 0;
  overflow: hidden;
}
.challenge .big { color: var(--gold); }
@media (max-width: 899px) {
  .screen.home .promo-row { align-items: stretch; }
  .screen.home .promo-row > .promo { min-width: 0; }
  .screen.home .challenge {
    justify-content: space-evenly;
    gap: clamp(1px, .4vh, 4px);
    padding: clamp(6px, 1vh, 10px);
  }
  .screen.home .challenge > * { flex: none; max-width: 100%; margin-block: 0; }
  .screen.home .challenge > b { font-size: clamp(12px, 1.8vh, 15.5px); line-height: 1.2; }
  .screen.home .challenge .ch-goal,
  .screen.home .challenge .ch-reward,
  .screen.home .challenge .ch-done,
  .screen.home .challenge .ch-timer { font-size: clamp(10px, 1.45vh, 12.5px); line-height: 1.15; }
  .screen.home .challenge .big { font-size: clamp(24px, 4vh, 36px); line-height: 1; }
  .screen.home .challenge .big small { font-size: clamp(12px, 1.8vh, 16px); }
}
.quick-play {
  color: #142018;
  background: linear-gradient(180deg, var(--quick1, #dfba70), var(--quick2, #a97935));
  border: 1px solid color-mix(in srgb, var(--gold) 70%, #fff);
  border-radius: 9px;
  box-shadow: 0 8px 22px #0005, inset 0 1px 0 #ffffff80;
}
.bonus-btn {
  background: linear-gradient(180deg, color-mix(in srgb, var(--club-walnut) 76%, var(--gold)), var(--club-walnut));
  border-width: 1px;
  border-radius: 9px;
}

/* ورود، پنجره‌ها و اعلان‌ها */
.login-brand h1 { color: var(--club-ink); letter-spacing: -.5px; }
.login-brand p { color: var(--club-cream); }
.login-card { border-top: 2px solid var(--gold); border-radius: 13px; }
.modal-wrap { background: #02090bcf; backdrop-filter: blur(5px); }
.modal {
  border-radius: 13px;
  border: 1px solid var(--club-line);
  border-top: 2px solid var(--gold);
  background: linear-gradient(155deg, color-mix(in srgb, var(--card) 97%, #fff), color-mix(in srgb, var(--card) 88%, #000));
}
.modal h3 { color: var(--gold); }
.toast {
  border-radius: 8px;
  background: color-mix(in srgb, var(--card) 92%, #000);
  border-inline-start: 3px solid var(--turq);
}

/* فهرست‌ها، فروشگاه، رتبه و دستاورد */
.game-row, .person, .rk-row, .shop-row, .notif {
  border-bottom-color: var(--club-line);
}
.lb-row.me, .rk-row.me { background: color-mix(in srgb, var(--turq) 12%, transparent); }
.tile { border-inline-start: 2px solid color-mix(in srgb, var(--gold) 55%, transparent); }
.tile b, .room-code { color: var(--gold); }
.level {
  background: linear-gradient(165deg, color-mix(in srgb, var(--card) 96%, #fff), color-mix(in srgb, var(--club-walnut) 24%, var(--card)));
  border-radius: 9px;
}
.level.on { border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 20%, transparent); }
.ach {
  border-radius: 10px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--card) 96%, #fff), var(--card));
}
.ach.done {
  border-color: color-mix(in srgb, var(--gold) 55%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--gold) 13%, var(--card)), var(--card));
  box-shadow: inset 0 1px 0 #ffffff0b;
}
.ach-bar i { background: linear-gradient(90deg, var(--turq), var(--gold)); }

/* پنل مدیریت */
.admin-top { border-radius: 10px; border-top: 2px solid var(--gold); }
.admin-tabs { border-bottom: 1px solid var(--club-line); }
.atab { border-radius: 7px 7px 0 0; }
.atab.on { color: #211a0d; background: var(--gold); }
.kpi { border-radius: 9px; border-color: var(--club-line); background: color-mix(in srgb, var(--card) 92%, #000); }
.cz-nav, .cz-main { border-color: var(--club-line); }

/* بازی: قاب آرام‌تر تا خود تخته مرکز توجه بماند */
.game-root {
  background:
    radial-gradient(ellipse at center, color-mix(in srgb, var(--turq) 12%, transparent), transparent 58%),
    linear-gradient(150deg, #0b1b20, #030a0d);
}
.pcard {
  border-radius: 10px;
  border-color: var(--club-line);
  background: linear-gradient(145deg, #ffffff0b, #00000012);
}
.pcard.active { box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 55%, transparent), 0 8px 22px #0006; }
.banner { border-radius: 8px; }
.replay-board { border: 1px solid var(--club-line); }

/* نمایشگرهای کوچک: تزئینات کمتر، خوانایی ثابت */
@media (max-width: 520px) {
  .screen { padding-inline: 12px; }
  .cta { padding-inline: 10px; }
  .card, .profile, .menu-card, .promo, .login-card { box-shadow: 0 7px 20px #0000002e; }
  .topbar h1 { font-size: 18px; }
}
.pf-actions{display:flex;justify-content:center;margin:12px 0 4px}.pf-actions .btn{min-width:190px}.pf-friend{display:inline-flex;align-items:center;min-height:38px;padding:0 14px;border:1px solid color-mix(in srgb,var(--primary) 45%,transparent);border-radius:12px;background:color-mix(in srgb,var(--primary) 10%,transparent)}
.friend-tool svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}.friend-tool:disabled{opacity:.55}

/* ===== ۴٫۳ — تم سه‌بعدی چوب، برنز و طلا ===== */
:root {
  --club-ink:#f6e8cf; --club-cream:#d8bd91; --club-brass:#e8b85b; --club-brass-dark:#8d531d;
  --club-petrol:#a86d2b; --club-rust:#a43b2d; --club-walnut:#352014; --club-deep:#080503;
  --club-surface:#1b120c; --club-surface-2:#27180e; --club-line:#e8b85b35;
}
body {
  background-image:
    radial-gradient(850px 430px at 50% -150px, #c87d2529, transparent 68%),
    repeating-linear-gradient(103deg, transparent 0 40px, #b2762510 41px, transparent 43px 92px),
    linear-gradient(180deg, #110a05, var(--bg));
}
.card,.menu-card,.lb-card,.tile,.promo,.profile,.pack,.acard,.admin-top,.login-card,.notif,.person-card,.rank-card,.ach,.ad-banner {
  border-color:color-mix(in srgb,var(--gold) 24%,transparent);
  background:linear-gradient(145deg,color-mix(in srgb,var(--card) 90%,#5b3419),color-mix(in srgb,var(--card) 94%,#000));
  box-shadow:0 12px 30px #0008,inset 0 1px 0 #f7d78917;
}
.menu-item:hover { background:linear-gradient(90deg,#e8b85b0c,#e8b85b03); }
.menu-item + .menu-item { border-top-color:#e8b85b1c; }
.profile .avatar { box-shadow:0 0 0 2px #e8b85b,0 0 20px #bd762b55; }
.cta.purple { color:#f6e8cf; }
.quick-play { color:#1d1008; text-shadow:0 1px #fff5; }

.icon3d { width:100%; height:100%; display:block; object-fit:contain; filter:drop-shadow(0 7px 6px #0009) drop-shadow(0 0 7px #d6903944); transform:translateZ(0); }
.mi-ic:has(.icon3d) { width:54px; height:54px; overflow:visible; }
.menu-item.sub .mi-ic:has(.icon3d) { width:44px; height:44px; }
.drawer .icon3d { width:46px; height:46px; }
.drawer .nav-item:has(.icon3d) { min-height:60px; }
.mini-dice .icon3d { animation:iconDiceRoll 4.2s cubic-bezier(.4,0,.2,1) infinite; transform-origin:50% 62%; }
.ani-trophy .icon3d,.icon3d.trophy { animation:iconTrophy 3.1s ease-in-out infinite; }
.ani-mag .icon3d,.icon3d.analysis { animation:iconScan 2.8s ease-in-out infinite; }
.ani-online .icon3d,.icon3d.online { animation:iconOnline 2.4s ease-in-out infinite; }
.icon3d.friends { animation:iconFriends 3.5s ease-in-out infinite; }
.icon3d.store { animation:iconStore 3s ease-in-out infinite; }
.icon3d.profile3d { animation:iconFloat 3.4s ease-in-out infinite; }
.icon3d.settings { animation:iconGear 7s linear infinite; }
@keyframes iconDiceRoll { 0%,72%,100%{transform:rotate(0) translateY(0) scale(1)} 78%{transform:rotate(-16deg) translateY(-7px) scale(1.07)} 84%{transform:rotate(18deg) translateY(-2px)} 90%{transform:rotate(-7deg) translateY(-5px)} }
@keyframes iconTrophy { 0%,100%{transform:translateY(0) rotate(0)} 50%{transform:translateY(-5px) rotate(2deg);filter:drop-shadow(0 10px 7px #0008) drop-shadow(0 0 12px #ffc35c80)} }
@keyframes iconScan { 0%,100%{transform:scale(1)} 50%{transform:scale(1.07) rotate(-3deg);filter:drop-shadow(0 7px 6px #0009) drop-shadow(0 0 13px #f5bd5680)} }
@keyframes iconOnline { 0%,100%{transform:translateX(0) scale(1)} 45%{transform:translateX(-4px) scale(1.06)} 60%{transform:translateX(2px)} }
@keyframes iconFriends { 0%,100%{transform:translateY(0)} 45%{transform:translateY(-4px) rotate(2deg)} 60%{transform:translateY(-2px) rotate(-2deg)} }
@keyframes iconStore { 0%,65%,100%{transform:scale(1)} 75%{transform:scale(1.08) rotate(-2deg)} 86%{transform:scale(1.02) rotate(2deg)} }
@keyframes iconFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }
@keyframes iconGear { to{transform:rotate(360deg)} }

.avatar.photo { padding:0; overflow:hidden; background:#130c07; }
.avatar.photo img { width:100%; height:100%; display:block; object-fit:cover; }
.profile-photo-box { display:flex; flex-direction:column; align-items:center; gap:8px; min-width:96px; }
.avatar-pick { cursor:pointer; white-space:nowrap; background:linear-gradient(180deg,#e8b85b,#9a5f20); color:#1d1008; }
@media (prefers-reduced-motion:reduce) { .icon3d { animation:none !important; } }
