/* GamesVora shared stylesheet */
:root {
  --bg: #f4f6fb; --bg2: #e9edf6; --surface: #ffffff; --surface2: #f1f4fa; --border: #dde3ee;
  --text: #17203a; --muted: #5c6782; --accent: #4f46e5; --accent2: #7c3aed; --accent-text: #fff;
  --good: #059669; --bad: #dc2626; --warn: #d97706; --focus: #f59e0b;
  --felt: #17714a; --felt2: #0f5c3b; --board: #e7c48f; --board2: #b07d48;
  --shadow: 0 1px 2px rgba(20,30,60,.06), 0 6px 20px rgba(20,30,60,.08);
  --radius: 14px; --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1220; --bg2: #121a2d; --surface: #172036; --surface2: #1e2943; --border: #2a3654;
    --text: #e8ecf7; --muted: #9aa6c3; --accent: #818cf8; --accent2: #a78bfa; --accent-text: #0d1220;
    --good: #34d399; --bad: #f87171; --warn: #fbbf24; --felt: #145c3d; --felt2: #0d452d; --board: #c9a06a; --board2: #8a5d33;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1220; --bg2: #121a2d; --surface: #172036; --surface2: #1e2943; --border: #2a3654;
  --text: #e8ecf7; --muted: #9aa6c3; --accent: #818cf8; --accent2: #a78bfa; --accent-text: #0d1220;
  --good: #34d399; --bad: #f87171; --warn: #fbbf24; --felt: #145c3d; --felt2: #0d452d; --board: #c9a06a; --board2: #8a5d33;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; min-height: 100vh; }
a { color: var(--accent); }
img, svg, canvas { max-width: 100%; }
button, select, input { font: inherit; color: inherit; }

/* ---------- header / sidebar / footer ---------- */
:root { --side-w: 232px; --head-h: 64px; }
.site-header { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); height: var(--head-h); }
.site-header .inner { height: 100%; padding: 0 16px; display: flex; align-items: center; gap: 12px; }
.menu-btn { border: 0; background: transparent; font-size: 22px; width: 40px; height: 40px; border-radius: 10px; cursor: pointer; color: var(--text); }
.menu-btn:hover { background: var(--surface2); }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; color: var(--text); text-decoration: none; letter-spacing: -.02em; flex-shrink: 0; }
.logo-img { height: 54px; width: auto; display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.18)); transition: transform .2s; }
.logo:hover .logo-img { transform: scale(1.04) rotate(-1deg); }
.hsearch { flex: 1; max-width: 560px; margin: 0 auto; position: relative; }
.hsearch input { width: 100%; padding: 10px 16px 10px 40px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface2); font-size: 15px; outline: none; transition: border-color .15s, background .15s; }
.hsearch input:focus { border-color: var(--accent); background: var(--surface); }
.hsearch::before { content: "🔍"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: .65; pointer-events: none; }
.icon-btn { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; width: 40px; height: 40px; cursor: pointer; font-size: 17px; flex-shrink: 0; }
.icon-btn:hover { background: var(--surface2); }
.icon-btn.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.sidebar { position: fixed; top: var(--head-h); left: 0; bottom: 0; width: var(--side-w); z-index: 55; background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; transform: translateX(-100%); transition: transform .2s ease; }
.side-inner { padding: 10px 10px 30px; display: flex; flex-direction: column; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 14.5px; }
.side-link .ic { width: 24px; text-align: center; font-size: 18px; }
.side-link small { margin-left: auto; color: var(--muted); font-weight: 600; font-size: 12px; }
.side-link:hover { background: var(--surface2); }
.side-link.on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.side-sep { height: 1px; background: var(--border); margin: 8px 6px; }
.side-scrim { display: none; }
body.menu-open .sidebar { transform: none; box-shadow: var(--shadow); }
body.menu-open .side-scrim { display: block; position: fixed; inset: var(--head-h) 0 0 0; z-index: 54; background: rgba(8, 12, 24, .4); }
@media (min-width: 1100px) {
  body.home .sidebar, body.cat-page .sidebar { transform: none; }
  body.home .content, body.cat-page .content, body.home .site-footer, body.cat-page .site-footer { margin-left: var(--side-w); }
  body.home .menu-btn, body.cat-page .menu-btn { display: none; }
  body.home.menu-open .side-scrim, body.cat-page.menu-open .side-scrim { display: none; }
}
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 28px 16px; color: var(--muted); font-size: 14px; text-align: center; }
.site-footer a { color: var(--muted); }

/* ---------- home / category ---------- */
.content { padding: 0 20px 20px; max-width: 1640px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; margin: 16px 0 6px; padding: 26px 28px; border-radius: 22px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #2bb8ff55 0%, transparent 55%), radial-gradient(90% 120% at 0% 100%, #ff9f1a40 0%, transparent 60%), linear-gradient(135deg, #24135f 0%, #3b1d8f 55%, #1d3c9e 100%); box-shadow: 0 10px 30px -12px #3b1d8f88; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(#ffffff22 1.2px, transparent 1.3px); background-size: 22px 22px; mask-image: linear-gradient(90deg, transparent, #000 70%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 70%); pointer-events: none; }
.hero-text { position: relative; flex: 1; min-width: 0; }
.hero h1 { font-size: clamp(24px, 3.6vw, 40px); line-height: 1.12; margin: 0 0 8px; letter-spacing: -.03em; color: #fff; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #ffd23f, #ffa62b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
.hero-btn { display: inline-flex; align-items: center; gap: 6px; padding: 11px 22px; border-radius: 999px; font-weight: 800; color: #3a1a00; text-decoration: none; background: linear-gradient(180deg, #ffd23f, #ff9f1a); box-shadow: 0 4px 0 #c46a00, 0 8px 18px -6px #ff9f1a; transition: transform .12s, box-shadow .12s; }
.hero-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 #c46a00, 0 10px 22px -6px #ff9f1a; }
.hero-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #c46a00; }
.hero-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.hero-badges span { font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: #ffffff1f; border: 1px solid #ffffff2e; }
.hero-art { position: relative; width: 200px; height: auto; flex-shrink: 0; filter: drop-shadow(0 12px 18px rgba(0,0,0,.35)); animation: hero-bob 4s ease-in-out infinite; }
@keyframes hero-bob { 50% { transform: translateY(-8px) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .hero-art { animation: none; } }
@media (max-width: 600px) { .hero { padding: 18px 16px; border-radius: 18px; gap: 8px; } .hero-art { width: 96px; align-self: flex-start; } .hero-badges { display: none; } .hero-btn { padding: 9px 18px; } }
.hero p { color: #dcd6ff; margin: 0; font-size: 15.5px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; border: 1px solid var(--border); background: var(--surface); padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--text); text-decoration: none; }
.chip:hover { border-color: var(--accent); }
@media (min-width: 1100px) { body.home .chips { display: none; } }
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 10px; font-size: 20px; letter-spacing: -.02em; }
.section-title small { color: var(--muted); font-weight: 500; font-size: 14px; }
.see-all { margin-left: auto; font-size: 14px; font-weight: 700; text-decoration: none; }
/* tiles */
.tile { position: relative; display: block; text-decoration: none; color: var(--text); border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: 0 1px 2px rgba(20,30,60,.08); transition: transform .16s ease, box-shadow .16s ease; }
.tile:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 10px 24px rgba(20,30,60,.22); z-index: 2; }
.tile-art { position: relative; aspect-ratio: 16/10; background: linear-gradient(135deg, var(--c1, #6366f1), var(--c2, #a855f7)); display: grid; place-items: center; overflow: hidden; }
.tile-emoji { font-size: clamp(34px, 4vw, 52px); filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); }
.tile-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.tile-name { padding: 7px 10px 8px; font-weight: 700; font-size: 13.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { position: absolute; top: 7px; left: 7px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; padding: 3px 7px; border-radius: 7px; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.badge.new { background: #047857; }
.badge.hot { background: #b91c1c; }
.plays { position: absolute; right: 7px; bottom: 7px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.55); padding: 2px 7px; border-radius: 7px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
@media (max-width: 600px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
/* featured mosaic */
.featured { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; margin-top: 14px; }
.featured .tile.big { grid-row: span 2; }
.featured .tile.big .tile-art { aspect-ratio: auto; height: calc(100% - 37px); min-height: 240px; }
.featured .tile.big .tile-emoji { font-size: 90px; }
.featured .tile.big .tile-name { font-size: 17px; }
@media (max-width: 760px) { .featured { grid-template-columns: 1fr 1fr; grid-template-rows: auto; } .featured .tile.big { grid-column: span 2; grid-row: auto; } .featured .tile.big .tile-art { aspect-ratio: 16/9; height: auto; min-height: 0; } }
/* rails */
.rail-wrap { position: relative; }
.rail-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 200px); gap: 14px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 10px; scrollbar-width: thin; }
.rail-track > .tile { scroll-snap-align: start; }
@media (max-width: 600px) { .rail-track { grid-auto-columns: 42%; gap: 10px; } }
.rail-arrow { position: absolute; top: 36%; transform: translateY(-50%); z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); font-size: 22px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; color: var(--text); }
.rail-arrow.l { left: -6px; } .rail-arrow.r { right: -6px; }
.rail-wrap:hover .rail-arrow { opacity: 1; }
@media (hover: none) { .rail-arrow { display: none; } }
.empty-msg { color: var(--muted); padding: 30px; text-align: center; }
.seo-text { color: var(--muted); max-width: 900px; margin: 40px 0 0; font-size: 15px; }
.seo-text h2 { color: var(--text); font-size: 20px; }
.cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 14px; }
.cat-head h1 { margin: 0; font-size: clamp(22px, 3vw, 32px); letter-spacing: -.02em; }
.cat-head h1 small { color: var(--muted); font-size: 15px; font-weight: 600; }
.sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: 14px; }
.prose { max-width: 760px; }
.prose h1 { margin-top: 24px; }
/* consent */
.gv-consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 900; max-width: 720px; margin: 0 auto; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.25); padding: 14px 16px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.gv-consent-text { flex: 1; min-width: 220px; }
.gv-consent-btns { display: flex; gap: 8px; margin-left: auto; }

/* ---------- game page ---------- */
.game-layout { max-width: 1560px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 0 16px; }
@media (min-width: 1280px) { .game-layout { grid-template-columns: minmax(0, 1fr) 300px; } }
.game-wrap { min-width: 0; padding: 12px 0 8px; }
.game-side { display: none; padding-top: 12px; }
@media (min-width: 1280px) { .game-side { display: block; } }
.game-side h2 { font-size: 16px; margin: 4px 0 10px; }
.side-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: sticky; top: calc(var(--head-h) + 12px); }
.tile.sm .tile-name { font-size: 12px; padding: 5px 8px 6px; }
.tile.sm .tile-emoji { font-size: 30px; }
.gamebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.gb-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 22px; background: linear-gradient(135deg, var(--c1), var(--c2)); flex-shrink: 0; }
.gb-title { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.gb-title small { color: var(--muted); font-size: 12.5px; }
.gb-title small a { color: var(--muted); text-decoration: none; }
.gb-spacer { flex: 1; }
.gb-btn { border: 1px solid var(--border); background: var(--surface2); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--text); }
.gb-btn:hover { border-color: var(--accent); }
.gb-btn.on { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border-color: var(--accent); color: var(--accent); }
.more-games { max-width: 1560px; }
.game-wrap.pseudo-fs, .game-wrap:fullscreen { position: fixed; inset: 0; z-index: 100; max-width: none; background: var(--bg); overflow: auto; }
.game-wrap:fullscreen { position: static; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.game-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.game-head h1 { margin: 0; font-size: clamp(20px, 3vw, 28px); letter-spacing: -.02em; }
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.gv-tb-custom, .gv-tb-fixed { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.gv-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 7px 13px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; line-height: 1.2; transition: background .12s, transform .08s; touch-action: manipulation; }
.gv-btn:hover { background: var(--surface2); }
.gv-btn:active { transform: scale(.97); }
.gv-btn:disabled { opacity: .45; cursor: default; }
.gv-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.gv-btn.primary:hover { filter: brightness(1.08); }
.gv-btn.icon { width: 36px; padding: 7px 0; text-align: center; }
.gv-btn.on { outline: 2px solid var(--accent); }
.gv-select-wrap { display: inline-flex; align-items: center; gap: 4px; }
.gv-select-label { font-size: 12px; color: var(--muted); display: none; }
.gv-select { border: 1px solid var(--border); background: var(--surface); padding: 7px 8px; border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; }
.gv-status { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 14px; margin-bottom: 10px; font-size: 15px; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.gv-status b { font-variant-numeric: tabular-nums; }
.game-area { position: relative; min-height: 360px; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.game-area.center, .gv-center { display: flex; flex-direction: column; align-items: center; }
.game-info { max-width: 1560px; margin: 18px auto 0; padding: 0 16px; }
.game-info .card-box { max-width: 980px; }
.game-info .card-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; }
.game-info h2 { margin-top: 0; font-size: 19px; }
.game-info h3 { font-size: 16px; margin-bottom: 4px; }
.game-info ul { padding-left: 20px; }
.related { display: grid; gap: 8px; }
.related a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface2); font-weight: 600; font-size: 14px; }
.related a:hover { border-color: var(--accent); }
.related .ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font-size: 20px; background: linear-gradient(135deg, var(--c1), var(--c2)); flex-shrink: 0; }
.gv-error { color: var(--bad); padding: 20px; }
@media (max-width: 600px) { .gv-btn { padding: 6px 10px; font-size: 13px; } .game-layout { padding: 0 8px; } .game-wrap { padding: 8px 0 4px; } .logo-img { height: 44px; } .site-header .inner { gap: 8px; padding: 0 10px; } .content { padding: 0 12px 16px; } .gb-btn { padding: 6px 11px; } }

/* ---------- modal / toast ---------- */
.gv-modal-back { position: fixed; inset: 0; background: rgba(8, 12, 24, .55); display: grid; place-items: center; z-index: 1000; opacity: 0; transition: opacity .18s; padding: 16px; }
.gv-modal-back.show { opacity: 1; }
.gv-modal { background: var(--surface); color: var(--text); border-radius: 18px; padding: 22px 24px; max-width: 460px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.35); text-align: center; max-height: 88vh; overflow: auto; transform: translateY(10px) scale(.98); transition: transform .18s; }
.gv-modal-back.show .gv-modal { transform: none; }
.gv-modal h2 { margin: 4px 0 10px; font-size: 22px; }
.gv-modal-icon { font-size: 44px; line-height: 1; }
.gv-modal-body { color: var(--muted); text-align: left; }
.gv-modal-body p:only-child, .gv-modal-body > p:first-child:last-child { text-align: center; }
.gv-modal-btns { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.gv-stats { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.gv-stats div { background: var(--surface2); border-radius: 12px; padding: 8px 14px; min-width: 84px; text-align: center; }
.gv-stats b { display: block; font-size: 20px; color: var(--text); }
.gv-stats span { font-size: 12px; }
.gv-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .2s; z-index: 1100; max-width: 90vw; text-align: center; }
.gv-toast.show { opacity: 1; transform: translate(-50%, 0); }
.gv-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 1200; }

/* ---------- reusable game bits ---------- */
.gv-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.gv-felt { background: radial-gradient(ellipse at top, var(--felt), var(--felt2)); border-radius: var(--radius); padding: 12px; }
.gv-board-grid { display: grid; gap: 2px; touch-action: manipulation; }
.gv-cell { display: grid; place-items: center; background: var(--surface); border-radius: 6px; cursor: pointer; font-weight: 700; aspect-ratio: 1; }
.gv-key { border: 1px solid var(--border); background: var(--surface2); border-radius: 8px; min-width: 32px; padding: 10px 6px; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.gv-key:active { transform: scale(.95); }
.gv-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.gv-muted { color: var(--muted); }
.gv-canvas { display: block; margin: 0 auto; border-radius: var(--radius); touch-action: none; max-width: 100%; }
.gv-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8,12,24,.45); color: #fff; border-radius: var(--radius); text-align: center; z-index: 5; }
.gv-overlay > div { padding: 20px; }
.gv-overlay h2 { margin: 0 0 8px; }

/* ---------- shared 2D game presentation ---------- */
body.game-page {
  background:
    radial-gradient(ellipse at 8% 14%, color-mix(in srgb, var(--c2, var(--accent)) 13%, transparent), transparent 34rem),
    radial-gradient(ellipse at 92% 38%, color-mix(in srgb, var(--c1, var(--accent2)) 9%, transparent), transparent 32rem),
    var(--bg);
}
.game-page .game-head h1 { font-weight: 850; letter-spacing: -.035em; }
.game-page .game-head h1::after { content: ""; display: block; width: 42px; height: 4px; margin-top: 5px; border-radius: 9px; background: linear-gradient(90deg, var(--c1, var(--accent)), var(--c2, var(--accent2))); }
.game-page .gv-status { border-color: color-mix(in srgb, var(--c1, var(--accent)) 23%, var(--border)); box-shadow: 0 5px 18px rgba(24,32,58,.07); }
.game-page .gv-status > span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: var(--surface2); }
.game-page .game-area { isolation: isolate; }
.game-page .game-area:has(.ar-wrap) { padding: 12px; border: 1px solid color-mix(in srgb, var(--c1, var(--accent)) 24%, var(--border)); border-radius: 20px; background: linear-gradient(145deg, color-mix(in srgb, var(--c1, var(--accent)) 7%, var(--surface)), var(--surface) 48%, color-mix(in srgb, var(--c2, var(--accent2)) 8%, var(--surface))); box-shadow: 0 14px 36px rgba(24,32,58,.10), inset 0 1px rgba(255,255,255,.65); }
.game-page .ar-wrap { overflow: hidden; border-radius: 14px; box-shadow: 0 10px 30px rgba(7,12,28,.22), 0 0 0 1px rgba(255,255,255,.18); }
.game-page .ar-wrap > canvas, .game-page canvas.gv-canvas, .game-page #game > canvas { image-rendering: auto; }
.game-page .game-area:has(.ar-wrap) .ar-wrap > canvas { border-radius: 12px; }
.game-page .game-area:has(.ar-wrap) .ar-pad { margin-bottom: 2px; }
.game-page .ar-tbtn { border-color: color-mix(in srgb, var(--c1, var(--accent)) 22%, var(--border)); background: linear-gradient(160deg, var(--surface), var(--surface2)); box-shadow: 0 4px 0 color-mix(in srgb, var(--c1, var(--accent)) 20%, var(--border)), 0 7px 14px rgba(10,20,40,.10); }
.game-page .ar-tbtn:active, .game-page .ar-tbtn.on { box-shadow: 0 1px 0 color-mix(in srgb, var(--c1, var(--accent)) 22%, var(--border)); }
.game-page .game-area .gv-felt { box-shadow: inset 0 2px 9px rgba(0,0,0,.18), 0 8px 22px rgba(10,20,40,.12); border: 1px solid rgba(255,255,255,.12); }
.game-page .game-area .gv-panel { box-shadow: 0 8px 24px rgba(15,23,42,.08), inset 0 1px rgba(255,255,255,.7); }
.game-page .game-area .gv-board-grid { padding: 7px; border-radius: 14px; background: color-mix(in srgb, var(--c1, var(--accent)) 18%, var(--border)); box-shadow: 0 8px 20px rgba(15,23,42,.12), inset 0 1px rgba(255,255,255,.55); }
.game-page .game-area .gv-cell { border-radius: 4px; transition: transform .12s, filter .12s, box-shadow .12s; box-shadow: inset 0 1px rgba(255,255,255,.78), 0 1px 1px rgba(15,23,42,.08); }
.game-page .game-area .gv-cell:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 3px 8px rgba(15,23,42,.16); }
.game-page .game-area button.gv-key, .game-page .game-area button.gv-btn { box-shadow: 0 2px 0 color-mix(in srgb, var(--border) 75%, var(--text)); transition: transform .12s, box-shadow .12s, filter .12s; }
.game-page .game-area button.gv-key:hover, .game-page .game-area button.gv-btn:hover { filter: brightness(1.04); transform: translateY(-1px); }
.game-page .game-area button.gv-key:active, .game-page .game-area button.gv-btn:active { transform: translateY(1px); box-shadow: none; }
.game-page .card { box-shadow: 0 2px 3px rgba(0,0,0,.19), 0 6px 12px rgba(0,0,0,.12), 0 0 0 1px rgba(0,0,0,.1); transition: transform .15s, box-shadow .15s; }
.game-page .card:not(.dragging):hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(0,0,0,.24), 0 0 0 1px rgba(0,0,0,.12); }
.game-page .card.down { background: repeating-linear-gradient(45deg, #243e74 0 5px, #2e568b 5px 10px); border-color: #f5f0df; box-shadow: 0 2px 3px rgba(0,0,0,.25), 0 0 0 1px rgba(255,255,255,.32); }
.game-page .gamebar { box-shadow: 0 7px 20px rgba(15,23,42,.06); }
@media (max-width: 600px) {
  .game-page .game-area:has(.ar-wrap) { padding: 6px; border-radius: 15px; }
  .game-page .ar-wrap, .game-page .ar-wrap > canvas { border-radius: 10px; }
}

/* ---------- playing cards (GV.cards) ---------- */
.card, .card-slot { --ch: calc(var(--cw, 72px) * 1.4); width: var(--cw, 72px); height: var(--ch); border-radius: calc(var(--cw, 72px) * .09); position: relative; flex-shrink: 0; }
.card { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25), 0 0 0 1px rgba(0,0,0,.12); font-family: Georgia, "Times New Roman", serif; cursor: pointer; overflow: hidden; color: #1a1a1a; }
.card.red { color: #c81e1e; }
.card.down { background: repeating-linear-gradient(45deg, #3f51b5 0 4px, #5c6bc0 4px 8px); border: calc(var(--cw, 72px) * .05) solid #fff; }
.card .c-tl, .card .c-br { position: absolute; font-weight: 700; font-size: calc(var(--cw, 72px) * .2); line-height: .95; text-align: center; letter-spacing: -.05em; }
.card .c-tl { top: 4%; left: 6%; }
.card .c-br { bottom: 4%; right: 6%; transform: rotate(180deg); }
.card .c-pips { position: absolute; inset: 12% 20%; }
.card .c-pips i { position: absolute; font-style: normal; transform: translate(-50%, -50%); font-size: calc(var(--cw, 72px) * .22); line-height: 1; }
.card .c-pips i.flip { transform: translate(-50%, -50%) rotate(180deg); }
.card .c-pips i.ace { font-size: calc(var(--cw, 72px) * .55); }
.card .c-face { position: absolute; inset: 16% 18%; border-radius: 4px; border: 1px solid currentColor; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(160deg, rgba(250,204,21,.18), rgba(99,102,241,.12)); }
.card .c-face-l { font-size: calc(var(--cw, 72px) * .5); line-height: 1; }
.card .c-face-s { font-size: calc(var(--cw, 72px) * .2); line-height: 1; }
.card.sel { box-shadow: 0 0 0 3px var(--focus), 0 4px 12px rgba(0,0,0,.3); }
.card.hint { box-shadow: 0 0 0 3px #22c55e, 0 4px 12px rgba(0,0,0,.3); }
.card.dim { filter: brightness(.6); }
.card.dragging { box-shadow: 0 10px 24px rgba(0,0,0,.4); }
.card-slot { border: 2px dashed rgba(255,255,255,.35); display: grid; place-items: center; color: rgba(255,255,255,.5); font-size: calc(var(--cw, 72px) * .35); font-weight: 700; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- ads ---------- */
.ad-slot { display: none; }
.ad-slot.on { display: block; margin: 14px 0; min-height: 100px; text-align: center; overflow: hidden; }
.game-side .ad-slot.on { margin: 0 0 14px; min-height: 250px; }
/* FAQ */
.faq details { border-top: 1px solid var(--border); padding: 10px 0; }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 8px 0 0; color: var(--muted); }
.prose { line-height: 1.65; }
.prose h2 { font-size: 19px; margin-top: 26px; }

.foot-popular { max-width: 1000px; margin: 8px auto; font-size: 13px; line-height: 1.9; }
