/* =========================================================================
   آزمایشگاه حکم — hokmlabfa.com
   هویت بصری: کاغذ روشن آزمایشگاهی · شبکهٔ کم‌رنگ · سبز نمد میز · کهربایی
   موبایل‌اول، RTL، بدون وابستگی بیرونی.
   ========================================================================= */

@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/vazirmatn-arabic.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/vazirmatn-latin.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2190-21BB, U+2212, U+2264-2265;
}

:root {
  --paper: #f4f6f8;
  --paper-2: #eaeef2;
  --surface: #ffffff;
  --line: #dfe5ea;
  --line-2: #eef2f5;
  --ink: #10202e;
  --ink-2: #35485a;
  --mut: #61738333;
  --muted: #5f7183;
  --felt: #0f7a63;
  --felt-d: #0a5c4a;
  --felt-l: #e6f4f0;
  --amber: #a35a08;
  --amber-l: #fdf3e6;
  --red: #b3202f;
  --ok: #1a7f4b;

  --r: 12px;
  --r-lg: 18px;
  --sh: 0 1px 2px rgba(16, 32, 46, .06), 0 4px 14px rgba(16, 32, 46, .05);
  --sh-2: 0 2px 6px rgba(16, 32, 46, .08), 0 14px 34px rgba(16, 32, 46, .09);
  --wrap: 1080px;
  --fs: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: "Vazirmatn", "Tahoma", system-ui, sans-serif;
  font-size: var(--fs);
  line-height: 1.85;
  color: var(--ink);
  background: var(--paper);
  background-image:
    linear-gradient(to left, rgba(16, 32, 46, .035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 32, 46, .035) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 .6rem; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(1.65rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 3.6vw, 1.75rem); }
h3 { font-size: 1.12rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-inline-start: 1.3rem; }
li { margin-bottom: .35rem; }
a { color: var(--felt-d); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--felt); }
img { max-width: 100%; height: auto; }
small, .sm { font-size: .87rem; }
.mut { color: var(--muted); }
.unset { color: var(--muted); font-size: .87em; font-style: normal; }
strong, b { font-weight: 800; }
code, .tnum { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 3px solid var(--felt); outline-offset: 2px; border-radius: 4px; }

/* پیوند پرش: عمودی از کادر دید بیرون می‌رود، نه افقی.
   در RTL مقدار منفیِ inset-inline-start صفحه را به سمت راست سرریز می‌کند. */
.skip {
  position: absolute; inset-inline-start: 0; top: -60px; z-index: 99;
  background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 var(--r) 0;
}
.skip:focus { top: 0; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.sec { margin-block: 2.6rem; }
.mt { margin-top: 1rem; }
.mb0 { margin-bottom: 0; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* ------------------------------------------------------------- سرآیند --- */
.hd {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: saturate(1.6) blur(8px);
  border-bottom: 1px solid var(--line);
}
.hd-in { display: flex; align-items: center; gap: .8rem; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: 40px; }
.brand-txt { display: grid; line-height: 1.25; }
.brand-txt b { font-size: 1.02rem; font-weight: 800; }
.brand-txt i { font-style: normal; font-size: .74rem; color: var(--muted); }
.hd-nav { display: none; margin-inline-start: auto; gap: .15rem; }
.hd-nav a {
  color: var(--ink-2); text-decoration: none; font-size: .92rem; font-weight: 600;
  padding: .45rem .6rem; border-radius: 8px;
}
.hd-nav a:hover { background: var(--felt-l); color: var(--felt-d); }
.hd-nav a[aria-current="page"] { color: var(--felt-d); background: var(--felt-l); }
/* در موبایل پنهان است. سلکتور دو کلاسی لازم است تا از قاعدهٔ بعدیِ .btn قوی‌تر بماند. */
.hd .hd-cta { display: none; }
.hd-tog {
  margin-inline-start: auto; width: 42px; height: 42px; display: grid; place-content: center; gap: 4px;
  background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.hd-tog span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
.drawer { border-top: 1px solid var(--line); background: #fff; }
.drawer ul { list-style: none; margin: 0; padding: .5rem 0 1rem; display: grid; gap: .1rem; }
.drawer a {
  display: block; padding: .65rem .4rem; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--line-2); font-weight: 600;
}
.drawer a[aria-current="page"] { color: var(--felt-d); }

@media (min-width: 900px) {
  .hd-nav { display: flex; }
  .hd .hd-cta { display: inline-flex; }
  .hd-tog { display: none; }
  .drawer { display: none !important; }
}

/* ------------------------------------------------------------ خرده‌نان --- */
.trail { border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .6); }
.trail ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: .5rem 0; font-size: .82rem; }
.trail li + li::before { content: "‹"; color: var(--muted); margin-inline-end: .35rem; }
.trail a { color: var(--muted); text-decoration: none; }
.trail a:hover { color: var(--felt-d); text-decoration: underline; }
.trail [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* -------------------------------------------------------------- دکمه‌ها --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; padding: .55rem 1.1rem; border-radius: 10px;
  font: inherit; font-weight: 700; font-size: .95rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-go { background: var(--felt); color: #fff; box-shadow: 0 2px 8px rgba(15, 122, 99, .3); }
.btn-go:hover { background: var(--felt-d); color: #fff; }
.btn-line { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-line:hover { border-color: var(--felt); color: var(--felt-d); }
.btn-amber { background: var(--amber); color: #fff; }
.btn-amber:hover { background: #8a4b06; color: #fff; }
.btn-sm { min-height: 38px; padding: .35rem .8rem; font-size: .87rem; }
.btn-lg { min-height: 52px; padding: .7rem 1.6rem; font-size: 1.05rem; }

/* ------------------------------------------------------------ عنوان بخش --- */
.sec-h { display: grid; gap: .1rem; margin-bottom: 1.1rem; }
.sec-kicker {
  display: block; font-size: .68rem; font-weight: 800; letter-spacing: .18em;
  color: var(--felt); text-transform: uppercase;
}
.lead { font-size: 1.07rem; color: var(--ink-2); }

/* --------------------------------------------------------------- جعبه‌ها --- */
.box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 1.2rem; box-shadow: var(--sh);
}
.box + .box { margin-top: 1rem; }
.grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 880px) {
  .grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.note {
  display: grid; gap: .2rem; padding: .85rem 1rem; border-radius: var(--r);
  background: var(--felt-l); border: 1px solid rgba(15, 122, 99, .28);
  border-inline-start: 4px solid var(--felt); margin: 1rem 0; font-size: .93rem;
}
.note b { color: var(--felt-d); }
.note.warn { background: var(--amber-l); border-color: rgba(163, 90, 8, .3); border-inline-start-color: var(--amber); }
.note.warn b { color: var(--amber); }
.note.plain { background: var(--paper-2); border-color: var(--line); border-inline-start-color: var(--muted); }
.note.plain b { color: var(--ink); }

/* ------------------------------------------------------------- کارت قانون */
.rules { display: grid; gap: .8rem; counter-reset: rc; }
.rule {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 1rem 1rem 1rem 1rem; padding-inline-start: 3.2rem;
}
.rule::before {
  counter-increment: rc; content: counter(rc);
  position: absolute; inset-inline-start: .9rem; top: 1rem;
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--felt); color: #fff; font-weight: 800; font-size: .85rem;
  font-variant-numeric: tabular-nums;
}
.rule h3 { margin-bottom: .25rem; font-size: 1.02rem; }
.rule p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- بایگانی */
.byline {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center;
  font-size: .82rem; color: var(--muted);
  border-block: 1px solid var(--line); padding: .6rem 0; margin: 0 0 1.4rem;
}
.byline .ed { font-weight: 700; color: var(--ink-2); }

/* ------------------------------------------------------------ چیدمان مقاله */
.art { display: grid; gap: 1.6rem; margin-block: 1.8rem 2.6rem; }
@media (min-width: 940px) {
  .art { grid-template-columns: 250px minmax(0, 1fr); align-items: start; }
  .art > .toc { position: sticky; top: 80px; }
}
.toc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: .9rem 1rem; font-size: .9rem;
}
.toc h2 { font-size: .78rem; letter-spacing: .14em; color: var(--felt); text-transform: uppercase; margin-bottom: .5rem; }
.toc ol { margin: 0; padding-inline-start: 1.1rem; }
.toc li { margin-bottom: .3rem; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--felt-d); text-decoration: underline; }

.prose h2 { margin-top: 2rem; scroll-margin-top: 84px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4rem; scroll-margin-top: 84px; }
.prose > p:first-of-type { font-size: 1.06rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .93rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .55rem .7rem; text-align: start; }
.prose th { background: var(--paper-2); font-weight: 700; }
.prose blockquote {
  margin: 1rem 0; padding: .2rem 1rem; border-inline-start: 3px solid var(--felt);
  color: var(--ink-2); background: var(--felt-l); border-radius: 0 var(--r) var(--r) 0;
}

/* --------------------------------------------------------------- جدول‌ها */
.tw { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-lg); }
.tbl {
  width: 100%; min-width: 620px; border-collapse: collapse; background: var(--surface);
  font-size: .92rem; box-shadow: var(--sh); border-radius: var(--r-lg); overflow: hidden;
}
.tbl caption { caption-side: bottom; text-align: start; padding: .6rem .2rem 0; font-size: .8rem; color: var(--muted); }
.tbl th, .tbl td { padding: .6rem .7rem; border-bottom: 1px solid var(--line-2); text-align: start; vertical-align: middle; }
.tbl thead th { background: var(--paper-2); font-size: .8rem; font-weight: 800; color: var(--ink-2); white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fafcfd; }
.tbl .num { width: 44px; }
.tbl .cw { min-width: 190px; }
.rnk {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  background: var(--paper-2); color: var(--ink-2); font-weight: 800; font-size: .82rem;
  font-variant-numeric: tabular-nums;
}
tr:nth-child(1) .rnk { background: var(--felt); color: #fff; }
tr:nth-child(2) .rnk, tr:nth-child(3) .rnk { background: var(--felt-l); color: var(--felt-d); }
.bcell { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.bcell b { font-size: .93rem; }
.sort-btn { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; padding: 0; display: inline-flex; gap: .25rem; align-items: center; }
.sort-btn:hover { color: var(--felt-d); }

@media (max-width: 700px) {
  .tbl { min-width: 0; display: block; box-shadow: none; background: none; }
  .tbl thead { display: none; }
  .tbl tbody, .tbl tr, .tbl td { display: block; }
  .tbl tr {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
    margin-bottom: .7rem; padding: .7rem .85rem; box-shadow: var(--sh);
  }
  .tbl td { border: 0; padding: .28rem 0; display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
  .tbl td::before { content: attr(data-th); font-size: .82rem; color: var(--muted); font-weight: 600; }
  .tbl td.cw, .tbl td.num { display: inline-flex; }
  .tbl td.num { padding-inline-end: .6rem; }
  .tbl td.cw::before, .tbl td.num::before { content: none; }
  /* در حالت display:block، caption باید صریحاً بلوکِ تمام‌عرض شود؛
     وگرنه به یک ستون باریک فشرده می‌شود. */
  .tbl caption { display: block; width: 100%; caption-side: top; padding: 0 0 .6rem; text-align: start; }
}

/* نشان برند: پس‌زمینهٔ تیره چون بیشتر نشان‌ها سفید یا روشن‌اند. */
.logo {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 66px; height: 40px; padding: 4px 6px;
  background: #16202b; border-radius: 8px; border: 1px solid #22303e;
}
.logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.logo.lg { width: 108px; height: 62px; padding: 6px 9px; border-radius: 10px; }

/* -------------------------------------------------------- امتیاز و نوار */
.chip {
  display: inline-grid; place-items: center; line-height: 1.15;
  background: var(--felt); color: #fff; border-radius: 10px; padding: .3rem .55rem; min-width: 54px;
}
.chip b { font-size: 1.12rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.chip i { font-style: normal; font-size: .6rem; opacity: .85; }
.chip.sm { padding: .22rem .45rem; min-width: 46px; }
.chip.sm b { font-size: .95rem; }
.chip.lg { padding: .5rem .9rem; min-width: 76px; border-radius: 12px; }
.chip.lg b { font-size: 1.7rem; }

.meter { display: inline-flex; align-items: center; gap: .4rem; min-width: 92px; }
.meter .bar { flex: 1; height: 6px; background: var(--paper-2); border-radius: 99px; overflow: hidden; min-width: 44px; }
.meter .bar > span { display: block; height: 100%; background: var(--felt); border-radius: 99px; }
.meter b { font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--ink-2); }

.stars { color: var(--amber); letter-spacing: -1px; font-size: .95rem; white-space: nowrap; }
.stars .off { color: #d6dde3; }

/* ----------------------------------------------------------- کارت برند --- */
.bcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.1rem; box-shadow: var(--sh); display: grid; gap: .8rem;
}
.bcard-h { display: grid; grid-template-columns: auto auto 1fr auto; gap: .7rem; align-items: center; }
.bcard-h h3 { margin: 0; font-size: 1.05rem; }
.bcard-h h3 a { text-decoration: none; color: var(--ink); }
.bcard-h h3 a:hover { color: var(--felt-d); }
.bcard-h p { margin: 0; font-size: .82rem; }
.bcard-n {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--ink); color: #fff; font-weight: 800; font-size: .88rem; font-variant-numeric: tabular-nums;
}
.bcard-m { display: grid; gap: .35rem; padding: .6rem .7rem; background: var(--paper); border-radius: var(--r); }
.bcard-m > div { display: grid; grid-template-columns: 8.5rem 1fr; gap: .5rem; align-items: center; font-size: .85rem; }
.bcard-m span { color: var(--muted); }
.bcard-v { margin: 0; font-size: .93rem; color: var(--ink-2); }
@media (max-width: 520px) {
  .bcard-h { grid-template-columns: auto auto 1fr; }
  .bcard-h > .chip { grid-column: 3; justify-self: end; }
}

/* ------------------------------------------------------- شبکهٔ قدم بعدی */
.nextgrid { display: grid; gap: .7rem; }
@media (min-width: 700px) { .nextgrid { grid-template-columns: repeat(2, 1fr); } }
.nextgrid a {
  display: grid; gap: .15rem; padding: .85rem 1rem; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .15s, transform .12s;
}
.nextgrid a:hover { border-color: var(--felt); transform: translateY(-2px); }
.nextgrid b { color: var(--ink); font-size: .98rem; }
.nextgrid span { color: var(--muted); font-size: .85rem; }

/* -------------------------------------------------------------- پرسش‌ها */
.qa { display: grid; gap: .5rem; }
.qa details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
.qa summary {
  cursor: pointer; padding: .85rem 1rem; font-weight: 700; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: .8rem;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; color: var(--felt); font-size: 1.3rem; font-weight: 400; line-height: 1; }
.qa details[open] summary::after { content: "−"; }
.qa .ans { padding: 0 1rem 1rem; color: var(--ink-2); font-size: .95rem; }
.qa .ans p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------- فرم‌ها */
.fields { display: grid; gap: .9rem; margin-top: .9rem; }
@media (min-width: 620px) { .fields { grid-template-columns: 1fr 1fr; } .fields.one { grid-template-columns: 1fr; } }
.lb { display: block; font-weight: 700; font-size: .88rem; margin-bottom: .3rem; }
.inp {
  width: 100%; font: inherit; font-size: .95rem; padding: .6rem .8rem; min-height: 44px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.inp:focus { border-color: var(--felt); }
textarea.inp { min-height: 120px; resize: vertical; line-height: 1.7; }
.hint { font-size: .78rem; color: var(--muted); margin: .3rem 0 0; }
.rating-in { display: flex; gap: .1rem; }
.rating-in .st {
  background: none; border: 0; cursor: pointer; font-size: 1.7rem; line-height: 1;
  color: #d6dde3; padding: .1rem .15rem; min-height: 44px;
}
.rating-in .st.on { color: var(--amber); }
.formmsg { margin-top: .8rem; padding: .7rem .9rem; border-radius: var(--r); font-size: .9rem; background: var(--amber-l); border: 1px solid rgba(163, 90, 8, .3); }
.formmsg.ok { background: #e8f6ee; border-color: rgba(26, 127, 75, .3); color: #135c37; }

/* --------------------------------------------------------------- نظرها */
.ops { display: grid; gap: .7rem; }
.op { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: .9rem 1rem; }
.op-h { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .85rem; margin-bottom: .35rem; }
.op-h b { font-size: .93rem; }
.op-h time { color: var(--muted); margin-inline-start: auto; }
.op p { margin: 0; font-size: .93rem; color: var(--ink-2); }
.hold { background: var(--amber-l); color: var(--amber); border: 1px solid rgba(163, 90, 8, .3); border-radius: 99px; padding: .05rem .5rem; font-size: .74rem; font-weight: 700; }
.seedtag { background: var(--paper-2); color: var(--muted); border-radius: 99px; padding: .05rem .5rem; font-size: .72rem; }

/* --------------------------------------------------------- کارت‌های بازی */
.pc {
  display: inline-grid; place-items: center; position: relative;
  width: 34px; height: 48px; border-radius: 6px; background: #fffdf6;
  border: 1px solid #d8cfb8; box-shadow: 0 1px 3px rgba(16, 32, 46, .18);
  color: #17140f; font-weight: 700; line-height: 1; vertical-align: middle; margin: 2px;
  font-variant-numeric: lining-nums;
}
.pc.red { color: var(--red); }
.pc-c { font-size: .82rem; }
.pc-s { font-size: .82rem; }
.pc.pc-m { width: 44px; height: 62px; }
.pc.pc-m .pc-c, .pc.pc-m .pc-s { font-size: 1rem; }
.pc.pc-l { width: 56px; height: 78px; }
.pc.pc-l .pc-c { font-size: 1.15rem; }
.pc.pc-l .pc-s { font-size: 1.3rem; }
.cardrow { display: flex; flex-wrap: wrap; gap: .1rem; align-items: center; margin: .6rem 0; }

/* --------------------------------------------------------------- پاورقی */
.ft { margin-top: 3rem; background: #101d28; color: #c9d6e0; border-top: 4px solid var(--felt); }
.ft a { color: #cfe3dc; text-decoration: none; }
.ft a:hover { color: #fff; text-decoration: underline; }
.ft .brand { color: #fff; }
.ft .brand-txt i { color: #8fa5b5; }
.ft-grid { display: grid; gap: 1.6rem; padding: 2.2rem 0 1.4rem; }
@media (min-width: 760px) { .ft-grid { grid-template-columns: 1.6fr repeat(2, 1fr); } }
@media (min-width: 1000px) { .ft-grid { grid-template-columns: 1.7fr repeat(4, 1fr); } }
.ft-intro p { font-size: .88rem; color: #93a8b8; margin-top: .7rem; }
.ft-col h2 { font-size: .82rem; letter-spacing: .1em; color: #fff; text-transform: uppercase; margin-bottom: .6rem; }
.ft-col ul { list-style: none; margin: 0; padding: 0; }
.ft-col li { margin-bottom: .35rem; font-size: .87rem; }
.ft-warn { display: flex; gap: .8rem; align-items: flex-start; border-top: 1px solid #1e2d3a; padding: 1rem 0; }
.ft-warn p { margin: 0; font-size: .82rem; color: #8fa5b5; }
.age { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 2px solid #c0524f; color: #e58d8a; font-weight: 800; font-size: .78rem; }
.ft-end { display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: space-between; border-top: 1px solid #1e2d3a; padding: .9rem 0; font-size: .8rem; color: #7e93a3; }

/* =========================================================================
   میز بازی حکم — پوستهٔ آزمایشگاه (روشن، تحلیلی، با پنل داده)
   ========================================================================= */
.game {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-2); overflow: hidden; margin-block: 1.2rem;
}
.game-load { padding: 2.4rem 1.2rem; text-align: center; }
.game-load p { margin: 0 0 .4rem; }

.g-bar {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  padding: .6rem .9rem; border-bottom: 1px solid var(--line); background: var(--paper);
}
.g-bar .g-sp { margin-inline-start: auto; }
.g-ib {
  min-width: 40px; min-height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); background: #fff; border-radius: 9px; cursor: pointer;
  font-size: 1rem; color: var(--ink-2);
}
.g-ib:hover { border-color: var(--felt); color: var(--felt-d); }
.g-tag {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem;
  background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: .25rem .7rem; color: var(--ink-2);
}
.g-tag b { color: var(--felt-d); }

.g-score { display: grid; grid-template-columns: 1fr auto 1fr; gap: .5rem; padding: .7rem .9rem; background: var(--paper); border-bottom: 1px solid var(--line); }
.g-sc { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: .45rem .6rem; text-align: center; }
.g-sc.ns { border-color: rgba(15, 122, 99, .45); }
.g-sc.ew { border-color: rgba(179, 32, 47, .35); }
.g-sc .l { font-size: .7rem; color: var(--muted); display: block; }
.g-sc .v { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; display: block; line-height: 1.2; }
.g-sc .s { font-size: .7rem; color: var(--ink-2); display: block; }
.g-sc.ns .v { color: var(--felt-d); }
.g-sc.ew .v { color: var(--red); }

.g-main { display: grid; gap: 0; }
@media (min-width: 960px) { .g-main { grid-template-columns: minmax(0, 1fr) 240px; } }

.g-felt {
  position: relative; padding: .8rem;
  background:
    radial-gradient(120% 90% at 50% 42%, #17997c 0%, #0f7a63 55%, #0a5c4a 100%);
  background-color: #0f7a63;
  display: grid; gap: .4rem;
  grid-template-columns: 1fr 1.5fr 1fr;
  grid-template-areas: ". n ." "w c e" ". s .";
  min-height: 330px;
}
.g-felt::before {
  content: ""; position: absolute; inset: 8px; border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, .22); pointer-events: none;
}
.seat-n { grid-area: n; } .seat-e { grid-area: e; } .seat-w { grid-area: w; } .seat-s { grid-area: s; }
.g-center { grid-area: c; display: grid; place-items: center; position: relative; min-height: 150px; }

@media (max-width: 620px) {
  .g-felt { grid-template-columns: 1fr 1fr 1fr; grid-template-areas: "w n e" "c c c" "s s s"; min-height: 0; }
}

.seat { display: grid; justify-items: center; gap: .25rem; align-content: center; }
.seat-tag {
  display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap;
  background: rgba(6, 40, 32, .55); color: #eaf6f2; border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 99px; padding: .2rem .6rem; font-size: .76rem; font-weight: 700;
}
.seat-tag.ns { border-color: rgba(190, 240, 220, .55); }
.seat-tag.ew { border-color: rgba(255, 190, 190, .5); }
.seat-tag.turn { box-shadow: 0 0 0 2px #ffd479; }
.crown { color: #ffd479; }
.seat-n2 { font-size: .7rem; color: rgba(234, 246, 242, .8); min-height: 1em; }
.mini { display: flex; }
.mini i {
  display: block; width: 20px; height: 29px; border-radius: 4px; margin-inline-start: -11px;
  background: linear-gradient(135deg, #0b3d2e, #072a20); border: 1px solid rgba(255, 212, 121, .5);
}
.mini i:first-child { margin-inline-start: 0; }

.g-trick { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-areas: ". tn ." "tw . te" ". ts ."; gap: .15rem; place-items: center; }
.g-trick > div { min-width: 40px; min-height: 56px; display: grid; place-items: center; }
.t-n { grid-area: tn; } .t-e { grid-area: te; } .t-s { grid-area: ts; } .t-w { grid-area: tw; }
.g-trump {
  position: absolute; top: -2px; inset-inline-end: -2px;
  background: rgba(6, 40, 32, .72); color: #ffe6a8; border: 1px solid rgba(255, 212, 121, .6);
  border-radius: 99px; padding: .15rem .6rem; font-size: .74rem; font-weight: 800;
}
.g-empty { color: rgba(234, 246, 242, .75); font-size: .85rem; text-align: center; padding: 1rem .5rem; }

/* پنل داده — امضای بصری آزمایشگاه */
.g-side { border-inline-start: 1px solid var(--line); background: var(--paper); padding: .8rem; display: grid; gap: .7rem; align-content: start; }
@media (max-width: 959px) { .g-side { border-inline-start: 0; border-top: 1px solid var(--line); } }
.g-side h3 { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--felt); margin: 0 0 .3rem; }
.g-log { display: grid; gap: .25rem; max-height: 190px; overflow-y: auto; font-size: .8rem; }
.g-log div { display: flex; gap: .4rem; align-items: center; padding: .25rem .4rem; background: #fff; border: 1px solid var(--line-2); border-radius: 7px; }
.g-log .w { margin-inline-start: auto; font-weight: 700; color: var(--felt-d); font-size: .76rem; }
.g-side .kv { display: flex; justify-content: space-between; font-size: .82rem; padding: .2rem 0; border-bottom: 1px dashed var(--line); }
.g-side .kv:last-child { border-bottom: 0; }
.g-side .kv b { font-variant-numeric: tabular-nums; }

.g-hand { padding: .9rem; border-top: 1px solid var(--line); }
.g-msg { text-align: center; font-weight: 700; min-height: 1.6em; margin: 0 0 .6rem; color: var(--ink); }
.g-msg.warn { color: var(--red); font-weight: 600; font-size: .9rem; }
.g-cards { display: flex; justify-content: center; align-items: flex-end; flex-wrap: wrap; gap: .25rem; }
.g-cards.fan { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: .5rem; }
.gc {
  position: relative; flex: 0 0 auto; width: 50px; height: 72px; border-radius: 8px;
  background: #fffdf6; border: 1px solid #d8cfb8; box-shadow: 0 2px 5px rgba(16, 32, 46, .2);
  display: grid; place-items: center; cursor: default; padding: 0;
  color: #17140f; font-family: inherit; font-weight: 700; line-height: 1;
  transition: transform .12s, box-shadow .12s;
}
.gc.red { color: var(--red); }
.gc .r { font-size: 1rem; font-variant-numeric: lining-nums; }
.gc .s { font-size: 1.15rem; }
.gc.play { cursor: pointer; box-shadow: 0 0 0 2px rgba(15, 122, 99, .85), 0 3px 8px rgba(16, 32, 46, .25); }
.gc.play:hover { transform: translateY(-9px); }
.gc.dim { opacity: .42; cursor: not-allowed; filter: grayscale(.4); }
.gc.tr::after { content: ""; position: absolute; inset: 0; border-radius: 8px; box-shadow: inset 0 0 0 2px #d9a441; pointer-events: none; }
.gc.sm { width: 40px; height: 58px; }
.gc.sm .r { font-size: .84rem; } .gc.sm .s { font-size: .95rem; }
@media (max-width: 420px) { .gc { width: 44px; height: 64px; } }

.trumpsel { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-top: .9rem; }
@media (min-width: 520px) { .trumpsel { grid-template-columns: repeat(4, 1fr); } }
.tsel {
  display: grid; place-items: center; gap: .2rem; padding: .8rem .4rem; cursor: pointer;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); font: inherit; font-weight: 700;
  min-height: 44px; color: var(--ink);
}
.tsel:hover { border-color: var(--felt); background: var(--felt-l); }
.tsel .sym { font-size: 1.7rem; line-height: 1; }
.tsel.red .sym { color: var(--red); }
.tsel .cnt { font-size: .74rem; color: var(--muted); font-weight: 600; }

.g-menu { padding: 1.1rem; display: grid; gap: .9rem; }
.g-modes { display: grid; gap: .7rem; }
@media (min-width: 640px) { .g-modes { grid-template-columns: 1fr 1fr; } }
.g-mode {
  text-align: start; display: grid; gap: .2rem; padding: 1rem 1.1rem; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); font: inherit; color: var(--ink);
}
.g-mode:hover { border-color: var(--felt); background: var(--felt-l); }
.g-mode b { font-size: 1rem; }
.g-mode span { font-size: .85rem; color: var(--muted); }
.g-opts { display: grid; gap: .7rem; }
@media (min-width: 640px) { .g-opts { grid-template-columns: repeat(3, 1fr); } }
.g-opt { display: grid; gap: .25rem; font-size: .85rem; }
.g-opt select { font: inherit; font-size: .9rem; min-height: 44px; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); }

/* دیالوگ پایان */
.g-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; background: rgba(16, 32, 46, .55); }
.g-modal-in { background: #fff; border-radius: var(--r-lg); padding: 1.4rem; max-width: 420px; width: 100%; box-shadow: var(--sh-2); text-align: center; }
.g-modal h2 { margin-bottom: .3rem; }
.g-modal .res { font-size: 2.2rem; line-height: 1; margin-bottom: .3rem; }

/* =========================================================================
   ابزارهای آزمایشگاه
   ========================================================================= */
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.2rem; box-shadow: var(--sh); scroll-margin-top: 84px; }
.tool + .tool { margin-top: 1.2rem; }
.tool h2 { display: flex; align-items: center; gap: .5rem; }
.tool .tno {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  background: var(--felt); color: #fff; font-size: .85rem; font-weight: 800; font-variant-numeric: tabular-nums;
}

/* امتیازشمار */
.sc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 1rem 0; }
.sc-team { border: 1px solid var(--line); border-radius: var(--r); padding: .8rem; text-align: center; background: var(--paper); }
.sc-team.a { border-color: rgba(15, 122, 99, .4); }
.sc-team.b { border-color: rgba(179, 32, 47, .3); }
.sc-team .nm { font-size: .85rem; color: var(--muted); }
.sc-team .pts { font-size: 2.4rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.sc-team.a .pts { color: var(--felt-d); }
.sc-team.b .pts { color: var(--red); }
.sc-btns { display: flex; gap: .35rem; justify-content: center; flex-wrap: wrap; margin-top: .5rem; }
.sc-hist { display: grid; gap: .3rem; margin-top: .8rem; font-size: .85rem; max-height: 200px; overflow-y: auto; }
.sc-hist div { display: flex; gap: .5rem; padding: .3rem .6rem; background: var(--paper); border-radius: 7px; }
.sc-hist .t { margin-inline-start: auto; color: var(--muted); font-size: .8rem; }

/* کاوشگر ترتیب کارت */
.ord-suits { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.ord-suits button {
  font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; min-height: 40px;
  padding: .35rem .8rem; border: 1px solid var(--line); background: #fff; border-radius: 99px; color: var(--ink);
}
.ord-suits button[aria-pressed="true"] { background: var(--felt); color: #fff; border-color: var(--felt); }
.ord-suits button.red[aria-pressed="false"] .sy { color: var(--red); }
.ord-line { display: flex; flex-wrap: wrap; gap: .2rem; align-items: flex-end; }
.ord-card { display: grid; justify-items: center; gap: .2rem; }
.ord-card .lbl { font-size: .68rem; color: var(--muted); }
.ord-note { margin-top: .8rem; }

/* کاوشگر قوانین */
.rx { display: grid; gap: 1rem; }
@media (min-width: 760px) { .rx { grid-template-columns: 220px minmax(0, 1fr); } }
.rx-nav { display: grid; gap: .3rem; align-content: start; }
.rx-nav button {
  font: inherit; text-align: start; cursor: pointer; padding: .55rem .8rem; min-height: 44px;
  border: 1px solid var(--line); background: #fff; border-radius: 9px; font-weight: 600; font-size: .9rem; color: var(--ink);
}
.rx-nav button[aria-selected="true"] { background: var(--felt); color: #fff; border-color: var(--felt); }
.rx-body { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; }
.rx-body h3 { margin-top: 0; }
.rx-body p:last-child { margin-bottom: 0; }

/* =========================================================================
   قهرمان صفحهٔ اصلی
   ========================================================================= */
.hero { padding: 2rem 0 1rem; }
.hero-in { display: grid; gap: 1.4rem; }
@media (min-width: 900px) { .hero-in { grid-template-columns: 1.05fr .95fr; align-items: center; } }
.hero h1 { margin-bottom: .7rem; }
.hero p { font-size: 1.05rem; color: var(--ink-2); }
.hero .row { margin-top: 1.1rem; }
.kicker {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .74rem; font-weight: 800;
  letter-spacing: .1em; color: var(--felt-d); background: var(--felt-l);
  border: 1px solid rgba(15, 122, 99, .25); border-radius: 99px; padding: .25rem .8rem; margin-bottom: .8rem;
}
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: 1.2rem; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: .7rem .6rem; text-align: center; }
.fact b { display: block; font-size: 1.35rem; font-weight: 800; color: var(--felt-d); font-variant-numeric: tabular-nums; }
.fact span { font-size: .76rem; color: var(--muted); }

.hero-art {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.1rem; box-shadow: var(--sh-2);
}
.hero-art h2 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--felt); }

/* =========================================================================
   کمکی‌ها
   ========================================================================= */
.pillrow { display: flex; flex-wrap: wrap; gap: .4rem; }
.pill { background: var(--paper-2); border-radius: 99px; padding: .2rem .7rem; font-size: .8rem; color: var(--ink-2); }
.pill.on { background: var(--felt-l); color: var(--felt-d); }
.prosc { display: grid; gap: 1rem; }
@media (min-width: 700px) { .prosc { grid-template-columns: 1fr 1fr; } }
.prosc ul { list-style: none; padding: 0; margin: 0; }
.prosc li { position: relative; padding-inline-start: 1.5rem; margin-bottom: .5rem; font-size: .93rem; }
.prosc li::before { position: absolute; inset-inline-start: 0; font-weight: 800; }
.pro li::before { content: "✓"; color: var(--ok); }
.con li::before { content: "✕"; color: var(--red); }
.pro h3 { color: var(--ok); }
.con h3 { color: var(--red); }
.crit { display: grid; gap: .5rem; }
.crit-row { display: grid; grid-template-columns: 9.5rem 1fr auto; gap: .6rem; align-items: center; font-size: .9rem; }
.crit-row .w { font-size: .76rem; color: var(--muted); }
@media (max-width: 480px) { .crit-row { grid-template-columns: 7.5rem 1fr auto; font-size: .84rem; } }
.cta-band {
  background: linear-gradient(140deg, #0f7a63, #0a5c4a); color: #fff;
  border-radius: var(--r-lg); padding: 1.4rem; display: grid; gap: .8rem; margin-block: 2rem;
}
.cta-band h2 { color: #fff; margin: 0; }
.cta-band p { margin: 0; color: #d6efe8; }
.cta-band .btn-line { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .4); }
.cta-band .btn-line:hover { background: rgba(255, 255, 255, .2); color: #fff; }
@media (min-width: 760px) { .cta-band { grid-template-columns: 1fr auto; align-items: center; } }
