:root {
  --cell-size: 34px;
  --gap: 2px;
  --board-border: 7px;
  --board-bg: #8b929d;
  --cell: #cbd5e1;
  --text: #0f172a;
  --muted: #526174;
  --line: #dbe3ef;
  --paper: #ffffff;
  --soft: #f6f9fd;
  --accent: #2563eb;
  --green: #16a34a;
  --red: #dc2626;
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
}
body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 10%, rgba(37, 99, 235, 0.14), transparent 32%),
    radial-gradient(circle at 90% 15%, rgba(22, 163, 74, 0.12), transparent 28%),
    linear-gradient(135deg, #eef6ff 0%, #f8fafc 52%, #ecfff4 100%);
  line-height: 1.65;
}
a { color: #1d4ed8; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: #0f3a9a; }
img { max-width: 100%; height: auto; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 100;
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
}
.skip-link:focus { left: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid rgba(148,163,184,0.28);
}
.header-inner {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: #111827;
  text-decoration: none;
  letter-spacing: -0.03em;
  font-size: clamp(18px, 2.2vw, 24px);
}
.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #2563eb, #22c55e);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  color: #334155;
  font-weight: 800;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 14px;
}
.nav a:hover { background: #eaf2ff; color: #1d4ed8; }

.page {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 44px;
}
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: stretch;
}
.play-card,
.side-card,
.content-card {
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(148,163,184,0.35);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.play-card { padding: clamp(10px, 2vw, 20px); overflow: hidden; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
  margin: 0 0 10px;
}
.hero-title {
  margin: 0;
  font-size: clamp(34px, 5vw, 66px);
  line-height: .96;
  letter-spacing: -0.06em;
}
.hero-intro {
  color: var(--muted);
  font-size: clamp(16px, 2vw, 21px);
  max-width: 820px;
  margin: 12px 0 18px;
}
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}
.cta,
.soft-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  border: 1px solid transparent;
}
.cta { background: #16a34a; color: #fff; box-shadow: 0 12px 24px rgba(22, 163, 74, .25); }
.cta:hover { color: #fff; background: #15803d; }
.soft-btn { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.soft-btn:hover { background: #dbeafe; }

.game-card {
  width: 100%;
  min-height: min(760px, calc(100dvh - 130px));
  padding: clamp(8px, 1.4vw, 18px);
  border-radius: clamp(14px, 2vw, 24px);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid rgba(148,163,184,0.45);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  align-items: center;
  justify-items: center;
  gap: clamp(8px, 1.05vh, 12px);
  overflow: hidden;
}
.game-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.game-head h2 { margin: 0; font-size: clamp(20px, 2.4vw, 30px); letter-spacing: -0.04em; line-height: 1.1; }
.game-head p { margin: 0; color: var(--muted); font-size: 14px; }
.top-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(7px, 1vw, 12px);
  padding: clamp(5px, 0.9vw, 9px) clamp(7px, 1vw, 12px);
  border: clamp(5px, 0.8vw, 7px) solid #9ca3af;
  border-top-color: #d1d5db;
  border-left-color: #d1d5db;
  background: #b8bec7;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  user-select: none;
}
.counter {
  min-width: clamp(60px, 7vw, 86px);
  padding: 2px 6px;
  background: #111827;
  color: #ef4444;
  border: 3px inset #4b5563;
  font-family: "Courier New", monospace;
  font-size: clamp(24px, 3.5vw, 38px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
}
.face {
  width: clamp(38px, 5vw, 52px);
  height: clamp(38px, 5vw, 52px);
  font-size: clamp(22px, 3vw, 30px);
  border: 4px outset #e5e7eb;
  background: #d1d5db;
  display: grid;
  place-items: center;
  cursor: pointer;
  line-height: 1;
}
.face:active { border-style: inset; }
.board-wrap {
  width: 100%;
  height: 100%;
  min-height: 320px;
  overflow: auto;
  padding: clamp(5px, 0.8vw, 10px);
  border-radius: 14px;
  background: rgba(15,23,42,0.055);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.board {
  display: grid;
  gap: var(--gap);
  padding: var(--gap);
  margin-inline: auto;
  background: var(--board-bg);
  border: var(--board-border) solid #9ca3af;
  border-top-color: #d1d5db;
  border-left-color: #d1d5db;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
  touch-action: manipulation;
  user-select: none;
}
.cell {
  width: var(--cell-size);
  height: var(--cell-size);
  border: max(2px, calc(var(--cell-size) * 0.105)) solid #f8fafc;
  border-right-color: #64748b;
  border-bottom-color: #64748b;
  background: var(--cell);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: calc(var(--cell-size) * 0.62);
  line-height: 1;
  cursor: pointer;
  color: #1e293b;
  padding: 0;
}
.cell:active { border-style: inset; }
.cell.revealed { border: 1px solid #94a3b8; background: #e2e8f0; cursor: default; }
.cell.mine-hit { background: #fecaca; }
.cell.flagged { color: var(--red); }
.cell.n1 { color: #2563eb; }
.cell.n2 { color: #16a34a; }
.cell.n3 { color: #dc2626; }
.cell.n4 { color: #4338ca; }
.cell.n5 { color: #991b1b; }
.cell.n6 { color: #0891b2; }
.cell.n7 { color: #111827; }
.cell.n8 { color: #64748b; }
.level-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1vw, 10px);
  width: 100%;
}
.level-btn {
  border: 0;
  border-radius: 999px;
  padding: clamp(9px, 1.3vw, 13px) clamp(13px, 1.8vw, 22px);
  min-width: clamp(92px, 12vw, 122px);
  font-size: clamp(14px, 1.45vw, 18px);
  font-weight: 900;
  color: #0f172a;
  background: #e5e7eb;
  box-shadow: inset 0 -4px 0 rgba(15,23,42,0.10), 0 8px 20px rgba(15,23,42,0.10);
  cursor: pointer;
}
.level-btn:hover { transform: translateY(-1px); }
.level-btn.active { color: #fff; background: linear-gradient(180deg, #3b82f6, #1d4ed8); }
.level-btn.new-game { color: #fff; background: linear-gradient(180deg, #22c55e, #15803d); }
.tip {
  margin: 0;
  max-width: 820px;
  text-align: center;
  color: var(--muted);
  font-size: clamp(12px, 1.15vw, 16px);
  line-height: 1.35;
}
.status-toast {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 50;
  padding: 10px 16px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  white-space: nowrap;
}
.status-toast.show { opacity: 1; transform: translateX(-50%) translateY(-5px); }

.side-card { padding: 18px; }
.side-card h2,
.side-card h3 { margin: 0 0 12px; line-height: 1.2; letter-spacing: -0.035em; }
.side-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.side-list a,
.side-list span {
  display: block;
  padding: 12px 13px;
  border-radius: 16px;
  background: var(--soft);
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: #0f172a;
  font-weight: 800;
}
.side-list small { display: block; color: var(--muted); font-weight: 700; margin-top: 2px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.badge { padding: 6px 10px; border-radius: 999px; background: #ecfdf5; color: #166534; border: 1px solid #bbf7d0; font-weight: 900; font-size: 12px; }

.content-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
.content-card { padding: clamp(18px, 2.5vw, 32px); }
.content-card h2 { font-size: clamp(25px, 3.2vw, 42px); line-height: 1.05; letter-spacing: -0.05em; margin: 0 0 12px; }
.content-card h3 { font-size: clamp(20px, 2.3vw, 28px); line-height: 1.15; letter-spacing: -0.04em; margin: 26px 0 8px; }
.content-card p { color: #334155; margin: 0 0 14px; }
.content-card ul,
.content-card ol { color: #334155; padding-left: 22px; }
.content-card li { margin: 8px 0; }
.info-table { width: 100%; border-collapse: collapse; margin: 16px 0 22px; overflow: hidden; border-radius: 16px; }
.info-table th,
.info-table td { border: 1px solid #e2e8f0; padding: 12px; text-align: left; vertical-align: top; }
.info-table th { background: #eff6ff; color: #1e3a8a; }
.callout { margin: 18px 0; padding: 16px; border-radius: 18px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.mini-card { padding: 14px; border-radius: 18px; background: #f8fafc; border: 1px solid #e2e8f0; }
.mini-card strong { display: block; color: #0f172a; margin-bottom: 4px; }
.footer {
  margin-top: 24px;
  border-top: 1px solid rgba(148,163,184,.35);
  background: rgba(255,255,255,.8);
}
.footer-inner {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 26px 0;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  color: #475569;
  font-size: 14px;
}
.footer a { color: #334155; font-weight: 800; }

@media (max-width: 980px) {
  .hero-layout,
  .content-grid { grid-template-columns: 1fr; }
  .game-card { min-height: min(760px, calc(100dvh - 120px)); }
}
@media (max-width: 720px) {
  .header-inner { align-items: flex-start; flex-direction: column; padding: 10px 0; gap: 8px; }
  .nav { justify-content: flex-start; }
  .nav a { padding: 6px 8px; }
  .page { width: min(100% - 14px, 1180px); padding-top: 10px; }
  .play-card,
  .side-card,
  .content-card { border-radius: 18px; }
  .game-card { min-height: calc(100dvh - 145px); padding: 8px; border-radius: 16px; }
  .level-btn { flex: 1 1 126px; min-width: 0; }
  .board-wrap { padding: 6px; min-height: 260px; }
  .card-grid { grid-template-columns: 1fr; }
}
@media (max-height: 610px) {
  .game-card { gap: 6px; padding: 8px; border-radius: 15px; }
  .game-head p { display: none; }
  .top-panel { padding: 4px 6px; border-width: 5px; }
  .counter { font-size: 22px; min-width: 56px; }
  .face { width: 36px; height: 36px; font-size: 20px; border-width: 3px; }
  .level-btn { padding: 8px 10px; font-size: 13px; min-width: 88px; }
  .tip { display: none; }
}


/* Homepage play-first layout: centered game, no right sidebar, responsive and fast */
.hero-single {
  display: block;
  max-width: 1120px;
  margin: 0 auto;
}
.hero-single .play-card {
  width: 100%;
  margin-inline: auto;
  text-align: center;
}
.hero-single .hero-intro {
  margin-left: auto;
  margin-right: auto;
  max-width: 760px;
}
.hero-single .quick-actions {
  justify-content: center;
  margin-bottom: 12px;
}
.hero-single .game-card {
  max-width: 1080px;
  margin: 0 auto;
  text-align: left;
  min-height: 0;
}
.hero-single .game-head { text-align: left; }
.hero-single .board-wrap {
  height: clamp(315px, 58vh, 560px);
  min-height: 300px;
}
.content-single {
  display: block;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 981px) {
  .hero-single .play-card { padding: 18px; }
  .hero-single .game-head { align-items: center; }
}

@media (max-width: 720px) {
  body { background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%); }
  .hero-title {
    font-size: clamp(30px, 9vw, 42px);
    letter-spacing: -0.045em;
  }
  .hero-intro {
    font-size: 15px;
    line-height: 1.45;
    margin-top: 8px;
    margin-bottom: 10px;
  }
  .kicker { margin-bottom: 8px; }
  .hero-single .play-card { padding: 10px; }
  .hero-single .game-card { padding: 7px; }
  .hero-single .game-head {
    justify-content: center;
    text-align: center;
    gap: 8px;
  }
  .hero-single .game-head > div:first-child { width: 100%; }
  .hero-single .game-head p { font-size: 12px; }
  .hero-single .board-wrap {
    height: clamp(255px, 49vh, 430px);
    min-height: 245px;
  }
  .top-panel { margin-inline: auto; }
  .tip { font-size: 12px; }
}


/* SEO article expansion: video, downloads, similar games, and fast responsive content blocks */
.article-label {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  margin: 0 0 12px;
  border-radius: 999px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 13px;
  font-weight: 900;
}
.toc-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 26px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
}
.toc-box strong {
  flex: 1 0 100%;
  color: #1e3a8a;
}
.toc-box a {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: #ffffff;
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  border: 1px solid #bfdbfe;
}
.toc-box a:hover { background: #dbeafe; }
.video-box {
  margin: 16px 0 28px;
}
.video-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid #cbd5e1;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
}
.video-placeholder img,
.video-placeholder iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.video-placeholder img {
  object-fit: cover;
  opacity: 0.72;
}
.video-load {
  position: absolute;
  inset: auto auto 50% 50%;
  transform: translate(-50%, 50%);
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  color: #fff;
  background: #16a34a;
  box-shadow: 0 14px 30px rgba(0,0,0,.26);
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 900;
  cursor: pointer;
}
.video-load:hover { background: #15803d; }
.video-loaded { background: #000; }
.video-note {
  margin-top: 8px !important;
  color: #64748b !important;
  font-size: 14px;
}
.download-grid,
.similar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
}
.download-card,
.similar-card {
  display: block;
  min-height: 110px;
  padding: 16px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: #0f172a;
}
.download-card:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.download-card strong,
.similar-card strong {
  display: block;
  font-size: 18px;
  line-height: 1.15;
  margin-bottom: 6px;
  color: #0f172a;
}
.download-card span,
.similar-card span {
  display: block;
  color: #475569;
  line-height: 1.45;
}
.content-card em {
  font-style: normal;
  font-weight: 800;
  color: #1e3a8a;
}
.content-card h2:not(:first-of-type) {
  margin-top: 36px;
}

@media (max-width: 820px) {
  .download-grid,
  .similar-grid { grid-template-columns: 1fr; }
  .toc-box { gap: 6px; }
  .toc-box a { font-size: 13px; padding: 6px 9px; }
  .video-placeholder { border-radius: 16px; }
  .video-load { width: min(82%, 320px); }
}


/* Version 2 game features: best time, daily challenge, streak, dark mode, sharing, custom board */
.game-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(7px, 1vw, 12px);
}
.stat-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
}
.stat-pill span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
}
.stat-pill strong {
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1;
  color: #0f172a;
}
.daily-btn {
  color: #fff;
  background: linear-gradient(180deg, #f59e0b, #d97706);
}
.game-actions {
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
}
.tool-btn {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: inset 0 -3px 0 rgba(15,23,42,0.07), 0 8px 18px rgba(15,23,42,0.08);
  font-weight: 900;
  cursor: pointer;
}
.tool-btn:hover { background: #eff6ff; border-color: #bfdbfe; }
.custom-panel {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  overflow: hidden;
}
.custom-panel summary {
  cursor: pointer;
  padding: 11px 14px;
  font-weight: 900;
  color: #1e3a8a;
  list-style-position: inside;
}
.custom-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 0 12px 12px;
  align-items: end;
}
.custom-grid label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  color: #475569;
}
.custom-grid input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 8px 10px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
}
.custom-start { border-color: #bbf7d0; background: #ecfdf5; color: #166534; }
.custom-message {
  margin: -4px 12px 12px !important;
  font-size: 13px;
  color: #64748b !important;
  text-align: center;
}
.custom-message.custom-error { color: #b91c1c !important; font-weight: 800; }

/* Dark mode stays lightweight: no extra scripts, no external assets */
html.dark-mode body {
  color: #e5e7eb;
  background:
    radial-gradient(circle at 8% 10%, rgba(59, 130, 246, 0.22), transparent 32%),
    radial-gradient(circle at 90% 15%, rgba(34, 197, 94, 0.14), transparent 28%),
    linear-gradient(135deg, #020617 0%, #111827 55%, #07111f 100%);
}
html.dark-mode .site-header,
html.dark-mode .footer {
  background: rgba(2, 6, 23, 0.94);
  border-color: rgba(148,163,184,.22);
}
html.dark-mode .logo,
html.dark-mode .nav a,
html.dark-mode .footer a { color: #e5e7eb; }
html.dark-mode .nav a:hover { background: #1e293b; color: #93c5fd; }
html.dark-mode .play-card,
html.dark-mode .content-card,
html.dark-mode .side-card,
html.dark-mode .game-card,
html.dark-mode .custom-panel {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(148,163,184,0.25);
}
html.dark-mode .hero-intro,
html.dark-mode .game-head p,
html.dark-mode .tip,
html.dark-mode .content-card p,
html.dark-mode .content-card li,
html.dark-mode .download-card span,
html.dark-mode .similar-card span,
html.dark-mode .video-note,
html.dark-mode .custom-message { color: #cbd5e1 !important; }
html.dark-mode .stat-pill,
html.dark-mode .mini-card,
html.dark-mode .download-card,
html.dark-mode .similar-card,
html.dark-mode .toc-box,
html.dark-mode .tool-btn {
  background: #111827;
  border-color: #334155;
  color: #e5e7eb;
}
html.dark-mode .stat-pill strong,
html.dark-mode .download-card strong,
html.dark-mode .similar-card strong,
html.dark-mode .mini-card strong,
html.dark-mode .content-card h2,
html.dark-mode .content-card h3 { color: #f8fafc; }
html.dark-mode .board-wrap { background: rgba(148,163,184,0.12); }
html.dark-mode .cell.revealed { background: #cbd5e1; color: #0f172a; }
html.dark-mode .custom-grid input {
  background: #020617;
  border-color: #334155;
  color: #f8fafc;
}
html.dark-mode .info-table th { background: #1e293b; color: #dbeafe; }
html.dark-mode .info-table th,
html.dark-mode .info-table td { border-color: #334155; }

@media (max-width: 820px) {
  .game-stats { grid-template-columns: 1fr; }
  .stat-pill { min-height: 40px; }
  .custom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .custom-start { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .game-actions { gap: 7px; }
  .tool-btn { flex: 1 1 140px; padding-left: 10px; padding-right: 10px; }
  .custom-grid { grid-template-columns: 1fr; }
}

/* Brand logo integration */
.site-logo-img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: block;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  background: #fff;
  transition: transform .16s ease;
}
.logo:hover .site-logo-img {
  transform: translateY(-1px);
}
@media (max-width: 720px) {
  .site-logo-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }
}
