/* ==========================================================
   قرعه‌نما — طراحی مینیمال با حس اپلیکیشن‌های اندروید (Material You)
   ========================================================== */
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Regular.ttf") format("truetype"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("../fonts/Vazirmatn-Bold.ttf") format("truetype"); font-weight: 600 800; font-display: swap; }

:root {
  --brand-a: #6D5EF5;
  --brand-b: #B66DFF;
  --brand: var(--brand-a);
  --on-brand: #fff;
  --grad: linear-gradient(135deg, var(--brand-a), var(--brand-b));

  --bg: #F4F2FB;
  --surface: #FFFFFF;
  --surface-2: #EEEBF8;
  --surface-3: #E6E2F4;
  --text: #1B1830;
  --muted: #6A6685;
  --line: #E3DFF1;
  --tonal: color-mix(in srgb, var(--brand-a) 12%, var(--surface));
  --tonal-text: color-mix(in srgb, var(--brand-a) 80%, #000);

  --ok: #0FA678; --ok-bg: #DDF6EE;
  --warn: #C27803; --warn-bg: #FFF1D6;
  --bad: #E0314F; --bad-bg: #FFE3E8;

  --r-s: 12px; --r-m: 18px; --r-l: 26px; --r-xl: 34px;
  --shadow-1: 0 1px 2px rgba(35,25,90,.06), 0 4px 14px rgba(35,25,90,.06);
  --shadow-2: 0 2px 6px rgba(35,25,90,.08), 0 14px 38px rgba(35,25,90,.12);
  --nav-h: 72px;
  --rail-w: 92px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0D0B19; --surface: #171428; --surface-2: #211D37; --surface-3: #2B2646;
  --text: #F2F0FD; --muted: #9D98BD; --line: #2C2748;
  --tonal: color-mix(in srgb, var(--brand-b) 18%, var(--surface));
  --tonal-text: color-mix(in srgb, var(--brand-b) 70%, #fff);
  --ok: #3DDBA8; --ok-bg: #11332B; --warn: #FFC453; --warn-bg: #3A2D0E; --bad: #FF7A92; --bad-bg: #3A1520;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
  --shadow-2: 0 2px 6px rgba(0,0,0,.5), 0 14px 38px rgba(0,0,0,.45);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  font-size: 15px; line-height: 1.8; min-height: 100vh;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1,h2,h3,h4 { margin: 0; line-height: 1.5; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-a) 55%, transparent); outline-offset: 2px; border-radius: 10px; }
.ico { width: 24px; height: 24px; fill: currentColor; flex: none; }
.ico.sm { width: 18px; height: 18px; } .ico.lg { width: 30px; height: 30px; }
.flip { transform: scaleX(-1); }
.num { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; text-align: left; }
.muted { color: var(--muted); }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.center { text-align: center; }
.hide { display: none !important; }

/* ---------- Layout ---------- */
.shell { min-height: 100vh; }
.shell.has-nav { padding-bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }
.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 18px; }
.container.narrow { max-width: 720px; }
.page { padding-block: 22px 40px; animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.appbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.appbar .container { height: 64px; display: flex; align-items: center; gap: 10px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.2px; }
.logo-mark { width: 36px; height: 36px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand-a) 40%, transparent); }
.logo-mark svg { width: 21px; height: 21px; fill: #fff; }
.appbar-title { font-size: 18px; font-weight: 700; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--text); position: relative; overflow: hidden; transition: background .2s; }
.icon-btn:hover { background: var(--surface-2); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 16px; }

/* Bottom nav (mobile) / Rail (desktop) */
.nav {
  position: fixed; z-index: 45; inset-inline: 0; bottom: 0;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; align-items: center; padding-inline: 6px;
}
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); font-weight: 500; padding: 8px 2px; max-width: 120px; }
.nav a .pill { width: 62px; height: 32px; border-radius: 16px; display: grid; place-items: center; transition: background .25s, color .25s, width .25s; }
.nav a.active { color: var(--text); font-weight: 700; }
.nav a.active .pill { background: var(--tonal); color: var(--tonal-text); }
.nav a.cta .pill { background: var(--grad); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand-a) 38%, transparent); }
@media (min-width: 900px) {
  .shell.has-nav { padding-bottom: 40px; padding-right: var(--rail-w); }
  .nav { inset: 64px 0 0 auto; width: var(--rail-w); height: auto; flex-direction: column; justify-content: flex-start; gap: 8px; padding: 22px 6px; border-top: 0; border-inline-start: 1px solid var(--line); right: 0; left: auto; }
  .nav a { flex: none; width: 100%; }
}

/* ---------- Cards / surfaces ---------- */
.card { background: var(--surface); border-radius: var(--r-l); padding: 20px; box-shadow: var(--shadow-1); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.card.flat { box-shadow: none; }
.card.tonal { background: var(--tonal); border-color: transparent; }
.card-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack.s { gap: 10px; } .stack.l { gap: 24px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); }
.auto { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
@media (max-width: 720px) { .g3 { grid-template-columns: 1fr; } .g2.keep { grid-template-columns: repeat(2, 1fr); } .g2:not(.keep) { grid-template-columns: 1fr; } }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 20px; }
.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: 26px; }
.page-head p { color: var(--muted); margin-top: 2px; }

/* ---------- Buttons ---------- */
.btn {
  --h: 48px; position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 700; font-size: 15px; white-space: nowrap; user-select: none;
  background: var(--grad); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--brand-a) 32%, transparent);
  transition: transform .15s, box-shadow .2s, filter .2s, background .2s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; box-shadow: none; }
.btn.tonal { background: var(--tonal); color: var(--tonal-text); box-shadow: none; }
.btn.outline { background: transparent; color: var(--text); box-shadow: none; border: 1.5px solid var(--line); }
.btn.outline:hover { background: var(--surface-2); }
.btn.text { background: transparent; color: var(--tonal-text); box-shadow: none; padding-inline: 12px; }
.btn.text:hover { background: var(--tonal); }
.btn.danger { background: var(--bad-bg); color: var(--bad); box-shadow: none; }
.btn.sm { --h: 38px; padding: 0 16px; font-size: 13.5px; }
.btn.lg { --h: 58px; padding: 0 32px; font-size: 17px; }
.btn.block { width: 100%; }
.btn .spin { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ripple-fx { position: absolute; border-radius: 50%; background: currentColor; opacity: .22; transform: scale(0); animation: rip .6s ease-out forwards; pointer-events: none; z-index: -1; }
@keyframes rip { to { transform: scale(1); opacity: 0; } }

/* ---------- Fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--muted); padding-inline: 4px; }
.input, .textarea, .select {
  width: 100%; background: var(--surface-2); border: 2px solid transparent; border-radius: var(--r-m);
  padding: 13px 16px; min-height: 52px; transition: border-color .2s, background .2s; outline: none; color: var(--text);
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.9; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--brand); background: var(--surface); }
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.hint { font-size: 12.5px; color: var(--muted); padding-inline: 4px; }
.err-text { color: var(--bad); font-size: 13px; }
.alert { padding: 13px 16px; border-radius: var(--r-m); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }

.switch { position: relative; display: inline-block; width: 54px; height: 32px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch i { position: absolute; inset: 0; background: var(--surface-3); border-radius: 20px; transition: background .25s; }
.switch i::after { content: ""; position: absolute; top: 4px; inset-inline-start: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: inset-inline-start .25s cubic-bezier(.3,1.4,.5,1); }
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { inset-inline-start: 26px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 6px 4px; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 8px; background: var(--surface-3); outline: none; direction: ltr; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); border: 4px solid var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,.3); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--brand); border: 4px solid var(--surface); cursor: pointer; }

.swatches { display: flex; gap: 12px; flex-wrap: wrap; }
.swatch { position: relative; width: 46px; height: 46px; }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 2; width: 100%; height: 100%; }
.swatch span { position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: inset 0 0 0 3px var(--surface); transition: transform .2s, box-shadow .2s; }
.swatch input:checked + span { box-shadow: inset 0 0 0 3px var(--surface), 0 0 0 3px var(--a); transform: scale(1.08); }

/* ---------- Chips / badges / segmented ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; font-weight: 600; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.badge.live { background: var(--bad-bg); color: var(--bad); }
.badge.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
.badge.draft { background: var(--surface-2); color: var(--muted); }
.badge.done { background: var(--ok-bg); color: var(--ok); }
.badge.pro { background: var(--grad); color: #fff; }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.seg { display: flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px 16px; border-radius: 999px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.seg .cnt { background: var(--tonal); color: var(--tonal-text); border-radius: 10px; padding: 0 8px; font-size: 12px; line-height: 20px; }

/* ---------- Draw cards ---------- */
.draw-card { display: flex; flex-direction: column; gap: 14px; transition: transform .2s, box-shadow .2s; position: relative; }
.draw-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.draw-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.draw-card h3 { font-size: 17px; }
.draw-card .meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.draw-card .meta span { display: inline-flex; align-items: center; gap: 5px; }
.draw-card .cover { position: absolute; inset-inline: 0; top: 0; height: 6px; border-radius: var(--r-l) var(--r-l) 0 0; background: linear-gradient(90deg, var(--a), var(--b)); }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-1); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.stat b { font-size: 28px; line-height: 1.3; }
.stat span { color: var(--muted); font-size: 13px; }
.pro-card { background: var(--grad); color: #fff; border: 0; position: relative; overflow: hidden; }
.pro-card::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.14); inset-inline-end: -60px; top: -80px; }
.pro-card .btn { background: #fff; color: #3a2bb5; box-shadow: none; }

.empty { text-align: center; padding: 46px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); }
.empty .art { width: 84px; height: 84px; border-radius: 28px; background: var(--tonal); color: var(--tonal-text); display: grid; place-items: center; }
.empty .art svg { width: 40px; height: 40px; }
.empty h3 { color: var(--text); font-size: 18px; }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.li:last-child { border-bottom: 0; }
.li .lead { width: 42px; height: 42px; border-radius: 14px; background: var(--tonal); color: var(--tonal-text); display: grid; place-items: center; font-weight: 800; flex: none; font-size: 14px; }
.li .lead.win { background: var(--grad); color: #fff; }
.li .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .s { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li.won .t { color: var(--ok); }
.search { position: relative; }
.search .ico { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-inline-start: 46px; border-radius: 999px; }

/* ---------- Sheet / modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(10,8,25,.55); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .25s; backdrop-filter: blur(3px); }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 90; inset-inline: 0; bottom: 0; margin-inline: auto; max-width: 560px; background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 12px 22px calc(24px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .38s cubic-bezier(.2,.9,.25,1); max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-2); }
.sheet.on { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 0 auto 16px; }
.sheet h3 { font-size: 19px; margin-bottom: 14px; }
@media (min-width: 720px) {
  .sheet { inset-block: 0; margin: auto; height: fit-content; bottom: auto; border-radius: var(--r-xl); transform: translateY(30px) scale(.97); opacity: 0; pointer-events: none; padding-bottom: 24px; }
  .sheet.on { transform: none; opacity: 1; pointer-events: auto; }
  .sheet .grab { display: none; }
}

/* ---------- Toast ---------- */
.toasts { position: fixed; z-index: 120; inset-inline: 0; bottom: calc(var(--nav-h) + 16px); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding-inline: 16px; }
@media (min-width: 900px) { .toasts { bottom: 24px; } }
.toast { background: #25213F; color: #fff; padding: 12px 18px; border-radius: 16px; box-shadow: var(--shadow-2); font-size: 14px; display: flex; gap: 10px; align-items: center; animation: toastIn .35s cubic-bezier(.2,.9,.3,1.2) both; max-width: 460px; }
.toast.ok .ico { color: #5CE6B8; } .toast.bad .ico { color: #FF8CA1; }
.toast.out { animation: toastOut .25s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.95); } }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; }
.auth::before, .auth::after { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .45; z-index: 0; }
.auth::before { width: 420px; height: 420px; background: var(--brand-a); top: -140px; inset-inline-start: -120px; }
.auth::after { width: 360px; height: 360px; background: var(--brand-b); bottom: -120px; inset-inline-end: -100px; }
.auth-card { position: relative; z-index: 1; width: 100%; max-width: 440px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(20px); border-radius: var(--r-xl); padding: 32px 26px; box-shadow: var(--shadow-2); border: 1px solid var(--line); }
.auth-card h1 { font-size: 24px; margin: 18px 0 4px; }

/* ---------- Landing ---------- */
.hero { padding: 40px 0 30px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.35; letter-spacing: -.5px; font-weight: 800; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--muted); margin: 16px 0 26px; max-width: 520px; }
.phone { width: min(310px, 82vw); margin-inline: auto; aspect-ratio: 9/18.2; border-radius: 44px; background: #0f0d1c; padding: 10px; box-shadow: 0 40px 80px -20px color-mix(in srgb, var(--brand-a) 55%, transparent), 0 0 0 2px #2a2644 inset; position: relative; }
.phone-screen { width: 100%; height: 100%; border-radius: 35px; background: linear-gradient(170deg, #1d1745, #0e0c1e); overflow: hidden; display: flex; flex-direction: column; padding: 22px 16px; gap: 12px; color: #fff; position: relative; }
.phone-screen .notch { width: 84px; height: 22px; background: #0f0d1c; border-radius: 0 0 14px 14px; position: absolute; top: 0; left: 50%; transform: translateX(-50%); }
.mini-reel { margin-top: 12px; border-radius: 26px; padding: 22px 12px; text-align: center; background: var(--grad); position: relative; overflow: hidden; height: 190px; }
.mini-reel .track { position: absolute; inset-inline: 0; top: 0; animation: reelScroll 5s cubic-bezier(.45,.05,.2,1) infinite; }
.mini-reel .track div { height: 62px; line-height: 62px; font-size: 24px; font-weight: 800; opacity: .55; }
.mini-reel::before { content: ""; position: absolute; inset-inline: 10px; top: 64px; height: 62px; border-radius: 16px; background: rgba(255,255,255,.2); box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.mini-reel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(40,20,100,.55), transparent 35%, transparent 65%, rgba(40,20,100,.55)); }
@keyframes reelScroll { 0% { transform: translateY(0); } 70%, 100% { transform: translateY(-494px); } }
.phone .mrow { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.08); border-radius: 16px; padding: 10px 12px; font-size: 13px; }
.phone .mrow b { width: 28px; height: 28px; border-radius: 9px; background: var(--grad); display: grid; place-items: center; font-size: 12px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; text-align: center; padding-top: 18px; } .hero p.lead { margin-inline: auto; } .hero .row { justify-content: center; } }
.feature { display: flex; flex-direction: column; gap: 10px; }
.feature .ic { width: 52px; height: 52px; border-radius: 18px; background: var(--tonal); color: var(--tonal-text); display: grid; place-items: center; }
.feature h3 { font-size: 17px; }
.feature p { color: var(--muted); font-size: 14px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step .n { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; flex: none; }
.plan { display: flex; flex-direction: column; gap: 14px; position: relative; }
.plan.best { outline: 3px solid var(--brand); }
.plan .price { font-size: 30px; font-weight: 800; }
.plan .price small { font-size: 13px; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.plan li { display: flex; gap: 8px; align-items: flex-start; }
.plan li .ico { color: var(--ok); width: 20px; height: 20px; margin-top: 4px; }
.plan .ribbon { position: absolute; top: -13px; inset-inline-start: 20px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 4px; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--muted); margin-top: 8px; }
.footer { padding: 30px 0 50px; color: var(--muted); font-size: 13.5px; text-align: center; }

/* ==========================================================
   صحنه‌ی قرعه‌کشی
   ========================================================== */
.stage {
  position: relative; overflow: hidden; border-radius: var(--r-xl); color: #fff; text-align: center;
  background: linear-gradient(160deg, color-mix(in srgb, var(--brand-a) 85%, #120d35), color-mix(in srgb, var(--brand-b) 70%, #1a0f45));
  padding: 26px 18px 30px; min-height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  box-shadow: 0 24px 60px -18px color-mix(in srgb, var(--brand-a) 70%, transparent);
  isolation: isolate;
}
.stage::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.28), transparent 38%),
    radial-gradient(circle at 85% 80%, rgba(255,255,255,.18), transparent 40%); }
.stage .rays { position: absolute; inset: -50%; z-index: -1; opacity: 0; transition: opacity .6s;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.14) 0 8deg, transparent 8deg 22deg); animation: rot 22s linear infinite; }
.stage.celebrate .rays { opacity: 1; }
@keyframes rot { to { transform: rotate(360deg); } }
.stage-label { font-size: 15px; font-weight: 700; padding: 6px 18px; background: rgba(255,255,255,.18); border-radius: 999px; backdrop-filter: blur(6px); max-width: 100%; }
.reel { position: relative; width: 100%; max-width: 560px; height: 168px; border-radius: 28px; background: rgba(8,5,30,.32); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.reel::before, .reel::after { content: ""; position: absolute; inset-inline: 0; height: 50px; z-index: 2; pointer-events: none; }
.reel::before { top: 0; background: linear-gradient(180deg, rgba(10,6,40,.55), transparent); }
.reel::after { bottom: 0; background: linear-gradient(0deg, rgba(10,6,40,.55), transparent); }
.reel .r { width: 100%; padding-inline: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.reel .r.a, .reel .r.c { font-size: 19px; opacity: .38; height: 34px; }
.reel .r.b { font-size: clamp(30px, 6.4vw, 48px); font-weight: 800; height: 74px; line-height: 74px; text-shadow: 0 4px 22px rgba(0,0,0,.35); }
.reel.tick .r.b { animation: tick .09s ease-out; }
@keyframes tick { from { transform: translateY(-14px); opacity: .5; } to { transform: none; opacity: 1; } }
.reel.won { background: rgba(255,255,255,.2); box-shadow: inset 0 0 0 3px rgba(255,255,255,.9), 0 0 60px rgba(255,255,255,.45); }
.reel.won .r.a, .reel.won .r.c { opacity: 0; }
.reel.won .r.b { animation: pop .8s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
.countdown { position: absolute; inset: 0; z-index: 5; display: none; place-items: center; background: rgba(12,7,45,.72); backdrop-filter: blur(6px); font-size: 120px; font-weight: 800; }
.countdown.on { display: grid; }
.countdown span { animation: cd 1s ease-out both; text-shadow: 0 0 60px rgba(255,255,255,.7); }
@keyframes cd { 0% { transform: scale(2.2); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(.85); opacity: .15; } }
.stage-sub { min-height: 26px; font-size: 14.5px; opacity: .92; }
.stage-sub b { background: rgba(255,255,255,.22); padding: 2px 12px; border-radius: 999px; }
.progress { width: min(360px, 80%); height: 6px; border-radius: 4px; background: rgba(255,255,255,.2); overflow: hidden; opacity: 0; transition: opacity .3s; }
.progress.on { opacity: 1; }
.progress i { display: block; height: 100%; width: 0; background: #fff; border-radius: 4px; }
.stage .snd { position: absolute; top: 14px; inset-inline-end: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(6px); }
.stage .snd:hover { background: rgba(255,255,255,.3); }
.stage .snd.off .on-i, .stage .snd:not(.off) .off-i { display: none; }
.stage .tag { position: absolute; top: 18px; inset-inline-start: 16px; }

.winners .li .lead { width: 46px; height: 46px; font-size: 17px; }
.winner-in { animation: slideIn .6s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-24px) scale(.96); background: var(--tonal); } to { opacity: 1; transform: none; } }
.pub-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pub-title h1 { font-size: clamp(22px, 4vw, 32px); }
.link-box { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: var(--r-m); padding: 6px 6px 6px 14px; }
.link-box .url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: left; font-size: 13.5px; color: var(--muted); }
.ctrl { display: flex; gap: 10px; flex-wrap: wrap; }
.ctrl .btn.lg { flex: 1 1 260px; }
.lockbox { display: flex; gap: 14px; align-items: center; }
.lockbox .art { width: 56px; height: 56px; border-radius: 18px; background: var(--warn-bg); color: var(--warn); display: grid; place-items: center; flex: none; }

/* ---------- Table (admin) ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-m); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.t th { text-align: start; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 10px 12px; background: var(--surface-2); }
.t th:first-child { border-radius: 0 var(--r-s) var(--r-s) 0; } .t th:last-child { border-radius: var(--r-s) 0 0 var(--r-s); }
.t td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print { .nav, .appbar, .btn, .toasts { display: none !important; } }
