/* موبایل‌بازی — استایل سایت. موبایل‌فرست، راست‌به‌چپ، دو تم: شب‌آبی و روشن.
   تم با data-theme روی <html> عوض می‌شود؛ انتخاب کاربر در localStorage می‌ماند. */
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2'); }

:root, :root[data-theme="dark"] {
  --bg: #161c3d;
  --bg-2: #1d2450;
  --card: #232c60;
  --card-2: #2b3573;
  --line: #3b4691;
  --line-2: #4c58ad;
  --tx: #f2f5ff;
  --tx-2: #cdd5f7;
  --dim: #a3addb;
  --cyan: #2ee0f2;
  --violet: #b57bff;
  --coral: #ff8fa3;
  --amber: #ffcb45;
  --ok: #46e2a8;
  --on-accent: #0b1030;
  --soft: rgba(255, 255, 255, .07);
  --soft-2: rgba(255, 255, 255, .12);
  --hdr: rgba(22, 28, 61, .78);
  --hdr-on: rgba(22, 28, 61, .94);
  --footer: rgba(13, 17, 44, .5);
  --card-fade: rgba(35, 44, 96, .92);
  --page:
    radial-gradient(1100px 600px at 88% -6%, rgba(181, 123, 255, .34), transparent 62%),
    radial-gradient(820px 520px at 6% 2%, rgba(46, 224, 242, .24), transparent 60%),
    linear-gradient(180deg, #202a5e 0%, #1a2149 34%, #161c3d 100%);
  --shadow: 0 12px 32px -14px rgba(8, 10, 30, .75);
  --glow-c: rgba(46, 224, 242, .8);
  --glow-v: rgba(181, 123, 255, .8);
  --r: 20px;
  --r-s: 12px;
  --hdr-h: 80px;   /* ارتفاع هدر چسبان؛ لنگرها این‌قدر پایین‌تر می‌ایستند */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f3f5ff;
  --bg-2: #ffffff;
  --card: #ffffff;
  --card-2: #eef1ff;
  --line: #dde2f6;
  --line-2: #b9c2ea;
  --tx: #131936;
  --tx-2: #3b4467;
  --dim: #6b7499;
  --cyan: #0e8fa8;
  --violet: #7c3aed;
  --coral: #dc2657;
  --amber: #b45309;
  --ok: #05875c;
  --on-accent: #ffffff;
  --soft: rgba(19, 25, 54, .05);
  --soft-2: rgba(19, 25, 54, .1);
  --hdr: rgba(255, 255, 255, .82);
  --hdr-on: rgba(255, 255, 255, .96);
  --footer: rgba(238, 241, 255, .7);
  --card-fade: rgba(255, 255, 255, .92);
  --page:
    radial-gradient(1000px 560px at 88% -8%, rgba(124, 58, 237, .16), transparent 62%),
    radial-gradient(760px 480px at 4% 0%, rgba(14, 143, 168, .16), transparent 60%),
    linear-gradient(180deg, #eaefff 0%, #f3f5ff 40%, #f7f8ff 100%);
  --shadow: 0 12px 30px -16px rgba(19, 25, 54, .3);
  --glow-c: rgba(14, 143, 168, .45);
  --glow-v: rgba(124, 58, 237, .45);
  color-scheme: light;
}

* { box-sizing: border-box; }
/* بدون این، هر عنصری که display خودش را دارد (مثل .card که flex است) با hidden هم پنهان نمی‌شود
   و فیلترها «کار نمی‌کنند»: کارت‌ها hidden می‌شوند ولی روی صفحه می‌مانند. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: var(--hdr-h); }
body {
  margin: 0; color: var(--tx);
  font-family: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif; font-size: 16px; line-height: 1.8;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
  background: var(--bg); background-image: var(--page); background-repeat: no-repeat;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.5; }
p { margin: 0; }
ol, ul, dl, dd { margin: 0; padding: 0; }
.wrap { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 640px) { .wrap { padding-inline: 24px; } }
.ic { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; vertical-align: -.2em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; top: -60px; inset-inline-start: 12px; background: var(--cyan); color: var(--on-accent); padding: 8px 14px; border-radius: 10px; z-index: 1000; font-weight: 700; }
.skip:focus { top: calc(10px + var(--sat)); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.dom { direction: ltr; unicode-bidi: isolate; color: var(--cyan); font-weight: 700; }

/* ---------- هدر ---------- */
.hdr {
  position: sticky; top: 0; z-index: 50; padding-top: var(--sat);
  background: var(--hdr); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .2s, background .2s;
}
.hdr.scrolled { border-bottom-color: var(--line); background: var(--hdr-on); }
.hdr .wrap { display: flex; align-items: center; gap: 8px; min-height: 62px; }
.burger, .theme-btn {
  width: 44px; height: 44px; flex: none; border-radius: 13px; border: 1px solid var(--line);
  background: var(--soft); color: var(--tx); display: grid; place-items: center;
}
.burger .ic, .theme-btn .ic { width: 22px; height: 22px; }
.burger:active, .theme-btn:active { transform: scale(.94); }
.burger:hover, .theme-btn:hover { background: var(--soft-2); }
@media (min-width: 900px) { #menu-open { display: none; } }
.theme-btn .moon { display: none; }
:root[data-theme="light"] .theme-btn .moon { display: block; }
:root[data-theme="light"] .theme-btn .sun { display: none; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.brand img { height: 40px; width: auto; }
.nav { display: none; gap: 2px; margin-inline-start: 6px; }
.nav a { padding: 8px 11px; border-radius: 10px; color: var(--tx-2); min-height: 44px; display: inline-flex; align-items: center; font-size: .92rem; }
.nav a:hover { color: var(--tx); background: var(--soft-2); }
@media (min-width: 900px) { .nav { display: flex; } }
.hdr-tools { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 14px; border: 0; font-weight: 700; white-space: nowrap;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn-p { background: linear-gradient(135deg, var(--cyan), var(--violet)); color: var(--on-accent); box-shadow: 0 8px 24px -10px var(--glow-c); }
.btn-p:hover { box-shadow: 0 10px 28px -8px var(--glow-v); }
.btn-g { background: var(--soft); border: 1px solid var(--line); color: var(--tx); }
.btn-g:hover { background: var(--soft-2); }
.btn-xl { min-height: 54px; font-size: 1.05rem; padding: 0 26px; border-radius: 16px; }
.hdr .hdr-cta { min-height: 42px; padding-inline: 16px; }
@media (max-width: 380px) { .hdr .hdr-cta .lbl { display: none; } .hdr .hdr-cta { padding-inline: 13px; } }

/* ---------- منوی کشویی موبایل ---------- */
.drawer-host { position: fixed; inset: 0; z-index: 80; overflow: hidden; pointer-events: none; }
.drawer-bg, .drawer { pointer-events: auto; }
.drawer-bg { position: absolute; inset: 0; background: rgba(8, 11, 30, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; transition: opacity .22s; }
.drawer-bg.show { opacity: 1; }
.drawer {
  position: absolute; z-index: 90; top: 0; bottom: 0; inset-inline-start: 0; width: min(86vw, 330px);
  background: var(--bg-2); border-inline-end: 1px solid var(--line); box-shadow: 8px 0 40px -14px rgba(0, 0, 0, .5);
  padding: calc(14px + var(--sat)) 14px calc(14px + var(--sab)); overflow-y: auto;
  transform: translateX(102%); transition: transform .26s cubic-bezier(.3, .8, .3, 1); visibility: hidden;
}
.drawer.open { transform: translateX(0); visibility: visible; }
.drawer-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.drawer-h img { height: 40px; width: auto; }
.drawer-nav, .drawer-cats { display: flex; flex-direction: column; gap: 4px; }
.drawer-nav a, .drawer-cats a {
  display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 0 12px; border-radius: 13px;
  color: var(--tx-2); font-size: .96rem; transition: background .15s, color .15s;
}
.drawer-nav a .ic, .drawer-cats a .ic { width: 20px; height: 20px; color: var(--cyan); }
.drawer-cats a .ic { color: var(--violet); }
.drawer-nav a:hover, .drawer-cats a:hover, .drawer-nav a:focus-visible, .drawer-cats a:focus-visible { background: var(--soft-2); color: var(--tx); }
.drawer-cats a b { margin-inline-start: auto; font-weight: 400; font-size: .76rem; color: var(--dim); background: var(--soft); border-radius: 999px; padding: 1px 9px; }
.drawer-t { color: var(--dim); font-size: .78rem; margin: 16px 0 6px; padding-inline: 12px; }
.drawer-f { margin-top: 18px; padding: 12px; border-top: 1px solid var(--line); color: var(--dim); font-size: .78rem; }
body.menu-open { overflow: hidden; }

/* ---------- هیرو ---------- */
.hero { padding-block: 26px 6px; display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.1fr .9fr; padding-block: 52px 26px; gap: 36px; } }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--cyan); background: color-mix(in srgb, var(--cyan) 12%, transparent); border: 1px solid color-mix(in srgb, var(--cyan) 35%, transparent); border-radius: 999px; padding: 4px 12px; margin-bottom: 14px; }
.kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); }
.hero h1 { font-size: clamp(1.7rem, 5.6vw, 2.9rem); line-height: 1.45; font-weight: 700; }
.hero h1 em { font-style: normal; background: linear-gradient(135deg, var(--cyan), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: var(--tx-2); font-size: clamp(.95rem, 2.4vw, 1.08rem); margin-top: 12px; max-width: 34rem; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.cta .btn { flex: 1 1 auto; min-height: 52px; font-size: 1rem; }
@media (min-width: 480px) { .cta .btn { flex: 0 0 auto; } }
.stats { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 20px; color: var(--dim); font-size: .85rem; }
.stats b { color: var(--tx); font-size: 1.1rem; margin-inline-end: 5px; }

.art { position: relative; display: grid; place-items: center; min-height: 208px; padding: 12px 0; }
@media (min-width: 900px) { .art { min-height: 300px; } }
.art .orb {
  position: absolute; width: min(74vw, 300px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--cyan) 34%, transparent), color-mix(in srgb, var(--violet) 22%, transparent) 62%, transparent);
  filter: blur(6px);
}
@media (min-width: 900px) { .art .orb { width: 340px; } }
.hero-logo { position: relative; width: min(62vw, 250px); height: auto; filter: drop-shadow(0 16px 30px rgba(8, 10, 30, .35)); animation: fl 7s ease-in-out infinite; }
@media (min-width: 900px) { .hero-logo { width: 280px; } }
.pill {
  position: absolute; display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 12px;
  box-shadow: var(--shadow); white-space: nowrap;
}
.pill .ic { width: 15px; height: 15px; }
.pill.p1 { top: 4%; inset-inline-start: 2%; color: var(--violet); animation: fl 6s ease-in-out infinite .2s; }
.pill.p2 { top: 20%; inset-inline-end: 0; color: var(--coral); animation: fl 7.5s ease-in-out infinite .9s; }
.pill.p3 { bottom: 16%; inset-inline-start: 0; color: var(--ok); animation: fl 8s ease-in-out infinite 1.4s; }
.pill.p4 { bottom: 2%; inset-inline-end: 4%; color: var(--amber); animation: fl 6.8s ease-in-out infinite .6s; }
@keyframes fl { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }

/* ---------- عنوان بخش‌ها ---------- */
.sec { padding-block: 26px 8px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sec-h h2 { font-size: clamp(1.15rem, 3vw, 1.5rem); font-weight: 700; }
.sec-h .sub { color: var(--dim); font-size: .85rem; }
a.sub:hover { color: var(--cyan); }

/* ---------- بازی‌های دورهمی (اسکرول افقی) ---------- */
.scroller { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 0 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scroller::-webkit-scrollbar { display: none; }
.fcard {
  position: relative; flex: 0 0 84%; max-width: 380px; aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden;
  scroll-snap-align: start; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow);
  transition: transform .2s, border-color .2s;
}
@media (min-width: 640px) { .fcard { flex-basis: calc(50% - 6px); } }
@media (min-width: 1024px) { .fcard { flex-basis: calc(33.333% - 8px); } }
.fcard:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.fcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fcard::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(12, 16, 42, .96) 2%, rgba(12, 16, 42, .62) 48%, transparent 82%); }
.ftxt { position: absolute; inset-inline: 0; bottom: 0; padding: 14px 16px; z-index: 2; color: #f2f5ff; }
.fk { font-size: .72rem; color: #67e8f9; margin-bottom: 2px; }
.ftxt h3 { font-size: 1.15rem; }
.ftxt p { font-size: .8rem; color: #d8ddf5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fplay { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; background: linear-gradient(135deg, var(--cyan), var(--violet)); color: var(--on-accent); font-weight: 700; font-size: .85rem; padding: 0 16px; border-radius: 999px; min-height: 40px; }
/* Real game previews contain interface text; keep the card copy below the image. */
.fcard.has-preview { aspect-ratio: auto; display: flex; flex-direction: column; }
.fcard.has-preview img { position: static; display: block; aspect-ratio: 1; height: auto; object-fit: contain; }
.fcard.has-preview::after { display: none; }
.fcard.has-preview .ftxt { position: static; flex: 1; background: #0c102a; }
.fsoon {
  flex: 1 1 100%; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 24px 18px; border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--card);
}
.fsoon .ic { width: 40px; height: 40px; color: var(--violet); }
.fsoon b { font-size: 1.05rem; }
.fsoon p { color: var(--tx-2); font-size: .88rem; max-width: 40rem; }
.fsoon .btn { margin-top: 10px; }

/* ---------- دسته‌بندی‌ها ---------- */
.cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .cats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; } }
.cat {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center;
  min-height: 104px; padding: 12px 8px; border-radius: 16px; background: var(--card); border: 1px solid var(--line);
  transition: transform .18s, border-color .18s, background .18s;
}
.cat:hover { transform: translateY(-3px); border-color: var(--cyan); background: var(--card-2); }
.cat .cico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--cyan) 14%, transparent); color: var(--cyan); margin-bottom: 4px; }
.cat:nth-child(2n) .cico { background: color-mix(in srgb, var(--violet) 16%, transparent); color: var(--violet); }
.cat:nth-child(3n) .cico { background: color-mix(in srgb, var(--coral) 16%, transparent); color: var(--coral); }
.cat .cico .ic { width: 22px; height: 22px; }
.cat b { font-size: .9rem; }
.cat small { color: var(--dim); font-size: .74rem; }

/* ---------- فیلترها ---------- */
.filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 6px 0 16px; }
.search { position: relative; }
.search input {
  width: 100%; min-height: 52px; border-radius: 15px; background: var(--card); border: 1px solid var(--line);
  color: var(--tx); padding: 0 46px 0 46px; font: inherit; font-size: 1rem; outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--dim); }
.search input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 18%, transparent); }
.search .ic-s { position: absolute; inset-inline-start: 15px; top: 50%; translate: 0 -50%; color: var(--dim); pointer-events: none; }
.search .x { position: absolute; inset-inline-end: 7px; top: 50%; translate: 0 -50%; width: 40px; height: 40px; border-radius: 11px; border: 0; background: transparent; color: var(--dim); display: grid; place-items: center; }
.search .x:hover { background: var(--soft-2); color: var(--tx); }
.frow { display: flex; align-items: center; gap: 8px; }
.chips { min-width: 0; width: 100%; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; -webkit-overflow-scrolling: touch; flex: 1; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--tx-2); white-space: nowrap; font-size: .86rem;
  transition: background .15s, border-color .15s, color .15s;
}
.chip b { font-weight: 400; font-size: .72rem; color: var(--dim); background: var(--soft); border-radius: 999px; padding: 0 7px; line-height: 1.6; }
.chip:hover { border-color: var(--line-2); color: var(--tx); background: var(--card-2); }
.chip.on { background: color-mix(in srgb, var(--cyan) 16%, transparent); border-color: var(--cyan); color: var(--cyan); }
.chip.on b { color: var(--cyan); background: color-mix(in srgb, var(--cyan) 18%, transparent); }
/* گزینه‌ای که با فیلترهای فعلی هیچ نتیجه‌ای ندارد: خاموش و غیرقابل کلیک */
.chip[disabled] { opacity: .38; cursor: not-allowed; }
.chip[disabled]:hover { border-color: var(--line); color: var(--tx-2); background: var(--card); }
.seg .chip[disabled]:hover { background: transparent; }
.seg .chips { gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 15px; padding: 4px; }
.seg .chip { flex: 1 1 0; justify-content: center; border: 0; background: transparent; min-height: 42px; padding: 0 12px; }
.seg .chip.on { background: linear-gradient(135deg, var(--cyan), var(--violet)); color: var(--on-accent); font-weight: 700; }
.meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.meta .tools { display: flex; align-items: center; gap: 8px; }
.meta select { min-height: 42px; border-radius: 11px; background: var(--card); border: 1px solid var(--line); color: var(--tx); padding: 0 10px; font: inherit; font-size: .85rem; }
.link-btn { background: none; border: 0; color: var(--coral); font-size: .85rem; padding: 6px 8px; min-height: 42px; }

/* ---------- کارت بازی ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s; min-width: 0;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 70%, var(--line)); box-shadow: 0 18px 36px -16px color-mix(in srgb, var(--accent) 55%, transparent); }
.cover { position: relative; display: block; aspect-ratio: 1; background: var(--card-2); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .cover img { transform: scale(1.06); }
.cover::after { display: none; }
.qplay {
  position: absolute; z-index: 2; inset-inline-end: 8px; bottom: 8px; width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--violet)); color: var(--on-accent); display: grid; place-items: center;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .5); opacity: 0; translate: 0 6px; transition: opacity .2s, translate .2s;
}
.qplay .ic { width: 18px; height: 18px; }
.card:hover .qplay { opacity: 1; translate: 0 0; }
.badge { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 2; font-size: .7rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.badge.new { background: color-mix(in srgb, var(--ok) 20%, var(--card)); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent); }
.badge.wip { background: color-mix(in srgb, var(--amber) 18%, var(--card)); color: var(--amber); border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); }
.body { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px 12px; flex: 1; }
@media (min-width: 640px) { .body { padding: 12px 14px 14px; } }
.card h3 { font-size: .98rem; line-height: 1.5; }
@media (min-width: 640px) { .card h3 { font-size: 1.05rem; } }
.alt { color: var(--dim); font-size: .72rem; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desc { color: var(--tx-2); font-size: .8rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
/* ردیف کوتاه مشخصات روی کارت: تعداد نفرات · مدت · سن */
.meta-row { display: flex; flex-wrap: wrap; gap: 4px 10px; list-style: none; margin: 4px 0 0; color: var(--dim); font-size: .7rem; }
.meta-row li { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.meta-row .ic { width: .95em; height: .95em; opacity: .8; }
.meta-row .plays { color: var(--ok); font-weight: 700; }
.tag { font-size: .67rem; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--tx-2); line-height: 1.7; }
.tag.mode { color: var(--cyan); background: color-mix(in srgb, var(--cyan) 13%, transparent); }
.tag.lvl { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.tag.dev { color: var(--violet, #b06cff); background: color-mix(in srgb, var(--violet, #b06cff) 14%, transparent); }
/* بازی‌ای که اتاق زندهٔ چهارحرفی دارد — پررنگ‌تر از بقیه چون نکتهٔ فروش است */
.tag.net { color: var(--amber); background: color-mix(in srgb, var(--amber) 15%, transparent); font-weight: 700; }
.tag.made { color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }

/* ---------- بفرست بازی‌ات را ---------- */
.submit-box {
  margin-top: 16px; padding: 20px; border-radius: var(--r);
  border: 1px dashed var(--line-2); background: var(--card);
  display: grid; gap: 16px;
}
@media (min-width: 900px) { .submit-box { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; align-items: start; } }
.submit-txt h3 { font-size: 1.1rem; margin-bottom: 6px; }
.submit-txt p { color: var(--tx-2); font-size: .88rem; }
.submit-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 560px) { .submit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fld { display: grid; gap: 5px; min-width: 0; }
.fld-wide { grid-column: 1 / -1; }
.fld label { font-size: .8rem; color: var(--tx-2); }
.fld-hint { font-size: .74rem; color: var(--tx-2); opacity: .8; line-height: 1.8; margin-top: 2px; }
.fld .opt { color: var(--dim); font-size: .74rem; }
.fld input, .fld textarea {
  width: 100%; min-height: 46px; border-radius: 12px; background: var(--bg-2);
  border: 1px solid var(--line); color: var(--tx); padding: 10px 12px; font: inherit; font-size: .9rem;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.fld textarea { min-height: 84px; resize: vertical; line-height: 1.7; }
.fld input:focus, .fld textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 18%, transparent); }
/* کادر آپلود آرشیو بازی — فقط zip و rar */
.drop {
  position: relative; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--bg-2);
  min-height: 92px; display: grid; place-items: center; padding: 14px 12px; text-align: center;
  transition: border-color .15s, background .15s;
}
.drop.is-over { border-color: var(--cyan); border-style: solid; background: color-mix(in srgb, var(--cyan) 10%, var(--bg-2)); }
.drop.is-bad { border-color: var(--coral); border-style: solid; }
.drop.has-file { border-style: solid; border-color: var(--ok); }
/* خود input روی کل کادر می‌افتد تا هم کلیک کار کند و هم فوکوس صفحه‌کلید */
.drop-in { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-in:focus-visible + .drop-face { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 8px; }
.drop.has-file .drop-in { pointer-events: none; }
.drop-face { display: grid; gap: 4px; pointer-events: none; }
.drop-face b { font-size: .92rem; }
.drop-face span { font-size: .78rem; color: var(--dim); }
.drop-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; max-width: 100%; }
.drop-name { font-size: .88rem; font-weight: 700; word-break: break-all; min-width: 0; }
.drop-size { font-size: .78rem; color: var(--dim); }
.drop-x {
  border: 1px solid var(--line); background: var(--card); color: var(--tx-2); border-radius: 999px;
  width: 30px; height: 30px; flex: none; cursor: pointer; font-size: .8rem; line-height: 1;
}
.drop-x:hover { color: var(--coral); border-color: var(--coral); }
.drop-bar { position: absolute; inset-inline: 10px; bottom: 8px; height: 5px; border-radius: 999px; background: var(--line); overflow: hidden; }
.drop-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--cyan), var(--violet)); transition: width .2s; }
.submit-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.submit-msg { font-size: .84rem; color: var(--tx-2); min-width: 0; }
.submit-msg.ok { color: var(--ok); }
.submit-msg.bad { color: var(--coral); }
.submit-note { grid-column: 1 / -1; color: var(--dim); font-size: .76rem; }
.acts { margin-top: auto; padding-top: 10px; display: flex; gap: 6px; align-items: stretch; }
.play {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: var(--r-s);
  background: linear-gradient(135deg, var(--cyan), var(--violet)); color: var(--on-accent); font-weight: 700; font-size: .92rem;
  box-shadow: 0 8px 18px -10px var(--glow-c);
}
.more { flex: none; display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 12px; border-radius: var(--r-s); border: 1px solid var(--line); color: var(--tx-2); font-size: .8rem; }
.more:hover { background: var(--soft-2); color: var(--tx); }
.empty { text-align: center; padding: 40px 16px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--dim); }
.empty .ic { width: 42px; height: 42px; color: var(--violet); margin-bottom: 6px; }
.empty p { color: var(--tx-2); margin-bottom: 12px; }

/* ---------- صفحهٔ بازی ---------- */
.crumbs { display: flex; align-items: center; gap: 4px; padding-top: 16px; color: var(--dim); font-size: .8rem; flex-wrap: wrap; }
.crumbs a { padding: 4px 2px; }
.crumbs a:hover { color: var(--cyan); }
.crumbs .ic { width: 14px; height: 14px; opacity: .6; transform: scaleX(-1); }
.ghero { display: grid; gap: 18px; padding-block: 16px 8px; }
@media (min-width: 760px) { .ghero { grid-template-columns: 300px 1fr; gap: 28px; align-items: center; padding-block: 24px 12px; } }
.gcover { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--card); box-shadow: 0 20px 44px -20px color-mix(in srgb, var(--accent) 60%, transparent); max-width: 300px; }
.gcover img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.ginfo .gk { font-size: .8rem; color: var(--cyan); }
.ginfo h1 { font-size: clamp(1.5rem, 5vw, 2.3rem); margin-top: 2px; }
.ginfo .alt { white-space: normal; margin-top: 2px; font-size: .84rem; }
.glead { color: var(--tx-2); margin-top: 12px; font-size: 1rem; }
.ginfo .tags { margin-top: 14px; gap: 6px; }
.ginfo .tag { font-size: .74rem; padding: 3px 11px; }
.gcta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.gnote { color: var(--dim); font-size: .82rem; width: 100%; }
@media (min-width: 480px) { .gnote { width: auto; } }
.gbody { display: grid; gap: 18px; padding-block: 22px 6px; }
@media (min-width: 760px) { .gbody { grid-template-columns: 1fr 300px; gap: 28px; align-items: start; } }
.gmain h2 { font-size: 1.2rem; margin-bottom: 8px; }
.gmain h2 + p { color: var(--tx-2); }
.gmain h2:not(:first-child) { margin-top: 24px; }
.how { list-style: none; counter-reset: s; display: grid; gap: 10px; }
.how li { counter-increment: s; position: relative; padding-inline-start: 42px; color: var(--tx-2); min-height: 32px; }
.how li::before {
  content: counter(s, persian); position: absolute; inset-inline-start: 0; top: 4px; width: 30px; height: 30px; border-radius: 10px;
  background: color-mix(in srgb, var(--cyan) 14%, transparent); color: var(--cyan); display: grid; place-items: center; font-weight: 700; font-size: .9rem;
}
.specs { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.specs h3 { font-size: 1rem; margin-bottom: 8px; }
.specs dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .88rem; }
.specs dt { color: var(--dim); }
.specs dd { color: var(--tx); text-align: start; }
.gfinal { padding-block: 26px 10px; }
.gfinal-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px; border-radius: var(--r);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--card)), var(--card));
  border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line));
}
.gfinal-box img { width: 74px; height: 74px; border-radius: 16px; object-fit: cover; flex: none; }
.gfinal-box > div { flex: 1 1 220px; }
.gfinal-box h2 { font-size: 1.1rem; }
.gfinal-box p { color: var(--tx-2); font-size: .88rem; }
.gfinal-box .btn { flex: 1 1 100%; }
@media (min-width: 640px) { .gfinal-box .btn { flex: 0 0 auto; } }

/* ---------- درباره ---------- */
.about { padding-block: 34px 16px; }
.feats { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 16px; }
@media (min-width: 640px) { .feats { grid-template-columns: repeat(3, 1fr); } }
.feat { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.feat .ico { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--cyan) 14%, transparent); color: var(--cyan); }
.feat:nth-child(2) .ico { background: color-mix(in srgb, var(--violet) 16%, transparent); color: var(--violet); }
.feat:nth-child(3) .ico { background: color-mix(in srgb, var(--coral) 16%, transparent); color: var(--coral); }
.feat .ico .ic { width: 24px; height: 24px; }
.feat h3 { font-size: 1rem; }
.feat p { color: var(--dim); font-size: .85rem; }
.about-txt { color: var(--tx-2); max-width: 46rem; margin-top: 10px; font-size: .95rem; }

/* ---------- فوتر ---------- */
footer { border-top: 1px solid var(--line); margin-top: 32px; padding: 24px 0 calc(24px + var(--sab)); color: var(--dim); font-size: .85rem; background: var(--footer); }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
footer .brand img { height: 34px; }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 6px; }
footer nav a { display: inline-flex; align-items: center; min-height: 42px; padding: 0 10px; border-radius: 9px; }
footer nav a:hover { color: var(--tx); background: var(--soft); }
footer .copy { width: 100%; font-size: .78rem; }

/* ---------- دکمهٔ بالا ---------- */
#totop {
  position: fixed; bottom: calc(16px + var(--sab)); inset-inline-end: 16px; z-index: 60; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--card); color: var(--tx); display: grid; place-items: center;
  opacity: 0; translate: 0 12px; pointer-events: none; transition: opacity .2s, translate .2s; box-shadow: var(--shadow);
}
#totop.show { opacity: 1; translate: 0 0; pointer-events: auto; }

/* ---------- حرکت کمتر ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* Store-style gallery: real media, separate from artistic covers. */
.gallery-track{display:flex;gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;padding:4px 0 16px;scrollbar-width:thin}
.gallery-item{flex:0 0 auto;width:min(250px,72vw);margin:0;scroll-snap-align:start}
.gallery-item img,.gallery-item video{display:block;width:100%;height:440px;object-fit:contain;background:#0b1220;border-radius:16px;border:1px solid var(--line)}
.gallery-item figcaption{font-size:.82rem;color:var(--tx-2);padding:10px 4px;line-height:1.8}
.gallery-image-link{display:block;border-radius:16px}
.gallery-image-link:focus-visible{outline:3px solid var(--cyan);outline-offset:4px}
.gallery-dialog{width:min(96vw,1100px);max-height:94dvh;border:1px solid #ffffff35;border-radius:20px;background:#0b1220;color:white;padding:56px 52px 20px;overflow:auto}
.gallery-dialog::backdrop{background:#000c}
.gallery-dialog figure{margin:0;text-align:center}
.gallery-dialog img{display:block;max-width:100%;max-height:73dvh;width:auto;height:auto;margin:auto;object-fit:contain}
.gallery-dialog figcaption{margin-top:12px;line-height:1.8}
.gallery-dialog button{position:absolute;background:#24344c;color:white;border:0;border-radius:12px;min-width:44px;min-height:44px;cursor:pointer;font-size:24px}
.gallery-close{top:8px;inset-inline-end:8px}.gallery-prev{top:45%;right:4px}.gallery-next{top:45%;left:4px}
@media(max-width:480px){.gallery-item img,.gallery-item video{height:400px}.gallery-dialog{padding:56px 48px 16px}}

/* ---------- نظر بازیکن‌ها ---------- */
.cm { padding-block: 26px 6px; }
.cm-list { list-style: none; display: grid; gap: 12px; }
.cm-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; }
.cm-item:target { outline: 2px solid var(--cyan); outline-offset: 2px; }
.cm-item.is-author { border-color: color-mix(in srgb, var(--cyan) 55%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--cyan) 9%, var(--card)), var(--card)); }
.cm-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.cm-ava { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem;
  background: linear-gradient(135deg, var(--cyan), var(--violet)); color: var(--on-accent); flex: 0 0 auto; }
.cm-name { font-size: .95rem; }
.cm-badge { font-size: .7rem; padding: 2px 8px; border-radius: 999px; background: var(--soft-2); border: 1px solid var(--line-2); color: var(--tx-2); }
.cm-head time { color: var(--dim); font-size: .76rem; margin-inline-start: auto; }
.cm-txt { color: var(--tx-2); font-size: .92rem; line-height: 2; margin-top: 8px; white-space: pre-line; }
.cm-reply { margin-top: 6px; min-height: 34px; padding: 0 10px; border-radius: 9px; border: 1px solid transparent;
  background: none; color: var(--dim); font: inherit; font-size: .8rem; cursor: pointer; }
.cm-reply:hover { color: var(--tx); background: var(--soft); border-color: var(--line); }
.cm-kids { list-style: none; display: grid; gap: 10px; margin-top: 10px; padding-inline-start: 14px;
  border-inline-start: 2px solid var(--line); }
.cm-kids:empty { display: none; }
.cm-kids .cm-item { background: var(--card-2); }
.cm-empty { color: var(--dim); font-size: .9rem; padding: 10px 2px; }

.cm-form { margin-top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.cm-form h3 { font-size: 1rem; margin-bottom: 10px; }
.cm-fields { display: grid; gap: 10px; }
@media (min-width: 640px) { .cm-fields { grid-template-columns: 200px 1fr; align-items: start; } }
.cm-f { display: grid; gap: 6px; font-size: .82rem; color: var(--dim); }
.cm-f input, .cm-f textarea { width: 100%; font: inherit; font-size: .92rem; color: var(--tx); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; min-height: 46px; }
.cm-f textarea { resize: vertical; line-height: 1.9; }
.cm-f input:focus-visible, .cm-f textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.cm-replying { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; font-size: .85rem; color: var(--tx-2); }
.cm-cancel { min-height: 32px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--soft);
  color: var(--tx-2); font: inherit; font-size: .78rem; cursor: pointer; }
.cm-send { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.cm-msg { font-size: .85rem; color: var(--ok); }
.cm-msg.bad { color: var(--coral); }
.cm-note { color: var(--dim); font-size: .78rem; margin-top: 10px; line-height: 1.9; }
.cm-item.is-pending { border-style: dashed; opacity: .82; }
.cm-badge.cm-wait { background: color-mix(in srgb, var(--amber) 18%, transparent); border-color: color-mix(in srgb, var(--amber) 45%, transparent); color: var(--amber); }

.gallery-item.landscape{width:min(660px,84vw)}
.gallery-item.landscape img{height:auto;aspect-ratio:900/506}


/* ---------- بازی ناموجود (پرچم از پنل مدیریت؛ site.js می‌سازد) ---------- */
.off-note { background: color-mix(in srgb, var(--amber) 16%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent);
  color: var(--amber); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: .92rem; font-weight: 700; }
.btn.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; filter: grayscale(.6); }

/* ---------- مجله (بلاگ) ---------- */
/* صفحهٔ مقاله ستون متن باریک دارد: خطِ بلندِ فارسی خوانده نمی‌شود.
   ستون کناری (فهرست مطالب) روی موبایل زیر متن نمی‌آید، بالای آن می‌ماند تا
   خواننده قبل از شروع بداند مقاله چند بخش دارد. */
.a-hero { padding-block: 18px 6px; }
.a-kicker { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--cyan) 14%, transparent); border: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent);
  color: var(--cyan); font-size: .78rem; font-weight: 700; margin-bottom: 10px; }
.a-hero h1 { font-size: clamp(1.4rem, 4.6vw, 2.1rem); font-weight: 700; }
.a-lead { color: var(--tx-2); margin-top: 10px; max-width: 48rem; font-size: 1rem; }
.a-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; color: var(--dim); font-size: .82rem; }
.a-meta li { display: inline-flex; align-items: center; gap: 5px; }

.a-body { display: grid; gap: 20px; padding-block: 20px 6px; }
@media (min-width: 900px) { .a-body { grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; } }
.a-main { min-width: 0; max-width: 46rem; }
.a-main h2 { font-size: clamp(1.15rem, 3.2vw, 1.4rem); margin-top: 30px; margin-bottom: 10px; scroll-margin-top: var(--hdr-h); }
.a-main > h2:first-child { margin-top: 4px; }
.a-main h3 { font-size: 1.02rem; margin-top: 20px; margin-bottom: 6px; color: var(--tx); }
.a-main p { color: var(--tx-2); margin-bottom: 12px; }
.a-main a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.a-main a:hover { color: var(--violet); }
.a-main b { color: var(--tx); }
.a-main code { background: var(--soft-2); border-radius: 6px; padding: 1px 6px; font-size: .9em; }
.a-list, .a-steps { display: grid; gap: 8px; margin-bottom: 14px; color: var(--tx-2); }
.a-list { list-style: none; }
.a-list li { position: relative; padding-inline-start: 20px; }
.a-list li::before { content: ''; position: absolute; inset-inline-start: 4px; top: .78em; width: 7px; height: 7px;
  border-radius: 50%; background: var(--cyan); }
.a-steps { list-style: decimal; padding-inline-start: 22px; }
.a-steps li { padding-inline-start: 4px; }
.a-note { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--r-s); color: var(--tx-2); font-size: .92rem;
  background: color-mix(in srgb, var(--violet) 12%, var(--card)); border-inline-start: 3px solid var(--violet); }
.a-tablewrap { overflow-x: auto; margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--r-s); }
.a-table { border-collapse: collapse; width: 100%; min-width: 420px; font-size: .88rem; }
.a-table th, .a-table td { padding: 9px 12px; text-align: start; border-bottom: 1px solid var(--line); }
.a-table th { background: var(--card-2); color: var(--tx); font-weight: 700; }
.a-table td { color: var(--tx-2); }
.a-table tr:last-child td { border-bottom: 0; }

.a-toc, .a-more { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.a-more { margin-top: 14px; }
.a-toc h3, .a-more h3 { font-size: .95rem; margin-bottom: 8px; }
.a-toc ol { list-style: none; counter-reset: t; display: grid; gap: 2px; font-size: .86rem; }
.a-toc li { counter-increment: t; }
.a-toc a { display: block; padding: 5px 0; color: var(--tx-2); }
.a-toc a::before { content: counter(t) '. '; color: var(--dim); }
.a-toc a:hover { color: var(--cyan); }
.a-more a { display: block; padding: 7px 0; font-size: .86rem; color: var(--tx-2); border-bottom: 1px solid var(--line); }
.a-more a:last-child { border-bottom: 0; }
.a-more a:hover { color: var(--cyan); }
@media (min-width: 900px) { .a-side { position: sticky; top: calc(var(--hdr-h) + 8px); } }

/* جعبهٔ «بازی‌های مرتبط» ته هر مقاله — همان کارت‌های سایت، فقط فشرده‌تر */
.a-games { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.a-games h2 { margin-top: 0; }
.a-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.a-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 4px 14px 4px 4px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); color: var(--tx); font-size: .88rem; text-decoration: none !important; }
.a-chip:hover { border-color: var(--line-2); background: var(--card-2); color: var(--tx) !important; }
.a-chip img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }

/* فهرست مقاله‌ها */
.a-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .a-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .a-grid { grid-template-columns: repeat(3, 1fr); } }
.a-card { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px; transition: border-color .15s, translate .15s; }
.a-card:hover { border-color: var(--line-2); translate: 0 -2px; }
.a-card .a-kicker { margin-bottom: 2px; }
.a-card h3 { font-size: 1.02rem; }
.a-card p { color: var(--dim); font-size: .86rem; flex: 1; }
.a-card .a-cmeta { color: var(--dim); font-size: .76rem; display: flex; gap: 12px; flex-wrap: wrap; }

/* ================= صفحهٔ اصلی — ویترین بازی (آرنا) =================
   هدر صفحهٔ اصلی در هر دو تم تیره و «بازی‌گونه» می‌ماند: دیوار کاورها پشت،
   متن و ویترین چرخان جلو. بقیهٔ صفحه از تم انتخابی پیروی می‌کند. */
.arena {
  position: relative; overflow: hidden; isolation: isolate; color: #f2f5ff;
  background: #0b0f2a;
  --tx: #f2f5ff; --tx-2: #d3daf8; --dim: #a9b2dc; --line: #39437f; --soft: rgba(255,255,255,.08); --soft-2: rgba(255,255,255,.14);
  --cyan: #2ee0f2; --violet: #b57bff; --on-accent: #0b1030; --glow-c: rgba(46,224,242,.8); --glow-v: rgba(181,123,255,.8);
}
.mosaic {
  position: absolute; inset: -40px -10%; z-index: -2; display: grid; gap: 10px;
  grid-template-columns: repeat(6, 1fr); transform: rotate(-8deg) scale(1.15); opacity: .38;
  animation: mosaic 60s linear infinite alternate;
}
.mosaic img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 14px; }
@keyframes mosaic { to { transform: rotate(-8deg) scale(1.15) translateY(-12%); } }
.arena::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 500px at 85% 0%, rgba(181,123,255,.35), transparent 60%),
    radial-gradient(700px 480px at 0% 100%, rgba(46,224,242,.22), transparent 60%),
    linear-gradient(180deg, rgba(11,15,42,.82) 0%, rgba(11,15,42,.9) 60%, #0b0f2a 100%);
}
.arena-in { display: grid; gap: 22px; padding-block: 18px 34px; align-items: center; }
@media (min-width: 900px) { .arena-in { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; padding-block: 44px 56px; } }
.arena h1 { font-size: clamp(1.9rem, 6.4vw, 3.3rem); line-height: 1.35; font-weight: 700; letter-spacing: -.01em; }
.arena h1 em { font-style: normal; background: linear-gradient(135deg, #2ee0f2, #b57bff 55%, #ff8fa3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.arena .lead { color: var(--tx-2); font-size: clamp(.95rem, 2.4vw, 1.1rem); margin-top: 12px; max-width: 32rem; }
.arena .btn-g { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; }
.arena .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 22px; max-width: 26rem; padding: 0; list-style: none; }
.arena .stats li { display: flex; flex-direction: column; align-items: center; padding: 9px 4px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.arena .stats b { font-size: 1.25rem; margin: 0; background: linear-gradient(135deg, #2ee0f2, #b57bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.arena .stats span { font-size: .74rem; color: var(--dim); }
@media (max-width: 899px) { .arena .hero-txt { order: 2; } .arena .spots { order: 1; } }

/* ویترین چرخان */
.spots { position: relative; border-radius: 26px; overflow: hidden; aspect-ratio: 4 / 5; background: #141a40;
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.1); }
@media (min-width: 560px) and (max-width: 899px) { .spots { aspect-ratio: 16 / 11; } }
@media (min-width: 900px) { .spots { aspect-ratio: 1 / 1; max-height: 560px; } }
.spot { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; }
.spot.on { opacity: 1; visibility: visible; }
.spot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 6s ease-out; }
.spot.on img { transform: scale(1); }
.spot::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,10,30,.96) 0%, rgba(8,10,30,.7) 32%, transparent 62%); }
.spot-txt { position: absolute; inset: auto 0 0; z-index: 1; padding: 18px 18px 42px; }
@media (min-width: 640px) { .spot-txt { padding: 26px 28px 48px; } }
.spot-k { display: inline-block; font-size: .74rem; font-weight: 700; color: #0b1030; background: var(--accent); border-radius: 999px; padding: 3px 11px; margin-bottom: 8px; }
.spot h2 { font-size: clamp(1.4rem, 4.6vw, 2rem); line-height: 1.4; color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.6); }
.spot p { color: #d6dcf7; font-size: .92rem; margin-top: 4px; max-width: 34rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spot-acts { display: flex; gap: 8px; margin-top: 12px; }
.spot-acts .btn { min-height: 46px; }
.spot-acts .btn-p { background: var(--accent); color: #0b1030; box-shadow: 0 10px 26px -10px var(--accent); }
.sdots { position: absolute; inset: auto 0 8px; z-index: 2; display: flex; justify-content: center; gap: 2px; }
.sdot { width: 28px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.sdot::before { content: ''; width: 8px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.45); transition: width .3s, background .3s; }
.sdot.on::before { width: 24px; background: #fff; }

/* عنوان بخش‌ها و لینک «همه» */
.sec-h .hx { font-size: .95em; margin-inline-end: 2px; }
.more-link { color: var(--cyan) !important; font-weight: 700; }
.more-link::after { content: ' ←'; }

/* قفسهٔ افقی */
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: 42%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.shelf::-webkit-scrollbar { display: none; }
@media (min-width: 560px) { .shelf { grid-auto-columns: 28%; } }
@media (min-width: 900px) { .shelf { grid-auto-columns: calc((100% - 60px) / 6); } }
.tile { scroll-snap-align: start; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tart { position: relative; display: block; aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: var(--card);
  box-shadow: 0 0 0 1px var(--line), var(--shadow); transition: transform .2s, box-shadow .2s; }
.tart img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.tile:hover .tart { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--accent), 0 18px 34px -14px var(--accent); }
.tile:hover .tart img { transform: scale(1.07); }
.tnew { position: absolute; top: 8px; inset-inline-start: 8px; font-style: normal; font-size: .7rem; font-weight: 700; color: #0b1030; background: #ffcb45; border-radius: 8px; padding: 2px 8px; }
.tplay { position: absolute; inset-inline-end: 8px; bottom: 8px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #0b1030; box-shadow: 0 6px 16px -4px rgba(0,0,0,.5); }
.tplay .ic { width: 18px; height: 18px; }
@media (hover: hover) { .tplay { opacity: 0; translate: 0 6px; transition: opacity .2s, translate .2s; } .tile:hover .tplay { opacity: 1; translate: 0 0; } }
.tile b { font-size: .92rem; margin-top: 8px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tx); }
.tile small { color: var(--dim); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* کاشی دسته‌بندی با نقاشی بازی */
@media (min-width: 900px) { .cats { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.cat.has-art { position: relative; overflow: hidden; isolation: isolate; min-height: 118px; align-items: flex-start; justify-content: flex-end; text-align: start; padding: 12px; border: 0; color: #fff; box-shadow: var(--shadow); }
.cat.has-art .cbg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .35s; }
.cat.has-art::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(8,10,30,.94) 8%, rgba(8,10,30,.45) 60%, rgba(8,10,30,.15)); }
.cat.has-art:hover { background: none; }
.cat.has-art:hover .cbg { transform: scale(1.08); }
.cat.has-art .cico { position: absolute; top: 10px; inset-inline-start: 10px; width: 34px; height: 34px; border-radius: 11px; background: rgba(11,15,42,.6) !important; color: #fff !important; margin: 0; }
.cat.has-art .cico .ic { width: 18px; height: 18px; }
.cat.has-art b { color: #fff; font-size: .95rem; }
.cat.has-art small { color: #cfd6f6; }

/* فیلترهای بیشتر */
.more-f { border: 1px solid var(--line); border-radius: 14px; padding: 2px 12px; background: var(--soft); }
.more-f summary { cursor: pointer; padding: 10px 0; font-weight: 700; font-size: .9rem; list-style: none; display: flex; align-items: center; gap: 8px; }
.more-f summary::-webkit-details-marker { display: none; }
.more-f summary::before { content: '+'; color: var(--cyan); font-size: 1.1rem; }
.more-f[open] summary::before { content: '−'; }
.more-f summary small { color: var(--dim); font-weight: 400; }
.more-f .frow { margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) {
  .mosaic { animation: none; }
  .spot, .spot img, .tart, .tart img, .cat.has-art .cbg { transition: none; }
}

/* ================= بازطراحی ۲ — کارت‌ها، دورهمی پهن، عنوان‌ها ================= */

/* عنوان بخش‌ها: نوار نئونی کوچک کنار تیتر */
.home .sec-h h2 { position: relative; padding-inline-start: 14px; }
.home .sec-h h2::before {
  content: ''; position: absolute; inset-inline-start: 0; top: .28em; bottom: .28em; width: 5px; border-radius: 9px;
  background: linear-gradient(180deg, var(--cyan), var(--violet));
}
.home .sec { padding-block: 30px 6px; }

/* کارت بازی — جمع‌وجور، نقاشی اول */
.card { border-radius: 22px; border: 0; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.card:hover { box-shadow: 0 0 0 2px var(--accent), 0 20px 40px -18px var(--accent); }
.card .cover::after { content: ''; display: block; position: absolute; inset: auto 0 0; height: 38%; background: linear-gradient(to top, rgba(8,10,30,.55), transparent); pointer-events: none; }
.cflags { position: absolute; z-index: 2; top: 8px; inset-inline-start: 8px; display: flex; gap: 5px; flex-wrap: wrap; }
.cf { font-style: normal; font-size: .68rem; font-weight: 700; line-height: 1.7; padding: 1px 8px; border-radius: 8px; color: #0b1030; box-shadow: 0 4px 10px -4px rgba(0,0,0,.5); }
.cf-new { background: #ffcb45; }
.cf-wip { background: #b9c2ea; }
.cf-on { background: #46e2a8; }
.cf-lang { position: absolute; z-index: 2; bottom: 8px; inset-inline-start: 8px; background: rgba(11,15,42,.72); color: #fff; }
.card .body { gap: 4px; padding: 10px 12px 12px; }
.card h3 { font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .desc { -webkit-line-clamp: 2; font-size: .78rem; }
.card .meta-row { margin-top: 2px; }
.card .tags { margin-top: 4px; }
.card .acts { margin-top: auto; padding-top: 8px; }
@media (max-width: 420px) {
  .card .desc { display: none; }           /* روی گوشی کوچک کارت فقط اسم و مشخصات */
  .card .body { padding: 9px 10px 10px; }
}
@media (hover: none) { .qplay { opacity: 1; translate: 0 0; width: 36px; height: 36px; } }

/* دکمهٔ «نمایش بیشتر» */
.more-wrap { display: flex; justify-content: center; margin-top: 18px; }
.more-btn { min-height: 50px; padding-inline: 28px; border-radius: 16px; font-weight: 700; gap: 6px; }
.more-btn b { color: var(--dim); font-weight: 400; }
html:not(.js) .more-wrap { display: none; }

/* کارت پهن دورهمی */
#featured { gap: 14px; }
.wcard {
  position: relative; isolation: isolate; overflow: hidden; flex: 0 0 84%; scroll-snap-align: start;
  aspect-ratio: 16 / 10; border-radius: 24px; display: flex; align-items: flex-end; color: #fff;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), var(--shadow); transition: transform .2s, box-shadow .2s;
}
@media (min-width: 640px) { .wcard { flex-basis: calc(50% - 7px); } }
@media (min-width: 1024px) { .wcard { flex-basis: calc(33.333% - 10px); } }
.wcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .4s; }
.wcard::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(8,10,30,.95) 6%, rgba(8,10,30,.55) 45%, transparent 75%); }
.wcard:hover { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--accent), 0 22px 44px -18px var(--accent); }
.wcard:hover img { transform: scale(1.06); }
.wtxt { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; width: 100%; }
.wk { font-size: .72rem; color: var(--accent); font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.wtxt b { font-size: 1.2rem; line-height: 1.4; }
.wd { font-size: .8rem; color: #d6dcf7; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.wplay { position: absolute; top: 12px; inset-inline-end: 12px; display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 700;
  background: var(--accent); color: #0b1030; padding: 6px 12px; border-radius: 999px; box-shadow: 0 6px 16px -6px rgba(0,0,0,.6); }
.wplay .ic { width: 14px; height: 14px; }

/* نوار جست‌وجو و فیلتر — حس کنترل‌پنل بازی */
.home .filters { padding: 14px; border-radius: 22px; background: var(--card); box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.home .search input { min-height: 50px; border-radius: 14px; }

@media (prefers-reduced-motion: reduce) { .wcard, .wcard img { transition: none; } }
@media (min-width: 900px) { .cat.has-art { min-height: 150px; } .cat.has-art b { font-size: .88rem; line-height: 1.5; } }
