/* ===== الألوان: الوضع الفاتح (افتراضي) والداكن ===== */
:root {
  --bg: #f5f1ea;
  --surface: #fffdf9;
  --surface2: #efe8dc;
  --line: #e3dacb;
  --text: #1f1b16;
  --muted: #6f665a;
  --strip: #1f1b16;
  --strip-text: #f5f1ea;
  --chip-on: #1f1b16;
  --chip-on-text: #fffdf9;
  --yellow: #f2b84b;
  --yellow-ink: #2a1f08;
  --coral: #ef5a5a;
  --teal: #1fa99b;
  --green: #22a45d;
  --board: #2f45c9;
  --hole: #f5f1ea;
  --shadow: 0 10px 30px rgba(60, 40, 10, .10);
  --radius: 22px;
  --font: "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #15122d;
  --surface: #211c44;
  --surface2: #2b2556;
  --line: #3a3374;
  --text: #f4f2ff;
  --muted: #b1acd6;
  --strip: #0d0b1f;
  --strip-text: #f4f2ff;
  --chip-on: #f4f2ff;
  --chip-on-text: #15122d;
  --yellow: #ffc93c;
  --yellow-ink: #1b1740;
  --coral: #ff6b6b;
  --teal: #2ec4b6;
  --green: #4ade80;
  --board: #2b3ac2;
  --hole: #15122d;
  --shadow: 0 14px 40px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; font-size: 15px; }
@media (max-width: 600px) { html { font-size: 14px; } }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.7; min-height: 100vh; overflow-x: clip; transition: background .25s, color .25s; }
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ===== الشريط العلوي ===== */
.strip { background: var(--strip); color: var(--strip-text); font-size: .85rem; }
.strip .wrap { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 38px; }
.strip a.pillbtn { background: var(--yellow); color: var(--yellow-ink); border-radius: 99px; padding: 3px 14px; font-weight: 800; text-decoration: none; white-space: nowrap; }

/* ===== رأس الصفحة ===== */
.top { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.logo .mark { width: 38px; height: 38px; flex: none; }
.logo .name { display: flex; flex-direction: column; line-height: 1.15; }
.logo .name b { font-size: 1.3rem; font-weight: 900; }
.logo .name small { color: var(--muted); font-size: .78rem; }
.tools { display: flex; align-items: center; gap: 6px; }
.iconbtn { width: 40px; height: 40px; border-radius: 14px; border: 1px solid transparent; background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; }
.iconbtn:hover { background: var(--surface2); }
.iconbtn svg { width: 21px; height: 21px; }
.theme-ic .moon { display: none; }
:root[data-theme="dark"] .theme-ic .sun { display: none; }
:root[data-theme="dark"] .theme-ic .moon { display: block; }

/* القائمة الجانبية */
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer { position: fixed; top: 0; bottom: 0; right: 0; width: min(320px, 86vw); background: var(--surface); z-index: 41; transform: translateX(100%); transition: transform .25s ease; padding: 22px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
body.menu-open .drawer { transform: none; }
body.menu-open .drawer-bg { opacity: 1; pointer-events: auto; }
.drawer a { display: block; padding: 12px 14px; border-radius: 12px; text-decoration: none; font-weight: 700; }
.drawer a:hover { background: var(--surface2); }
.drawer hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; width: 100%; }
.drawer .close { align-self: flex-start; margin-bottom: 6px; }

/* ===== أزرار ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 99px; padding: 10px 20px; font: inherit; font-weight: 800; font-size: .95rem; cursor: pointer; transition: transform .12s, filter .12s; color: var(--yellow-ink); background: var(--yellow); text-decoration: none; -webkit-tap-highlight-color: transparent; min-height: 42px; }
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(.97); }
.btn.coral { background: var(--coral); color: #fff; }
.btn.ghost { background: var(--surface); color: var(--text); border: 1.5px solid var(--line); }
.btn.dark { background: var(--chip-on); color: var(--chip-on-text); }
.btn.wa { background: #25d366; color: #073b1c; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }

/* ===== المعرض ===== */
.gallery-head { padding: 30px 0 6px; }
.gallery-head h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); line-height: 1.1; margin: 0 0 6px; font-weight: 900; }
.gallery-head p { color: var(--muted); margin: 0 0 18px; font-size: 1rem; }
.search { display: flex; gap: 8px; margin-bottom: 16px; }
.search input { flex: 1; font: inherit; font-size: 1.05rem; padding: 10px 18px; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); outline: none; min-height: 46px; font-size: 16px; }
.search input:focus { border-color: var(--yellow); }
.search .btn { padding: 0 20px; min-height: 46px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 20px; border-bottom: 2px dashed var(--line); }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); border-radius: 99px; padding: 6px 14px; font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer; min-height: 38px; }
.chip span { color: var(--muted); font-weight: 600; direction: ltr; }
.chip.on { background: var(--chip-on); color: var(--chip-on-text); border-color: var(--chip-on); }
.chip.on span { color: inherit; opacity: .75; }
.listbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0 12px; color: var(--muted); font-size: .95rem; flex-wrap: wrap; }
.listbar select { font: inherit; color: var(--text); background: transparent; border: 0; font-size: .95rem; cursor: pointer; padding: 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 18px; padding-bottom: 20px; }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.card { position: relative; display: block; margin: 0; aspect-ratio: 1 / .92; border-radius: var(--radius); overflow: hidden; text-decoration: none; color: #fff; box-shadow: var(--shadow); transition: transform .15s; isolation: isolate; background: #333; }
.card:hover { transform: translateY(-4px); }
.card .cover { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.card .cover svg, .card .cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.card::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.72)); z-index: -1; }
.card .badge { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.92); color: #1f1b16; font-weight: 800; font-size: .85rem; padding: 4px 13px; border-radius: 99px; }
.card .fav { position: absolute; top: 10px; left: 10px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(0,0,0,.35); color: #fff; display: grid; place-items: center; cursor: pointer; }
.card .fav svg { width: 22px; height: 22px; }
.card .fav.on { background: var(--coral); }
.card .fav.on svg path { fill: #fff; }
.card .info { position: absolute; inset: auto 14px 12px 14px; }
.card .info h3 { margin: 0; font-size: 1.1rem; line-height: 1.25; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.card .info small { opacity: .85; font-size: .88rem; }
@media (max-width: 560px) { .card .info h3 { font-size: .95rem; } .card .info small { font-size: .75rem; } .card .badge { font-size: .7rem; padding: 2px 9px; top: 9px; right: 9px; } .card .fav { width: 32px; height: 32px; top: 7px; left: 7px; } .card .fav svg { width: 18px; height: 18px; } .card { border-radius: 16px; } }
.empty { text-align: center; color: var(--muted); padding: 40px 0; grid-column: 1 / -1; }

/* أقسام عامة */
.section { padding: 34px 0; }
.section h2 { font-size: 1.35rem; margin: 0 0 14px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step .n { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--yellow); color: var(--yellow-ink); font-weight: 900; }
.step h3 { margin: 10px 0 4px; font-size: 1.1rem; }
.step p { margin: 0; color: var(--muted); font-size: .97rem; }

/* مقالات */
.article { max-width: 760px; margin: 0 auto; padding: 34px 0 10px; }
.article h1 { font-size: clamp(1.6rem, 5vw, 2.1rem); line-height: 1.25; margin: 0 0 8px; }
.article .lead { color: var(--muted); font-size: 1.12rem; }
.article h2 { margin: 32px 0 8px; font-size: 1.4rem; }
.article h3 { margin: 22px 0 6px; font-size: 1.15rem; }
.article p, .article li { font-size: 1rem; }
.article a { color: var(--coral); }
.article ul, .article ol { padding-inline-start: 22px; }
.article .box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 18px 0; }
.article .cta { text-align: center; margin: 26px 0; }
.article .cta a { color: var(--yellow-ink); }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.guides { display: grid; gap: 12px; margin-top: 18px; }
.guides a { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px; text-decoration: none; color: var(--text); }
.guides .thumb { width: 84px; height: 72px; border-radius: 12px; overflow: hidden; flex: none; }
.guides .thumb svg { width: 100%; height: 100%; display: block; }
.guides b { display: block; font-size: 1.1rem; }
.guides small { color: var(--muted); }

/* إعلانات (مخفية حتى التفعيل) */
.ad-slot { margin: 26px auto; text-align: center; }
.ad-slot:empty { display: none; }

/* التذييل */
.foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0 36px; color: var(--muted); font-size: .93rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 22px; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot a { color: var(--muted); display: inline-flex; align-items: center; min-height: 40px; padding: 0 2px; }

/* الكوكيز */
.consent { position: fixed; inset: auto 12px 12px 12px; z-index: 50; max-width: 640px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; box-shadow: var(--shadow); }
.consent p { margin: 0 0 12px; font-size: .95rem; }
.consent a { color: var(--coral); }
.consent .row { display: flex; gap: 8px; flex-wrap: wrap; }
.consent .btn { padding: 10px 18px; font-size: .95rem; }

/* ===== صفحة اللعب ===== */
.play { max-width: 500px; margin: 0 auto; padding: 16px 16px 40px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 4px; font-size: 1.35rem; }
.panel .sub { color: var(--muted); margin: 0 0 16px; font-size: .95rem; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
.input { width: 100%; font: inherit; font-size: 16px; padding: 9px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); outline: none; min-height: 44px; }
.input:focus { border-color: var(--yellow); }
.input.code { text-align: center; letter-spacing: .4em; font-size: 1.5rem; font-weight: 900; direction: ltr; }
.modes { display: grid; gap: 10px; }
.mode { display: flex; align-items: center; gap: 12px; text-align: start; width: 100%; background: var(--bg); border: 1.5px solid var(--line); border-radius: 16px; padding: 11px 12px; color: var(--text); font: inherit; cursor: pointer; transition: border-color .12s, transform .12s; }
.mode:hover { border-color: var(--yellow); }
.mode:active { transform: scale(.98); }
.mode .ic { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; flex: none; }
.mode b { display: block; font-size: 1.05rem; }
.mode small { color: var(--muted); font-size: .88rem; }
.gametabs { display: flex; gap: 6px; background: var(--bg); border: 1px solid var(--line); padding: 5px; border-radius: 99px; margin-bottom: 16px; }
.gametabs button { flex: 1; border: 0; background: transparent; color: var(--muted); font: inherit; font-weight: 800; padding: 9px 6px; border-radius: 99px; cursor: pointer; font-size: .92rem; }
.gametabs button.on { background: var(--chip-on); color: var(--chip-on-text); }
.back { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; margin-bottom: 10px; }
.err { color: var(--coral); min-height: 1.4em; margin: 8px 0 0; font-size: .95rem; }

.invite { text-align: center; }
.bigcode { font-size: 2.6rem; font-weight: 900; letter-spacing: .25em; direction: ltr; color: var(--coral); margin: 6px 0; }
.linkbox { display: flex; gap: 6px; margin: 12px 0; }
.linkbox input { flex: 1; direction: ltr; font-size: .9rem; }
.spinner { width: 46px; height: 46px; border: 5px solid var(--line); border-top-color: var(--yellow); border-radius: 50%; margin: 18px auto; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.vs { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 8px; margin-bottom: 14px; }
.pl { background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 10px; text-align: center; transition: border-color .2s, box-shadow .2s; }
.pl .nm { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl .mk { font-size: .85rem; color: var(--muted); }
.pl.turn { border-color: var(--yellow); box-shadow: 0 0 0 4px color-mix(in srgb, var(--yellow) 25%, transparent); }
.pl .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-inline-end: 5px; vertical-align: middle; }
.pl .dot.off { background: #999; }
.score { font-size: 1.3rem; font-weight: 900; direction: ltr; white-space: nowrap; }
.status { text-align: center; font-weight: 800; font-size: 1rem; min-height: 1.8em; margin: 6px 0 12px; }

.xo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; aspect-ratio: 1; max-width: 320px; margin: 0 auto; }
.xo button { border: 0; border-radius: 20px; background: var(--surface2); font: inherit; font-size: clamp(2.2rem, 11vw, 3.4rem); font-weight: 900; cursor: pointer; color: var(--text); display: grid; place-items: center; transition: background .15s, transform .1s; }
.xo button:hover:not([disabled]) { filter: brightness(.96); }
.xo button[disabled] { cursor: default; }
.xo .x { color: var(--coral); }
.xo .o { color: var(--teal); }
.xo .win { background: color-mix(in srgb, var(--yellow) 45%, var(--surface2)); animation: pop .4s ease; }
@keyframes pop { 50% { transform: scale(1.08); } }

.c4 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; background: var(--board); padding: 8px; border-radius: 18px; max-width: 400px; margin: 0 auto; direction: ltr; }
.c4 .cell { aspect-ratio: 1; border-radius: 50%; background: var(--hole); border: 0; padding: 0; cursor: pointer; box-shadow: inset 0 3px 6px rgba(0,0,0,.35); }
.c4 .cell.p0 { background: var(--coral); }
.c4 .cell.p1 { background: var(--yellow); }
.c4 .cell.last { animation: drop .35s ease-out; }
.c4 .cell.win { outline: 4px solid #fff; outline-offset: -4px; }
.c4.mine .cell:hover { filter: brightness(1.15); }
@keyframes drop { from { transform: translateY(-260%); } to { transform: translateY(0); } }

.quiz .qmeta { display: flex; justify-content: space-between; color: var(--muted); font-size: .9rem; margin-bottom: 8px; gap: 8px; }
.timer { height: 8px; background: var(--surface2); border-radius: 99px; overflow: hidden; margin-bottom: 14px; }
.timer i { display: block; height: 100%; background: linear-gradient(90deg, var(--coral), var(--yellow)); transition: width .25s linear; }
.quiz .q { font-size: 1.15rem; font-weight: 800; text-align: center; margin: 8px 0 16px; min-height: 2.4em; }
.opts { display: grid; gap: 10px; }
.opts button { text-align: center; border: 2px solid var(--line); background: var(--surface); color: var(--text); border-radius: 14px; padding: 10px; font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; position: relative; min-height: 46px; }
.opts button:hover:not([disabled]) { border-color: var(--yellow); }
.opts button[disabled] { cursor: default; }
.opts .picked { border-color: var(--yellow); background: color-mix(in srgb, var(--yellow) 18%, var(--surface)); }
.opts .right { border-color: var(--green); background: color-mix(in srgb, var(--green) 18%, var(--surface)); }
.opts .wrong { border-color: var(--coral); background: color-mix(in srgb, var(--coral) 15%, var(--surface)); }
.opts .who { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 10px; font-size: .75rem; background: var(--bg); border-radius: 99px; padding: 2px 8px; }
.opts .who.them { inset-inline-start: auto; inset-inline-end: 10px; }

.reacts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 18px; }
.reacts button { border: 1.5px solid var(--line); background: var(--surface); color: var(--text); border-radius: 99px; padding: 7px 13px; font: inherit; font-size: .9rem; cursor: pointer; }
.reacts button:hover { border-color: var(--yellow); }
.bubble { position: fixed; top: 90px; left: 50%; transform: translateX(-50%); background: var(--chip-on); color: var(--chip-on-text); font-weight: 800; border-radius: 99px; padding: 10px 18px; z-index: 60; box-shadow: var(--shadow); animation: bub 2.6s ease forwards; pointer-events: none; white-space: nowrap; }
.bubble.mine { background: var(--teal); color: #fff; }
@keyframes bub { 0% { opacity: 0; transform: translate(-50%, -10px); } 10%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

.result { text-align: center; margin-top: 16px; }
.result .big { font-size: 1.7rem; font-weight: 900; margin-bottom: 4px; }
.result .row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.note { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 10px; }
.hidden { display: none !important; }
.confetti { position: fixed; top: -12px; width: 10px; height: 14px; z-index: 70; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.card .hit { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card .badge, .card .info { pointer-events: none; z-index: 2; }
.card .fav { z-index: 3; }
.card .info { color: #fff; }

/* ===== صفحة لعبة فردية ===== */
.gtitle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 0 14px; flex-wrap: wrap; }
.gtitle h1 { margin: 0; font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.2; }
.gactions { display: flex; gap: 8px; }
.gactions .btn { padding: 8px 16px; min-height: 40px; }
.gactions .btn svg { width: 18px; height: 18px; }
.favbtn.on { background: var(--coral); border-color: var(--coral); color: #fff; }
.favbtn.on svg path { fill: #fff; }
.gamebox { background: #12162e; padding: 14px 0 18px; }
.gframe { max-width: 440px; margin: 0 auto; padding: 0 10px; display: flex; flex-direction: column; gap: 8px; }
.stage { position: relative; width: 100%; aspect-ratio: 384 / 620; display: grid; place-items: center; }
.stage canvas { display: block; border-radius: 18px; touch-action: none; box-shadow: 0 16px 40px rgba(0,0,0,.45); user-select: none; -webkit-user-select: none; }
.ghud { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ghud .iconbtn { color: #fff; background: rgba(255,255,255,.08); }
.ghud .iconbtn:hover { background: rgba(255,255,255,.16); }
.gbar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; background: rgba(255,255,255,.08); color: #fff; border-radius: 99px; padding: 7px 16px; font-size: .9rem; }
.gbar b { font-size: 1.1rem; color: #ffc93c; direction: ltr; display: inline-block; }
.gbar .mid { text-align: center; font-size: .72rem; opacity: .8; line-height: 1.2; }
.pips { display: flex; justify-content: center; gap: 4px; margin-top: 3px; direction: ltr; }
.pips i { width: 7px; height: 11px; border-radius: 99px; background: rgba(255,255,255,.2); }
.pips i.on { background: #ffc93c; }
.ov { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; z-index: 5; }
.ov .card2 { background: rgba(18, 16, 45, .88); backdrop-filter: blur(6px); color: #fff; border-radius: 22px; padding: 22px 20px; text-align: center; width: min(100%, 320px); box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.ov h2 { margin: 0 0 6px; font-size: 1.5rem; }
.ov p { margin: 0 0 14px; opacity: .85; font-size: .95rem; }
.ov .big { font-size: 2.4rem; font-weight: 900; color: #ffc93c; line-height: 1.1; direction: ltr; }
.ov .lbl { font-size: .85rem; opacity: .75; }
.ov .row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.ov .tips { text-align: start; font-size: .88rem; opacity: .9; margin: 0 0 14px; padding-inline-start: 18px; }
.ov .newbest { display: inline-block; background: #ffc93c; color: #1b1740; font-weight: 800; border-radius: 99px; padding: 2px 12px; font-size: .85rem; margin-bottom: 8px; }
.gtoast { position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 1.8rem; font-weight: 900; text-shadow: 0 3px 12px rgba(0,0,0,.5); opacity: 0; pointer-events: none; z-index: 4; white-space: nowrap; }
.gtoast.go { animation: toastgo 1s ease forwards; }
@keyframes toastgo { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.8); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -80%); } }
/* ملء الشاشة */
.gamebox:fullscreen, .gamebox.pseudo-fs { position: fixed; inset: 0; z-index: 100; width: 100%; height: 100%; padding: max(10px, env(safe-area-inset-top)) 0 max(10px, env(safe-area-inset-bottom)); display: flex; }
.gamebox:fullscreen .gframe, .gamebox.pseudo-fs .gframe { max-width: none; width: 100%; height: 100%; }
.gamebox:fullscreen .stage, .gamebox.pseudo-fs .stage { flex: 1; aspect-ratio: auto; min-height: 0; }
.gamebox:fullscreen .ghud, .gamebox:fullscreen .gbar, .gamebox.pseudo-fs .ghud, .gamebox.pseudo-fs .gbar { width: 100%; max-width: 460px; margin: 0 auto; }
body.noscroll { overflow: hidden; }
.fs-in { display: none; }
.is-fs .fs-in { display: block; }
.is-fs .fs-out { display: none; }
.stage { max-height: calc(100svh - 150px); }
.gamebox:fullscreen .stage, .gamebox.pseudo-fs .stage { max-height: none; }
.logo .name b { letter-spacing: -.01em; }
.logo .name b i { font-style: normal; color: var(--coral); font-size: .85em; padding: 0 1px; }

/* تبويبات الألعاب: تمرير أفقي */
.gametabs { overflow-x: auto; scrollbar-width: none; border-radius: 16px; }
.gametabs::-webkit-scrollbar { display: none; }
.gametabs button { flex: none; white-space: nowrap; padding: 8px 14px; }

/* المربعات */
.dots { max-width: 340px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 6px; }
.dots svg { display: block; width: 100%; height: auto; touch-action: manipulation; }
.dots .dt { fill: var(--text); }
.dots .ln { stroke-width: 7; stroke-linecap: round; }
.dots .ln.free { stroke: var(--line); stroke-width: 4; stroke-dasharray: 2 8; }
.dots .ln.me { stroke: var(--coral); }
.dots .ln.op { stroke: var(--teal); }
.dots .ln.last { stroke-width: 9; filter: drop-shadow(0 0 4px var(--yellow)); }
.dots .hit { stroke: transparent; stroke-width: 22; cursor: pointer; }
.dots.mine .hit:hover { stroke: color-mix(in srgb, var(--yellow) 55%, transparent); }
.dots .bx.me { fill: color-mix(in srgb, var(--coral) 30%, transparent); }
.dots .bx.op { fill: color-mix(in srgb, var(--teal) 30%, transparent); }
.dots .bxt { font: 800 13px var(--font); text-anchor: middle; fill: var(--text); opacity: .7; }

/* الذاكرة */
.memory { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 360px; margin: 0 auto; }
.mcard { aspect-ratio: 1; border-radius: 14px; border: 0; cursor: pointer; font-size: clamp(1.6rem, 9vw, 2.2rem); display: grid; place-items: center; background: linear-gradient(135deg, var(--coral), var(--yellow)); box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); transition: transform .2s, background .2s; }
.mcard:not(.up)::after { content: "؟"; color: rgba(255,255,255,.85); font-weight: 900; font-size: 1.4rem; }
.mcard.up { background: var(--surface); border: 2px solid var(--line); transform: rotateY(0); animation: flip .25s ease; }
.mcard.me { border-color: var(--coral); background: color-mix(in srgb, var(--coral) 14%, var(--surface)); }
.mcard.op { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 14%, var(--surface)); }
.mcard.bad { border-color: var(--coral); animation: shake .35s; }
.mcard[disabled] { cursor: default; }
@keyframes flip { from { transform: rotateY(90deg); } to { transform: rotateY(0); } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* حجرة ورقة مقص */
.rps .arena { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 10px 0 6px; }
.rps .hand { font-size: clamp(3rem, 18vw, 4.6rem); text-align: center; background: var(--surface2); border-radius: 22px; padding: 10px 0; line-height: 1.2; }
.rps .arena.shown .hand { animation: pop .4s ease; }
.rps .vsx { font-weight: 900; color: var(--coral); }
.rps .rmsg { text-align: center; font-weight: 800; min-height: 1.6em; margin-bottom: 10px; }
.rpsbtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rpsbtns button { border: 2px solid var(--line); background: var(--surface); color: var(--text); border-radius: 18px; padding: 10px 4px; cursor: pointer; display: grid; gap: 2px; font: inherit; }
.rpsbtns b { font-size: 2rem; line-height: 1.2; }
.rpsbtns small { font-weight: 700; color: var(--muted); }
.rpsbtns button:hover:not([disabled]) { border-color: var(--yellow); }
.rpsbtns button.picked { border-color: var(--yellow); background: color-mix(in srgb, var(--yellow) 20%, var(--surface)); }
.rpsbtns button[disabled]:not(.picked) { opacity: .5; }

/* ردة الفعل */
.reaction .pad { width: 100%; max-width: 380px; aspect-ratio: 1 / .85; margin: 0 auto; display: grid; place-content: center; gap: 6px; text-align: center; border: 0; border-radius: 26px; font: inherit; color: #fff; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: background .08s; }
.reaction .pad b { font-size: clamp(1.5rem, 7vw, 2.1rem); }
.reaction .pad small { opacity: .9; font-size: .9rem; padding: 0 18px; }
.reaction .pad.wait { background: #e5484d; }
.reaction .pad.go { background: #22a45d; }
.reaction .pad.reveal, .reaction .pad.done { background: var(--surface2); color: var(--text); cursor: default; }
.reaction .pad[disabled] { cursor: default; }
.rxres { display: flex; justify-content: center; gap: 18px; margin-top: 10px; flex-wrap: wrap; }
.rxres b { color: var(--coral); direction: ltr; display: inline-block; }

/* سباق الحساب */
.mathq .eq { font-size: clamp(2rem, 10vw, 2.8rem); direction: ltr; font-weight: 900; }
.opts.two { grid-template-columns: 1fr 1fr; }
.opts.two button { font-size: 1.4rem; direction: ltr; min-height: 60px; }

/* عاصفة الألوان */
.storm { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; justify-content: center; max-width: 460px; margin: 0 auto; }
.st-main { position: relative; padding: 6px; background: var(--surface); border: 3px solid var(--text); border-radius: 16px; box-shadow: var(--shadow); }
.st-main canvas { display: block; border-radius: 8px; touch-action: none; user-select: none; -webkit-user-select: none; }
.st-in { position: absolute; top: -12px; inset-inline: 8px; height: 20px; font-size: 13px; line-height: 20px; text-align: center; letter-spacing: -2px; z-index: 2; white-space: nowrap; overflow: hidden; }
.st-ov { position: absolute; inset: 6px; display: grid; place-content: center; text-align: center; background: rgba(20, 18, 45, .55); color: #fff; border-radius: 8px; z-index: 3; }
.st-ov b { font-size: 3.4rem; line-height: 1; }
.st-ov small { font-weight: 800; font-size: 1rem; }
.st-chain { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); color: #fff; font-weight: 900; font-size: 1.25rem; white-space: nowrap; text-shadow: 0 2px 8px rgba(0,0,0,.6); opacity: 0; pointer-events: none; z-index: 4; }
.st-chain.go { animation: toastgo 1.1s ease forwards; }
.st-side { display: grid; gap: 8px; align-content: start; }
.st-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px; display: grid; justify-items: center; gap: 2px; text-align: center; }
.st-card small { color: var(--muted); font-size: .78rem; }
.st-opn { font-size: .85rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-mini { display: block; border-radius: 6px; border: 2px solid var(--line); }
.st-sc { font-size: 1.3rem; direction: ltr; color: var(--coral); }
.st-pad { direction: ltr; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 4px; }
.st-pad button { min-height: 52px; border-radius: 14px; border: 2px solid var(--text); background: var(--surface); color: var(--text); font-size: 1.3rem; font-weight: 900; cursor: pointer; box-shadow: 0 4px 0 var(--text); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.st-pad button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--text); }
.st-pad [data-st="ccw"], .st-pad [data-st="cw"] { color: var(--coral); }

/* المنقلة */
.mancala { direction: ltr; display: grid; grid-template-columns: 1fr repeat(6, 1.1fr) 1fr; grid-template-rows: 1fr 1fr; gap: 6px; max-width: 480px; margin: 0 auto; padding: 10px; border-radius: 26px; background: linear-gradient(180deg, #b9783f, #8a5226); box-shadow: inset 0 3px 0 rgba(255,255,255,.25), var(--shadow); }
.mancala .mstore { grid-row: 1 / 3; border-radius: 999px; background: rgba(0,0,0,.28); box-shadow: inset 0 4px 10px rgba(0,0,0,.35); display: grid; place-content: center; text-align: center; color: #fff; padding: 6px 2px; min-height: 140px; }
.mancala .mstore.op { grid-column: 1; }
.mancala .mstore.me { grid-column: 8; }
.mancala .mstore b { font-size: 1.5rem; }
.mancala .mstore small { font-size: .65rem; opacity: .85; max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mancala .mpit { aspect-ratio: 1; border-radius: 50%; border: 0; background: rgba(0,0,0,.28); box-shadow: inset 0 4px 8px rgba(0,0,0,.4); position: relative; display: grid; place-items: center; color: #fff; padding: 0; font: inherit; }
.mancala .mpit b { position: absolute; bottom: -2px; right: 0; font-size: .72rem; background: rgba(0,0,0,.45); border-radius: 99px; padding: 0 6px; }
.mancala .seeds { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; width: 70%; }
.mancala .seeds i { width: 7px; height: 7px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #9be7d8 30%, #1fa99b); }
.mancala .mpit.op .seeds i { background: radial-gradient(circle at 35% 30%, #fff, #ffc2c2 30%, #ef5a5a); }
.mancala.mine .mpit.me:not([disabled]) { cursor: pointer; outline: 3px solid var(--yellow); outline-offset: -3px; }
.mancala .mpit.me:not([disabled]):hover { background: rgba(0,0,0,.15); }
.mancala .last { box-shadow: inset 0 4px 8px rgba(0,0,0,.4), 0 0 0 3px #fff; }
.mancala .cap { box-shadow: inset 0 4px 8px rgba(0,0,0,.4), 0 0 0 3px var(--coral); }

/* معركة السفن */
.battleship { max-width: 420px; margin: 0 auto; }
.bs-title { text-align: center; font-weight: 800; margin: 8px 0 6px; }
.bs-title.small { font-size: .85rem; color: var(--muted); }
.bs-info { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); }
.bgrid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; background: #1f5fa8; padding: 6px; border-radius: 14px; direction: ltr; }
.bgrid.small { max-width: 190px; margin: 0 auto; gap: 2px; padding: 4px; }
.bgrid .bc { aspect-ratio: 1; border: 0; padding: 0; border-radius: 5px; background: #4a90d9; position: relative; }
.bgrid.sea.mine .bc:not([disabled]) { cursor: pointer; }
.bgrid.sea.mine .bc:not([disabled]):hover { background: #7ab4ee; }
.bgrid .bc.ship { background: #5c6475; }
.bgrid .bc.miss::after { content: ""; position: absolute; inset: 38%; border-radius: 50%; background: rgba(255,255,255,.75); }
.bgrid .bc.hit { background: #ef5a5a; }
.bgrid .bc.hit::after { content: "✕"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: .8em; }
.bgrid .bc.sunk { background: #2a2350; }
.bgrid .bc.lastshot { outline: 2px solid var(--yellow); z-index: 1; }
.bs-setup .row { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }

/* شد الحبل */
.tug { max-width: 420px; margin: 0 auto; text-align: center; }
.tug-names { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: 6px; }
.rope { position: relative; height: 70px; border-radius: 18px; background: linear-gradient(90deg, color-mix(in srgb, var(--teal) 25%, var(--surface)) 0 8%, var(--surface) 8% 92%, color-mix(in srgb, var(--coral) 25%, var(--surface)) 92%); border: 1px solid var(--line); overflow: hidden; direction: ltr; margin-bottom: 10px; }
.rope-line { position: absolute; top: 50%; left: -20%; right: -20%; height: 8px; margin-top: -4px; background: repeating-linear-gradient(45deg, #b07a3c 0 8px, #d6a35f 8px 16px); border-radius: 99px; transition: transform .15s; }
.rope-mid { position: absolute; left: 50%; top: 8px; bottom: 8px; width: 2px; background: var(--muted); opacity: .5; }
.rope-flag { position: absolute; top: 50%; transform: translate(-50%, -60%); font-size: 1.8rem; transition: left .15s; }
.tugbtn { width: 100%; max-width: 320px; aspect-ratio: 1.6; margin: 8px auto 0; display: block; border: 0; border-radius: 28px; font: inherit; font-size: 1.6rem; font-weight: 900; color: #fff; background: linear-gradient(180deg, var(--coral), #c93c3c); box-shadow: 0 8px 0 #9b2c2c; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.tugbtn:active:not([disabled]) { transform: translateY(6px); box-shadow: 0 2px 0 #9b2c2c; }
.tugbtn[disabled] { background: var(--surface2); color: var(--muted); box-shadow: 0 8px 0 var(--line); }
.tug-count { margin-top: 14px; color: var(--muted); font-size: .9rem; }

/* سباق الكتابة */
.typing { max-width: 460px; margin: 0 auto; }
.tbars { display: grid; gap: 6px; margin-bottom: 10px; }
.tbar { position: relative; height: 26px; border-radius: 99px; background: var(--surface2); overflow: hidden; }
.tbar span { position: absolute; inset-inline-start: 12px; top: 2px; font-size: .8rem; font-weight: 800; z-index: 1; }
.tbar i { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; transition: width .2s; }
.tbar.me i { background: color-mix(in srgb, var(--coral) 60%, transparent); }
.tbar.op i { background: color-mix(in srgb, var(--teal) 60%, transparent); }
.tsent { font-size: 1.35rem; line-height: 1.9; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: 0 0 10px; color: var(--muted); user-select: none; -webkit-user-select: none; }
.tsent .ok { color: var(--green); font-weight: 800; }
.tsent .bad { background: color-mix(in srgb, var(--coral) 35%, transparent); color: var(--text); border-radius: 4px; }
.tinput { font-size: 18px; }
.tinput.wrong { border-color: var(--coral); background: color-mix(in srgb, var(--coral) 8%, var(--bg)); }

/* ===== إطار الألعاب الفردية ===== */
.gwrap { position: relative; width: 100%; display: flex; justify-content: center; }
.gwrap .stage { aspect-ratio: var(--ar, 1); max-width: 100%; touch-action: none; }
.ghud-info { color: #fff; font-size: .9rem; opacity: .9; text-align: center; flex: 1; }
.ghud-info b { color: #ffc93c; }
.gamebox:fullscreen .gwrap, .gamebox.pseudo-fs .gwrap { flex: 1; min-height: 0; }
.gamebox:fullscreen .gwrap .stage, .gamebox.pseudo-fs .gwrap .stage { height: 100%; width: auto; max-height: 100%; }
.dpad { display: grid; grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(2, 48px); gap: 6px; justify-content: center; direction: ltr; margin-top: 4px; }
.dpad button { border: 0; border-radius: 14px; background: rgba(255,255,255,.12); color: #fff; font-size: 1.3rem; touch-action: manipulation; }
.dpad button:active { background: rgba(255,255,255,.25); }
.dpad [data-dir="up"] { grid-column: 2; }
.dpad [data-dir="left"] { grid-column: 1; grid-row: 2; }
.dpad [data-dir="down"] { grid-column: 2; grid-row: 2; }
.dpad [data-dir="right"] { grid-column: 3; grid-row: 2; }

/* دمج الأرقام */
.m2048 { position: relative; aspect-ratio: 1; background: #bfae98; border-radius: 16px; padding: 2.4%; direction: ltr; touch-action: none; user-select: none; -webkit-user-select: none; --gap: 2.4%; }
.m2048 .m-bg, .m2048 .m-tiles { position: absolute; inset: 2.4%; }
.m2048 .m-bg { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); gap: 3.2%; }
.m2048 .m-bg i { background: rgba(255,255,255,.28); border-radius: 10px; }
.m2048 .mt { position: absolute; width: 22.6%; height: 22.6%; left: calc(var(--c) * 25.8%); top: calc(var(--r) * 25.8%); border-radius: 10px; display: grid; place-items: center; font-weight: 900; font-size: clamp(1.4rem, 8vw, 2.4rem); transition: left .1s ease, top .1s ease; box-shadow: 0 3px 0 rgba(0,0,0,.12); font-family: Arial, sans-serif; }
.m2048 .mt[data-len="3"] { font-size: clamp(1.2rem, 6.5vw, 2rem); }
.m2048 .mt[data-len="4"] { font-size: clamp(1rem, 5.2vw, 1.6rem); }
.m2048 .mt.new { animation: tileIn .18s ease; }
.m2048 .mt.pop { animation: tilePop .2s ease; }
.m2048.shake { animation: shake .25s; }
@keyframes tileIn { from { transform: scale(.2); opacity: 0; } }
@keyframes tilePop { 50% { transform: scale(1.15); } }

/* بلوكات */
.bk { margin: 0 auto; display: grid; gap: 14px; touch-action: none; user-select: none; -webkit-user-select: none; }
.bk-board { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; background: #2a2350; padding: 6px; border-radius: 14px; aspect-ratio: 1; direction: ltr; }
.bk-board i { border-radius: 5px; background: #3b3373; transition: background .1s; }
.bk-board i.on { box-shadow: inset 0 -3px 0 rgba(0,0,0,.2), inset 0 2px 0 rgba(255,255,255,.3); }
.bk-board i.hov { background: rgba(255,255,255,.45); }
.bk-board i.clear { animation: clearFlash .26s ease; }
@keyframes clearFlash { 0% { transform: scale(1); filter: brightness(2); } 100% { transform: scale(.3); opacity: 0; } }
.bk-tray { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; direction: ltr; }
.bk-slot { min-height: 96px; border-radius: 14px; background: rgba(255,255,255,.08); display: grid; place-items: center; cursor: grab; touch-action: none; }
.bk-slot.dead { opacity: .35; }
.bk-slot.lifting { opacity: .25; }
.bk-piece { direction: ltr; display: grid; grid-template-columns: repeat(var(--w), var(--s)); grid-template-rows: repeat(var(--h), var(--s)); gap: 2px; pointer-events: none; }
.bk-piece i { border-radius: 4px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.2), inset 0 2px 0 rgba(255,255,255,.3); }
.bk-drag { direction: ltr; position: absolute; left: 0; top: 0; z-index: 6; pointer-events: none; opacity: .9; filter: drop-shadow(0 8px 12px rgba(0,0,0,.4)); }

/* ===== لودو ===== */
.ludo { max-width: 440px; margin: 0 auto; }
.lboard { direction: ltr; position: relative; aspect-ratio: 1; border-radius: 18px; overflow: hidden; border: 4px solid #2a2350; background: #fff; transition: transform .3s; }
.lgrid { display: grid; grid-template-columns: repeat(15, 1fr); grid-template-rows: repeat(15, 1fr); position: absolute; inset: 0; }
.lgrid i { border: .5px solid rgba(42,35,80,.15); }
.lgrid .q { border: 0; }
.lgrid .q0 { background: #ef4b4b; } .lgrid .q1 { background: #f2b51d; } .lgrid .q2 { background: #38c972; } .lgrid .q3 { background: #3d8bff; }
.lgrid .tr { background: #fff; }
.lgrid .st0, .lgrid .hc0 { background: #ef4b4b; } .lgrid .st1, .lgrid .hc1 { background: #f2b51d; } .lgrid .st2, .lgrid .hc2 { background: #38c972; } .lgrid .st3, .lgrid .hc3 { background: #3d8bff; }
.lgrid .safe:not(.st0):not(.st1):not(.st2):not(.st3) { background: #f1edff; background-image: radial-gradient(circle, #b9a8f0 22%, transparent 24%); }
.lgrid .mid { border: 0; }
.lbase { position: absolute; width: 26.6%; height: 26.6%; background: #fff; border-radius: 16px; box-shadow: inset 0 0 0 3px rgba(0,0,0,.08); }
.lbase.b0 { top: 6.66%; left: 6.66%; } .lbase.b2 { top: 6.66%; right: 6.66%; } .lbase.b1 { bottom: 6.66%; right: 6.66%; } .lbase.b3 { bottom: 6.66%; left: 6.66%; }
.lcenter { position: absolute; left: 40%; top: 40%; width: 20%; height: 20%; }
.ltokens { position: absolute; inset: 0; }
.tok { position: absolute; width: 5.4%; height: 5.4%; transform: translate(calc(-50% + var(--off, 0) * 14%), calc(-50% - var(--off, 0) * 14%)); border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 3px 0 rgba(0,0,0,.35), inset 0 -3px 0 rgba(0,0,0,.2); padding: 0; transition: top .12s, left .12s; z-index: 2; }
.tok.home { width: 4%; height: 4%; }
.tok.can { animation: tokpulse .8s infinite alternate; cursor: pointer; z-index: 3; outline: 3px solid #1b1740; }
@keyframes tokpulse { to { transform: translate(-50%, -62%) scale(1.15); } }
.tok.hop { z-index: 4; transition: top .11s, left .11s; }
.lbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 12px; }
.lp { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 8px; text-align: center; }
.lp small { display: block; color: var(--muted); font-size: .8rem; }
.lp.turn { border-color: var(--yellow); }
.lp.me b { color: #ef4b4b; } .lp.op b { color: #d99a00; }
.ldice { width: 84px; height: 84px; border-radius: 22px; border: 3px solid var(--text); background: var(--surface); font-size: 3.2rem; line-height: 1; display: grid; place-items: center; box-shadow: 0 5px 0 var(--text); cursor: pointer; padding: 0; color: var(--text); }
.ldice.ready { animation: diceready 1s infinite; background: var(--yellow); }
.ldice.op { opacity: .75; }
.ldice.rolled span { animation: roll .45s ease; display: inline-block; }
.ldice[disabled] { cursor: default; }
@keyframes diceready { 50% { transform: translateY(-4px) rotate(-4deg); } }
@keyframes roll { 0% { transform: rotate(0) scale(.6); } 60% { transform: rotate(300deg) scale(1.15); } 100% { transform: rotate(360deg) scale(1); } }
.lmsg { text-align: center; font-weight: 800; margin: 10px 0 6px; min-height: 1.5em; }

/* ===== من هو؟ ===== */
.who { max-width: 520px; margin: 0 auto; }
.whead { display: grid; grid-template-columns: 92px 1fr; gap: 10px; margin-bottom: 8px; }
.wsecret { background: var(--surface); border: 2px solid var(--yellow); border-radius: 14px; padding: 6px; text-align: center; }
.wsecret small { font-size: .68rem; color: var(--muted); display: block; }
.wsecret b { font-size: .85rem; }
.wsface svg { width: 62px; height: 68px; display: block; margin: 0 auto; }
.whist { display: grid; gap: 4px; align-content: start; font-size: .8rem; }
.wh { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px 8px; display: flex; justify-content: space-between; gap: 6px; }
.wh b.yes, .wh.yes { color: var(--green); } .wh b.no, .wh.no { color: var(--coral); }
.wh.dim { color: var(--muted); }
.wgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.wcard { position: relative; border: 2px solid var(--line); background: var(--surface); border-radius: 12px; padding: 3px 2px 2px; cursor: pointer; transition: transform .2s, opacity .2s; }
.wcard svg { display: block; width: 100%; height: auto; border-radius: 8px; }
.wcard span { display: block; font-size: .7rem; font-weight: 800; color: var(--text); }
.wcard.down { opacity: .28; transform: scale(.92); filter: grayscale(1); }
.wcard.pick { border-color: var(--coral); animation: tokpulse2 .9s infinite alternate; }
@keyframes tokpulse2 { to { box-shadow: 0 0 0 3px color-mix(in srgb, var(--coral) 40%, transparent); } }
.wcard.answer { border-color: var(--green); box-shadow: 0 0 0 3px var(--green); opacity: 1; filter: none; transform: none; }
.wcard.wrong { border-color: var(--coral); box-shadow: 0 0 0 3px var(--coral); }
.wtools { display: flex; gap: 8px; justify-content: center; margin: 10px 0 4px; flex-wrap: wrap; }
.wtools .btn { padding: 8px 14px; min-height: 38px; font-size: .88rem; }
.wmsg { text-align: center; font-weight: 800; font-size: .92rem; margin: 6px 0; min-height: 1.4em; }
.wqs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.wq { border: 1.5px solid var(--line); background: var(--surface); color: var(--text); border-radius: 99px; padding: 7px 12px; font: inherit; font-size: .85rem; cursor: pointer; }
.wq:hover { border-color: var(--yellow); }

/* ===== ارسم وخمّن ===== */
.drawg { max-width: 460px; margin: 0 auto; }
.dhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.dword { font-weight: 900; color: var(--text); font-size: 1.05rem; }
.dword .mask { letter-spacing: .15em; font-size: 1.3rem; direction: rtl; }
.dword small { color: var(--muted); font-weight: 600; }
.dcanvas { position: relative; display: flex; justify-content: center; }
.dcanvas canvas { border-radius: 16px; border: 3px solid var(--text); background: #fff; touch-action: none; display: block; }
.dcanvas canvas.can { cursor: crosshair; }
.dov { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; background: rgba(20, 18, 45, .72); color: #fff; border-radius: 16px; padding: 16px; }
.dov b { display: block; font-size: 1.2rem; margin-bottom: 8px; }
.dov b.big { font-size: 2.2rem; color: #ffc93c; }
.dov small { display: block; opacity: .9; }
.dchoices { display: grid; gap: 8px; }
.dtools { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-top: 8px; }
.dcol { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.dcol.on { outline: 3px solid var(--yellow); outline-offset: 1px; }
.dsep { width: 8px; }
.dw { min-width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; padding: 0 4px; }
.dw i { display: block; border-radius: 50%; background: var(--text); }
.dw.on { border-color: var(--yellow); }
.dguess { display: flex; gap: 6px; margin-top: 8px; }
.dguess .input { flex: 1; }
.dlist { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; justify-content: center; }
.dlist span { background: var(--surface2); border-radius: 99px; padding: 3px 10px; font-size: .85rem; }
.dlist .close { background: color-mix(in srgb, var(--yellow) 35%, var(--surface)); }
.dlist .ok { background: color-mix(in srgb, var(--green) 30%, var(--surface)); font-weight: 800; }

/* ===== الشطرنج ===== */
.chess { max-width: 440px; margin: 0 auto; }
.chboard { direction: ltr; position: relative; display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 4px solid #2a2350; }
.chboard .sq, .ckboard .sq { border: 0; padding: 0; margin: 0; display: grid; place-items: center; position: relative; aspect-ratio: 1; }
.chboard .lt { background: #f3e7cf; } .chboard .dk { background: #b58863; }
.chboard .sq.last { box-shadow: inset 0 0 0 100px rgba(255, 214, 60, .38); }
.chboard .sq.sel { box-shadow: inset 0 0 0 100px rgba(80, 200, 120, .55); }
.chboard .sq.chk { box-shadow: inset 0 0 0 100px rgba(239, 75, 75, .7); }
.chboard .sq.tg::after, .ckboard .sq.tg::after { content: ''; position: absolute; width: 30%; height: 30%; border-radius: 50%; background: rgba(27, 23, 64, .35); }
.chboard .sq.cap::after { width: 86%; height: 86%; background: none; border: 4px solid rgba(27, 23, 64, .4); box-sizing: border-box; }
.pc { font-style: normal; font-size: min(9.5vw, 44px); line-height: 1; font-family: "Segoe UI Symbol", "DejaVu Sans", "Noto Sans Symbols2", "Arial Unicode MS", sans-serif; pointer-events: none; }
.pc.w { color: #fffdf7; -webkit-text-stroke: 1.4px #1b1740; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.pc.b { color: #1b1740; -webkit-text-stroke: .6px #000; text-shadow: 0 2px 0 rgba(255,255,255,.18); }
.chbar { display: flex; align-items: center; gap: 8px; padding: 6px 2px; }
.chbar .chn { font-size: .92rem; white-space: nowrap; }
.chtk { flex: 1; display: flex; flex-wrap: wrap; direction: ltr; justify-content: flex-start; min-height: 20px; }
.chtk .pc { font-size: 17px; -webkit-text-stroke-width: .6px; }
.chclk { font: 800 1.15rem/1 ui-monospace, Menlo, monospace; background: var(--surface); border: 2px solid var(--line); border-radius: 10px; padding: 6px 10px; min-width: 70px; text-align: center; direction: ltr; }
.chclk.run { background: var(--yellow); color: #1b1740; border-color: var(--yellow); }
.chclk.low.run { background: var(--coral); color: #fff; animation: diceready .9s infinite; }
.chmsg, .ckmsg, .rvmsg { text-align: center; font-weight: 800; margin: 8px 0 0; min-height: 1.4em; }
.chpromo { position: absolute; inset: 0; background: rgba(20,18,45,.78); display: grid; place-content: center; gap: 10px; text-align: center; color: #fff; direction: rtl; }
.chpromo div { display: flex; gap: 8px; direction: ltr; }
.chpromo button { width: 64px; height: 64px; border-radius: 14px; background: #f3e7cf; border: 3px solid #ffc93c; cursor: pointer; display: grid; place-items: center; }

/* ===== الداما ===== */
.ckg { max-width: 440px; margin: 0 auto; }
.ckboard { direction: ltr; display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 4px solid #4a2a14; margin-bottom: 8px; }
.ckboard .lt { background: #f2dcb3; } .ckboard .dk { background: #8a5226; cursor: pointer; }
.ckboard .sq.last { box-shadow: inset 0 0 0 100px rgba(255, 214, 60, .3); }
.ckboard .sq.lastcap { box-shadow: inset 0 0 0 100px rgba(239, 75, 75, .35); }
.ckboard .sq.sel { box-shadow: inset 0 0 0 100px rgba(80, 200, 120, .55); }
.ckboard .sq.tg::after { background: rgba(255, 255, 255, .55); }
.ck { width: 78%; height: 78%; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: min(6vw, 26px); color: #ffd84a; pointer-events: none; transition: transform .15s; }
.ck.mine { background: radial-gradient(circle at 35% 30%, #ff8a8a, #d92e2e 60%, #9d1c1c); box-shadow: 0 4px 0 #6b1010, inset 0 0 0 4px rgba(255,255,255,.18); }
.ck.theirs { background: radial-gradient(circle at 35% 30%, #5a5577, #26223f 60%, #121022); box-shadow: 0 4px 0 #000, inset 0 0 0 4px rgba(255,255,255,.1); }
.ckboard .sq.can .ck { transform: translateY(-2px); }
.ckboard .sq.must .ck { animation: tokpulse2 .8s infinite alternate; outline: 3px solid #ffc93c; outline-offset: 2px; }

/* ===== أوثيلو ===== */
.rvg { max-width: 440px; margin: 0 auto; }
.rvboard { direction: ltr; display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; padding: 6px; background: #145c3a; border-radius: 14px; border: 4px solid #0d3f27; aspect-ratio: 1; margin-bottom: 8px; }
.rsq { background: #1f8a55; border: 0; border-radius: 5px; padding: 0; display: grid; place-items: center; cursor: pointer; position: relative; }
.rsq.mv::after { content: ''; width: 26%; height: 26%; border-radius: 50%; background: rgba(0,0,0,.28); }
.rsq.last { background: #27a566; }
.disc { width: 84%; height: 84%; border-radius: 50%; display: none; }
.disc.d0, .disc.d1 { display: block; }
.disc.d0 { background: radial-gradient(circle at 35% 30%, #4c4c5c, #111 65%); box-shadow: 0 3px 0 rgba(0,0,0,.45); }
.disc.d1 { background: radial-gradient(circle at 35% 30%, #fff, #dcdcdc 70%); box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.disc.flip { animation: rvflip .45s ease; }
.disc.drop { animation: rvdrop .25s ease; }
@keyframes rvflip { 0% { transform: rotateY(0); } 50% { transform: rotateY(90deg) scale(1.1); } 100% { transform: rotateY(0); } }
@keyframes rvdrop { from { transform: scale(1.5); opacity: .4; } }
.rvcount { display: flex; justify-content: space-between; margin-bottom: 8px; }
.rvcount span { display: flex; align-items: center; gap: 8px; font-size: 1.4rem; font-weight: 900; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 6px 14px; }
.rvcount .disc { width: 26px; height: 26px; }

/* ===== سباق الضوء ===== */
.trg { max-width: 440px; margin: 0 auto; }
.trwrap { position: relative; display: flex; justify-content: center; touch-action: none; user-select: none; }
.trcv { border-radius: 14px; border: 3px solid #2a2350; box-shadow: 0 0 30px rgba(34, 211, 238, .15); display: block; }
.trov { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #fff; pointer-events: none; }
.trov b { font-size: 4rem; text-shadow: 0 0 20px #22d3ee; }
.trov small { font-weight: 800; background: rgba(11,10,31,.75); padding: 6px 12px; border-radius: 99px; }
.trpad { display: grid; grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(2, 54px); gap: 6px; justify-content: center; margin-top: 10px; direction: ltr; }
.trpad button { border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font-size: 1.4rem; cursor: pointer; touch-action: manipulation; }
.trpad button:active { background: var(--yellow); color: #1b1740; }
.trpad [data-trd="0"] { grid-column: 2; grid-row: 1; } .trpad [data-trd="3"] { grid-column: 1; grid-row: 2; }
.trpad [data-trd="2"] { grid-column: 2; grid-row: 2; } .trpad [data-trd="1"] { grid-column: 3; grid-row: 2; }
.trmsg { text-align: center; color: var(--muted); font-size: .85rem; margin: 8px 0 0; }

/* ===== الألعاب اللحظية: أرض الألوان، القنابل، الدبابات ===== */
.rtg { max-width: 440px; margin: 0 auto; }
.rthud { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-weight: 800; font-size: .9rem; margin-bottom: 6px; direction: rtl; }
.rthud span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.rthud i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.rthud .h-t { font-variant-numeric: tabular-nums; color: var(--muted); }
.rthud .h-t.warn { color: var(--coral); animation: diceready .8s infinite; }
.rthud .h-op { color: var(--muted); }
.rtwrap { position: relative; display: flex; justify-content: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.rtwrap canvas { border-radius: 14px; border: 3px solid #2a2350; display: block; }
.paintg canvas { box-shadow: 0 0 30px rgba(34, 211, 238, .15); }
.rtov { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #fff; pointer-events: none; }
.rtov b { font-size: 4rem; text-shadow: 0 0 20px #22d3ee; }
.rtov small { font-weight: 800; background: rgba(11,10,31,.78); padding: 6px 12px; border-radius: 99px; }
.rtpad { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 10px; direction: ltr; }
.dpad { display: grid; grid-template-columns: repeat(3, 60px); grid-template-rows: repeat(2, 52px); gap: 6px; }
.dpad button { border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font-size: 1.35rem; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.dpad button:active { background: var(--yellow); color: #1b1740; }
.dpad [data-dir="0"] { grid-column: 2; grid-row: 1; } .dpad [data-dir="3"] { grid-column: 1; grid-row: 2; }
.dpad [data-dir="2"] { grid-column: 2; grid-row: 2; } .dpad [data-dir="1"] { grid-column: 3; grid-row: 2; }
.rtfire { width: 92px; height: 92px; border-radius: 50%; border: 3px solid var(--text); background: var(--coral); color: #fff; font: 900 1.6rem/1 inherit; box-shadow: 0 5px 0 var(--text); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.rtfire:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--text); }
.tanksg .rtfire { font-size: 1.05rem; }
.tkctl { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: 0 12px; direction: ltr; }
.joy { width: 124px; height: 124px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); position: relative; touch-action: none; display: grid; place-items: center; }
.joy i { width: 54px; height: 54px; border-radius: 50%; background: #22d3ee; border: 3px solid var(--text); box-shadow: 0 4px 0 rgba(0,0,0,.25); pointer-events: none; }
.rtmsg { text-align: center; color: var(--muted); font-size: .82rem; margin: 8px 0 0; }
.tanksg .rthud { margin-bottom: 4px; }
.tanksg .joy { width: 112px; height: 112px; }
.tanksg .rtfire { width: 86px; height: 86px; }
.tkctl { margin-top: 8px; }

/* ===== ألعاب الفيزياء ===== */
.hockeyg canvas { border-color: #3d8bff; box-shadow: 0 6px 0 rgba(27,23,64,.15); cursor: none; touch-action: none; }
.soccerg canvas { border-color: #1b4d2b; }
.sumog canvas { border-radius: 50%; border-color: #2a2350; }
.phg .rtfire { position: relative; font-size: 1.05rem; }
.cdring { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); transform: rotate(-90deg); pointer-events: none; }
.cdring circle { fill: none; stroke: #ffc93c; stroke-width: 6; stroke-dasharray: 289; stroke-dashoffset: 289; transition: stroke-dashoffset .1s linear; }
.rtfire.cool { filter: saturate(.45) brightness(.92); }
.soccerg .joy { width: 108px; height: 108px; }
.soccerg .rtfire, .sumog .rtfire { width: 84px; height: 84px; }

/* ===== وضع اللعب: اللعبة تغطي الشاشة ===== */
.pbar { display: none; }
body.playing { overflow: hidden; }
body.playing #game {
  position: fixed; inset: 0; z-index: 60; background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
  padding: 0 10px calc(10px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch;
}
body.playing #game > * { max-width: 560px; margin-inline: auto; }
body.playing .pbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0; z-index: 2; background: var(--bg); padding: calc(6px + env(safe-area-inset-top)) 0 4px; }
.gbtn { border: 1.5px solid var(--line); background: var(--surface); color: var(--text); border-radius: 12px; min-height: 34px; padding: 4px 10px; font: inherit; font-weight: 800; font-size: .85rem; cursor: pointer; white-space: nowrap; }
.gbtn.arm { background: var(--coral); color: #fff; border-color: var(--coral); }
.gtitle { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.playing .vs { gap: 6px; margin-bottom: 2px; }
body.playing .pl { padding: 3px 8px; border-radius: 12px; border-width: 1.5px; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
body.playing .pl .nm { font-size: .85rem; }
body.playing .pl .mk { font-size: .78rem; white-space: nowrap; }
body.playing .score { font-size: 1.05rem; }
body.playing .status { font-size: .86rem; min-height: 1.25em; margin: 2px 0 4px; line-height: 1.3; }
body.playing .reacts { margin-top: 10px; }
body.playing .reacts button { padding: 5px 10px; font-size: .82rem; }
/* النتيجة تطفو فوق اللعبة بدل أن تختفي أسفل الشاشة */
body.playing .result:not(.hidden) {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70;
  width: min(94vw, 420px); margin: 0; background: var(--surface); border: 2px solid var(--line); border-radius: 22px; padding: 14px 12px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35); animation: resIn .3s ease;
}
@keyframes resIn { from { transform: translate(-50%, 30px); opacity: 0; } }
body.playing .result .big { font-size: 1.4rem; }
/* الألعاب اللحظية: أزرار أصغر قليلاً، ونخفي نص المساعدة في الشاشات القصيرة */
body.playing .rthud { font-size: .82rem; margin-bottom: 3px; }
body.playing .tkctl, body.playing .rtpad { margin-top: 6px; }
body.playing .rtwrap canvas { border-width: 2px; }
@media (max-height: 860px) {
  body.playing .rtmsg, body.playing .trmsg { display: none; }
  body.playing .joy, body.playing .tanksg .joy, body.playing .soccerg .joy { width: 100px; height: 100px; }
  body.playing .joy i { width: 46px; height: 46px; }
  body.playing .rtfire, body.playing .tanksg .rtfire, body.playing .soccerg .rtfire, body.playing .sumog .rtfire { width: 80px; height: 80px; font-size: .95rem; }
  body.playing .dpad { grid-template-columns: repeat(3, 54px); grid-template-rows: repeat(2, 46px); gap: 5px; }
  body.playing .trpad { grid-template-columns: repeat(3, 56px); grid-template-rows: repeat(2, 46px); }
}
@media (max-height: 640px) {
  body.playing .status { display: none; }
}
.bubble { z-index: 66; }
body.playing .gtitle { color: var(--text); }
body.playing .whead { grid-template-columns: 150px 1fr; gap: 6px; margin-bottom: 4px; }
body.playing .wsecret { display: grid; grid-template-columns: 44px 1fr; align-items: center; text-align: start; gap: 6px; padding: 4px 6px; }
body.playing .wsecret small { grid-column: 1 / -1; }
body.playing .wsface svg { width: 40px; height: 44px; margin: 0; }
body.playing .wgrid { gap: 4px; }
body.playing .wcard span { font-size: .64rem; }

/* الألعاب الفردية: على الجوال تبدأ الصفحة من اللعبة مباشرة، واللوح لا يتجاوز ارتفاع الشاشة */
@media (max-width: 760px) { .gamebox { scroll-margin-top: 0; } .stage { max-height: calc(100svh - 92px); } }

@media (max-width: 760px) { body.gamepage .top { position: static; } }

/* أزرار الألعاب: بدون مربع اللمس الأزرق وبدون تحديد نص أو قائمة ضغط مطوّل */
.gamebox, .gamebox *, #board canvas, #board button, .joy, .rtfire, .dpad button, .trpad button, .ldice, .pbar button {
  -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none;
}
.gamebox .stage canvas { touch-action: none; }

/* ===== تحدي التسلسل ===== */
.seqg, .tfg, .scrg, .oddg { max-width: 440px; margin: 0 auto; }
.sqhud, .tfhud { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; font-size: .88rem; color: var(--muted); margin-bottom: 6px; }
.sqpads { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; aspect-ratio: 1; max-width: 360px; margin: 6px auto; padding: 12px; border-radius: 50%; background: #1b1740; touch-action: manipulation; }
.sqpad { border: 0; padding: 0; background: var(--c); opacity: .42; cursor: pointer; transition: opacity .1s, transform .1s, filter .1s; }
.sqpad:nth-child(1) { border-radius: 100% 12px 12px 12px; } .sqpad:nth-child(2) { border-radius: 12px 100% 12px 12px; }
.sqpad:nth-child(3) { border-radius: 12px 12px 12px 100%; } .sqpad:nth-child(4) { border-radius: 12px 12px 100% 12px; }
.sqpads.live .sqpad { opacity: .78; }
.sqpad.lit { opacity: 1 !important; filter: brightness(1.25) drop-shadow(0 0 18px var(--c)); transform: scale(1.03); }
.sqpads.bad { animation: shake .4s; }
.sqcenter { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 38%; aspect-ratio: 1; border-radius: 50%; background: var(--surface); border: 6px solid #1b1740; display: grid; place-content: center; text-align: center; pointer-events: none; }
.sqcenter b { font-size: 2rem; line-height: 1.1; }
.sqcenter small { font-size: .68rem; color: var(--muted); font-weight: 700; padding: 0 6px; }
.sqprog { display: grid; gap: 4px; margin: 8px 0 4px; }
.sqprog > div { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: .8rem; font-weight: 800; }
.sqprog span { min-width: 64px; }
.sqprog i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); display: inline-block; }
.sqprog .pr-me i.on { background: #22d3ee; } .sqprog .pr-op i.on { background: #ff4fa3; }
.sqprog i.x { background: var(--coral); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ===== صح أم خطأ ===== */
.tfcard { background: var(--surface); border: 3px solid var(--line); border-radius: 22px; min-height: 170px; padding: 18px 14px; display: grid; place-content: center; text-align: center; margin: 8px 0; transition: border-color .2s, background .2s; }
.tfq { font-size: 1.3rem; font-weight: 900; line-height: 1.6; margin: 0; }
.tff { font-weight: 800; margin: 8px 0 0; min-height: 1.2em; }
.tfcard.right { border-color: var(--green); background: color-mix(in srgb, var(--green) 12%, var(--surface)); }
.tfcard.wrong { border-color: var(--coral); background: color-mix(in srgb, var(--coral) 12%, var(--surface)); }
.tfbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tfb { min-height: 64px; border-radius: 18px; border: 3px solid var(--text); font: 900 1.25rem/1 inherit; cursor: pointer; box-shadow: 0 5px 0 var(--text); color: #fff; }
.tfb.yes { background: var(--green); } .tfb.no { background: var(--coral); }
.tfb:disabled { opacity: .45; box-shadow: 0 2px 0 var(--text); transform: translateY(3px); cursor: default; }
.tfb.picked { opacity: 1; outline: 4px solid var(--yellow); outline-offset: 2px; }
.tfmsg { text-align: center; font-weight: 800; min-height: 1.4em; margin: 10px 0 0; }

/* ===== رتّب الحروف ===== */
.scrword { background: var(--surface); border: 3px dashed var(--line); border-radius: 18px; min-height: 76px; display: grid; place-items: center; margin: 8px 0; }
.scrword b { font-size: 2.2rem; letter-spacing: .02em; }
.scrword.done { border-style: solid; border-color: var(--green); }
.scrword.shake { animation: shake .4s; border-color: var(--coral); }
.scrslots, .scrtiles { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 8px 0; }
.slot { width: 48px; height: 52px; border-radius: 12px; border: 2px dashed var(--line); background: transparent; font: 900 1.5rem/1 inherit; color: var(--text); }
.slot.full { border-style: solid; border-color: var(--yellow); background: var(--surface); cursor: pointer; }
.tile { width: 56px; height: 60px; border-radius: 14px; border: 3px solid var(--text); background: var(--yellow); color: #1b1740; font: 900 1.7rem/1 inherit; box-shadow: 0 4px 0 var(--text); cursor: pointer; }
.tile:disabled { opacity: .25; box-shadow: none; transform: translateY(3px); }
.scrtools { display: flex; gap: 8px; justify-content: center; }
.scrtools .btn { min-height: 38px; padding: 6px 14px; font-size: .88rem; }

/* ===== اللون المختلف ===== */
.oddwrap { position: relative; max-width: 400px; margin: 8px auto; }
.oddgrid { display: grid; gap: 6px; aspect-ratio: 1; touch-action: manipulation; }
.oddgrid.wait { filter: blur(6px); }
.odt { border: 0; border-radius: 12px; padding: 0; cursor: pointer; transition: transform .1s; }
.odt:active { transform: scale(.94); }
.odt.found { outline: 5px solid #fff; box-shadow: 0 0 0 9px #ff4fa3; z-index: 1; animation: tokpulse2 .5s infinite alternate; }
.odt.found.mine { box-shadow: 0 0 0 9px #22d3ee; }
.odt.miss { animation: shake .35s; }
.oddfreeze { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3.5rem; background: rgba(20,18,45,.45); border-radius: 14px; }
.sqpads { overflow: hidden; gap: 10px; padding: 0; border: 10px solid #1b1740; }
.sqpad:nth-child(1), .sqpad:nth-child(2), .sqpad:nth-child(3), .sqpad:nth-child(4) { border-radius: 0; }

/* ===== البلياردو ===== */
.poolg, .raceg, .archg { max-width: 560px; margin: 0 auto; }
.plhud { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; font-size: .78rem; font-weight: 800; margin-bottom: 4px; }
.plhud .pl-op { text-align: left; color: var(--muted); }
.plhud .pl-msg { text-align: center; color: var(--text); max-width: 200px; line-height: 1.3; }
.poolg canvas { border-radius: 14px; touch-action: none; box-shadow: 0 8px 24px rgba(0,0,0,.25); border: 0; }
.plctl { display: flex; align-items: center; gap: 8px; margin-top: 6px; direction: ltr; }
.plctl.dim { opacity: .45; }
.plpow { flex: 1; accent-color: #ef4b4b; height: 34px; }
.plshoot { min-height: 44px; padding: 8px 16px; font-size: 1rem; }
/* ===== السباق ===== */
.raceg canvas { border-radius: 14px; border: 3px solid #8a5226; }
.rcinfo { display: grid; text-align: center; gap: 2px; font-weight: 900; }
.rcinfo b { font-size: 1.2rem; } .rcinfo small { color: var(--muted); font-size: .9rem; }
/* ===== الرماة ===== */
.archg canvas { border-radius: 14px; border: 3px solid #2a2350; touch-action: none; cursor: crosshair; }
.armsg { text-align: center; font-weight: 800; min-height: 1.4em; margin: 6px 0 0; }

/* ===== الدومينو ===== */
.domg, .volg, .golfg { max-width: 600px; margin: 0 auto; }
.dmhud { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-weight: 800; font-size: .85rem; margin-bottom: 4px; }
.dmhud b { font-size: 1.15rem; } .dmhud .dm-mid { text-align: center; color: var(--muted); font-size: .76rem; }
.dmhud i, .gf-me i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dmopp { display: flex; align-items: center; gap: 3px; justify-content: center; min-height: 22px; margin-bottom: 4px; flex-wrap: wrap; }
.dmopp small { color: var(--muted); font-weight: 700; margin-left: 4px; }
.dmback { width: 11px; height: 20px; border-radius: 3px; background: #2a2350; border: 2px solid #4b4390; }
.domg canvas { border-radius: 14px; border: 4px solid #6b3d1f; }
.dmmsg { text-align: center; font-weight: 800; min-height: 1.4em; margin: 6px 0 4px; font-size: .92rem; }
.dmhand { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; direction: ltr; }
.dmtile { padding: 0; border: 0; background: none; cursor: pointer; transition: transform .12s, opacity .12s; touch-action: manipulation; }
.dmtile svg { width: 38px; height: 76px; display: block; }
.dmtile svg rect, svg.mini rect { fill: #fbf8ef; stroke: #1b1740; stroke-width: 2.5; }
.dmtile svg path, svg.mini path { stroke: #1b1740; stroke-width: 2; }
.dmtile svg circle, svg.mini circle { fill: #1b1740; }
.dmtile.ok svg rect { stroke: #ffc93c; stroke-width: 4; fill: #fff; }
.dmtile.ok { transform: translateY(-6px); filter: drop-shadow(0 4px 6px rgba(255,201,60,.5)); }
.dmtile.no { opacity: .45; }
.dmtile.sel { transform: translateY(-12px) scale(1.06); }
.dmtile.sel svg rect { fill: #fff6cf; }
.dmsides { display: flex; gap: 6px; justify-content: center; align-items: center; flex-wrap: wrap; margin: 4px 0 8px; font-weight: 800; }
.dmsides .btn { padding: 8px 12px; min-height: 40px; }
.dmact { text-align: center; margin-top: 8px; }
.dmdraw:disabled { opacity: .4; }
.dmdraw.pulse { animation: dmpulse 1s infinite; }
@keyframes dmpulse { 50% { transform: scale(1.06); } }
.dmover { position: relative; margin: 10px auto 0; background: var(--card, #fff); border: 3px solid #1b1740; border-radius: 16px; padding: 12px; text-align: center; display: grid; gap: 6px; }
.dmover b { font-size: 1.1rem; } .dmover small { color: var(--muted); }
.dmrev { display: grid; gap: 6px; } .dmrev div { display: flex; align-items: center; gap: 6px; justify-content: center; flex-wrap: wrap; }
.dmrev em { font-style: normal; font-weight: 800; } .dmrev span { display: flex; gap: 3px; direction: ltr; }
svg.mini { width: 16px; height: 32px; }
/* ===== الكرة الطائرة ===== */
.volg canvas { border-radius: 14px; border: 3px solid #1b1740; }
.vbctl { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; direction: ltr; user-select: none; -webkit-user-select: none; }
.vbmove { display: flex; gap: 10px; }
.vbbtn { width: 74px; height: 64px; border-radius: 18px; border: 3px solid #1b1740; background: #fff; font-size: 1.6rem; font-weight: 900; color: #1b1740; touch-action: none; box-shadow: 0 4px 0 #1b1740; -webkit-tap-highlight-color: transparent; }
.vbbtn.jump { width: 110px; background: #ffc93c; font-size: 1.15rem; }
.vbbtn.on { transform: translateY(3px); box-shadow: 0 1px 0 #1b1740; background: #22d3ee; }
/* ===== الجولف ===== */
.golfg canvas { border-radius: 12px; touch-action: none; cursor: crosshair; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.golfg .plhud small { color: var(--muted); font-weight: 600; }
.domg { position: relative; }
.dmover { position: absolute; left: 8px; right: 8px; top: 64px; z-index: 6; box-shadow: 0 12px 30px rgba(0,0,0,.3); margin: 0; }
.golfg .rtov b { font-size: 1.7rem; }
.golfg .rtov small { font-size: .95rem; }
/* لوحة تحريك الكرة الطائرة */
.volg canvas { touch-action: none; }
.vbpad { position: relative; flex: 1; height: 70px; border-radius: 20px; border: 3px solid #1b1740; background: linear-gradient(90deg, #e8f9fd, #c9f2fb); touch-action: none; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 4px 0 #1b1740; cursor: ew-resize; }
.vbpad span { font-weight: 800; color: #1b1740; opacity: .55; font-size: .9rem; pointer-events: none; direction: rtl; }
.vbpad.act span { opacity: .2; }
.vbthumb { position: absolute; top: 50%; left: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50% 50% 12px 12px; background: #22d3ee; border: 3px solid #1b1740; pointer-events: none; transition: left .05s linear; }
.vbpad.act .vbthumb { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(34,211,238,.3); transition: none; }
.vbctl .vbbtn.jump { height: 70px; width: 104px; flex: none; }

/* ===== ركلات الترجيح ===== */
.peng, .snkg, .slcg { max-width: 560px; margin: 0 auto; }
.pkrow { display: grid; grid-template-columns: 70px 1fr 28px; align-items: center; gap: 6px; font-weight: 800; font-size: .85rem; margin-bottom: 3px; }
.pkrow span { display: flex; gap: 4px; direction: ltr; justify-content: center; flex-wrap: wrap; }
.pkrow i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-style: normal; font-size: .72rem; }
.pkrow i.g { background: #38c972; border-color: #1f8a4c; } .pkrow i.x { background: #ef4b4b; border-color: #a52727; color: #fff; }
.pkrow i.sd { border-style: dashed; }
.pkrow em { font-style: normal; font-size: 1.2rem; text-align: center; }
.pkwrap { position: relative; }
.peng canvas { border-radius: 14px; border: 3px solid #1b1740; }
.pkzones { position: absolute; display: none; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); direction: ltr; gap: 4px; }
.pkzones.on, .pkzones:has(.sel) { display: grid; }
.pkzones button { border: 2px dashed rgba(255,255,255,.8); background: rgba(255,255,255,.12); border-radius: 10px; font-size: 1.5rem; cursor: pointer; touch-action: manipulation; }
.pkzones.on button { animation: pkblink 1.2s infinite; }
.pkzones.on button:hover, .pkzones button.sel { background: rgba(255,201,60,.55); border-style: solid; animation: none; }
@keyframes pkblink { 50% { background: rgba(255,255,255,.28); } }
.pkmsg { text-align: center; font-weight: 800; min-height: 2.6em; margin: 6px 0 0; }
/* ===== الثعابين ===== */
.snkg canvas { border-radius: 12px; border: 4px solid #5e8a2e; touch-action: none; }
.snwrap { touch-action: none; }
.snkg .trpad { margin-top: 8px; }
.snkg .trpad button { touch-action: none; }
/* ===== التقطيع ===== */
.slcg canvas { border-radius: 14px; border: 4px solid #2a1a0d; touch-action: none; cursor: crosshair; }
.slcg .rthud b { font-size: 1.2rem; }
.trpad [data-snd="0"] { grid-column: 2; grid-row: 1; } .trpad [data-snd="3"] { grid-column: 1; grid-row: 2; }
.trpad [data-snd="2"] { grid-column: 2; grid-row: 2; } .trpad [data-snd="1"] { grid-column: 3; grid-row: 2; }

/* ===== تحدي السلة ===== */
.hoopg, .bowlg, .cardg, .wallg { max-width: 600px; margin: 0 auto; position: relative; }
.hoopg canvas { border-radius: 14px; border: 3px solid #1b1740; touch-action: none; }
.hoopg .rthud b, .cardg .dmhud b { font-size: 1.15rem; }
.hpmsg { min-height: 1.4em; }
/* ===== البولينج ===== */
.bwcard { font-size: .74rem; font-weight: 800; margin-bottom: 6px; display: grid; gap: 2px; }
.bwcard > div { display: grid; grid-template-columns: 58px repeat(5, 1fr) 36px; gap: 2px; align-items: stretch; }
.bwcard span { border: 1.5px solid var(--line); border-radius: 6px; display: grid; text-align: center; min-height: 30px; background: var(--surface); }
.bwcard span.cur { border-color: #ffc93c; box-shadow: 0 0 0 2px rgba(255,201,60,.4); }
.bwcard span i { font-style: normal; font-size: .7rem; color: var(--muted); direction: ltr; }
.bwcard span em { font-style: normal; font-size: .85rem; }
.bwcard strong { display: grid; place-items: center; font-size: 1rem; }
.bwcard .bwhead span { min-height: 0; border: 0; background: none; color: var(--muted); }
.bwmain { display: flex; gap: 10px; align-items: flex-start; justify-content: center; }
.bwmain .rtwrap { flex: none; }
.bowlg canvas { border-radius: 12px; border: 3px solid #1b1740; touch-action: none; }
.bwside { flex: 1; max-width: 170px; display: grid; gap: 6px; font-weight: 800; font-size: .85rem; }
.bwside.dim { opacity: .5; }
.bwside input { width: 100%; accent-color: #ff4fa3; height: 30px; }
.bwspl { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; }
.bwmsg { margin: 6px 0 0; font-size: .95rem; line-height: 1.5; }
/* ===== سباق الأوراق ===== */
.cdopp { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-bottom: 6px; }
.cdopp small { color: var(--muted); font-weight: 800; }
.cdopp span { display: flex; justify-content: center; }
.cdback { width: 22px; height: 32px; border-radius: 5px; background: repeating-linear-gradient(45deg, #2a2350 0 4px, #4b4390 4px 8px); border: 2px solid #fff; margin-left: -8px; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.cdtable { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 14px; border-radius: 18px; background: radial-gradient(#1f9a57, #137341); border: 4px solid #6b3d1f; position: relative; }
.cddeck { width: 64px; height: 92px; border-radius: 10px; border: 3px solid #fff; background: repeating-linear-gradient(45deg, #2a2350 0 6px, #4b4390 6px 12px); color: #fff; font-size: 1.6rem; display: grid; place-items: center; cursor: pointer; box-shadow: 3px 3px 0 #1b1740; }
.cddeck small { font-size: .75rem; font-weight: 800; }
.cddeck:disabled { opacity: .55; cursor: default; }
.cddeck.pulse { animation: dmpulse 1s infinite; }
.cdcolor { position: absolute; bottom: 6px; left: 10px; color: #fff; font-weight: 800; font-size: .8rem; display: flex; gap: 5px; align-items: center; }
.cdcolor i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; }
.cd { direction: ltr; unicode-bidi: isolate; --cc: #ef4b4b; width: 52px; height: 76px; border-radius: 9px; background: #fff; border: 3px solid var(--cc); box-shadow: 0 2px 5px rgba(0,0,0,.35); display: grid; place-items: center; position: relative; color: var(--cc); font-weight: 900; overflow: hidden; }
/* تصميم أصلي: معيّن ملوّن في الوسط ورقم في الزوايا */
.cd::before { content: ''; position: absolute; width: 30px; height: 30px; border-radius: 7px; background: var(--cc); transform: rotate(45deg); }
.cd i { position: relative; font-style: normal; font-size: 1.2rem; color: #fff; line-height: 1; }
.cd.wild { border-color: #1b1740; color: #1b1740; }
.cd.wild::before { background: conic-gradient(#ef4b4b 0 25%, #ffc93c 0 50%, #38c972 0 75%, #3d8bff 0); }
.cd.wild i { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.cd small { position: absolute; top: 3px; right: 5px; font-size: .62rem; }
.cd small + small { top: auto; right: auto; bottom: 3px; left: 5px; }
.cd.big { width: 70px; height: 102px; box-shadow: 0 0 0 4px var(--cc), 0 4px 10px rgba(0,0,0,.35); }
.cd.big::before { width: 42px; height: 42px; border-radius: 9px; }
.cd.big i { font-size: 1.6rem; }
.cd.mini { width: 26px; height: 38px; border-width: 2px; } .cd.mini::before { width: 14px; height: 14px; border-radius: 3px; } .cd.mini i { font-size: .6rem; } .cd.mini small { display: none; }
.cdhand { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; direction: ltr; margin-top: 6px; }
.cdbtn { padding: 0; border: 0; background: none; cursor: pointer; transition: transform .12s, opacity .12s; touch-action: manipulation; }
.cdbtn.ok { transform: translateY(-8px); filter: drop-shadow(0 4px 6px rgba(255,201,60,.6)); }
.cdbtn.no { opacity: .45; }
.cdbtn.sel { transform: translateY(-14px) scale(1.06); }
.cdpick { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 4px 0; font-weight: 800; }
.cdpick [data-col]:not(.gbtn) { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #1b1740; cursor: pointer; }
.cdrev { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; direction: ltr; }
/* ===== سباق الجدران ===== */
.wallg canvas { border-radius: 14px; border: 4px solid #2a2350; touch-action: none; }
.wlctl { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.wlctl .btn { padding: 8px 14px; min-height: 44px; }
.wlctl .gbtn { min-width: 48px; min-height: 44px; font-size: 1.3rem; }
.bwside input, .bwspl { direction: ltr; }

/* ===== السهام ===== */
.dartg { max-width: 560px; margin: 0 auto; }
.dthud { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.dthud > div { border: 2px solid var(--line); border-radius: 14px; padding: 6px 8px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 8px; background: var(--surface); opacity: .65; transition: opacity .2s, transform .2s; }
.dthud > div.act { opacity: 1; border-color: #ffc93c; box-shadow: 0 0 0 3px rgba(255,201,60,.3); }
.dthud b { font-size: .85rem; } .dthud strong { font-size: 1.6rem; text-align: left; line-height: 1.1; }
.dthud span { grid-column: 1 / -1; display: flex; gap: 4px; direction: ltr; justify-content: center; min-height: 0; }
.dthud span i { font-style: normal; font-size: .75rem; font-weight: 800; min-width: 34px; text-align: center; padding: 2px 4px; border-radius: 8px; background: rgba(127,127,127,.15); }
.dthud span i.hit { background: #38c972; color: #fff; } .dthud span i.miss { background: #ef4b4b; color: #fff; }
.dthud small { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: .72rem; font-weight: 700; min-height: 1.1em; }
.dartg canvas { border-radius: 16px; border: 3px solid #1b1740; touch-action: none; cursor: crosshair; }

/* ===== محتوى صفحات الألعاب (SEO) ===== */
.gabout { margin: 18px 0; }
.specs { width: 100%; border-collapse: collapse; margin: 12px 0 4px; font-size: .92rem; }
.specs th, .specs td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.specs th { width: 34%; color: var(--muted); font-weight: 800; white-space: nowrap; }
.gextra h2, .related h2 { margin-top: 28px; }
.faq details { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 8px 0; background: var(--surface); }
.faq summary { cursor: pointer; font-weight: 800; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: '＋ '; color: #ff6b6b; }
.faq details[open] summary::before { content: '－ '; }
.faq details p { margin: 8px 0 2px; }
.relgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 12px 0; }
.relcard { display: grid; gap: 4px; text-decoration: none; color: inherit; border-radius: 14px; overflow: hidden; border: 1.5px solid var(--line); background: var(--surface); padding-bottom: 8px; transition: transform .15s; }
.relcard:hover { transform: translateY(-3px); }
.relcard .thumb { display: block; aspect-ratio: 400 / 368; overflow: hidden; }
.relcard .thumb svg { width: 100%; height: 100%; display: block; }
.relcard b { padding: 0 10px; font-size: .95rem; }
.relcard small { padding: 0 10px; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.catlinks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.catlinks a { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); text-decoration: none; color: inherit; }
.catlinks a:hover { border-color: #ffc93c; }
.catlinks small { color: var(--muted); }
.byline { color: var(--muted); font-size: .85rem; margin: -6px 0 14px; }
/* حجز مساحة للإعلان عند امتلائه حتى لا تهتز الصفحة (مؤشر CLS) */
.ad-slot:not(:empty) { min-height: 280px; }
.gshot { margin: 12px 0; } .gshot img { width: 100%; height: auto; border-radius: 14px; display: block; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.card .rules { position: relative; z-index: 3; display: inline-flex; align-items: center; min-height: 32px; font-size: .78rem; font-weight: 800; color: #ff6b6b; text-decoration: none; margin-top: 2px; }
.card .rules:hover { text-decoration: underline; }
.card .info { z-index: 2; pointer-events: none; }
.card .info .rules { pointer-events: auto; }
.postlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 12px 0; }
.postlist a { display: grid; gap: 4px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); text-decoration: none; color: inherit; }
.postlist a:hover { border-color: #ffc93c; }
.postlist b { font-size: .98rem; line-height: 1.5; } .postlist small { color: var(--muted); line-height: 1.6; }
.readalso { margin-top: 18px; font-weight: 700; }
.footcats { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.footcats nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .85rem; }
