@font-face {
  font-family: "JNQ Serif";
  src: url("/brand/bsb/fonts/noto-serif-sc-latin-700.woff2?v=14") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: optional;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JNQ Serif";
  src: url("/brand/bsb/fonts/noto-serif-sc-latin-900.woff2?v=14") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: optional;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JNQ Serif";
  src: local("Songti SC"), local("Songti TC"), local("STSong"), local("SimSun"), local("宋体"), local("PingFang SC");
  font-weight: 100 900;
  font-style: normal;
  font-display: optional;
  unicode-range: U+2E80-2EFF, U+3000-303F, U+31C0-31EF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}

:root {
  --linen: #f4f7f4;
  --linen-2: #e9efe9;
  --wood: #deb887;
  --wood-deep: #c89b6a;
  --ink: #14221a;
  --ink-soft: #4d6356;
  --brown: #1c663e;
  --brown-deep: #12472b;
  --jade: #2a7b4f;
  --jade-deep: #1a5635;
  --gold: #b48018;
  --line: rgba(20, 50, 32, 0.13);
  --line-soft: rgba(20, 50, 32, 0.08);
  --surface: #ffffff;
  --surface-2: #f0f5f1;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px rgba(16, 45, 28, 0.06), 0 2px 6px rgba(16, 45, 28, 0.03);
  --scroll-thumb: rgba(25, 75, 45, 0.25);
  --scroll-track: transparent;
  --serif: "JNQ Serif", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --sans: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --sidebar-w: 200px;
  --ad-w: 160px;
  color-scheme: light;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

:root[data-theme="dark"] {
  --linen: #0e1913;
  --linen-2: #13231b;
  --ink: #eef6f1;
  --ink-soft: #9bb5a5;
  --brown: #4ade80;
  --brown-deep: #7ae6a4;
  --jade: #2ea063;
  --jade-deep: #227c4d;
  --gold: #facc15;
  --line: rgba(180, 225, 198, 0.13);
  --line-soft: rgba(180, 225, 198, 0.07);
  --surface: #15241c;
  --surface-2: #1b2d23;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  --scroll-thumb: rgba(74, 222, 128, 0.35);
  --scroll-track: rgba(10, 20, 14, 0.4);
  color-scheme: dark;
}

html { height: 100%; background-color: #164e32; }
html, body { height: 100%; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
img, svg, canvas { display: block; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  background-color: #164e32;
  transition: color 0.25s;
}

html[data-theme="dark"],
html[data-theme="dark"] body {
  background-color: #0c1a13;
}

button {
  appearance: none;
  margin: 0;
  font: inherit;
  color: inherit;
  line-height: inherit;
}

button:not([class]) {
  padding: 0;
  border: none;
  background: none;
}

button, select, input { font: inherit; color: inherit; }

a { color: var(--brown); text-decoration: none; }
a:hover { color: var(--gold); }

/* ===== App shell: sidebar + content ===== */
.app {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

/* ===== Sidebar navigation ===== */
.sidebar {
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  padding: calc(18px + env(safe-area-inset-top)) 14px 14px;
  color: #f0fdf4;
  background-color: #164e32;
  background-image: linear-gradient(165deg, #185536 0%, #124329 55%, #0d341f 100%);
  border-right: 1px solid rgba(0, 0, 0, 0.16);
  box-shadow: 4px 0 20px rgba(6, 26, 15, 0.18);
}
:root[data-theme="dark"] .sidebar {
  color: #eef6f1;
  background-color: #0c1a13;
  background-image: linear-gradient(165deg, #0f2219 0%, #0c1a13 55%, #08120d 100%);
  border-right: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 18px;
}
.sidebar .brand {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  width: 100%;
  padding: 8px 8px 18px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.sidebar .brand .brand__mark {
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 11px;
  background: none;
  border: none;
  box-shadow: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}
.sidebar .brand,
.sidebar .brand:hover {
  color: #ffffff;
  text-decoration: none;
}
.sidebar .brand__name {
  display: block;
  color: #ffffff;
  font-size: 20px;
  line-height: 1.25;
  min-height: 28px;
  letter-spacing: 0.05em;
  text-align: center;
}
.sidebar .brand__text { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sidebar__top-spacer { display: none; }
.brand .brand__mark { display: block; border-radius: 9px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35)); }
.brand__name {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.15;
  white-space: nowrap;
}
.brand__latin {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.sidebar .brand__latin {
  color: rgba(230, 245, 235, 0.72);
}
.brand__text p {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.sidebar .brand__text p {
  color: rgba(255, 248, 232, 0.62);
}

.nav { display: flex; flex-direction: column; justify-content: flex-start; gap: 4px; flex: 1 1 auto; }
.nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 42px;
  height: 42px;
  padding: 11px 14px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 240, 220, 0.72);
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.nav__item:hover { background: rgba(255, 255, 255, 0.08); color: #ffffff; }
.nav__item.active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  color: #ffffff;
}
.nav__item svg { flex: 0 0 auto; width: 20px; height: 20px; }

/* Latin nav labels: Noto Sans SC at 500 looks thin on the dark sidebar. */
html[lang="en"] .nav__item {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", var(--sans);
  font-weight: 600;
  color: rgba(255, 240, 220, 0.82);
}
html[lang="en"] .nav__item.active {
  font-weight: 600;
}

.sidebar__foot {
  padding: 14px 8px 0;
  border-top: 1px solid rgba(255, 240, 220, 0.14);
  font-size: 14px;
  color: rgba(255, 240, 220, 0.6);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sidebar__tools { display: flex; gap: 10px; justify-content: center; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 240, 220, 0.18);
  border-radius: 12px;
  background: rgba(255, 240, 220, 0.08);
  color: rgba(255, 244, 228, 0.9);
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, transform 0.12s, opacity 0.16s;
}
.icon-btn:hover { background: rgba(255, 240, 220, 0.16); border-color: rgba(255, 240, 220, 0.32); }
.icon-btn:active { transform: translateY(1px); }
.icon-btn svg { flex: 0 0 auto; width: 18px; height: 18px; }
.bsb-icon-sun { display: none; }
:root[data-theme="dark"] .bsb-icon-sun { display: block; }
:root[data-theme="dark"] .bsb-icon-moon { display: none; }
.icon-btn:disabled { opacity: 0.42; cursor: not-allowed; }
.icon-btn:disabled:hover { background: rgba(255, 240, 220, 0.08); border-color: rgba(255, 240, 220, 0.18); }

.sidebar__panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.menu-toggle,
.nav-scrim { display: none; }

/* ===== Content area ===== */
.content {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  overflow-x: hidden;
  background: linear-gradient(160deg, #f8faf8 0%, var(--linen) 50%, #edf3ed 100%);
}
:root[data-theme="dark"] .content {
  background: linear-gradient(160deg, #101e17 0%, var(--linen) 50%, #0c1711 100%);
}
.content-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
}

/* Board layout: 3 columns — board | info | ad */
.play {
  display: grid;
  --panel-w: 336px;
  --play-mid-gap: 14px;
  --mid: calc(var(--panel-w) + var(--play-mid-gap));
  --mid-sq: var(--mid);
  grid-template-columns: minmax(0, 1fr) var(--mid) var(--ad-w);
  column-gap: 0;
  row-gap: 14px;
  align-items: start;
  height: 100dvh;
  min-height: 100dvh;
  padding: 12px;
}
/* Online in-game: no ad rail, board + info only */
.play--noad { grid-template-columns: minmax(0, 1fr) var(--mid); }
@media (min-width: 1201px) {
  .play .board {
    box-sizing: border-box;
    container-type: normal;
    --play-pad-x: 24px;
    --board-w-cap: calc(100vw - var(--sidebar-w) - var(--mid-sq) - var(--ad-w) - var(--play-pad-x));
    --sq: min(var(--board-w-cap), calc((100dvh - clamp(300px, 36vh, 420px)) * 3 / 2));
  }
  .play--noad .board {
    --board-w-cap: calc(100vw - var(--sidebar-w) - var(--mid-sq) - var(--play-pad-x));
  }
  .board__stage {
    flex: 0 0 auto;
    align-self: center;
    width: var(--sq);
    height: calc(var(--sq) * 2 / 3);
    max-width: 100%;
  }
  .board__frame {
    width: var(--sq);
    height: calc(var(--sq) * 2 / 3);
    min-height: 0;
    aspect-ratio: 3 / 2;
  }
  .bsb-board-host {
    aspect-ratio: 3 / 2;
  }
}
@media (min-width: 1201px) and (max-width: 1439px) {
  .play { --panel-w: 360px; }
}
@media (min-width: 1440px) and (max-width: 1679px) {
  .play { --panel-w: 400px; }
}
@media (min-width: 1680px) and (max-width: 1919px) {
  .play { --panel-w: 440px; }
}
@media (min-width: 1920px) {
  .play { --panel-w: 480px; }
}
@media (min-width: 1921px) {
  html,
  body,
  html[data-theme="dark"],
  html[data-theme="dark"] body {
    background-color: var(--linen);
  }
  .app {
    flex-direction: column;
    width: 100%;
    max-width: none;
    margin-inline: 0;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    background-color: var(--linen);
  }
  .content {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    margin-inline: 0;
    overflow-y: visible;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  .content-main {
    width: 100%;
    max-width: none;
  }
  .play {
    width: 100%;
    max-width: 1920px;
    margin-inline: auto;
    box-sizing: border-box;
    height: auto;
    min-height: 0;
    max-height: none;
    align-items: start;
    padding: 16px 24px 20px;
    --play-mid-gap: 36px;
    --mid: calc(var(--panel-w) + var(--play-mid-gap));
  }
  .play .board {
    height: auto;
    min-height: 0;
    align-self: start;
    container-type: normal;
    --play-pad-x: 48px;
    --board-w-cap: calc(100vw - var(--mid-sq) - var(--ad-w) - var(--play-pad-x));
    --sq: min(var(--board-w-cap), calc((100dvh - clamp(300px, 36vh, 420px)) * 3 / 2));
  }
  .play--noad .board {
    --board-w-cap: calc(100vw - var(--mid-sq) - var(--play-pad-x));
  }
  .play .panel {
    margin-left: var(--play-mid-gap);
    height: auto;
    max-height: none;
    align-self: start;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .site-footer {
    width: 100%;
    max-width: none;
    margin-top: 0;
    box-sizing: border-box;
  }
  .site-footer__inner,
  .footer-games-wrap,
  .site-footer__bar {
    width: 100%;
    max-width: 1920px;
    margin-inline: auto;
    padding-left: 32px;
    padding-right: 32px;
    box-sizing: border-box;
  }
  .sidebar {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 16px 20px;
    box-sizing: border-box;
    padding-top: calc(10px + env(safe-area-inset-top));
    padding-bottom: 10px;
    padding-left: max(18px, calc((100vw - 1920px) / 2 + 18px));
    padding-right: max(18px, calc((100vw - 1920px) / 2 + 18px));
    border-right: none;
    border-bottom: 1px solid rgba(255, 235, 205, 0.14);
    box-shadow: none;
  }
  .sidebar__top {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
  }
  .sidebar__top-spacer,
  .menu-toggle { display: none; }
  .sidebar .brand,
  .sidebar .brand--chrome {
    flex-direction: row;
    align-items: center;
    width: auto;
    margin: 0;
    padding: 0;
    border-bottom: none;
    gap: 10px;
  }
  .sidebar__panel {
    display: flex;
    flex: 1 1 auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    padding: 0;
    background: none;
    box-shadow: none;
    border: none;
    overflow: visible;
    max-height: none;
  }
  .nav {
    flex: 1 1 auto;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 6px;
    min-width: 0;
  }
  .nav__item svg { display: none; }
  .sidebar__foot {
    flex: 0 0 auto;
    padding: 0;
    border-top: none;
  }
}

.board {
  position: relative;
  z-index: 2;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  overflow: visible;
  container-type: size;
  --chrome: 56px;
  --avail-h: calc(100cqh - var(--chrome));
  --sq: min(100cqw, calc(var(--avail-h) * 3 / 2));
}
.play--scoring:not(.play--spectating) .board {
  --chrome: 232px;
}
.play--spectating .board {
  --chrome: 80px;
}
[data-bsb-spectate-leave] {
  display: none;
}
.play--spectating [data-bsb-spectate-leave="panel"] {
  display: block;
  width: 100%;
}
.play-head [data-bsb-spectate-leave="head"] {
  flex: 0 0 auto;
  white-space: nowrap;
}

.board__stage {
  position: relative;
  flex: 1 1 auto;
  align-self: stretch;
  min-height: calc(var(--sq) * 2 / 3);
  width: 100%;
  max-height: none;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: visible;
}
/* Compact, real (visible) H1 above the board */
.play-head {
  flex: 0 0 auto;
  width: var(--sq);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.play-head__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.play-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--brown-deep);
  line-height: 1.2;
}

/* Live status pulled onto the H1 row: the two things players glance at most
   (whose turn, capture counts) live here so the info panel can stay slim. */
.head-live {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}
.head-live__turn,
.head-live__cap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid var(--line);
}
.head-live__turn {
  background: var(--surface);
  color: var(--ink);
}
.head-live__turn [data-bsb-turn-text] {
  min-width: 12ch;
}
.head-live__cap {
  background: var(--surface);
  color: var(--ink-soft);
}
/* Match the bordered turn/captures chips so the row keeps one height. */
.head-live .status-chip { border: 1px solid transparent; }
.head-live__cap b { color: var(--ink); font-weight: 700; }
.head-live__sep { color: var(--line); margin: 0 1px; }

.infobar {
  width: 100%;
  max-width: min(100%, calc(100dvh - 140px));
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* image-7.png remains the approved visual reference for the original top control banner:
   title chip at left, board-size pills and sound control at right. Its composition
   is intentionally carried by the live semantic controls below rather than used as text-in-image. */
/* Board size segmented control */
.size-switch {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
}
.size-switch__btn {
  padding: 5px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}
.size-switch__btn:hover { background: var(--surface-2); color: var(--ink); }
.size-switch__btn.active {
  background: linear-gradient(135deg, var(--jade), var(--jade-deep));
  color: #f3fbf5;
  border-color: transparent;
}
.mode-pill {
  flex: 0 0 auto;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--jade), var(--jade-deep));
  color: #f3fbf5;
  font-size: 14px;
  letter-spacing: 0.03em;
}
.turn {
  flex: 0 0 auto;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #f7efe0;
  font-size: 14px;
}
.info-cap { flex: 1 1 auto; text-align: right; color: var(--ink-soft); font-size: 14px; }
.btn-sound {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.16s, color 0.16s, border-color 0.16s, opacity 0.16s;
}
.btn-sound svg { width: 18px; height: 18px; }
.btn-sound:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line); }

.board__frame {
  width: 100%;
  height: 100%;
  min-height: calc(var(--sq) * 2 / 3);
  padding: clamp(3px, 0.35vw, 5px);
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(174deg, #e8c79a, var(--wood) 55%, #cfa775);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 240, 210, 0.4), inset 0 0 8px rgba(120, 80, 40, 0.22);
}
.board__frame canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.bsb-board-host {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  border-radius: 4px;
}
.board__frame canvas.bsb-fx-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: transparent;
  cursor: default;
}
.board__status {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 3;
  margin: 0;
  max-width: calc(100% - 28px);
  padding: 7px 14px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(61, 32, 12, 0.86);
  color: #fff8ee;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(40, 18, 4, 0.28);
}
.board__status[hidden] {
  display: none;
}

/* ===== Info column ===== */
.panel {
  min-width: 0;
  width: auto;
  max-width: var(--panel-w);
  height: auto;
  min-height: 0;
  align-self: stretch;
  margin-left: var(--play-mid-gap);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
/* ===== Live status card (top of info column) ===== */
.status-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
}
.panel-status-foot {
  margin-top: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  min-width: 0;
}
.panel:has(.bsb-ad-house) .panel-status-foot {
  margin-top: 8px;
}
.panel-status-foot__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.panel-status-foot__meta .status-chip {
  padding: 4px 10px;
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
}
.panel-status-foot .status-card__live-nudge {
  flex: none;
  width: 100%;
  box-sizing: border-box;
  min-height: 38px;
  height: 38px;
  padding: 0 12px;
  gap: 8px;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--jade) 28%, var(--line));
  background: color-mix(in srgb, var(--jade) 10%, var(--surface-2));
  box-shadow: none;
  color: var(--brown-deep);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  text-align: center;
}
.panel-status-foot .status-card__live-nudge:hover {
  filter: none;
  background: color-mix(in srgb, var(--jade) 16%, var(--surface-2));
}
.panel-status-foot .status-card__live-nudge[data-live="0"],
.panel-status-foot .status-card__live-nudge[data-live="1"],
.panel-status-foot .status-card__live-nudge[data-live="2"],
.panel-status-foot .status-card__live-nudge[data-live="3"] {
  box-shadow: none;
}
.panel-status-foot .status-card__live-nudge[data-live="1"] {
  border-color: color-mix(in srgb, var(--gold) 38%, var(--line));
  background: color-mix(in srgb, var(--gold) 16%, var(--surface-2));
  color: #7a5808;
}
.panel-status-foot .status-card__live-nudge[data-live="2"] {
  border-color: color-mix(in srgb, var(--jade) 40%, var(--line));
  background: color-mix(in srgb, var(--jade) 16%, var(--surface-2));
  color: var(--brown-deep);
}
.panel-status-foot .status-card__live-nudge[data-live="3"] {
  border-color: color-mix(in srgb, #b93829 38%, var(--line));
  background: color-mix(in srgb, #b93829 14%, var(--surface-2));
  color: #8d261c;
}
.panel-status-foot .status-card__live-nudge svg {
  flex: none;
  width: 16px;
  height: 16px;
}
.panel-status-foot .status-card__live-nudge [data-bsb-live-nudge-text] {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.panel-status-foot .status-card__live-nudge::after {
  content: none;
}
:root[data-theme="dark"] .panel-status-foot .status-card__live-nudge,
:root[data-theme="dark"] .panel-status-foot .status-card__live-nudge[data-live="0"],
:root[data-theme="dark"] .panel-status-foot .status-card__live-nudge[data-live="2"] {
  color: var(--brown);
}
:root[data-theme="dark"] .panel-status-foot .status-card__live-nudge[data-live="1"] {
  color: #f6e4bc;
}
:root[data-theme="dark"] .panel-status-foot .status-card__live-nudge[data-live="3"] {
  color: #ffd4cc;
}
.status-card__top {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
}
.status-card__badges {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
}
.status-card__badges .mode-pill,
.status-card__badges .status-chip {
  flex: 0 0 auto;
  width: max-content;
  padding: 5px 12px;
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.status-card__live-nudge {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 32px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  border: 1px dashed rgba(45, 106, 79, 0.38);
  background: rgba(45, 106, 79, 0.08);
  color: var(--jade-deep);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.status-card__live-nudge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--jade);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.18);
}
.status-card__live-nudge [data-bsb-live-nudge-text] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-card__live-nudge::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 1px;
  border-right: 1.7px solid currentColor;
  border-top: 1.7px solid currentColor;
  transform: rotate(45deg);
  flex: 0 0 auto;
  opacity: 0.72;
}
.status-card__live-nudge[data-live="1"] {
  border-style: solid;
  border-color: rgba(200, 134, 30, 0.42);
  background: linear-gradient(180deg, #fff4dc, #f3d59a);
  color: #7a5808;
  box-shadow: 0 0 0 1px rgba(200, 134, 30, 0.16), 0 6px 14px rgba(180, 110, 20, 0.16);
}
.status-card__live-nudge[data-live="1"] .status-card__live-nudge-dot {
  background: var(--gold, #c8861e);
  box-shadow: 0 0 0 4px rgba(200, 134, 30, 0.28);
  animation: pulse 1.2s ease-in-out infinite;
}
.status-card__live-nudge[data-live="2"] {
  border-style: solid;
  border-color: rgba(45, 106, 79, 0.55);
  background: rgba(45, 106, 79, 0.16);
  color: var(--jade-deep);
}
.status-card__live-nudge[data-live="2"] .status-card__live-nudge-dot {
  background: var(--jade);
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.22);
  animation: pulse 2.4s ease-in-out infinite;
}
.status-card__live-nudge[data-live="3"] {
  border-style: solid;
  border-color: rgba(185, 56, 41, 0.45);
  background: linear-gradient(180deg, #fff1ee, #f6d2cb);
  color: #8d261c;
  box-shadow: 0 0 0 1px rgba(185, 56, 41, 0.12), 0 6px 14px rgba(185, 56, 41, 0.12);
}
.status-card__live-nudge[data-live="3"] .status-card__live-nudge-dot {
  background: #b93829;
  box-shadow: 0 0 0 4px rgba(185, 56, 41, 0.22);
  animation: pulse 1.2s ease-in-out infinite;
}
.status-card__live-nudge:hover { filter: brightness(0.97); }
:root[data-theme="dark"] .status-card__live-nudge {
  border-color: rgba(74, 222, 128, 0.5);
  background: rgba(74, 222, 128, 0.16);
  color: #d8f5e4;
}
:root[data-theme="dark"] .status-card__live-nudge-dot {
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.3);
}
:root[data-theme="dark"] .status-card__live-nudge[data-live="1"] {
  border-color: #f3c25a;
  background: linear-gradient(180deg, #f6c45a, #c97a14);
  color: #2a1606;
}
:root[data-theme="dark"] .status-card__live-nudge[data-live="1"] .status-card__live-nudge-dot {
  background: #2a1606;
  box-shadow: 0 0 0 4px rgba(42, 22, 6, 0.22);
}
:root[data-theme="dark"] .status-card__live-nudge[data-live="2"] {
  border-color: rgba(74, 222, 128, 0.72);
  background: rgba(74, 222, 128, 0.22);
  color: #d8f5e4;
}
:root[data-theme="dark"] .status-card__live-nudge[data-live="3"] {
  border-color: #e07a6a;
  background: linear-gradient(180deg, #c45246, #8d2c24);
  color: #fff6f2;
}
:root[data-theme="dark"] .status-card__live-nudge[data-live="3"] .status-card__live-nudge-dot {
  background: #fff6f2;
  box-shadow: 0 0 0 4px rgba(255, 246, 242, 0.2);
}
:root[data-theme="dark"] .status-card__live-nudge:hover { filter: brightness(1.06); }
.status-card__badges .status-chip {
  gap: 6px;
}
.status-card__tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex: 0 0 auto;
}
.status-card__tools .btn-sound {
  margin-left: 0;
}
.status-card__tools .focus-toggle span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.status-card__tools .focus-toggle svg {
  width: 18px;
  height: 18px;
}
.focus-toggle [data-bsb-focus-on],
.focus-toggle[aria-pressed="true"] [data-bsb-focus-off] {
  display: none;
}
.focus-toggle[aria-pressed="true"] [data-bsb-focus-on] {
  display: block;
}
html[data-focus="true"] .bsb-chrome-header,
html[data-focus="true"] .site-footer,
html[data-focus="true"] .nav-scrim,
html[data-focus="true"] [data-bsb-hero],
html[data-focus="true"] .content-main > :not([data-bsb-shell]):not([data-bsb-online]) {
  display: none !important;
}
html[data-focus="true"] .content-main > [data-bsb-online] {
  display: block !important;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
html[data-focus="true"] [data-bsb-online] > [data-online-confirm] {
  display: none !important;
}
html[data-focus="true"] .bsb-aside,
html[data-focus="true"] .bsb-aside-fill {
  display: contents !important;
}
html[data-focus="true"] .bsb-aside > :not(.status-card):not(.bsb-aside-fill),
html[data-focus="true"] .bsb-aside-fill > :not(.status-card) {
  display: none !important;
}
html[data-focus="true"] .status-card,
html[data-focus="true"] .status-card__top,
html[data-focus="true"] .status-card__tools {
  display: contents;
}
html[data-focus="true"] .status-card__badges,
html[data-focus="true"] .status-card__hint,
html[data-focus="true"] .status-card__tools [data-bsb-sound] {
  display: none !important;
}
html[data-focus="true"] {
  --bsb-head-h: 0px;
}
html[data-focus="true"],
html[data-focus="true"] body {
  overflow: hidden !important;
  height: 100dvh;
  max-height: 100dvh;
}
@media (min-width: 721px) {
  html[data-focus="true"] .focus-toggle:not(.focus-toggle--hud) {
    display: grid;
    place-items: center;
    position: fixed;
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: 10px;
    z-index: 220;
    width: 40px;
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(10, 14, 20, 0.82);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    color: #f4f7f5;
    filter: none;
    pointer-events: auto;
  }
  html[data-focus="true"] .focus-toggle:not(.focus-toggle--hud):hover,
  html[data-focus="true"] .focus-toggle:not(.focus-toggle--hud):active {
    background: rgba(10, 14, 20, 0.94);
    color: #ffffff;
  }
}
@media (min-width: 721px) {
  html[data-focus="true"] .bw-hud__top {
    padding-right: 56px;
  }
  html[data-focus="true"] .toolbar.toolbar--panel {
    display: none !important;
  }
}
.status-card__turn {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--brown-deep);
}
.stone-dot {
  flex: 0 0 auto;
  width: 18px;
  height: 12px;
  border-radius: 3px;
  box-sizing: border-box;
  box-shadow: none;
}
.stone-dot.black {
  background: linear-gradient(180deg, #f08a78 0%, #d04532 55%, #8d1c14 100%);
  border: 1px solid #5c100c;
}
.stone-dot.white {
  background: linear-gradient(180deg, #8ea4bc 0%, #3d5570 52%, #243447 100%);
  border: 1px solid #15283c;
}
.status-card__hint {
  margin: 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
  height: calc(2 * 1.5em + 20px);
  overflow: hidden;
}
.status-card__size {
  display: flex;
  align-items: center;
  gap: 10px;
}
.status-card__label {
  flex: 0 0 auto;
  color: var(--ink-soft);
  font-size: 14px;
}
.status-card__size .size-switch {
  flex: 1 1 auto;
  justify-content: stretch;
  gap: 4px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
}
.status-card__size .size-switch__btn { flex: 1 1 0; text-align: center; }

.caps-row {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.caps-row__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
}
.caps-row__item dt {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 14px;
}
.caps-row__item .stone-dot { width: 14px; height: 14px; }
.caps-row__item dd { margin: 0 0 0 auto; font-size: 18px; font-weight: 700; color: var(--ink); }

.board__bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--surface);
}
.board__bar label { flex-shrink: 0; color: var(--ink-soft); font-size: 14px; }
.board__bar select {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf7;
  font-size: 14px;
  cursor: pointer;
}

.toolbar { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.toolbar:not(.toolbar--panel) .btn { border-radius: 12px; }
.toolbar:not(.toolbar--panel) .btn--primary { grid-column: 1 / -1; }
.toolbar.toolbar--panel {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
  flex: 0 0 auto;
}
.toolbar.toolbar--panel.toolbar--panel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.play[data-mode="online"] .toolbar.toolbar--panel.toolbar--panel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.toolbar.toolbar--panel .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  min-height: 36px;
  padding: 6px 4px;
  gap: 4px;
  white-space: nowrap;
}
.toolbar.toolbar--panel .btn:hover,
.toolbar.toolbar--panel .btn:active { transform: none; }
.toolbar.toolbar--panel.toolbar--panel-grid .btn {
  flex: unset;
  width: 100%;
}
.toolbar--panel .btn[aria-busy="true"],
.toolbar--panel .btn.is-replaying {
  cursor: wait;
  opacity: 0.85;
  animation: bsb-hint-pulse 1.1s ease-in-out infinite;
}
.play .card-side .side-tabs { display: none; }
.play .side-pane[data-bsb-side-pane="info"] { flex: 0 0 auto; }
.play .side-pane[data-bsb-side-pane="history"] {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 8px;
}
.live-lobby-teaser {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 22px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--surface);
}
.live-lobby-teaser__text { margin: 0; }
.live-lobby-teaser__link { font-weight: 650; white-space: nowrap; }

/* Toolbar mounted below the board: a content-aware flex row. All six controls
   stay on a single line whenever the board is wide enough to hold them; only
   when space actually runs out do they wrap, and any wrapped row stretches to
   fill the width so no empty gaps are left behind. */
.toolbar--board {
  display: flex;
  flex-wrap: wrap;
  flex: 0 0 auto;
  width: var(--sq);
}
.toolbar--board .btn {
  flex: 1 1 0;
  min-width: 92px;
  padding-inline: 12px;
  white-space: nowrap;
}
.toolbar--board .btn[aria-busy="true"],
.toolbar--board .btn.is-replaying {
  cursor: wait;
  opacity: 0.85;
  animation: bsb-hint-pulse 1.1s ease-in-out infinite;
}
@keyframes bsb-hint-pulse {
  50% { opacity: 0.55; }
}

.score-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: var(--sq);
  flex: 0 0 auto;
  margin-top: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.score-bar[hidden] { display: none !important; }
.score-bar__hint {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.score-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.score-bar__actions .btn { flex: 1 1 0; min-width: 120px; }
.toolbar .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.toolbar .btn svg { width: 16px; height: 16px; flex: 0 0 auto; opacity: 0.85; }
.toolbar .btn--primary svg { opacity: 1; }
.btn {
  min-height: 38px;
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--surface-2); }
.btn:active { transform: translateY(0); }
.btn--primary {
  border-color: transparent;
  background: linear-gradient(135deg, #1e7044, #124d2d);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(18, 77, 45, 0.28);
}
.btn--primary:hover { background: linear-gradient(135deg, #248250, #165b36); }
.btn--lg { min-height: 44px; padding: 10px 26px; font-size: 15px; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 15px;
}
.card h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--brown-deep);
}
.card--inline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.card--inline > h3 {
  margin: 0;
  flex: 0 0 auto;
  font-size: 15px;
}
.card--inline .select {
  flex: 1 1 auto;
  min-width: 0;
}
.card--inline .select__trigger {
  padding: 6px 10px;
  min-height: 36px;
}
.card--inline .select__labels {
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
}
.setup-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
}
.setup-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.setup-row > h3 {
  margin: 0;
  flex: 0 0 6.6em;
  font-size: 15px;
  white-space: nowrap;
}
.setup-row .select {
  flex: 1 1 auto;
  min-width: 0;
}
.setup-row .select__trigger {
  padding: 4px 10px;
  min-height: 34px;
}
.setup-row .select__trigger .select__labels {
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
}
.setup-row .select__trigger .select__sub { display: none; }
.setup-row .select__trigger .select__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.setup-row .select__opt .select__title { white-space: nowrap; }
.setup-row .select__opt .select__sub { white-space: normal; }
.stat-grid { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
}
.stat-item dt { color: var(--ink-soft); font-size: 14px; }
.stat-item dd { margin: 0; font-size: 18px; font-weight: 700; color: var(--ink); }

.card-side {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 10px 12px 12px;
}
.side-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 10px;
  border-bottom: 1px solid var(--line-soft);
}
.side-tabs__btn {
  min-height: 30px;
  padding: 4px 2px 8px;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
}
.side-tabs__btn:hover { color: var(--brown-deep); }
.side-tabs__btn.active {
  color: var(--brown-deep);
  border-bottom-color: var(--brown-deep);
}
.side-stack {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.side-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}
.side-pane[hidden] { display: none; }
.side-pane.is-off {
  visibility: hidden;
  pointer-events: none;
}
.side-pane[data-bsb-side-pane="history"]:not([hidden]) {
  position: relative;
  inset: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.move-list-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overflow-anchor: none;
}
.move-list-bar {
  position: relative;
  flex: 0 0 auto;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 8px 0 0;
  background: var(--surface);
}
.move-list-copy {
  min-height: 28px;
  padding: 2px 12px;
  font-size: 14px;
  font-weight: 400;
}
.card-side .move-list {
  flex: none;
  align-self: stretch;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  align-items: start;
  overflow-anchor: none;
  box-sizing: border-box;
}

.card-history { display: flex; flex-direction: column; min-height: 0; }
.card-history__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  text-align: left;
}
.card-history__toggle h3 { margin: 0; }
.card-history__meta {
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
.card-history__chevron {
  width: 18px;
  height: 18px;
  color: var(--ink-soft);
  transition: transform 0.2s ease;
}
.card-history__toggle[aria-expanded="true"] .card-history__chevron { transform: rotate(180deg); }
.card-history__toggle + .move-list { margin-top: 12px; }
.move-list {
  margin: 0;
  padding: 0 2px 4px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: 6px;
  list-style: none;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
.move-list > li {
  width: 100%;
  height: 36px;
  overflow: visible;
  align-self: start;
}
.move-list .bsb-move {
  width: 100%;
  height: 36px;
  min-height: 36px;
  box-sizing: border-box;
  padding: 0 8px 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--ink-soft);
  text-align: left;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-variant-numeric: tabular-nums;
  overflow: visible;
}
.move-list .bsb-move__play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: max-content;
  white-space: nowrap;
}
.move-list .bsb-move__num {
  flex: 0 0 auto;
  min-width: 2.6em;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink-soft);
  opacity: 0.65;
}
.move-list .stone-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}
.move-list .bsb-move__san {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.move-list .bsb-move__cap {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: max-content;
  height: 100%;
  padding: 0 0 0 8px;
  border-left: 1px dashed color-mix(in srgb, var(--brown) 22%, transparent);
}
.move-list .bsb-move__cap-label {
  font-size: 14px;
  letter-spacing: 0.03em;
  opacity: 0.8;
  line-height: 1;
  white-space: nowrap;
}
.move-list .active .bsb-move { background: var(--brown); color: #ffffff; border-color: var(--brown); font-weight: 700; }
.move-list .active .bsb-move__num,
.move-list .active .bsb-move__san,
.move-list .active .bsb-move__cap-label {
  color: #ffffff;
  opacity: 1;
}
.move-list .active .bsb-move__cap {
  border-left-color: color-mix(in srgb, #ffffff 42%, transparent);
}

/* ===== Ad column (160x600) ===== */
.ad-rail {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  justify-content: center;
  margin-left: 14px;
}
.ad-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.ad-unit--rail {
  width: var(--ad-w);
}
.ad-unit--mobile {
  display: none;
  width: var(--sq);
  gap: 4px;
  margin-top: 8px;
}
.ad-slot__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
}
.ad-slot__badge {
  flex-shrink: 0;
  align-self: stretch;
  text-align: center;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--ink-soft);
  user-select: none;
}
.ad-slot__note {
  flex-shrink: 0;
  max-width: 100%;
  text-align: center;
  font-size: 14px;
  line-height: 1.2;
  color: var(--ink-soft);
  opacity: 0.88;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ad-slot {
  width: var(--ad-w);
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
}
.ad-slot iframe {
  border: 0;
  display: block;
  flex-shrink: 0;
}
.ad-slot--mobile {
  display: none;
  width: var(--sq);
  height: 50px;
  flex: 0 0 50px;
  margin-top: 8px;
}
iframe[id^="container-"],
iframe[class^="container-"] {
  display: none !important;
}

/* ===== Article (rules / tips) ===== */
.article {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 28px;
}
.article section + section { margin-top: 30px; }
.article h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: var(--brown-deep);
}
.article p { color: var(--ink-soft); }
.guide-list { padding-left: 22px; color: var(--ink-soft); }
.guide-list li { margin: 9px 0; }
.guide-list strong { color: var(--brown-deep); }
.article-body code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--brown-deep);
  font-size: 0.92em;
}
.article-toc {
  margin: 24px 0 30px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.article-toc strong { color: var(--brown-deep); }
.article-toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 28px;
  margin: 11px 0 0;
  padding-left: 24px;
}
.article-toc li { padding-left: 4px; }
.article-toc a { color: var(--jade-deep); text-decoration: none; }
.article-toc a:hover { color: var(--brown); text-decoration: underline; }
.score-table-wrap {
  overflow-x: auto;
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.score-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  text-align: left;
  color: var(--ink-soft);
}
.score-table caption {
  padding: 14px 16px 8px;
  color: var(--brown-deep);
  font-weight: 700;
  text-align: left;
}
.score-table th,
.score-table td { padding: 11px 16px; border-top: 1px solid var(--line); }
.score-table thead th { color: var(--brown-deep); background: var(--surface-2); }
.score-table tbody th { color: var(--brown-deep); font-weight: 600; }
.practice-checklist {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.practice-checklist h3 {
  margin: 0 0 12px;
  color: var(--brown-deep);
  font-family: var(--serif);
  font-size: 21px;
}
.practice-checklist ol { margin: 0 0 16px; padding-left: 22px; color: var(--ink-soft); }
.practice-checklist li + li { margin-top: 10px; }
.practice-checklist a {
  color: var(--jade-deep);
  font-weight: 700;
}
.practice-checklist__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid color-mix(in srgb, var(--jade-deep) 35%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--jade) 12%, var(--surface));
  color: var(--jade-deep);
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}
.practice-checklist__cta:hover {
  background: color-mix(in srgb, var(--jade) 18%, var(--surface));
  color: var(--brown-deep);
}
.tips-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  color: var(--brown-deep);
}
.tips-flow__step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 72px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  text-align: center;
}
.tips-flow__step strong {
  font-size: 15px;
  line-height: 1.3;
}
.tips-flow__step span {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.4;
}
.tips-flow__step--last {
  background: color-mix(in srgb, var(--jade) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--jade-deep) 28%, var(--line));
}
.tips-flow__step:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -12px;
  transform: translateY(-50%);
  color: var(--brown);
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
}
.tips-eyes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.tips-eyes__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.tips-eyes__label {
  margin: 0;
  color: var(--brown-deep);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.tips-eyes__panel svg {
  display: block;
  width: min(100%, 180px);
  height: auto;
}
.article-figure {
  max-width: 720px;
  margin: 22px auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.article-figure svg {
  display: block;
  width: 100%;
  height: auto;
  color: var(--brown-deep);
}
.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius) - 4px);
}
.article-figure figcaption {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}
.article-figure--wide {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
.article-figure--wide svg {
  width: auto;
  min-width: 100%;
  max-width: none;
}
.article-note {
  margin: 22px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--jade);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface-2);
}
.article-note strong { color: var(--brown-deep); }
.article-note p { margin: 7px 0 0; }
details {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
summary { cursor: pointer; color: var(--brown-deep); font-weight: 700; }
details p { margin: 8px 0 0; }
.license-notice pre {
  overflow-x: auto;
  margin: 14px 0 0;
  padding: 14px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
}

/* ===== Custom select (difficulty) ===== */
.select { position: relative; width: 100%; }
.select__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(150deg, #fffdf7, #f6efdd);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.select__trigger:hover { border-color: var(--brown); }
.select.open .select__trigger {
  border-color: var(--brown);
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.14);
}
.select__dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 0 3px rgba(58, 107, 79, 0.18);
}
.select__dot.lv2 { background: var(--gold); box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.18); }
.select__dot.lv3 { background: var(--brown); box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.18); }
.select__dot.lv4 { background: #1c1917; box-shadow: 0 0 0 3px rgba(28, 25, 23, 0.22); }
.select__dot.lv5 { background: #9f2d2d; box-shadow: 0 0 0 3px rgba(159, 45, 45, 0.22); }
.select__dot.lv-white,
.select__dot.lv-black {
  width: 16px;
  height: 11px;
  border-radius: 3px;
  box-sizing: border-box;
}
.select__dot.lv-white {
  background: linear-gradient(180deg, #8ea4bc 0%, #3d5570 52%, #243447 100%);
  border: 1px solid #15283c;
  box-shadow: none;
}
.select__dot.lv-black {
  background: linear-gradient(180deg, #f08a78 0%, #d04532 55%, #8d1c14 100%);
  border: 1px solid #5c100c;
  box-shadow: none;
}
:root[data-theme="dark"] .select__dot.lv-white {
  background: linear-gradient(180deg, #8ea4bc 0%, #3d5570 52%, #243447 100%);
  border-color: #15283c;
}
.select__labels { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.select__title { font-size: 14px; font-weight: 500; }
.select__sub { font-size: 14px; color: var(--ink-soft); }
.select__chev { flex: 0 0 auto; color: var(--ink-soft); transition: transform 0.2s; }
.select.open .select__chev { transform: rotate(180deg); }

.select__menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.select__menu[hidden] { display: none; }
.select__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.14s;
}
.select__opt:hover { background: var(--surface-2); }
.select__opt.active { background: rgba(139, 69, 19, 0.1); }
.select__opt .select__title { color: var(--ink); }

/* ===== Online room view ===== */
.online { max-width: 860px; width: 100%; min-width: 0; margin: 0 auto; padding: 32px 24px; }
.online__head { text-align: center; margin-bottom: 26px; }
.online__head h1 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 700;
  color: var(--brown-deep);
}
.online__lead {
  margin: 0;
  max-width: none;
  width: 100%;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
}
.online__head h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 600;
  color: var(--ink-soft);
}
.online__head p { margin: 0; color: var(--ink-soft); }
.online__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; min-width: 0; }
.room-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.room-card p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.room-card .size-switch {
  justify-content: stretch;
  width: 100%;
}
.room-card .size-switch__btn {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}
.room-input {
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf7;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-align: center;
}
.online__hint {
  margin: 0;
  min-height: 1.2em;
  font-size: 14px;
  color: var(--gold);
}
.online__hint--warn {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  color: var(--ink);
}
[data-online-type-note].online__hint--warn {
  margin-top: 14px;
}
.online__lobby {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.online__lobby-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.online__lobby-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--brown-deep);
}
.room-code {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-align: center;
  color: var(--brown-deep);
  padding: 10px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
}
.online__note {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(58, 107, 79, 0.1);
  border: 1px solid rgba(58, 107, 79, 0.24);
  color: var(--jade-deep);
  font-size: 14px;
}

/* ===== Online state UIs ===== */
.state-tabs {
  max-width: 720px;
  margin: 18px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.35);
}
.state-tabs__label { flex: 0 0 100%; font-size: 14px; color: var(--ink-soft); margin-bottom: 2px; }
.state-tabs button {
  padding: 5px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 14px;
  cursor: pointer;
}
.state-tabs button.active { background: var(--brown); color: #fff5e6; border-color: var(--brown); }

.conn {
  max-width: 560px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 40px 24px;
  text-align: center;
}
.conn__spinner {
  width: 54px;
  height: 54px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 4px solid rgba(139, 69, 19, 0.18);
  border-top-color: var(--brown);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.conn__ring {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(58, 107, 79, 0.12);
  color: var(--jade-deep);
}
.conn__ring.warn { background: rgba(184, 134, 11, 0.14); color: var(--gold); }
.conn__ring.err { background: rgba(150, 40, 20, 0.12); color: #9c3320; }
.conn h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--brown-deep);
}
.conn p { margin: 0 0 20px; color: var(--ink-soft); }
.conn__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Generic segmented control (room type, color pick) */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-soft); max-width: 100%; }
.seg--full { display: flex; width: 100%; min-width: 0; }
.seg--full .seg__btn { flex: 1 1 0; min-width: 0; white-space: nowrap; }
.seg__btn {
  padding: 7px 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
  white-space: nowrap;
}
.seg__btn:hover { color: var(--ink); }
.seg__btn.active {
  background: linear-gradient(135deg, #1e7044, #124d2d);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(18, 77, 45, 0.24);
}
.seg__btn.active.jade { background: linear-gradient(135deg, var(--jade), var(--jade-deep)); }
.opt-row { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.opt-row > span { font-size: 14px; color: var(--ink-soft); }

/* Invite (URL + code) rows */
.invite { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 20px; text-align: left; }
.invite__label { font-size: 14px; color: var(--ink-soft); margin-bottom: 4px; }
.invite-row { display: flex; gap: 8px; }
.invite-row input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf7;
  font-size: 14px;
  color: var(--ink);
}
.invite-row .btn { flex: 0 0 auto; }
.copied { font-size: 14px; color: var(--jade-deep); }

/* Site footer */
.site-footer {
  margin-top: 8px;
  background-color: #0d341f;
  background-image: linear-gradient(180deg, #124329 0%, #0d341f 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.18);
  color: rgba(220, 245, 230, 0.72);
}
.bsb-chrome-footer::after {
  content: "";
  display: block;
  height: env(safe-area-inset-bottom, 0px);
}
:root[data-theme="dark"] .site-footer {
  background-color: #08120d;
  background-image: linear-gradient(180deg, #0c1a13 0%, #08120d 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.5);
  color: rgba(180, 215, 195, 0.65);
}
.site-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 44px 32px 32px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 28px 32px;
}
.footer-games-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 32px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
:root[data-theme="dark"] .footer-games-wrap {
  border-top-color: rgba(255, 255, 255, 0.08);
}
.footer-groups { display: flex; flex-direction: column; gap: 12px; }
.footer-group {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
}
.footer-group__title {
  margin: 0;
  flex: 0 0 auto;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: #f0fdf4;
  letter-spacing: 0.02em;
}
.footer-col h2,
.footer-col h4,
.footer-heading {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 15px;
  color: #f0fdf4;
  letter-spacing: 0.02em;
}
:root[data-theme="dark"] .footer-group__title,
:root[data-theme="dark"] .footer-heading {
  color: #eef6f1;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-group .footer-games {
  display: flex;
  flex: 1 1 280px;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-col a,
.footer-games-wrap a {
  color: rgba(220, 245, 230, 0.78);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s;
}
.footer-col a:hover,
.footer-games-wrap a:hover { color: #f0fdf4; }
:root[data-theme="dark"] .footer-col a,
:root[data-theme="dark"] .footer-games-wrap a { color: rgba(180, 215, 195, 0.75); }
:root[data-theme="dark"] .footer-col a:hover,
:root[data-theme="dark"] .footer-games-wrap a:hover { color: #eef6f1; }
.footer-col--brand .brand { margin-bottom: 14px; }
.footer-col--brand .brand__name { font-size: 17px; color: #f0fdf4; }
.footer-col--brand .brand__text p { color: rgba(220, 245, 230, 0.72); }
:root[data-theme="dark"] .footer-col--brand .brand__name { color: #eef6f1; }
:root[data-theme="dark"] .footer-col--brand .brand__text p { color: rgba(180, 215, 195, 0.72); }
.footer-about {
  margin: 0 0 18px;
  color: rgba(220, 245, 230, 0.68);
  font-size: 14px;
  line-height: 1.7;
  max-width: 34ch;
}
:root[data-theme="dark"] .footer-about { color: rgba(180, 215, 195, 0.65); }
.lang { position: relative; display: inline-block; }
.lang__trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 1px solid rgba(240, 253, 244, 0.22);
  border-radius: 999px;
  background: rgba(240, 253, 244, 0.1);
  color: #f0fdf4;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, box-shadow 0.16s;
}
.lang__trigger:hover { border-color: rgba(240, 253, 244, 0.4); background: rgba(240, 253, 244, 0.16); }
.lang__trigger.open { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.25); }
.lang__globe { color: var(--gold); }
.lang__caret { color: rgba(240, 253, 244, 0.7); transition: transform 0.18s; }
.lang__trigger.open .lang__caret { transform: rotate(180deg); }
.lang__menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  min-width: 190px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 20;
  transform-origin: bottom left;
  animation: langPop 0.16s ease;
}
@keyframes langPop {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.lang__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s;
}
.lang__opt:hover { background: var(--surface-2); }
.lang__opt.active { background: rgba(28, 102, 62, 0.1); color: var(--brown-deep); font-weight: 600; }
.lang__check { margin-left: auto; color: var(--brown); }
.lang__opt:not(.active) .lang__check { visibility: hidden; }
.site-footer__bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: rgba(220, 245, 230, 0.62);
}
:root[data-theme="dark"] .site-footer__bar {
  border-top-color: rgba(255, 255, 255, 0.08);
  color: rgba(180, 215, 195, 0.55);
}
@media (max-width: 900px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; gap: 28px; padding: 36px 24px 28px; }
  .footer-col--brand { grid-column: 1 / -1; }
  .footer-games-wrap { padding: 18px 24px 8px; }
  .footer-groups { gap: 0; }
  .footer-group {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .footer-group:first-child { border-top: 0; padding-top: 4px; }
  .footer-group .footer-games {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: none;
    gap: 0 12px;
  }
  .footer-group .footer-games a {
    display: flex;
    align-items: center;
    min-height: 36px;
  }
  .site-footer__bar { padding: 16px 24px; }
}
@media (max-width: 560px) {
  .site-footer__inner { grid-template-columns: 1fr; }
  .footer-games-wrap { padding-left: 16px; padding-right: 16px; }
}

/* Room lobby */
.lobby { max-width: 760px; width: 100%; min-width: 0; margin: 0 auto; }
.lobby__filter { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.lobby__filter button {
  padding: 5px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 14px;
  cursor: pointer;
}
.lobby__filter button.active { background: var(--brown); color: #fff5e6; border-color: var(--brown); }
.lobby-block { margin-top: 8px; }
.lobby-block + .lobby-block { margin-top: 28px; }
.lobby-block__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.lobby-block h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--brown-deep);
}
.lobby-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  background: rgba(42, 123, 79, 0.10);
  color: var(--jade-deep);
  border: 1px solid rgba(42, 123, 79, 0.18);
}
.room-list { display: flex; flex-direction: column; gap: 10px; }
.room-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 4px 16px rgba(16, 45, 28, 0.05);
}
.room-item--mine {
  border-color: rgba(42, 123, 79, 0.35);
  background: linear-gradient(158deg, var(--surface), rgba(42, 123, 79, 0.08));
}
.room-item__ava {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #1e7044, #124d2d);
}
.room-item__ava--black,
.room-item__ava--white {
  background: linear-gradient(135deg, #1e7044, #124d2d);
  border: none;
}
.room-item__body { min-width: 0; }
.room-item__name { font-weight: 600; color: var(--ink); }
.room-item__title,
.room-item__code {
  font: inherit;
  color: inherit;
}
.room-item__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.room-item__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-self: end;
  min-width: 88px;
}
.room-item__actions .btn {
  width: 100%;
  white-space: nowrap;
}
.room-item__close { font-size: 14px; }
.room-tag {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  font-size: 14px;
  color: var(--ink-soft);
}
.room-tag--waiting {
  color: var(--gold);
  border-color: rgba(180, 128, 24, 0.28);
  background: rgba(180, 128, 24, 0.1);
}
.room-tag--live {
  color: var(--jade-deep);
  background: rgba(42, 123, 79, 0.12);
  border-color: rgba(42, 123, 79, 0.28);
}
.room-tag--watch {
  color: var(--ink-soft);
  background: var(--surface-2);
}
.lobby__empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.lobby__empty-icon {
  color: var(--wood-deep, var(--brown-deep));
  opacity: 0.75;
}
@media (max-width: 560px) {
  .room-item { grid-template-columns: auto minmax(0, 1fr); }
  .room-item__actions { grid-column: 1 / -1; width: 100%; }
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  width: max-content;
  white-space: nowrap;
  box-sizing: border-box;
}
.status-chip .dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.status-chip.online { background: rgba(58, 107, 79, 0.14); color: var(--jade-deep); }
.status-chip.online .dot { background: var(--jade); box-shadow: 0 0 0 2px rgba(58, 107, 79, 0.18); }
.status-chip.waiting { background: rgba(184, 134, 11, 0.14); color: var(--gold); }
.status-chip.waiting .dot { background: var(--gold); animation: pulse 1.2s ease-in-out infinite; }
.status-chip.offline { background: rgba(90, 74, 56, 0.12); color: var(--ink-soft); }
.status-chip.offline .dot { background: var(--ink-soft); }
.status-chip.watch { background: rgba(99, 78, 61, 0.10); color: var(--ink-soft); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.players {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 8px 0 22px;
}
.player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  min-width: 0;
  flex: 1 1 120px;
}
.player.you { box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.25); }
.avatar {
  width: 52px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0;
  box-sizing: border-box;
  border: 1px solid transparent;
}
.avatar.black {
  background: linear-gradient(180deg, #f08a78 0%, #d04532 55%, #8d1c14 100%);
  border-color: #5c100c;
}
.avatar.white {
  background: linear-gradient(180deg, #8ea4bc 0%, #3d5570 52%, #243447 100%);
  border-color: #15283c;
}
.avatar.ghost { background: var(--surface-2); color: var(--ink-soft); border-style: dashed; }
.player__name { font-weight: 600; font-size: 15px; color: var(--ink); }
.player__meta { font-size: 14px; color: var(--ink-soft); }
.vs { font-family: var(--serif); font-size: 20px; color: var(--brown-deep); font-weight: 700; }
.vs-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  user-select: none;
  touch-action: manipulation;
}
.vs-col:has(.vs-swap:not([hidden])) { cursor: pointer; }
.vs-swap {
  appearance: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(58, 107, 79, 0.12);
  color: var(--jade-deep);
  display: grid;
  place-items: center;
  cursor: pointer;
  touch-action: manipulation;
}
.vs-swap svg { width: 20px; height: 20px; }
.vs-swap[hidden] { display: none; }

/* Online in-game panel bits */
.turn-flag {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  font-size: 14px;
  color: var(--ink);
}
.turn-flag .dot { width: 16px; height: 11px; border-radius: 3px; box-sizing: border-box; }
.turn-flag .dot.black {
  background: linear-gradient(180deg, #f08a78 0%, #d04532 55%, #8d1c14 100%);
  border: 1px solid #5c100c;
}
.turn-flag .dot.white {
  background: linear-gradient(180deg, #8ea4bc 0%, #3d5570 52%, #243447 100%);
  border: 1px solid #15283c;
}

/* ===== Below-fold copy ===== */
.below {
  padding: 56px 32px 64px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent 240px);
  content-visibility: auto;
  contain-intrinsic-size: auto 720px;
}
.below__inner { max-width: 1040px; margin: 0 auto; }
.below__lead { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.below__title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--brown-deep);
}
.below__intro { margin: 0; font-size: 16px; color: var(--ink-soft); }
.below__resource-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.below__resource-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--brown-deep);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s;
}
.below__resource-link:hover {
  background: var(--surface-2);
  border-color: var(--line-soft);
}
.below__resource-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.beginner-guide {
  max-width: 860px;
  margin: 0 auto 56px;
  padding: 30px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.beginner-guide__body h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(21px, 2.6vw, 27px);
  color: var(--brown-deep);
}
.beginner-guide__body p { margin: 0 0 10px; color: var(--ink-soft); }
.beginner-guide__link {
  display: inline-block;
  margin-top: 5px;
  color: var(--jade-deep);
  font-weight: 700;
}
.beginner-guide__link:hover { color: var(--brown); }

.mode-choices {
  margin: 0 auto 56px;
}
.mode-choices__heading {
  max-width: 680px;
  margin: 0 auto 22px;
  text-align: center;
}
.mode-choices__heading h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(21px, 2.6vw, 27px);
  font-weight: 700;
  color: var(--brown-deep);
}
.mode-choices__heading p {
  margin: 0;
  color: var(--ink-soft);
}
.mode-choices__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.mode-choice {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}
.mode-choice:hover {
  transform: translateY(-2px);
  border-color: var(--line-soft);
  background: var(--surface-2);
}
.mode-choice__icon {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--brown);
}
.mode-choice strong {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 20px);
  font-weight: 700;
  color: var(--brown-deep);
}
.mode-choice__description {
  flex: 1;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.75;
}
.mode-choice__action {
  margin-top: 18px;
  color: var(--brown);
  font-size: 14px;
  font-weight: 700;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
  margin-bottom: 56px;
}
.feature:last-of-type { margin-bottom: 0; }
.feature.reverse .feature__media { order: 2; }
.feature__media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.feature__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.feature__body h3 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 27px);
  font-weight: 700;
  color: var(--brown-deep);
}
.feature__body p { margin: 0 0 14px; color: var(--ink-soft); }
.feature__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.feature__tags span {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--brown-deep);
}

.below__stats {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.below__stat {
  margin: 0;
  text-align: center;
  padding: 22px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.below__stat strong {
  display: block;
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  color: var(--jade-deep);
}
.below__stat span { font-size: 14px; color: var(--ink-soft); font-weight: 400; }

.below-faq {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 860px;
  margin: 56px auto 0;
}
.below-faq > h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.35;
  color: var(--brown-deep);
}
.below-faq details {
  margin: 0;
  padding: 16px 0;
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.below-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  color: var(--brown-deep);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16.5px;
  line-height: 1.45;
  list-style: none;
}
.below-faq summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--brown);
  font-family: system-ui, sans-serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}
.below-faq details[open] summary::after {
  content: "−";
}
.below-faq summary::-webkit-details-marker {
  display: none;
}
.below-faq details p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.8;
}

@media (max-width: 900px) {
  .online { padding: 24px 16px; }
  .online__grid { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; gap: 20px; margin-bottom: 40px; }
  .feature.reverse .feature__media { order: 0; }
  .below { padding: 40px 18px 48px; }
  .mode-choices__grid { grid-template-columns: 1fr; }
  .mode-choice { padding: 20px; }
  .beginner-guide { padding: 26px; }
  .below__stats { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Overlay ===== */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(32, 18, 6, 0.58);
  backdrop-filter: blur(5px);
  z-index: 50;
}
:root[data-theme="dark"] .overlay {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}
.overlay[hidden] { display: none; }
.overlay__card {
  width: min(100%, 360px);
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
  color: var(--ink);
  text-align: center;
}
:root[data-theme="dark"] .overlay__card {
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.55);
}
.overlay__icon {
  margin: 0 0 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.overlay__icon .stone-dot {
  width: 36px;
  height: 24px;
  border-radius: 6px;
}
.overlay__title { margin: 8px 0 4px; font-family: var(--serif); font-size: 24px; font-weight: 800; color: var(--brown-deep); }
.overlay__detail { margin: 0 0 18px; color: var(--ink-soft); }
.overlay__actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 0 0 12px; }
.overlay__actions[hidden] { display: none; }
.overlay__actions--stack {
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 0;
}
.overlay__actions--stack .btn { width: 100%; }
.overlay--online-confirm { z-index: 60; }
.btn--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--ink-soft);
  box-shadow: none;
}
.btn--quiet:hover {
  background: var(--surface-2);
  color: var(--ink);
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .play {
    --panel-w: 300px;
    grid-template-columns: 1fr;
    height: auto;
    padding: 14px;
    gap: 12px;
  }
  .board,
  .play--spectating .board {
    height: auto;
    container-type: normal;
    --sq: min(100%, calc((100dvh - 220px) * 3 / 2));
  }
  .play--scoring:not(.play--spectating) .board {
    --sq: min(100%, calc((100dvh - 326px) * 3 / 2));
  }
  .panel > .toolbar.toolbar--panel { order: -1; }
  .play-head,
  .play-title,
  .head-live {
    max-width: var(--sq);
  }
  .panel { margin-left: 0; }
  .move-list {
    height: 288px;
    max-height: 288px;
    overflow-y: auto;
  }
  .ad-rail { display: none; }
  .ad-slot--mobile {
    display: flex;
  }
  .app { flex-direction: column; height: 100dvh; }
  .sidebar {
    /* Block, not flex: an absolutely positioned panel must not
       participate in flex sizing or the header grows and crushes .content. */
    display: block;
    position: relative;
    z-index: 40;
    flex: 0 0 auto;
    width: 100%;
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
    border-right: none;
    /* Solid top bar: Safari overscroll / theme-color ignore gradients. */
    background-image: none;
  }
  :root[data-theme="dark"] .sidebar {
    background-image: none;
    border-right: none;
  }
  .sidebar__top {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    column-gap: 8px;
  }
  .sidebar__top-spacer {
    display: block;
    width: 42px;
    height: 42px;
  }
  .sidebar .brand,
  .sidebar .brand--chrome {
    grid-column: 2;
    justify-self: center;
    flex: none;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: auto;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border-bottom: none;
  }
  .sidebar .brand .brand__mark {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 9px;
    flex: 0 0 auto;
  }
  .sidebar .brand__name {
    font-size: 17px;
    letter-spacing: 0.06em;
    line-height: 1.1;
    white-space: nowrap;
  }
  .menu-toggle {
    display: inline-flex;
    grid-column: 3;
    justify-self: end;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 5px;
  }
  .menu-toggle__bar {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .sidebar.is-open .menu-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .sidebar.is-open .menu-toggle__bar:nth-child(2) { opacity: 0; }
  .sidebar.is-open .menu-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .sidebar__panel {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 1;
    width: auto;
    flex: none;
    padding: 8px 14px 14px;
    background: linear-gradient(165deg, #185536 0%, #124329 55%, #0d341f 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.32);
    max-height: min(72dvh, calc(100dvh - 72px));
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) var(--scroll-track);
    overscroll-behavior: contain;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px) scale(0.985);
    transform-origin: top center;
    pointer-events: none;
    transition:
      opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0.28s;
  }
  :root[data-theme="dark"] .sidebar__panel {
    background: linear-gradient(165deg, #0f2219 0%, #0c1a13 55%, #08120d 100%);
  }
  .sidebar.is-open .sidebar__panel {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .nav { flex: 0 0 auto; }
  .sidebar__foot { display: flex; }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(28, 14, 4, 0.46);
    touch-action: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0.28s;
  }
  .nav-scrim.is-active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  @media (prefers-reduced-motion: reduce) {
    .sidebar__panel,
    .nav-scrim {
      transition: none;
      transform: none;
    }
  }

  .content { flex: 1 1 auto; min-height: 0; }
}

@media (max-width: 900px) {
  .play {
    grid-template-columns: 1fr;
    height: auto;
    padding: 14px;
    gap: 12px;
  }
  .board {
    height: auto;
    container-type: normal;
    --sq: min(100dvw - 28px, calc((100dvh - 278px) * 3 / 2));
  }
  .play--scoring:not(.play--spectating) .board {
    --sq: min(100dvw - 28px, calc((100dvh - 326px) * 3 / 2));
  }
  .play--spectating [data-bsb-spectate-leave="head"] {
    display: inline-flex;
  }
  .play-head {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: var(--sq);
    text-align: center;
    flex-wrap: wrap;
  }
  .play-title { width: 100%; text-align: center; }
  .play-head__meta {
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
  }
  .head-live {
    justify-content: center;
    flex-wrap: wrap;
  }
  .board__stage {
    flex: 0 0 auto;
    width: var(--sq);
    height: auto;
    max-height: none;
  }
  .board__frame {
    width: 100%;
    height: auto;
    padding: 3px;
    border-radius: 6px;
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 240, 210, 0.35), inset 0 0 6px rgba(120, 80, 40, 0.16);
  }
  .toolbar--board { width: var(--sq); }
  .bsb-board-host,
  .board__frame canvas {
    border-radius: 3px;
  }
  .infobar { max-width: var(--sq); }
  .panel {
    height: auto;
    overflow: visible;
    margin-left: 0;
  }
  .card-side,
  .side-stack,
  .side-pane {
    flex: 0 1 auto;
  }
  .card-side .side-stack {
    min-height: min(42dvh, 380px);
  }
  .move-list {
    gap: 6px;
  }
  .move-list > li,
  .move-list .bsb-move {
    height: 36px;
    min-height: 36px;
  }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .brand__name { font-size: 17px; }
}

/* ===== Dark-mode contrast refinements ===== */
.turn {
  background: linear-gradient(135deg, var(--brown), var(--brown-deep));
  color: #fff9ef;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(73, 37, 10, 0.24);
}

:root[data-theme="dark"] .board__bar select,
:root[data-theme="dark"] .room-input,
:root[data-theme="dark"] .invite-row input {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line);
}
:root[data-theme="dark"] .select__trigger {
  background: linear-gradient(150deg, #403426, #30261c);
  color: var(--ink);
  border-color: rgba(235, 206, 165, 0.28);
}
:root[data-theme="dark"] input::placeholder { color: #c9b99f; opacity: 1; }
:root[data-theme="dark"] .move-list .active .bsb-move { background: var(--gold); border-color: var(--gold); color: #1c130b; }
:root[data-theme="dark"] .move-list .active .bsb-move__num,
:root[data-theme="dark"] .move-list .active .bsb-move__san,
:root[data-theme="dark"] .move-list .active .bsb-move__cap-label {
  color: #1c130b;
  opacity: 1;
}
:root[data-theme="dark"] .move-list .active .bsb-move__cap {
  border-left-color: color-mix(in srgb, #1c130b 38%, transparent);
}

:root[data-theme="dark"] .content::-webkit-scrollbar,
:root[data-theme="dark"] .panel::-webkit-scrollbar,
:root[data-theme="dark"] .move-list::-webkit-scrollbar,
:root[data-theme="dark"] .article-figure--wide::-webkit-scrollbar,
:root[data-theme="dark"] .sidebar__panel::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
:root[data-theme="dark"] .content::-webkit-scrollbar-track,
:root[data-theme="dark"] .panel::-webkit-scrollbar-track,
:root[data-theme="dark"] .move-list::-webkit-scrollbar-track,
:root[data-theme="dark"] .article-figure--wide::-webkit-scrollbar-track,
:root[data-theme="dark"] .sidebar__panel::-webkit-scrollbar-track {
  background: var(--scroll-track);
  border-radius: 999px;
}
:root[data-theme="dark"] .content::-webkit-scrollbar-thumb,
:root[data-theme="dark"] .panel::-webkit-scrollbar-thumb,
:root[data-theme="dark"] .move-list::-webkit-scrollbar-thumb,
:root[data-theme="dark"] .article-figure--wide::-webkit-scrollbar-thumb,
:root[data-theme="dark"] .sidebar__panel::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
:root[data-theme="dark"] .content::-webkit-scrollbar-thumb:hover,
:root[data-theme="dark"] .panel::-webkit-scrollbar-thumb:hover,
:root[data-theme="dark"] .move-list::-webkit-scrollbar-thumb:hover,
:root[data-theme="dark"] .article-figure--wide::-webkit-scrollbar-thumb:hover,
:root[data-theme="dark"] .sidebar__panel::-webkit-scrollbar-thumb:hover {
  background: rgba(208, 138, 78, 0.72);
  background-clip: padding-box;
}
:root[data-theme="dark"] .content::-webkit-scrollbar-corner,
:root[data-theme="dark"] .panel::-webkit-scrollbar-corner,
:root[data-theme="dark"] .move-list::-webkit-scrollbar-corner,
:root[data-theme="dark"] .article-figure--wide::-webkit-scrollbar-corner,
:root[data-theme="dark"] .sidebar__panel::-webkit-scrollbar-corner {
  background: transparent;
}

/* ===== Article navigation ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  color: var(--ink-soft);
  font-size: 14px;
}
.breadcrumb a {
  color: var(--jade-deep);
  font-weight: 700;
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--brown); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb span[aria-current="page"] { color: var(--ink-soft); }
.article__head {
  max-width: none;
  margin-bottom: 34px;
  padding: 0 0 24px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.article__head h1,
.article > h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(27px, 3.3vw, 34px);
  font-weight: 700;
  line-height: 1.18;
  color: var(--brown-deep);
}
.notfound-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}
.article__head > p:last-child {
  margin: 10px 0 0;
  color: var(--ink-soft);
}
:root[data-theme="dark"] .article__head {
  background: transparent;
  box-shadow: none;
}

@media (max-width: 560px) {
  .article { padding: 24px 18px 36px; }
  .breadcrumb { margin-bottom: 18px; }
  .article__head { margin-bottom: 28px; padding: 0 0 20px; }
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.breadcrumb ol li + li::before {
  content: "/";
  margin-right: 9px;
  color: var(--ink-soft);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 36px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 28px 48px;
}
.article-layout .article {
  max-width: none;
  padding: 0;
}
.article-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.article-side section {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.article-side h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--brown-deep);
}
.article-side ul { margin: 0; padding-left: 18px; color: var(--ink-soft); }
.article-side li { margin: 6px 0; }
.article-side p { margin: 0; color: var(--ink-soft); font-size: 14px; }

.meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 14px;
}
.article-footer {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 14px;
}
.author-bio {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.author-bio img { border-radius: 12px; }
.author-bio strong { display: block; color: var(--brown-deep); }
.author-bio span { display: block; font-size: 14px; color: var(--ink-soft); }
.author-bio p { margin: 6px 0 0; font-size: 14px; }

.article-layout--solo {
  grid-template-columns: minmax(0, 1fr);
  max-width: 900px;
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
    padding: 24px 18px 40px;
  }
  .article-figure { margin-inline: 0; padding: 10px; }
  .article-toc ol { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .article-layout { padding: 18px 14px 32px; }
  .article section + section { margin-top: 26px; }
  .article h2 { font-size: clamp(20px, 5.5vw, 26px); line-height: 1.28; }
  .article p,
  .guide-list,
  .article-note p { font-size: 15px; line-height: 1.7; }
  .article .intro { font-size: 16px; line-height: 1.75; }
  .guide-list { padding-left: 18px; }
  .article-toc {
    margin: 20px 0 24px;
    padding: 14px 14px 16px;
  }
  .article-toc ol {
    gap: 8px;
    padding-left: 18px;
  }
  .article-toc a {
    display: inline-block;
    padding: 2px 0;
    line-height: 1.45;
  }
  .article-figure { padding: 10px 8px; }
  .article-figure--wide svg { min-width: 520px; }
  .article-note {
    margin: 18px 0;
    padding: 14px;
    border-left-width: 3px;
  }
  .practice-checklist {
    margin: 18px 0;
    padding: 16px 14px;
  }
  .practice-checklist h3 { font-size: 19px; }
  .practice-checklist ol {
    padding-left: 18px;
    font-size: 15px;
    line-height: 1.65;
  }
  .practice-checklist__cta {
    min-height: 48px;
    font-size: 15px;
  }
  .tips-flow {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .tips-flow__step {
    min-height: 0;
    padding: 14px 12px;
    text-align: left;
  }
  .tips-flow__step:not(:last-child)::after {
    top: auto;
    right: auto;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%) rotate(90deg);
  }
  .tips-eyes {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .tips-eyes__panel svg {
    width: min(100%, 220px);
  }
  .score-table-wrap {
    overflow-x: visible;
    margin: 18px 0;
  }
  .score-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
  }
  .score-table caption {
    padding: 12px 14px 10px;
    font-size: 15px;
  }
  .score-table thead { display: none; }
  .score-table tbody tr {
    display: block;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
  }
  .score-table tbody th {
    display: block;
    padding: 10px 14px;
    border-top: 0;
    background: var(--surface-2);
    font-size: 14px;
  }
  .score-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px;
    border-top: 1px solid var(--line-soft);
    font-size: 14px;
  }
  .score-table tbody td::before {
    color: var(--brown-deep);
    font-weight: 600;
    white-space: nowrap;
  }
  .score-table tbody td:nth-child(2)::before { content: "你"; }
  .score-table tbody td:nth-child(3)::before { content: "对方"; }
  details {
    padding: 14px;
  }
  summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    line-height: 1.45;
    padding-right: 8px;
  }
  .article-tags {
    gap: 10px;
    font-size: 14px;
  }
  .article-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
  }
  .author-bio {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 14px;
  }
  .author-bio p { font-size: 14px; line-height: 1.65; }
  .article-footer { margin-top: 28px; padding-top: 18px; }
}

@media (max-width: 560px) {
  .article { padding: 24px 18px 36px; }
  .breadcrumb { margin-bottom: 18px; }
  .article__head {
    margin-bottom: 24px;
    padding: 0 0 18px;
  }
  .article__head h1,
  .article > h1 {
    font-size: clamp(26px, 7vw, 34px);
  }
}

/* PWA install guide (iOS Share → Add to Home Screen) */
.bsb-pwa-guide {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}
.bsb-pwa-guide[hidden] { display: none !important; }
.bsb-pwa-guide__backdrop {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: rgba(20, 10, 4, 0.5);
  cursor: pointer;
}
.bsb-pwa-guide__card {
  position: relative;
  z-index: 1;
  width: min(20.5rem, calc(100vw - 1.5rem));
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(50, 25, 8, 0.28);
}
.bsb-pwa-guide__head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 16px 12px;
  background: linear-gradient(165deg, #e9efe9 0%, var(--surface) 60%);
  border-bottom: 1px solid var(--line-soft);
}
:root[data-theme="dark"] .bsb-pwa-guide__head {
  background: linear-gradient(165deg, #0c1a13 0%, var(--surface) 60%);
}
.bsb-pwa-guide__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(60, 30, 10, 0.14);
}
.bsb-pwa-guide__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
.bsb-pwa-guide__host {
  margin: 2px 0 0;
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.3;
}
.bsb-pwa-guide__kicker {
  margin: 12px 16px 0;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brown);
}
.bsb-pwa-guide__kicker[hidden],
.bsb-pwa-guide__steps[hidden] { display: none !important; }
.bsb-pwa-guide__steps {
  list-style: none;
  margin: 10px 16px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bsb-pwa-guide__steps li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink);
}
.bsb-pwa-guide__n {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  background: var(--brown);
  margin-top: 1px;
}
.bsb-pwa-guide__share {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin: 0 2px;
  vertical-align: -2px;
  color: var(--brown);
}
.bsb-pwa-guide__actions {
  display: flex;
  gap: 8px;
  padding: 14px 16px 16px;
}
.bsb-pwa-guide__primary,
.bsb-pwa-guide__ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 5.75rem;
  min-height: 42px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bsb-pwa-guide__primary {
  border: none;
  background: var(--brown);
  color: #fff;
  padding: 0 14px;
}
.bsb-pwa-guide__primary:hover { filter: brightness(1.08); }
.bsb-pwa-guide__ghost {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  padding: 0 12px;
}
.bsb-pwa-guide__ghost:hover {
  border-color: var(--brown);
  color: var(--brown-deep);
}

/* Layout variants that used to ride on style="" attributes. Keeping them in the
   stylesheet is what lets the CSP ship style-src 'self' with no unsafe-inline. */
.players--split {
  margin: 0;
  justify-content: space-between;
}
.player--grow {
  min-width: 0;
  flex: 1;
}
.opt-row--board {
  margin-top: 14px;
}
.online__note--type {
  margin: 14px 0 4px;
}
.online__note--flush {
  margin-top: 0;
}
.lobby__filter--spaced {
  margin-bottom: 16px;
}
.status-chip--lead {
  margin-bottom: 16px;
}
.opt-row--color {
  max-width: min(360px, 100%);
  margin: 0 auto 8px;
  align-items: center;
}
.match-format {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 12px 0 0;
  font-size: 14px;
}
.match-format strong {
  font-weight: 650;
}
.room-input--centered {
  display: block;
  max-width: 300px;
  margin: 0 auto 12px;
}


html[data-bsb-skin="make"] {
  --bsb-head-h: calc(52px + env(safe-area-inset-top, 0px));
  --linen: #f4f7f4;
  --linen-2: #e9efe9;
  --surface: #ffffff;
  --surface-2: #f0f5f1;
  --ink: #14221a;
  --ink-soft: #4d6356;
  --brown: #1c663e;
  --brown-deep: #12472b;
  --jade: #2a7b4f;
  --jade-deep: #1a5635;
  --gold: #b48018;
  --line: rgba(20, 50, 32, 0.13);
  --line-soft: rgba(20, 50, 32, 0.08);
  --wood: #1e3e2d;
  --wood-deep: #132b1e;
  --shadow: 0 10px 30px rgba(16, 45, 28, 0.06), 0 2px 6px rgba(16, 45, 28, 0.03);
  --radius: 17px;
  --radius-lg: 22px;
  --serif: var(--sans);
  --font-display: "Barlow Condensed", "PingFang SC", "Microsoft YaHei", sans-serif;
  --scroll-thumb: #acb9aa;
}
html[data-bsb-skin="make"][data-theme="dark"] {
  --linen: #0e1913;
  --linen-2: #13231b;
  --surface: #15241c;
  --surface-2: #1b2d23;
  --ink: #eef6f1;
  --ink-soft: #9bb5a5;
  --brown: #4ade80;
  --brown-deep: #7ae6a4;
  --jade: #2ea063;
  --jade-deep: #227c4d;
  --gold: #facc15;
  --line: rgba(180, 225, 198, 0.13);
  --line-soft: rgba(180, 225, 198, 0.07);
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}
html,
body {
  background-color: #164e32;
}
html[data-theme="dark"],
html[data-theme="dark"] body {
  background-color: #0c1a13;
}
body.body-play {
  min-height: 100dvh;
}
.content-main {
  min-width: 0;
  background: linear-gradient(160deg, #f8faf8 0%, var(--linen) 50%, #edf3ed 100%);
}
html[data-bsb-skin="make"][data-theme="dark"] .content-main {
  background: linear-gradient(160deg, #101e17 0%, var(--linen) 50%, #0c1711 100%);
}
body.body-play .content-main {
  padding: 0;
  overflow: visible;
}
.bsb-chrome-header--top {
  position: sticky;
  top: 0;
  z-index: 200;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: env(safe-area-inset-top, 0px) 16px 0;
  height: var(--bsb-head-h);
  min-height: var(--bsb-head-h);
  max-height: var(--bsb-head-h);
  overflow: visible;
  border-bottom: 1px solid #ffffff1a;
  background: linear-gradient(170deg, #185536 0%, #124329 52%, #0d341f 100%);
}
html[data-bsb-skin="make"][data-theme="dark"] .bsb-chrome-header--top {
  background: linear-gradient(170deg, #0f2219 0%, #0c1a13 52%, #08120d 100%);
}
.bsb-chrome-header--top .bsb-brand {
  display: inline-flex;
  grid-column: 1;
  justify-self: start;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: #ffffff;
}
.bsb-chrome-header--top .bsb-brand .brand__name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  color: #ffffff;
}
.bsb-chrome-header--top .bsb-brand .brand__mark {
  width: 32px;
  height: 32px;
  box-shadow: 0 4px 16px #00000020;
}
.bsb-top-nav {
  position: relative;
  display: flex;
  grid-column: 2;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.bsb-nav-panel {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.bsb-chrome-header--top .nav__item {
  display: inline-flex;
  flex: none;
  align-items: center;
  height: auto;
  min-height: 0;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(230, 245, 235, 0.78);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  overflow: visible;
}
.bsb-chrome-header--top .nav__item svg {
  display: none;
}
.bsb-chrome-header--top .nav__item:hover {
  background: transparent;
  color: #fff;
}
.bsb-chrome-header--top .nav__item.active {
  background: transparent;
  box-shadow: none;
  color: #fff;
  font-weight: 500;
}
.bsb-chrome-utils {
  display: flex;
  grid-column: 3;
  justify-self: end;
  align-items: center;
  gap: 6px;
}
.bsb-settings-btn {
  display: none;
}
.bsb-settings-scrim {
  display: none;
}
.bsb-chrome-header--top .bsb-chrome-utils .icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #ffffff08;
  border: 0;
  color: #dbe6cb;
}
.play-title {
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.head-live__turn {
  color: var(--ink-soft);
  font-size: 14px;
}
.board__frame {
  background: #07090d;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}
.bsb-board-host,
.board__frame canvas {
  border-radius: 0;
}
.card {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
}
.card h3 {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.status-card {
  background: var(--surface);
  border-color: var(--line);
}
.status-card__hint {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.85;
  height: auto;
  min-height: calc(2 * 1.85em + 20px);
  max-height: none;
  overflow: visible;
}
.mode-pill {
  color: var(--jade-deep);
  background: var(--surface-2);
  border-color: var(--line);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.04em;
}
html[data-bsb-skin="make"][data-theme="dark"] .mode-pill {
  color: #e8f8ee;
  background: rgba(74, 222, 128, 0.16);
  border-color: rgba(74, 222, 128, 0.38);
}
html[data-bsb-skin="make"][data-theme="dark"] .status-chip.online {
  color: #d8f5e4;
  background: rgba(74, 222, 128, 0.2);
  border: 1px solid rgba(74, 222, 128, 0.45);
}
html[data-bsb-skin="make"][data-theme="dark"] .status-chip.online .dot {
  background: #4ade80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.35);
}
html[data-bsb-skin="make"][data-theme="dark"] .status-chip.waiting {
  color: #f5e6c8;
  background: rgba(250, 204, 21, 0.18);
  border: 1px solid rgba(250, 204, 21, 0.42);
}
html[data-bsb-skin="make"][data-theme="dark"] .status-chip.offline,
html[data-bsb-skin="make"][data-theme="dark"] .status-chip.watch {
  color: #d0e4d8;
  background: rgba(180, 225, 198, 0.12);
  border: 1px solid rgba(180, 225, 198, 0.28);
}
.status-card__live-nudge {
  color: var(--jade-deep);
  background: var(--surface-2);
  border-color: var(--line-soft);
}
html[data-bsb-skin="make"][data-theme="dark"] .status-card__live-nudge {
  color: #d8f5e4;
}
.btn {
  border-radius: 12px;
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
  font-weight: 550;
}
.btn--primary {
  color: #ffffff;
  background: var(--jade);
  box-shadow: none;
}
.btn--primary:hover {
  color: #ffffff;
  background: var(--jade-deep);
}
.bsb-aside .btn:hover,
.bsb-aside .btn:active,
.bsb-aside .status-card__live-nudge:hover,
html[data-bsb-skin="make"][data-theme="dark"] .bsb-aside .status-card__live-nudge:hover {
  transform: none;
  box-shadow: none;
  filter: none;
}
.btn[aria-pressed="true"]:not(.btn--primary) {
  color: var(--jade-deep);
  border-color: var(--jade);
  background: var(--surface-2);
}
html[data-bsb-skin="make"][data-theme="dark"] .btn[aria-pressed="true"]:not(.btn--primary) {
  color: #e8f8ee;
  border-color: rgba(74, 222, 128, 0.55);
  background: rgba(74, 222, 128, 0.14);
}
.btn:disabled {
  opacity: 0.38;
  transform: none;
}
.select__trigger {
  border-radius: 12px;
  background: var(--surface-2);
  border-color: transparent;
  color: var(--ink);
  box-shadow: none;
}
.select__trigger:hover {
  border-color: var(--line);
}
.select.open .select__trigger,
.select__trigger[aria-expanded="true"] {
  border-color: var(--jade);
  box-shadow: 0 0 0 3px rgba(50, 121, 91, 0.16);
}
html[data-bsb-skin="make"][data-theme="dark"] .select__trigger {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--line);
}
html[data-bsb-skin="make"][data-theme="dark"] .select__trigger:hover {
  border-color: var(--jade);
}
html[data-bsb-skin="make"][data-theme="dark"] .select.open .select__trigger,
html[data-bsb-skin="make"][data-theme="dark"] .select__trigger[aria-expanded="true"] {
  border-color: var(--jade);
  box-shadow: 0 0 0 3px rgba(132, 186, 151, 0.22);
}
.select__title {
  font-weight: 600;
}
.select__sub {
  color: var(--ink-soft);
  font-size: 14px;
}
.select__menu {
  border-radius: 14px;
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
}
.select__opt.active {
  background: var(--surface-2);
  color: var(--jade-deep);
}
.side-tabs {
  border-bottom-color: var(--line-soft);
}
.side-tabs__btn {
  font-size: 14px;
  letter-spacing: 0.08em;
}
.side-tabs__btn.active {
  color: var(--jade-deep);
  border-color: var(--jade);
}
.bsb-move {
  color: var(--ink-soft);
  font-size: 14px;
  border-color: var(--line-soft);
}
.below {
  background: var(--linen);
}
.below__title {
  color: var(--ink);
  letter-spacing: -0.03em;
}
.below__intro,
.feature__body p,
.beginner-guide p {
  color: var(--ink-soft);
}
.mode-choice,
.feature,
.beginner-guide,
.below-faq {
  border-color: var(--line);
  box-shadow: none;
}
.mode-choice {
  border-radius: 17px;
  background: var(--surface);
}
.mode-choice:hover {
  border-color: var(--jade);
  box-shadow: 0 6px 20px #24513c0a;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

/* Lightweight HTML cue: no extra render passes, blur or large animated layers. */
.read-cue {
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 100%;
  padding: 10px 16px 10px 11px;
  border: 1px solid #bdcdbb50;
  border-radius: 14px;
  color: #f4f6eb;
  background: #12271fee;
  box-shadow: 0 6px 20px #00000028;
}
.read-cue[data-stage="prepare"] {
  color: #f5d39a;
  border-color: #d2ad6266;
  background: #28251bed;
}
.read-cue__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ffffff0c;
}
.read-cue__eyebrow {
  display: block;
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.65;
  letter-spacing: 0.08em;
}
.read-cue strong {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
}
.read-cue__lanes {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  margin-left: 8px;
}
.read-cue__lanes i {
  width: 8px;
  height: 23px;
  border-radius: 3px;
  background: #ffffff15;
}
.read-cue__lanes i[data-active="true"] {
  background: currentColor;
}
@media (max-width: 560px) {
  .read-cue {
    padding: 6px 10px 6px 7px;
    gap: 7px;
    border-radius: 11px;
  }
  .read-cue strong {
    font-size: 14px;
  }
  .read-cue__icon {
    width: 27px;
    height: 27px;
  }
  .read-cue__icon svg {
    width: 19px;
    height: 19px;
  }
  .read-cue__lanes i {
    width: 6px;
    height: 19px;
  }
}
.site-footer {
  background-color: #0d341f;
  background-image: linear-gradient(180deg, #124329 0%, #0d341f 100%);
  border-top: 0;
  color: rgba(220, 245, 230, 0.72);
}
html[data-bsb-skin="make"][data-theme="dark"] .site-footer {
  background-color: #08120d;
  background-image: linear-gradient(180deg, #0c1a13 0%, #08120d 100%);
  border-top: 0;
  color: rgba(180, 215, 195, 0.65);
}
.footer-games-wrap {
  border-top-color: rgba(255, 255, 255, 0.14);
}
html[data-bsb-skin="make"][data-theme="dark"] .footer-games-wrap {
  border-top-color: rgba(255, 255, 255, 0.08);
}
.site-footer__bar {
  border-top-color: rgba(255, 255, 255, 0.1);
  color: rgba(220, 245, 230, 0.55);
}
html[data-bsb-skin="make"][data-theme="dark"] .site-footer__bar {
  border-top-color: rgba(255, 255, 255, 0.08);
}
.lang__trigger {
  border-color: rgba(240, 253, 244, 0.22);
  background: rgba(240, 253, 244, 0.1);
  color: #f0fdf4;
}
.lang__trigger:hover {
  border-color: rgba(240, 253, 244, 0.4);
  background: rgba(240, 253, 244, 0.16);
}
.lang__trigger.open {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(164, 121, 56, 0.25);
}
.bsb-table-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: calc(100dvh - var(--bsb-head-h));
  min-height: calc(100dvh - var(--bsb-head-h));
  max-height: calc(100dvh - var(--bsb-head-h));
  background: var(--linen);
  overflow: hidden;
}
html[data-bsb-skin="make"] .play.play--make-layout {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  grid-template-columns: none;
  align-items: stretch;
  transition: none;
}
.bsb-play-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  gap: 0;
}
.bsb-main-play {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  padding: 0;
}
html[data-bsb-skin="make"] .play.play--make-layout .board {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  padding: 0;
  container-type: normal;
  --sq: 100%;
  --board-w-cap: 100%;
}
html[data-bsb-skin="make"] .play.play--make-layout .play-head {
  display: none;
}
html[data-bsb-skin="make"] .play.play--make-layout .board__stage {
  flex: 1 1 auto;
  align-self: stretch;
  min-height: 0;
  width: 100%;
  max-width: none;
  height: auto;
  padding: 0;
}
html[data-bsb-skin="make"] .bw-hud .bw-hud__board {
  justify-content: center;
}
html[data-bsb-skin="make"] .bw-hud .bw-scoreboard,
html[data-bsb-skin="make"] .bw-hud .bw-sheet,
html[data-bsb-skin="make"] .bw-hud .bw-sheet__head,
html[data-bsb-skin="make"] .bw-hud .bw-sheet__row {
  width: 100%;
  max-width: 100%;
}
html[data-bsb-skin="make"] .bw-hud .bw-sheet__head,
html[data-bsb-skin="make"] .bw-hud .bw-sheet__row {
  display: flex !important;
  align-items: stretch;
}
html[data-bsb-skin="make"] .bw-hud .bw-sheet__head > *,
html[data-bsb-skin="make"] .bw-hud .bw-sheet__row > * {
  min-width: 0;
}
html[data-bsb-skin="make"] .bw-hud .bw-sheet__who {
  flex: 0 0 var(--sc-who, 86px);
  width: var(--sc-who, 86px);
}
html[data-bsb-skin="make"] .bw-hud .bw-sheet__no,
html[data-bsb-skin="make"] .bw-hud .bw-cell {
  flex: 1 1 0;
}
html[data-bsb-skin="make"] .bw-hud .bw-sheet__no:nth-last-child(2),
html[data-bsb-skin="make"] .bw-hud .bw-cell.is-last {
  flex: 1.35 1 0;
}
html[data-bsb-skin="make"] .bw-hud .bw-sheet__no--tot,
html[data-bsb-skin="make"] .bw-hud .bw-sheet__tot {
  flex: 0 0 var(--sc-tw, 56px);
  width: var(--sc-tw, 56px);
}
@media (max-width: 720px) {
  html[data-bsb-skin="make"] .bw-hud .bw-sheet {
    --sc-who: 30px;
    --sc-tw: 44px;
  }
}
@media (min-width: 721px) {
  html[data-bsb-skin="make"] .bw-hud .bw-scoreboard,
  html[data-bsb-skin="make"] .bw-hud .bw-sheet {
    width: fit-content;
    margin-inline: auto;
  }
  html[data-bsb-skin="make"] .bw-hud .bw-sheet {
    --sc-fw: 64px;
    --sc-lw: 88px;
  }
  html[data-bsb-skin="make"] .bw-hud .bw-sheet__head > .bw-sheet__no:not(.bw-sheet__no--tot),
  html[data-bsb-skin="make"] .bw-hud .bw-sheet__row > .bw-cell {
    flex: 1 1 var(--sc-fw, 64px);
    min-width: 64px;
    max-width: 96px;
  }
  html[data-bsb-skin="make"] .bw-hud .bw-sheet__head > .bw-sheet__no:nth-last-child(2),
  html[data-bsb-skin="make"] .bw-hud .bw-sheet__row > .bw-cell.is-last {
    flex: 1 1 var(--sc-lw, 88px);
    min-width: 88px;
    max-width: 128px;
  }
}
html[data-bsb-skin="make"] .play.play--make-layout .board__frame {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  background: #07090d;
}
html[data-bsb-skin="make"] .play.play--make-layout .bsb-board-host {
  position: relative;
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  height: auto;
  max-height: none;
  min-height: 0;
  aspect-ratio: auto;
}
html[data-bsb-skin="make"] .play.play--make-layout .bsb-aside {
  display: flex;
  flex-direction: column;
  flex: 0 0 336px;
  width: 336px;
  max-width: 336px;
  min-height: 100%;
  align-self: stretch;
  margin: 0;
  padding: 20px 20px 15px;
  border-top: 0;
  border-left: 1px solid var(--line);
  background: var(--surface);
  overflow-x: hidden;
  overflow-y: auto;
}
html[data-bsb-skin="make"] .play.play--make-layout .panel {
  width: auto;
  max-width: none;
  height: auto;
  max-height: none;
  margin-left: 0;
  align-self: stretch;
}
html[data-bsb-skin="make"] .play.play--make-layout .bsb-aside.panel {
  height: 100%;
  min-height: 100%;
}
html[data-bsb-skin="make"] .play.play--make-layout .bsb-aside > .bsb-aside-fill {
  order: 0;
  flex: 1 1 auto;
  min-height: 0;
}
html[data-bsb-skin="make"] .play.play--make-layout .bsb-aside > .bsb-ad-house {
  order: 1;
  margin-top: 12px;
}
html[data-bsb-skin="make"] .play.play--make-layout .side-pane[data-bsb-side-pane="history"] {
  margin-top: 0;
}
html[lang="en"][data-bsb-skin="make"] .play.play--make-layout .toolbar.toolbar--panel .btn svg {
  display: none;
}
html[data-bsb-skin="make"] .play.play--make-layout .toolbar.toolbar--panel.toolbar--panel-grid:has([data-bsb-pause]) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
html[data-focus="true"] {
  --bsb-head-h: 0px;
}
@media (min-width: 641px) {
  html[data-focus="true"] .court-surface > .absolute.top-0 {
    padding-right: 56px;
  }
}
@media (max-width: 1200px) {
  html[data-focus="true"] .bsb-settings-scrim {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  html[data-focus="true"] .play.play--make-layout .bsb-aside {
    transform: translateX(100%) !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}
@media (max-width: 720px) {
  html[data-bsb-skin="make"] [data-bsb-stage-play]:not([hidden]) {
    --bsb-dock-y: calc(12px + env(safe-area-inset-bottom, 0px));
    --bsb-dock-gap: 42px;
    position: relative;
  }
  html[data-bsb-skin="make"]:not([data-bsb-settings="1"]) [data-bsb-stage-play]:not([hidden]) .bsb-play-row {
    position: relative;
  }
  html[data-bsb-settings="1"] [data-bsb-stage-play]:not([hidden]) .bw-hud__dock,
  html[data-bsb-settings="1"] [data-bsb-stage-play]:not([hidden]) .bw-helpbtn,
  html[data-bsb-settings="1"] [data-bsb-stage-play]:not([hidden]) .bw-hud__tools {
    display: none !important;
  }
  html[data-bsb-skin="make"]:not([data-bsb-settings="1"]) [data-bsb-stage-play]:not([hidden]) .bw-hud__dock {
    position: absolute !important;
    z-index: 28;
    left: 10px;
    right: auto;
    bottom: var(--bsb-dock-y);
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    width: auto;
    height: auto;
    min-height: 0;
    gap: 10px;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    pointer-events: none;
  }
  html[data-bsb-skin="make"]:not([data-bsb-settings="1"]) [data-bsb-stage-play]:not([hidden]) .bw-hud__dock .bw-helpbtn,
  html[data-bsb-skin="make"]:not([data-bsb-settings="1"]) [data-bsb-stage-play]:not([hidden]) .bw-hud__dock .bw-hud__tool {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: 1;
    width: 40px;
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0;
    display: grid !important;
    place-items: center;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(244, 247, 245, 0.88);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.65));
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    transition: color 0.12s ease, filter 0.12s ease;
  }
  html[data-bsb-skin="make"]:not([data-bsb-settings="1"]) [data-bsb-stage-play]:not([hidden]) .bw-hud__dock .bw-helpbtn:hover,
  html[data-bsb-skin="make"]:not([data-bsb-settings="1"]) [data-bsb-stage-play]:not([hidden]) .bw-hud__dock .bw-helpbtn:active,
  html[data-bsb-skin="make"]:not([data-bsb-settings="1"]) [data-bsb-stage-play]:not([hidden]) .bw-hud__dock .bw-helpbtn:focus,
  html[data-bsb-skin="make"]:not([data-bsb-settings="1"]) [data-bsb-stage-play]:not([hidden]) .bw-hud__dock .bw-helpbtn:focus-visible,
  html[data-bsb-skin="make"]:not([data-bsb-settings="1"]) [data-bsb-stage-play]:not([hidden]) .bw-hud__dock .bw-hud__tool:hover,
  html[data-bsb-skin="make"]:not([data-bsb-settings="1"]) [data-bsb-stage-play]:not([hidden]) .bw-hud__dock .bw-hud__tool:active,
  html[data-bsb-skin="make"]:not([data-bsb-settings="1"]) [data-bsb-stage-play]:not([hidden]) .bw-hud__dock .bw-hud__tool:focus,
  html[data-bsb-skin="make"]:not([data-bsb-settings="1"]) [data-bsb-stage-play]:not([hidden]) .bw-hud__dock .bw-hud__tool:focus-visible {
    background: transparent !important;
    border: 0 !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: none;
    transform: none !important;
    color: #fff;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.75));
  }
  html[data-bsb-skin="make"]:not([data-bsb-settings="1"]) [data-bsb-stage-play]:not([hidden]) .bw-hud__dock .bw-helpbtn svg,
  html[data-bsb-skin="make"]:not([data-bsb-settings="1"]) [data-bsb-stage-play]:not([hidden]) .bw-hud__dock .bw-hud__tool svg {
    width: 18px;
    height: 18px;
  }
  html[data-bsb-skin="make"]:not([data-bsb-settings="1"]) [data-bsb-stage-play]:not([hidden]) .baseball-board:has(.bsb-pitch-panel) .bw-hud__dock {
    bottom: calc(var(--bsb-dock-y) + min(44vh, 14.25rem)) !important;
    z-index: 28 !important;
  }
  .baseball-board:has(.board-modal) .bw-hud__dock,
  .baseball-board:has(.bsb-board-overlay-shell) .bw-hud__dock,
  .baseball-board:has(.z-40.flex.animate-fade) .bw-hud__dock {
    display: none !important;
  }
  html[data-focus="true"] .bsb-aside > :not(.status-card):not(.bsb-aside-fill):not(.toolbar.toolbar--panel),
  html[data-focus="true"] .bsb-aside-fill > :not(.status-card):not(.toolbar.toolbar--panel) {
    display: none !important;
  }
}
html:has(body:not(.body-play)),
body:not(.body-play) {
  height: auto;
}
body:not(.body-play) {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
body:not(.body-play) .content-main {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding: 28px 20px 40px;
}
@media (min-width: 1201px) {
  .bsb-chrome-header--top .menu-toggle {
    display: none;
  }
}
@media (max-width: 1200px) {
  .bsb-chrome-header--top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-inline: 12px;
  }
  .bsb-chrome-header--top .bsb-brand {
    flex: 1 1 auto;
  }
  .bsb-top-nav {
    flex: 0 0 auto;
  }
  .bsb-chrome-header--top .menu-toggle {
    display: inline-flex;
    width: 36px;
    height: 36px;
  }
  .bsb-nav-panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 220;
    min-width: 176px;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(18, 67, 41, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
  }
  .bsb-chrome-header--top.is-open .bsb-nav-panel {
    display: flex;
  }
  .bsb-chrome-header--top .bsb-nav-panel .nav__item {
    display: flex;
    height: 42px;
    padding: 10px 12px;
    gap: 10px;
    border-radius: 8px;
  }
  .bsb-chrome-header--top .bsb-nav-panel .nav__item svg {
    display: block;
    width: 18px;
    height: 18px;
  }
  .bsb-chrome-header--top .bsb-nav-panel .nav__item.active {
    background: rgba(255, 255, 255, 0.08);
  }
  .bsb-play-row {
    flex-direction: column;
  }
  .bsb-main-play {
    flex: 0 0 auto;
    width: 100%;
    height: calc(100dvh - var(--bsb-head-h));
    min-height: calc(100dvh - var(--bsb-head-h));
    max-height: calc(100dvh - var(--bsb-head-h));
  }
  html[data-bsb-skin="make"] .play.play--make-layout .board,
  html[data-bsb-skin="make"] .play.play--make-layout .board__stage,
  html[data-bsb-skin="make"] .play.play--make-layout .board__frame {
    height: 100%;
    min-height: 0;
  }
  .bsb-settings-scrim {
    display: block;
    position: fixed;
    z-index: 170;
    top: var(--bsb-head-h);
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(7, 9, 13, 0.46);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.42s ease, visibility 0s linear 0.42s;
  }
  html[data-bsb-settings="1"] .bsb-settings-scrim {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.42s ease, visibility 0s;
  }
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-aside,
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-aside.panel {
    display: flex;
    position: fixed;
    z-index: 180;
    top: var(--bsb-head-h);
    right: 0;
    bottom: 0;
    left: auto;
    flex: none;
    width: min(360px, calc(100vw - 16px));
    max-width: min(360px, calc(100vw - 16px));
    min-width: min(344px, 100vw);
    height: auto;
    min-height: 0;
    max-height: none;
    border-top: 0;
    border-left: 1px solid var(--line);
    padding: 12px 12px calc(16px + env(safe-area-inset-bottom));
    background: var(--surface);
    box-shadow: -16px 0 40px rgba(0, 0, 0, 0.32);
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 0.42s;
  }
  html[data-bsb-settings="1"] .play.play--make-layout .bsb-aside,
  html[data-bsb-settings="1"] .play.play--make-layout .bsb-aside.panel {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    height: auto;
    min-height: 0;
    transition: transform 0.42s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s;
  }
  html[data-bsb-settings="1"] [data-bsb-stage-play]:not([hidden]) .bw-hud__dock,
  html[data-bsb-settings="1"] [data-bsb-stage-play]:not([hidden]) .bw-helpbtn,
  html[data-bsb-settings="1"] [data-bsb-stage-play]:not([hidden]) .bw-hud__tools {
    display: none !important;
  }
  @media (prefers-reduced-motion: reduce) {
    .bsb-settings-scrim,
    html[data-bsb-skin="make"] .play.play--make-layout .bsb-aside {
      transition: none;
    }
  }
  html:not([data-bsb-resume]) body:has([data-bsb-hero]:not([hidden])) .bsb-settings-btn {
    display: none;
  }
  .bsb-settings-btn {
    display: inline-flex;
  }
  #bsb-theme {
    display: none;
  }
  html[data-bsb-settings="1"] .bsb-settings-btn {
    background: rgba(255, 255, 255, 0.16);
  }
  html[data-bsb-skin="make"] .play.play--make-layout .panel > .toolbar.toolbar--panel {
    order: -1;
  }
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-aside .toolbar.toolbar--panel [data-bsb-hint],
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-aside .toolbar.toolbar--panel [data-bsb-pause],
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-aside .status-card__tools {
    display: none;
  }
  .bsb-table-shell {
    height: auto;
    max-height: none;
    min-height: calc(100dvh - var(--bsb-head-h));
    overflow: visible;
  }
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-board-host {
    min-height: 0;
    height: 100%;
    aspect-ratio: auto;
  }
}
@media (min-width: 1280px) {
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-aside {
    flex: 0 0 336px;
    width: 336px;
    max-width: 336px;
  }
}
@media (min-width: 1921px) {
  html[data-bsb-skin="make"],
  html[data-bsb-skin="make"] body,
  html[data-bsb-skin="make"][data-theme="dark"],
  html[data-bsb-skin="make"][data-theme="dark"] body {
    background-color: var(--linen);
  }
  html[data-bsb-skin="make"] .content-main {
    width: 100%;
    max-width: none;
    overflow-x: hidden;
    overflow-y: visible;
    box-sizing: border-box;
  }
  html[data-bsb-skin="make"] body.body-play .content-main {
    padding: 0;
  }
  html[data-bsb-skin="make"] .bsb-chrome-header--top {
    padding-left: max(18px, calc((100vw - 1920px) / 2 + 18px));
    padding-right: max(18px, calc((100vw - 1920px) / 2 + 18px));
  }
  html[data-bsb-skin="make"] .bsb-chrome-header--top .menu-toggle {
    display: none;
  }
  html[data-bsb-skin="make"] .bsb-chrome-header--top .bsb-nav-panel {
    display: flex;
  }
  html[data-bsb-skin="make"] .bsb-chrome-header--top .nav__item svg {
    display: none;
  }
  html[data-bsb-skin="make"] .bsb-table-shell {
    width: 100%;
    max-width: 1920px;
    margin-inline: auto;
    box-sizing: border-box;
  }
  html[data-bsb-skin="make"] .play.play--make-layout {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    height: 100%;
    min-height: 0;
    padding: 0;
  }
  html[data-bsb-skin="make"] .bsb-hero {
    padding-left: max(18px, calc((100vw - 1920px) / 2 + 18px));
    padding-right: max(18px, calc((100vw - 1920px) / 2 + 18px));
    box-sizing: border-box;
  }
  html[data-bsb-skin="make"] .bsb-hero__inner {
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }
  html[data-bsb-skin="make"] .site-footer {
    width: 100%;
    max-width: none;
    margin-top: 0;
    box-sizing: border-box;
  }
  html[data-bsb-skin="make"] .site-footer__inner,
  html[data-bsb-skin="make"] .footer-games-wrap,
  html[data-bsb-skin="make"] .site-footer__bar {
    width: 100%;
    max-width: 1920px;
    margin-inline: auto;
    padding-left: 32px;
    padding-right: 32px;
    box-sizing: border-box;
  }
  html[data-bsb-skin="make"] body:not(.body-play) .content-main {
    max-width: 1920px;
    margin-inline: auto;
    padding-left: max(20px, 32px);
    padding-right: max(20px, 32px);
    box-sizing: border-box;
  }
}
html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-house {
  display: flex;
  flex: 0 0 auto;
  flex-shrink: 0;
  box-sizing: border-box;
  margin-inline: auto;
  width: 300px;
  max-width: 100%;
  height: 250px;
  min-height: 250px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
  text-decoration: none;
  color: var(--ink);
  text-align: center;
  transition: border-color 0.2s ease;
}
html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-house:hover {
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}
html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-house .house-ad-kicker {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-house .house-ad-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 0;
  line-height: 1.2;
}
html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-house .house-ad-brand {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--jade-deep);
}
html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-house .house-ad-sub {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-house .house-ad-body {
  margin: 0;
  max-width: 26ch;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}
html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-house .house-ad-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #f4f7f4;
  background: var(--jade);
  border: 0;
  box-shadow: none;
}
html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-house:has(iframe),
html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-slot {
  display: block;
  padding: 0;
  gap: 0;
  align-items: stretch;
  justify-content: flex-start;
  text-align: left;
  border-radius: 8px;
  overflow: hidden;
}
html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-house iframe,
html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-slot iframe {
  display: block;
  width: 300px;
  height: 250px;
  max-width: 100%;
  margin: 0;
  border: 0;
}
@media (min-width: 1201px) and (max-height: 860px) {
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-aside:has(> .bsb-aside-fill):has(.bsb-ad-house, .bsb-ad-slot) {
    overflow: hidden;
  }
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-aside:has(> .bsb-aside-fill):has(.bsb-ad-house, .bsb-ad-slot) > .bsb-aside-fill {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-aside > .bsb-ad-house,
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-aside > .bsb-ad-slot {
    flex: 0 0 auto;
    width: 300px;
    max-width: 100%;
    height: 250px;
    min-height: 250px;
    margin-top: auto;
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: var(--surface);
    box-shadow: 0 -10px 24px rgba(12, 26, 19, 0.08);
  }
  html[data-theme="dark"][data-bsb-skin="make"] .play.play--make-layout .bsb-aside > .bsb-ad-house,
  html[data-theme="dark"][data-bsb-skin="make"] .play.play--make-layout .bsb-aside > .bsb-ad-slot {
    box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.35);
  }
}
@media (max-width: 1200px) {
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-house:not(:has(iframe)),
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-slot:not(:has(iframe)) {
    width: 320px;
    max-width: calc(100vw - 48px);
    height: 100px;
    min-height: 100px;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    padding: 10px 12px;
    gap: 4px 12px;
  }
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-house .house-ad-kicker {
    width: 100%;
    font-size: 14px;
  }
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-house .house-ad-title {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
  }
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-house .house-ad-brand {
    font-size: 18px;
  }
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-house .house-ad-sub {
    font-size: 14px;
  }
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-house .house-ad-body {
    display: none;
  }
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-house .house-ad-cta {
    min-height: 34px;
    padding: 0 12px;
    font-size: 14px;
  }
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-house:has(iframe),
  html[data-bsb-skin="make"] .play.play--make-layout .bsb-ad-slot:has(iframe) {
    width: 300px;
    height: 250px;
    min-height: 250px;
    padding: 0;
    flex-direction: column;
    flex-wrap: nowrap;
  }
}
.bsb-hero[hidden],
.bsb-table-shell[hidden] {
  display: none !important;
}
html[data-bsb-resume] .bsb-hero {
  display: none !important;
}
html[data-bsb-resume] .bsb-table-shell[hidden] {
  display: flex !important;
}
.bsb-board-loading {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  background: #07090d;
  color: #f4f1ea;
  font-size: 40px;
  font-weight: 650;
  letter-spacing: 0.06em;
  pointer-events: none;
}
.bsb-board-host[data-bsb-live] .bsb-board-loading {
  display: none;
}
.bsb-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100dvh - var(--bsb-head-h));
  padding: clamp(24px, 4vw, 52px) clamp(18px, 4vw, 44px);
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(ellipse 56% 62% at 80% 34%, rgba(28, 95, 184, 0.12) 0%, transparent 66%),
    radial-gradient(ellipse 46% 52% at 14% 18%, rgba(50, 121, 91, 0.1) 0%, transparent 60%),
    linear-gradient(155deg, #f8f7f2 0%, #eff2eb 52%, #e6ece2 100%);
  border-bottom: 1px solid var(--line);
}
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero {
  color: #f4f6ee;
  background:
    radial-gradient(ellipse 62% 64% at 78% 36%, rgba(26, 84, 160, 0.36) 0%, transparent 64%),
    radial-gradient(ellipse 50% 54% at 14% 18%, rgba(42, 118, 86, 0.22) 0%, transparent 56%),
    linear-gradient(150deg, #102a20 0%, #091712 46%, #060a0f 100%);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.bsb-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.96fr);
  align-items: center;
  gap: clamp(24px, 4vw, 52px);
}
.bsb-hero__main {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 34px);
  min-width: 0;
}
.bsb-hero__copy {
  max-width: 620px;
}
.bsb-hero__title {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--sans);
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #16372b;
}
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero__title {
  color: #fdf8ec;
}
.bsb-hero__accent {
  font-size: clamp(22px, 2.8vw, 36px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #c85716;
}
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero__accent {
  color: #ff9442;
}
.bsb-hero__lead {
  margin: 16px 0 0;
  max-width: 54ch;
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.68;
  color: #46574c;
}
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero__lead {
  color: rgba(235, 242, 233, 0.84);
}
.bsb-hero__cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.bsb-hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  padding: 22px 20px 20px;
  border-radius: 20px;
  border: 1px solid var(--line);
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.bsb-hero-card--ai {
  background: linear-gradient(155deg, #214d3d 0%, #15372b 100%);
  border-color: rgba(24, 75, 57, 0.45);
  color: #f6f8f2;
  box-shadow: 0 14px 32px rgba(20, 56, 42, 0.18);
}
.bsb-hero-card--live {
  background: var(--surface);
  border-color: rgba(23, 77, 153, 0.22);
  color: var(--ink);
  box-shadow: 0 12px 28px rgba(24, 48, 38, 0.08);
}
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero-card {
  backdrop-filter: blur(10px);
}
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero-card--ai {
  background: linear-gradient(155deg, rgba(28, 68, 52, 0.92) 0%, rgba(12, 31, 24, 0.95) 100%);
  border-color: rgba(255, 140, 46, 0.44);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
}
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero-card--live {
  background: linear-gradient(155deg, rgba(19, 44, 74, 0.88) 0%, rgba(10, 21, 36, 0.94) 100%);
  border-color: rgba(132, 182, 255, 0.34);
  color: #f4f7f1;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}
.bsb-hero-card:hover {
  transform: translateY(-3px);
}
.bsb-hero-card--ai:hover {
  border-color: #ff9442;
  box-shadow: 0 18px 38px rgba(18, 52, 38, 0.26);
}
.bsb-hero-card--live:hover {
  border-color: #2b6bc4;
  box-shadow: 0 18px 38px rgba(23, 77, 153, 0.14);
}
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero-card--ai:hover {
  border-color: rgba(255, 148, 66, 0.82);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 148, 66, 0.32);
}
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero-card--live:hover {
  border-color: rgba(158, 196, 255, 0.72);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(158, 196, 255, 0.28);
}
.bsb-hero-card__head {
  display: flex;
  align-items: center;
  gap: 11px;
}
.bsb-hero-card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex: 0 0 auto;
}
.bsb-hero-card--ai .bsb-hero-card__icon {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.bsb-hero-card--live .bsb-hero-card__icon {
  background: rgba(23, 77, 153, 0.08);
  border: 1px solid rgba(23, 77, 153, 0.16);
}
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero-card--live .bsb-hero-card__icon {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.bsb-hero-card__title {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.bsb-hero-card--ai .bsb-hero-card__title {
  color: #fdf8ec;
}
.bsb-hero-card--live .bsb-hero-card__title {
  color: #16372b;
}
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero-card--live .bsb-hero-card__title {
  color: #fdf8ec;
}
.bsb-hero-card__desc {
  font-size: 14px;
  line-height: 1.58;
  flex: 1 1 auto;
}
.bsb-hero-card--ai .bsb-hero-card__desc {
  color: rgba(242, 246, 238, 0.82);
}
.bsb-hero-card--live .bsb-hero-card__desc {
  color: var(--ink-soft);
}
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero-card--live .bsb-hero-card__desc {
  color: rgba(232, 240, 232, 0.78);
}
.bsb-hero-card__cta {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: transform 160ms ease, background 160ms ease;
}
.bsb-hero-card--ai .bsb-hero-card__cta {
  background: #ff842b;
  color: #101713;
  box-shadow: 0 6px 18px rgba(255, 132, 43, 0.32);
}
.bsb-hero-card--ai:hover .bsb-hero-card__cta {
  background: #ff9442;
}
.bsb-hero-card--live .bsb-hero-card__cta {
  background: #174d99;
  color: #f4f8ff;
}
.bsb-hero-card--live:hover .bsb-hero-card__cta {
  background: #1f5fb8;
}
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero-card--live .bsb-hero-card__cta {
  background: rgba(132, 182, 255, 0.16);
  border: 1px solid rgba(158, 196, 255, 0.44);
  color: #eef5ff;
}
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero-card--live:hover .bsb-hero-card__cta {
  background: rgba(132, 182, 255, 0.24);
}
.bsb-hero-card:hover .bsb-hero-card__cta svg {
  transform: translateX(2px);
}
.bsb-hero__visual {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  margin-top: -18px;
}
.bsb-hero__shot {
  width: 100%;
  max-width: 600px;
  height: auto;
  display: block;
  border-radius: 16px;
  box-shadow:
    0 28px 60px rgba(15, 45, 90, 0.14),
    0 0 0 1px rgba(25, 70, 130, 0.08);
}
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero__shot {
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(120, 168, 255, 0.12);
}
@media (max-width: 980px) {
  .bsb-hero__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .bsb-hero__visual {
    margin-top: 0;
  }
  .bsb-hero__shot {
    max-width: 500px;
  }
}
@media (max-width: 720px) {
  .bsb-hero {
    min-height: auto;
    padding: 28px 16px 36px;
  }
  .bsb-hero__cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .bsb-hero-card {
    padding: 20px 18px 18px;
  }
  .bsb-hero__shot {
    max-width: 400px;
  }
}
html[data-bsb-skin="make"] .bsb-hero {
  align-items: center;
  min-height: calc(100dvh - var(--bsb-head-h));
  padding-top: clamp(40px, 6vh, 80px);
  padding-bottom: clamp(48px, 8vh, 96px);
  background:
    radial-gradient(ellipse 48% 58% at 78% 46%, rgba(30, 99, 196, 0.10) 0%, transparent 70%),
    radial-gradient(ellipse 34% 40% at 62% 78%, rgba(255, 132, 43, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 8% 12%, rgba(50, 121, 91, 0.06) 0%, transparent 62%),
    linear-gradient(180deg, #f6f5ef 0%, #eef0e8 100%);
}
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero {
  background:
    radial-gradient(ellipse 50% 60% at 78% 46%, rgba(38, 104, 200, 0.34) 0%, transparent 70%),
    radial-gradient(ellipse 34% 40% at 62% 80%, rgba(255, 132, 43, 0.14) 0%, transparent 70%),
    radial-gradient(ellipse 44% 54% at 8% 12%, rgba(42, 118, 86, 0.22) 0%, transparent 60%),
    linear-gradient(160deg, #0f271e 0%, #08140f 52%, #060a0f 100%);
}
html[data-bsb-skin="make"] .bsb-hero__inner {
  max-width: 1320px;
  margin-inline: auto;
  grid-template-columns: minmax(0, 5.2fr) minmax(0, 5.8fr);
  gap: clamp(36px, 4.5vw, 72px);
}
html[data-bsb-skin="make"] .bsb-hero__main { gap: clamp(28px, 2.6vw, 36px); }
html[data-bsb-skin="make"] .bsb-hero__copy { max-width: 600px; min-width: 0; container-type: inline-size; }
html[data-bsb-skin="make"] .bsb-hero__title {
  display: block;
  font-size: clamp(26px, 3.8vw, 58px);
  line-height: 1.16;
  letter-spacing: -0.035em;
  white-space: normal;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
@supports (font-size: 1cqi) {
  html[data-bsb-skin="make"] .bsb-hero__title { font-size: clamp(20px, 10.2cqi, 60px); }
}
html[data-bsb-skin="make"] .bsb-hero__accent {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  font-size: clamp(18px, 1.55vw, 23px);
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.5;
}
html[data-bsb-skin="make"] .bsb-hero__accent::before {
  content: "";
  flex: 0 0 auto;
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 18%, #ffb067 40%, #ff842b 72%, #d9620f 100%);
  box-shadow: 0 0 0 4px rgba(255, 132, 43, 0.14);
}
html[data-bsb-skin="make"] .bsb-hero__lead {
  margin-top: clamp(18px, 2vw, 26px);
  max-width: 34em;
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.8;
  color: #536257;
}
html[data-bsb-skin="make"] .bsb-hero__cards {
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 600px;
}
html[data-bsb-skin="make"] .bsb-hero-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  grid-template-areas: "icon title cta" ". desc desc";
  align-items: center;
  column-gap: 14px;
  row-gap: 8px;
  width: 100%;
  padding: 20px;
  border-radius: 18px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
html[data-bsb-skin="make"] .bsb-hero-card__head { display: contents; }
html[data-bsb-skin="make"] .bsb-hero-card__icon { grid-area: icon; width: 44px; height: 44px; border-radius: 12px; }
html[data-bsb-skin="make"] .bsb-hero-card__title { grid-area: title; font-size: 19px; }
html[data-bsb-skin="make"] .bsb-hero-card__desc { grid-area: desc; font-size: 14px; line-height: 1.65; max-width: 34em; }
html[data-bsb-skin="make"] .bsb-hero-card__cta { grid-area: cta; margin: 0; min-width: 140px; min-height: 44px; justify-content: center; white-space: nowrap; }
html[data-bsb-skin="make"] .bsb-hero-card:hover { transform: translateY(-2px); }
html[data-bsb-skin="make"] .bsb-hero-card:active { transform: translateY(0); }
html[data-bsb-skin="make"] .bsb-hero-card--ai {
  padding: 20px;
  background:
    radial-gradient(ellipse 60% 120% at 100% 0%, rgba(255, 132, 43, 0.12) 0%, transparent 60%),
    linear-gradient(150deg, #22543f 0%, #143327 100%);
  border-color: rgba(20, 60, 45, 0.5);
  box-shadow: 0 14px 30px -16px rgba(16, 52, 38, 0.5), 0 2px 5px rgba(16, 52, 38, 0.08);
}
html[data-bsb-skin="make"] .bsb-hero-card--ai .bsb-hero-card__title { font-size: 21px; }
html[data-bsb-skin="make"] .bsb-hero-card--ai .bsb-hero-card__desc { color: #dbe8dc; }
html[data-bsb-skin="make"] .bsb-hero-card--ai .bsb-hero-card__cta {
  padding: 14px 22px;
  font-size: 15px;
  background: #ff842b;
  color: #13180f;
  box-shadow: 0 6px 16px -8px rgba(255, 132, 43, 0.5);
}
html[data-bsb-skin="make"] .bsb-hero-card--ai:hover .bsb-hero-card__cta { background: #ff9748; }
html[data-bsb-skin="make"] .bsb-hero-card--live {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(23, 77, 153, 0.18);
  box-shadow: none;
  backdrop-filter: blur(8px);
}
html[data-bsb-skin="make"] .bsb-hero-card--live .bsb-hero-card__cta {
  padding: 11px 16px;
  background: transparent;
  color: #174d99;
  border: 1px solid rgba(23, 77, 153, 0.32);
}
html[data-bsb-skin="make"] .bsb-hero-card--live .bsb-hero-card__desc { color: #536257; }
html[data-bsb-skin="make"] .bsb-hero-card--live:hover { background: rgba(255, 255, 255, 0.85); border-color: rgba(23, 77, 153, 0.4); }
html[data-bsb-skin="make"] .bsb-hero-card--live:hover .bsb-hero-card__cta { background: #174d99; color: #f4f8ff; border-color: #174d99; }
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero-card--live { background: rgba(255, 255, 255, 0.04); border-color: rgba(158, 196, 255, 0.22); }
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero-card--live:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(158, 196, 255, 0.5); }
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero-card--live .bsb-hero-card__cta { background: transparent; color: #cfe1ff; border-color: rgba(158, 196, 255, 0.4); }
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero-card--live:hover .bsb-hero-card__cta { background: rgba(158, 196, 255, 0.18); color: #fff; }
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero-card--live .bsb-hero-card__desc { color: #b9cbbf; }
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero__lead { color: rgba(232, 240, 232, 0.76); }
html[data-bsb-skin="make"] .bsb-hero-card:focus-visible { outline: 3px solid #ff842b; outline-offset: 3px; }
html[data-bsb-skin="make"] .bsb-hero__visual {
  position: relative;
  margin: 0;
  justify-content: flex-end;
  perspective: 1600px;
}
html[data-bsb-skin="make"] .bsb-hero__visual::before {
  content: "";
  position: absolute;
  inset: 8% -4% -10% 6%;
  z-index: 0;
  border-radius: 40px;
  background: radial-gradient(ellipse at 50% 60%, rgba(30, 99, 196, 0.18), transparent 68%);
  filter: blur(24px);
}
html[data-bsb-skin="make"] .bsb-hero__visual::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: -3%;
  top: -11%;
  width: 32%;
  aspect-ratio: 2 / 1;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 120'%3E%3Cpath d='M6 112 C 60 6, 150 0, 226 40' fill='none' stroke='%23ff842b' stroke-width='2.4' stroke-linecap='round' stroke-dasharray='2 9' opacity='.75'/%3E%3Ccircle cx='226' cy='40' r='9' fill='%23ff8f3c'/%3E%3Ccircle cx='223' cy='37' r='3' fill='%23fff' opacity='.85'/%3E%3C/svg%3E");
  pointer-events: none;
}
html[data-bsb-skin="make"] .bsb-hero__shot {
  position: relative;
  z-index: 1;
  max-width: 760px;
  border-radius: 18px;
  transform: rotateY(-3deg) rotateX(1deg);
  transform-origin: 60% 50%;
  filter: brightness(1.08);
  box-shadow:
    0 28px 56px -24px rgba(12, 38, 80, 0.4),
    0 0 0 1px rgba(25, 70, 130, 0.10),
    0 0 0 5px rgba(255, 255, 255, 0.55);
  transition: transform 500ms cubic-bezier(.2,.7,.2,1);
}
html[data-bsb-skin="make"][data-theme="dark"] .bsb-hero__shot {
  box-shadow: 0 28px 56px -20px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(140, 186, 255, 0.18), 0 0 0 5px rgba(255, 255, 255, 0.04);
}
html[data-bsb-skin="make"] .bsb-hero__visual:hover .bsb-hero__shot { transform: rotateY(0) rotateX(0); }
@media (prefers-reduced-motion: reduce) {
  html[data-bsb-skin="make"] .bsb-hero__shot,
  html[data-bsb-skin="make"] .bsb-hero__visual:hover .bsb-hero__shot,
  html[data-bsb-skin="make"] .bsb-hero-card,
  html[data-bsb-skin="make"] .bsb-hero-card:hover,
  html[data-bsb-skin="make"] .bsb-hero-card__cta,
  html[data-bsb-skin="make"] .bsb-hero-card__cta svg { transition: none; transform: none; }
}
@media (min-width: 1081px) {
  html[data-bsb-skin="make"] .bsb-hero__shot {
    max-height: calc(100dvh - var(--bsb-head-h) - 96px);
    width: 100%;
    height: auto;
    object-fit: contain;
  }
}
@media (max-width: 1080px) {
  html[data-bsb-skin="make"] .bsb-hero { min-height: auto; padding-top: 40px; padding-bottom: 56px; }
  html[data-bsb-skin="make"] .bsb-hero__inner { grid-template-columns: 1fr; gap: 44px; max-width: 680px; }
  html[data-bsb-skin="make"] .bsb-hero__visual { justify-content: center; perspective: none; }
  html[data-bsb-skin="make"] .bsb-hero__shot,
  html[data-bsb-skin="make"] .bsb-hero__visual:hover .bsb-hero__shot { transform: none; max-width: 100%; }
  html[data-bsb-skin="make"] .bsb-hero__visual::after { left: auto; right: -2%; top: -12%; width: 34%; }
}
@media (max-width: 560px) {
  html[data-bsb-skin="make"] .bsb-hero { padding: 20px 16px 24px; }
  html[data-bsb-skin="make"] .bsb-hero__main { gap: 18px; }
  html[data-bsb-skin="make"] .bsb-hero__lead { margin-top: 12px; }
  html[data-bsb-skin="make"] .bsb-hero__accent { font-size: clamp(15px, 4.2vw, 18px); gap: 8px; margin-top: 14px; }
  html[data-bsb-skin="make"] .bsb-hero__lead { font-size: 15px; line-height: 1.75; }
  html[data-bsb-skin="make"] .bsb-hero-card {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    grid-template-areas: "icon title cta" "desc desc desc";
    column-gap: 10px;
    row-gap: 12px;
    padding: 16px;
  }
  html[data-bsb-skin="make"] .bsb-hero-card__icon { width: 36px; height: 36px; border-radius: 10px; }
  html[data-bsb-skin="make"] .bsb-hero-card__icon svg { width: 24px; height: 24px; }
  html[data-bsb-skin="make"] .bsb-hero-card__title,
  html[data-bsb-skin="make"] .bsb-hero-card--ai .bsb-hero-card__title { font-size: 17px; white-space: nowrap; }
  html[data-bsb-skin="make"] .bsb-hero-card__desc { font-size: 13.5px; line-height: 1.75; }
  html[data-bsb-skin="make"] .bsb-hero-card__cta,
  html[data-bsb-skin="make"] .bsb-hero-card--ai .bsb-hero-card__cta,
  html[data-bsb-skin="make"] .bsb-hero-card--live .bsb-hero-card__cta { min-width: 114px; min-height: 42px; padding: 10px 12px; font-size: 12px; gap: 6px; }
  html[data-bsb-skin="make"] .bsb-hero-card__cta svg { width: 14px; height: 14px; }
  html[data-bsb-skin="make"] .bsb-hero__visual::after { display: none; }
  html[data-bsb-skin="make"] .bsb-hero__shot { border-radius: 16px; box-shadow: 0 24px 48px -20px rgba(12, 38, 80, 0.45), 0 0 0 1px rgba(25, 70, 130, 0.1); }
}

/* Operation guide (Figma make skin) */
html[data-bsb-skin="make"] .beginner-guide:has(.guide-steps) {
  --guide-tint: #f2f6f1;
  --guide-lane: #e6eee3;
  --guide-boards: #ccdac8;
  --guide-key: #fff;
  --guide-accent: #c9612d;
  max-width: 1040px;
  margin: 0 auto 56px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.guide-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.beginner-guide__body .guide-header h3 { margin: 0 0 6px; font-size: clamp(24px, 3vw, 30px); font-weight: 800; letter-spacing: -.035em; line-height: 1.25; }
.beginner-guide__body .guide-header__intro { margin: 0; font-size: 14px; color: var(--ink-soft); }
.guide-device { display: inline-flex; flex-shrink: 0; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.guide-device svg, .guide-keyboard__label svg, .guide-assist > svg, .guide-note svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.guide-device svg { width: 16px; height: 16px; }
.guide-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 0; margin: 0 0 26px; list-style: none; }
.guide-step { min-width: 0; }
.guide-step__visual { height: 124px; margin-bottom: 17px; overflow: hidden; border-radius: 12px; background: var(--guide-tint); }
.guide-step__visual svg { width: 100%; height: 100%; }
.guide-lane { fill: var(--guide-lane); }
.guide-boards { stroke: var(--guide-boards); stroke-width: 1; }
.guide-lane-mark { stroke: #96ae91; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.guide-stance-ring { stroke: #fff; stroke-width: 3; }
.guide-motion { stroke: var(--guide-accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.guide-trail { stroke: #afc4a8; stroke-width: 2; stroke-dasharray: 3 5; stroke-linecap: round; }
.guide-ball { fill: #245d41; }
.guide-ball-shine { stroke: #76a481; stroke-width: 2; stroke-linecap: round; }
.guide-ball-hole { fill: #113c2b; }
.guide-step h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 9px; color: var(--ink); font-size: 17px; font-weight: 700; line-height: 1.4; }
.guide-step__number { color: var(--jade-deep); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.beginner-guide__body .guide-step p { margin: 0; font-size: 14px; line-height: 1.85; }
.guide-keyboard { display: flex; align-items: center; gap: 24px; padding: 18px 20px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--guide-tint); }
.guide-keyboard__label { display: flex; flex-shrink: 0; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: var(--brown-deep); }
.guide-keys { display: flex; flex: 1; align-items: center; justify-content: space-between; gap: 16px; margin: 0; padding: 0; }
.guide-keys > div { display: flex; align-items: center; gap: 8px; }
.guide-keys dt { display: flex; flex-shrink: 0; gap: 4px; }
.guide-keys dd { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.guide-keys kbd { display: inline-flex; justify-content: center; align-items: center; min-width: 25px; height: 28px; padding: 0 6px; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 5px; color: var(--ink); background: var(--guide-key); font: 600 12px/1 var(--sans); }
.guide-keys__space { max-width: 165px; }
.guide-keys__space kbd { min-width: 48px; }
.guide-assists { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 23px 0 20px; }
.guide-assist { display: flex; align-items: flex-start; gap: 10px; }
.guide-assist > svg { color: var(--jade-deep); margin-top: 3px; }
.beginner-guide__body .guide-assist p { margin: 0; font-size: 13px; line-height: 1.85; }
.guide-assist strong { display: block; margin-bottom: 3px; color: var(--ink); font-weight: 650; font-size: 13px; }
.beginner-guide__body .guide-note { display: flex; align-items: flex-start; gap: 7px; margin: 0; padding-top: 15px; border-top: 1px solid var(--line-soft); font-size: 12px; line-height: 1.8; color: var(--ink-soft); }
.guide-note svg { width: 15px; height: 15px; margin-top: 3px; }
html[data-theme="dark"] .beginner-guide { --guide-tint: #1b3024; --guide-lane: #263e2a; --guide-boards: #354e36; --guide-key: #2d4a3a; --guide-accent: #f5a46c; }
html[data-bsb-skin="make"][data-theme="dark"] .beginner-guide:has(.guide-steps) {
  --guide-tint: #1b3024;
  --guide-lane: #263e2a;
  --guide-boards: #354e36;
  --guide-key: #2d4a3a;
  --guide-accent: #f5a46c;
}
html[data-bsb-skin="make"][data-theme="dark"] .beginner-guide:has(.guide-steps) .guide-keyboard {
  border-color: #3d5c4a;
  background: #1b3024;
}
html[data-bsb-skin="make"][data-theme="dark"] .beginner-guide:has(.guide-steps) .guide-keyboard__label {
  color: #e8f0e6;
}
html[data-bsb-skin="make"][data-theme="dark"] .beginner-guide:has(.guide-steps) .guide-keys dd {
  color: #b8cfc0;
}
html[data-bsb-skin="make"][data-theme="dark"] .beginner-guide:has(.guide-steps) .guide-keys kbd {
  color: #f0f6f2;
  background: #2d4a3a;
  border-color: #4a6b58;
}
html[data-bsb-skin="make"][data-theme="dark"] .beginner-guide:has(.guide-steps) .guide-device {
  color: #b8cfc0;
  border-color: #3d5c4a;
}
html[data-theme="dark"] .guide-stance-ring { stroke: #cee6ce; }
html[data-theme="dark"] .guide-ball { fill: #8ebba0; }
html[data-theme="dark"] .guide-ball-shine { stroke: #d4ecda; }
html[data-theme="dark"] .guide-ball-hole { fill: #2a5138; }
html[data-theme="dark"] .guide-step__number, html[data-theme="dark"] .guide-assist > svg { color: var(--brown); }
@media (max-width: 1000px) {
  .guide-keyboard { flex-direction: column; align-items: stretch; gap: 15px; }
  .guide-keys { justify-content: space-between; }
}
@media (min-width: 641px) and (max-width: 800px) {
  .guide-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 20px; }
}
@media (max-width: 640px) {
  .beginner-guide { padding: 22px 20px 18px; border-radius: 18px; }
  .guide-header { align-items: flex-start; gap: 12px; margin-bottom: 22px; }
  .guide-device { padding: 5px 7px; font-size: 10px; gap: 4px; margin-top: 4px; }
  .guide-device svg { width: 13px; height: 13px; }
  .beginner-guide__body .guide-header__intro { font-size: 12px; }
  .guide-steps { grid-template-columns: 1fr; gap: 18px; margin-bottom: 22px; }
  .guide-step { display: grid; grid-template-columns: 86px minmax(0, 1fr); align-items: center; gap: 16px; }
  .guide-step__visual { height: 110px; margin: 0; border-radius: 10px; }
  .guide-step h4 { font-size: 16px; margin-bottom: 6px; gap: 7px; }
  .beginner-guide__body .guide-step p { font-size: 13px; line-height: 1.8; }
  .guide-keyboard { padding: 16px; }
  .guide-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 10px; }
  .guide-keys > div { flex-direction: column; align-items: flex-start; gap: 5px; }
  .guide-keys__space { max-width: none; }
  .guide-assists { grid-template-columns: 1fr; gap: 17px; padding: 20px 0; }
  .guide-assist strong { display: inline; margin-right: 4px; }
}
@media (max-width: 360px) {
  .beginner-guide { padding: 20px 16px 16px; }
  .guide-device { display: none; }
  .guide-step { grid-template-columns: 70px minmax(0, 1fr); gap: 12px; }
  .guide-step__visual { height: 116px; }
}


