:root {
  --bg: #262522;
  --bg-deep: #1f1e1b;
  --panel: #302e2b;
  --panel-hi: #3a3835;
  --line: rgba(255, 255, 255, 0.07);
  --text: #ffffff;
  --text-2: #d6d4cf;
  --muted: #9c9a95;
  --green: #81b64c;
  --green-dark: #5d8a32;
  --gold: #f4c247;
  --radius: 12px;
  --size: min(calc(100vw - 32px), calc(100vh - 170px), 720px);
  --head: Nunito, Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Inter, system-ui, sans-serif; color: var(--text); background: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
a { color: inherit; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
/* piece = image from the chosen set + optional mode add-on drawn on top */
.pcw { position: relative; display: block; width: 100%; height: 100%; }
.pcw img, .pcw svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 24px;
  height: 60px; padding: 0 clamp(16px, 3vw, 32px);
  background: var(--bg-deep); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 900; font-size: 22px; text-decoration: none; letter-spacing: -.01em; }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; padding: 3px; background: var(--green); box-shadow: inset 0 -3px 0 var(--green-dark); }
.nav a { color: var(--text-2); text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: var(--panel); color: #fff; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.engine-pill { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 6px 12px; background: var(--panel); border-radius: 99px; white-space: nowrap; }
.engine-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #e8c547; animation: blink 1s infinite alternate; }
.engine-pill.ready .dot { background: var(--green); animation: none; }
.engine-pill.failed .dot { background: #e0483e; animation: none; }
@keyframes blink { to { opacity: .3; } }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 0; background: var(--panel); color: var(--text-2); }
.icon-btn:hover { background: var(--panel-hi); color: #fff; }

/* ---------- Online play ---------- */
.join-btn { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--panel); color: var(--text-2); font-weight: 800; white-space: nowrap; }
.join-btn:hover { background: var(--panel-hi); color: #fff; }
@media (max-width: 760px) { .join-btn span { display: none; } }
.opp-note { margin: 8px 2px 0; font-size: 13px; color: var(--muted); min-height: 1em; }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
.net-sheet h2 { font-weight: 900; font-size: 26px; margin: 0 0 6px; }
.net-sheet p { line-height: 1.5; }
.invite-code { margin: 14px auto 10px; padding: 14px 10px; border-radius: 14px; background: var(--bg); font-size: 42px; font-weight: 900; letter-spacing: .25em; font-variant-numeric: tabular-nums; color: var(--green); user-select: all; }
.invite-link-row { display: flex; gap: 8px; margin-top: 12px; }
.invite-link-row input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text-2); font: inherit; font-size: 13px; }
.net-status { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 16px 0 6px; font-weight: 700; color: var(--text-2); min-height: 22px; }
.net-status .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--green); animation: spin .8s linear infinite; flex: none; }
.join-input { width: 100%; height: 64px; margin-top: 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg); color: #fff; font: inherit; font-size: 34px; font-weight: 900; letter-spacing: .3em; text-align: center; text-transform: uppercase; outline: none; }
.join-input:focus { border-color: var(--green); }

/* ---------- Search ---------- */
.search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; margin: 0 auto; border-radius: 10px; background: var(--panel); color: var(--muted); border: 2px solid transparent; transition: border-color .15s; }
.search:focus-within { border-color: var(--green); color: var(--text); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 14.5px; }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear { border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; padding: 0 2px; }
.no-results { padding: 40px 0; text-align: center; color: var(--muted); font-size: 16px; }

/* ---------- Category menu ---------- */
.burger { display: none; }
.home-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: start; }
.cat-nav { position: sticky; top: 76px; padding: 8px 0; }
.cat-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 0 12px 8px; }
.cat-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.cat-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--text-2); text-decoration: none; font-weight: 700; font-size: 14.5px; transition: background .12s; }
.cat-nav a:hover { background: var(--panel); color: #fff; }
.cat-nav a.active { background: var(--panel-hi); color: #fff; box-shadow: inset 3px 0 0 var(--green); }
.cat-nav a.empty { opacity: .4; }
.cat-nav .ci { width: 22px; text-align: center; }
.cat-nav .cn { flex: 1; }
.cat-nav .cc { font-size: 12px; color: var(--muted); background: var(--panel); padding: 1px 8px; border-radius: 99px; }
.nav-scrim { display: none; }
@media (max-width: 980px) {
  .burger { display: grid; }
  .home-layout { grid-template-columns: 1fr; }
  .cat-nav { position: fixed; top: 0; left: 0; bottom: 0; z-index: 40; width: 270px; padding: 76px 10px 20px; background: var(--bg-deep); box-shadow: 10px 0 30px rgba(0,0,0,.5); transform: translateX(-105%); transition: transform .22s ease; overflow-y: auto; }
  body.nav-open .cat-nav { transform: none; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.5); }
  .topbar { z-index: 45; }
}
@media (max-width: 640px) {
  .brand { font-size: 0; gap: 0; }
  .search input::placeholder { font-size: 13px; }
  /* small screens: keep the whole top bar on screen */
  .topbar { gap: 8px; padding: 0 10px; }
  .engine-pill { display: none; }
  .search { min-width: 0; padding: 0 10px; }
  .join-btn { padding: 0 11px; }
  .top-right { gap: 6px; }
}

/* ---------- Home ---------- */
.home { max-width: 1240px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 32px) 40px; }
.featured { display: grid; grid-template-columns: 1.35fr 1fr; gap: 32px; align-items: center; background: var(--panel); border-radius: 18px; padding: 18px; margin-bottom: 44px; }
.feat-img { padding: 0; border: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 5 / 3; background: none; }
.feat-img svg { display: block; width: 100%; height: 100%; transition: transform .35s ease; }
.feat-img:hover svg { transform: scale(1.03); }
.feat-text { padding: 8px 18px 8px 0; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.feat-text h1 { font-family: var(--head); font-weight: 900; font-size: clamp(32px, 4.2vw, 50px); line-height: 1.02; margin: 0 0 14px; }
.feat-text p { color: var(--text-2); font-size: 17px; line-height: 1.55; margin: 0 0 16px; }
.feat-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 22px 26px; border-radius: 18px;
  background: radial-gradient(600px 200px at 0% 0%, rgba(129,182,76,.18), transparent 70%), radial-gradient(500px 200px at 100% 100%, rgba(224,64,251,.12), transparent 70%), var(--panel); }
.intro-text { min-width: 0; }
.intro-brand { display: flex; align-items: center; gap: 14px; }
.intro-logo { width: 54px; height: 54px; border-radius: 14px; padding: 5px; background: var(--green); box-shadow: inset 0 -4px 0 var(--green-dark); transform: rotate(-6deg); flex: none; }
.intro-brand h1 { font-size: clamp(32px, 4.4vw, 50px); font-weight: 900; letter-spacing: -.03em; margin: 0; }
.slogan { margin: 6px 0 6px; font-size: clamp(17px, 2vw, 22px); font-weight: 800; color: var(--green); font-style: italic; }
.intro-desc { color: var(--muted); font-size: 15px; margin: 0; max-width: 620px; line-height: 1.5; }
.create-btn { display: flex; align-items: center; gap: 14px; padding: 16px 22px; border: 0; border-radius: 14px; text-align: left; color: #fff;
  background: linear-gradient(135deg, #81b64c, #4f9a3a); box-shadow: inset 0 -5px 0 rgba(0,0,0,.22), 0 10px 24px -10px rgba(129,182,76,.8); transition: transform .12s, filter .12s; }
.create-btn:hover { transform: translateY(-2px) rotate(-.5deg); filter: brightness(1.07); }
.create-btn .plus { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.22); font-size: 26px; font-weight: 900; }
.create-btn b { display: block; font-size: 17px; }
.create-btn small { display: block; font-size: 12.5px; opacity: .85; }
.custom-sec { margin-top: 32px; }

/* ---------- Mode editor ---------- */
.editor { display: flex; gap: 24px; justify-content: center; align-items: flex-start; flex-wrap: wrap; padding: 16px clamp(16px, 2vw, 28px) 32px; }
.ed-main { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ed-top { display: flex; gap: 10px; width: 100%; }
.ed-name { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border-radius: 10px; border: 2px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 18px; font-weight: 800; outline: none; }
.ed-name:focus { border-color: var(--green); }
.ed-board-wrap { padding: 8px; border-radius: 8px; background: #1b1a18; box-shadow: 0 18px 40px -18px #000; }
.ed-board { display: grid; user-select: none; touch-action: none; }
.esq { position: relative; cursor: pointer; }
.esq:hover { box-shadow: inset 0 0 0 3px rgba(129, 182, 76, .9); }
.esq .pc { position: absolute; inset: 0; pointer-events: none; }
.ed-hint { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
.ed-side { width: 400px; max-width: 100%; display: flex; flex-direction: column; gap: 10px; }
.ed-palette { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.ed-piece { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 10px; border: 2px solid transparent; background: var(--bg); font-size: 11.5px; font-weight: 700; color: var(--text-2); }
.ed-piece .pcw { width: 40px; height: 40px; }
.ed-piece:hover { background: var(--panel-hi); }
.ed-piece.on { border-color: var(--green); background: rgba(129, 182, 76, .15); color: #fff; }
.ed-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.ed-row .muted { font-size: 13.5px; font-weight: 600; }
.ed-info { flex: 1; font-size: 12.5px; color: var(--muted); line-height: 1.4; min-width: 150px; }
#edErase.on { background: #e0483e; }
.ed-size { display: flex; align-items: center; gap: 8px; font-weight: 700; flex-wrap: wrap; }
.ed-size span { color: var(--muted); font-size: 13.5px; margin-left: 6px; }
.ed-size button { width: 32px; height: 32px; border-radius: 8px; border: 0; background: var(--panel-hi); font-size: 18px; font-weight: 900; }
.ed-size button:hover { background: #48453f; }
.ed-size b { min-width: 22px; text-align: center; font-size: 17px; }
.ed-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ed-counts { font-size: 12.5px; margin-top: 10px; }
.seg.mini { padding: 3px; }
.seg.mini button { padding: 6px 12px; }
.ed-slider { margin-top: 12px; }
.ed-problem { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(224, 72, 62, .15); color: #ff8a80; font-size: 13.5px; font-weight: 600; }
.ed-actions { display: flex; gap: 8px; margin-top: 12px; }
.ed-actions .big { flex: 1; }
.ed-saved-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ed-saved-row:last-child { border-bottom: 0; }
.ed-saved-thumb { width: 64px; height: 36px; border-radius: 6px; overflow: hidden; flex: none; }
.ed-saved-thumb svg { width: 100%; height: 100%; display: block; }
.ed-saved-name { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-section { margin-top: 40px; scroll-margin-top: 76px; }
.sec-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.sec-head h2 { font-size: 30px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.sec-head span { color: var(--muted); font-size: 14px; }
.mode-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 16px; }
.mode-card { display: flex; flex-direction: column; text-align: left; padding: 0; border: 0; background: none; color: var(--text); }
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #3a3835; }
.thumb svg { display: block; width: 100%; height: 100%; transition: transform .3s ease; }
.mode-card:hover .thumb svg { transform: scale(1.06); }
.play-badge { position: absolute; right: 10px; bottom: 10px; padding: 6px 12px; border-radius: 8px; background: var(--green); box-shadow: inset 0 -3px 0 var(--green-dark); font-weight: 800; font-size: 13px; opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s; }
.mode-card:hover .play-badge { opacity: 1; transform: none; }
.mode-name { font-size: 15px; font-weight: 800; line-height: 1.35; margin-top: 10px; }
.mode-desc { color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 3px; }
@media (max-width: 1100px) { .mode-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) { .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .mode-grid { grid-template-columns: 1fr; } }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 99px; background: color-mix(in srgb, var(--accent, #81b64c) 22%, transparent); color: #fff; font-size: 12.5px; font-weight: 700; margin-top: 4px; }
.chip b { padding: 0 4px; color: var(--accent); }
.chip .chip-pc { width: 22px; height: 22px; flex: none; }
.brand-mark .pcw, .avatar .pcw { width: 100%; height: 100%; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }
.footer-links a, .link-btn { color: var(--text-2); font-weight: 700; font-size: 13.5px; text-decoration: none; background: none; border: 0; padding: 0; }
.footer-links a:hover, .link-btn:hover { color: #fff; text-decoration: underline; }
.info-sheet { width: min(620px, 100%); }
.info-sheet p, .info-sheet li { color: var(--text-2); line-height: 1.55; font-size: 14.5px; }
.info-sheet ul { padding-left: 20px; margin: 6px 0; }
.info-sheet li + li { margin-top: 6px; }
.footer { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- Game layout ---------- */
.game { display: flex; gap: 24px; justify-content: center; align-items: flex-start; padding: 12px clamp(16px, 2vw, 24px) 28px; flex-wrap: wrap; }
.board-col { width: var(--size); flex: none; }
.board-frame { border-radius: 4px; overflow: hidden; box-shadow: 0 18px 40px -18px rgba(0,0,0,.9); }
/* the board is one image from the chosen board set; squares are transparent on top of it */
.board { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); width: var(--size); height: var(--size);
  background: #b58863 center / 100% 100% no-repeat; user-select: none; touch-action: none; }
.sq { position: relative; min-width: 0; min-height: 0; }
.board.my-turn .sq { cursor: pointer; }
.sq.hill { background: rgba(255, 196, 0, .5); box-shadow: inset 0 0 0 2px rgba(255, 220, 80, .9); }
.sq.last::before, .sq.sel::before, .sq.check::before, .sq.hint::before { content: ''; position: absolute; inset: 0; z-index: 1; }
.sq.last::before { background: rgba(155, 199, 0, .41); }
.sq.sel::before { background: rgba(20, 85, 30, .5); }
.sq.check::before { background: radial-gradient(circle, rgba(255,30,30,1) 0%, rgba(230,20,20,.7) 40%, rgba(230,20,20,0) 75%); }
.sq.hint::before { background: rgba(80, 170, 255, .55); animation: pulse .5s ease-in-out 3 alternate; }
@keyframes pulse { from { opacity: .3; } }
.sq .pc { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.sq .pc.special { filter: drop-shadow(0 0 3px rgba(255, 225, 100, .95)); }
.sq.lifted .pc { opacity: .3; }
.sq.land .pc { animation: land .18s ease-out; }
@keyframes land { from { transform: scale(1.12); } }
.coord { position: absolute; z-index: 2; font-size: max(10px, calc(var(--size) / 52)); font-weight: 700; pointer-events: none; color: rgba(255, 255, 255, .85); text-shadow: 0 0 2px rgba(0,0,0,.8); }
.coord.rank { top: 2px; left: 3px; }
.coord.file { bottom: 1px; right: 3px; }
/* flat boards: coordinates in the opposite square colour, like most chess sites */
.board.flat .coord { text-shadow: none; font-weight: 800; }
.board.flat .sq:nth-child(16n+1) .coord, .board.flat .sq:nth-child(16n+3) .coord, .board.flat .sq:nth-child(16n+5) .coord, .board.flat .sq:nth-child(16n+7) .coord,
.board.flat .sq:nth-child(16n+10) .coord, .board.flat .sq:nth-child(16n+12) .coord, .board.flat .sq:nth-child(16n+14) .coord, .board.flat .sq:nth-child(16n+16) .coord { color: var(--sq-d); }
.board.flat .sq:nth-child(16n+2) .coord, .board.flat .sq:nth-child(16n+4) .coord, .board.flat .sq:nth-child(16n+6) .coord, .board.flat .sq:nth-child(16n+8) .coord,
.board.flat .sq:nth-child(16n+9) .coord, .board.flat .sq:nth-child(16n+11) .coord, .board.flat .sq:nth-child(16n+13) .coord, .board.flat .sq:nth-child(16n+15) .coord { color: var(--sq-l); }
.sq .dot { position: absolute; z-index: 3; left: 37%; top: 37%; width: 26%; height: 26%; border-radius: 50%; background: rgba(20, 85, 30, .5); pointer-events: none; }
.sq .ring { position: absolute; z-index: 3; inset: 0; background: radial-gradient(transparent 0%, transparent 79%, rgba(20, 85, 0, .3) 80%); pointer-events: none; }
.sq.boom::after { content: ''; position: absolute; }
.sq .scope { position: absolute; z-index: 3; inset: 12%; border-radius: 50%; border: 3px solid #ff2020; pointer-events: none; box-shadow: 0 0 6px rgba(255,0,0,.6); animation: aim 1s ease-in-out infinite alternate; }
.sq .scope::before, .sq .scope::after { content: ''; position: absolute; background: #ff2020; }
.sq .scope::before { left: 50%; top: -18%; bottom: -18%; width: 3px; transform: translateX(-50%); }
.sq .scope::after { top: 50%; left: -18%; right: -18%; height: 3px; transform: translateY(-50%); }
@keyframes aim { to { transform: scale(.88); } }
.sq.boom::after { opacity: 1; z-index: 4; inset: -15%; background: radial-gradient(circle, #fff 0%, #ffd166 28%, #ff5a3c 52%, transparent 70%); animation: boom .45s ease-out forwards; }
@keyframes boom { from { opacity: 1; transform: scale(.3); } to { opacity: 0; transform: scale(1.4); } }
/* ---------- Utter Chaos (any board size) ---------- */
.big-col { width: auto; }
.big-frame { display: inline-block; }
.big-board { display: grid; user-select: none; }
.big-board.my-turn .bsq { cursor: pointer; }
.bsq { position: relative; }
.bsq .pc { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.bsq.last::before, .bsq.sel::before, .bsq.check::before { content: ''; position: absolute; inset: 0; z-index: 1; }
.bsq.last::before { background: rgba(155, 199, 0, .41); }
.bsq.sel::before { background: rgba(20, 85, 30, .5); }
.bsq.check::before { background: radial-gradient(circle, rgba(255,30,30,1) 0%, rgba(230,20,20,.7) 40%, rgba(230,20,20,0) 75%); }
.bsq .dot { position: absolute; z-index: 3; left: 35%; top: 35%; width: 30%; height: 30%; border-radius: 50%; background: rgba(20, 85, 30, .5); pointer-events: none; }
.bsq .ring { position: absolute; z-index: 3; inset: 0; background: radial-gradient(transparent 0%, transparent 74%, rgba(20, 85, 0, .35) 76%); pointer-events: none; }

/* ---------- Four-Player Chess ---------- */
.four-frame { box-shadow: none; overflow: visible; }
.four-board { display: grid; user-select: none; }
.four-board.my-turn .fsq[data-sq] { cursor: pointer; }
.fsq { position: relative; }
.fsq.void { background: transparent; }
.fsq .pc { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.fsq.last::before, .fsq.sel::before, .fsq.check::before { content: ''; position: absolute; inset: 0; z-index: 1; }
.fsq.last::before { background: rgba(155, 199, 0, .41); }
.fsq.sel::before { background: rgba(20, 85, 30, .5); }
.fsq.check::before { background: radial-gradient(circle, rgba(255,30,30,1) 0%, rgba(230,20,20,.7) 40%, rgba(230,20,20,0) 75%); }
.fsq .dot { position: absolute; z-index: 3; left: 35%; top: 35%; width: 30%; height: 30%; border-radius: 50%; background: rgba(20, 85, 30, .5); pointer-events: none; }
.fsq .ring { position: absolute; z-index: 3; inset: 0; background: radial-gradient(transparent 0%, transparent 74%, rgba(20, 85, 0, .35) 76%); pointer-events: none; }
/* the white piece images are tinted for the Red and Blue armies; knocked-out armies turn grey */
.pc.tint-red img { filter: sepia(1) saturate(7) hue-rotate(-38deg) brightness(.92); }
.pc.tint-blue img { filter: sepia(1) saturate(6) hue-rotate(175deg) brightness(.95); }
.pc.dead img { filter: grayscale(1) brightness(.75) opacity(.55); }
.four-side .card h3 { margin-bottom: 10px; }
.fp { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; font-weight: 700; font-size: 14px; }
.fp.turn { background: var(--panel-hi); }
.fp.out { opacity: .45; text-decoration: line-through; }
.fp .sw { width: 16px; height: 16px; border-radius: 4px; border: 2px solid rgba(255,255,255,.25); flex: none; }
.fp-name { flex: 1; }
.fp-state { font-size: 12px; color: var(--muted); display: flex; align-items: center; }
.fp-state .spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--green); animation: spin .8s linear infinite; }
.fp-mat { min-width: 26px; text-align: right; color: var(--muted); font-size: 13px; }
.log-line { font-size: 13.5px; color: var(--text-2); padding: 3px 0; border-bottom: 1px solid var(--line); }
.log-line:last-child { border-bottom: 0; }

/* No Turns: cooldown ring that drains as the piece recharges */
.bsq .cd { position: absolute; inset: 6%; z-index: 3; border-radius: 50%; pointer-events: none;
  background: conic-gradient(rgba(0, 0, 0, .38) var(--f), transparent 0); -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%); mask: radial-gradient(circle, transparent 58%, #000 60%); }
.bsq .cd.mine { background: conic-gradient(rgba(0, 150, 255, .7) var(--f), transparent 0); }
.big-board .bsq { cursor: pointer; }
.big-board.aiming .bsq { cursor: crosshair; }
.bsq .scope { position: absolute; z-index: 3; inset: 12%; border-radius: 50%; border: 3px solid #ff2020; pointer-events: none; box-shadow: 0 0 6px rgba(255,0,0,.6); }
.bsq .scope::before, .bsq .scope::after { content: ''; position: absolute; background: #ff2020; }
.bsq .scope::before { left: 50%; top: -18%; bottom: -18%; width: 2px; transform: translateX(-50%); }
.bsq .scope::after { top: 50%; left: -18%; right: -18%; height: 2px; transform: translateY(-50%); }
.bsq.boom::after { content: ''; position: absolute; inset: -20%; z-index: 4; pointer-events: none; background: radial-gradient(circle, #fff 0%, #ffd166 28%, #ff5a3c 52%, transparent 70%); animation: boom .5s ease-out forwards; }
.throw-bar button.on.missile { background: #e0483e; }
.ammo { margin-top: 6px; font-size: 13.5px; color: var(--text-2); }

/* Meteor Shower */
.sq .meteor-target { position: absolute; inset: 10%; z-index: 3; pointer-events: none; border-radius: 50%; border: 4px solid #ff3b1f;
  box-shadow: 0 0 12px #ff3b1f, inset 0 0 10px rgba(255, 59, 31, .6); animation: aim 0.8s ease-in-out infinite alternate; }
.sq .meteor-target::after { content: '☄'; position: absolute; right: -14%; top: -30%; font-size: calc(var(--size) / 22); filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
/* SCP-035 possession */
.sq .pc.possessed img { filter: drop-shadow(0 0 4px #b44bff) drop-shadow(0 0 2px #b44bff); }
/* The Stalker */
.sq .monster.stalker { inset: -8% 0 0; z-index: 4; transition: none; animation: stalk 1s ease-in-out infinite alternate; }
@keyframes stalk { to { transform: translateY(-3%) rotate(2deg); } }
.sq.hunted::before { content: ''; position: absolute; inset: 4%; z-index: 1; border-radius: 50%; border: 3px solid #e0302a; box-shadow: 0 0 10px rgba(224, 48, 42, .8); animation: pulse .6s ease-in-out infinite alternate; }

/* ---------- Juice: shakes, particles, poofs, tornado, confetti ---------- */
.board-frame.shake-s { animation: shake-s .35s ease-out; }
.board-frame.shake-l { animation: shake-l .6s ease-out; }
.board-frame.quake { animation: quake 1s ease-in-out; }
.board-frame.drunk { animation: drunk 1.1s ease-in-out; }
@keyframes shake-s { 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-3px, -1px); } 80% { transform: translate(2px, 2px); } }
@keyframes shake-l { 10% { transform: translate(-9px, 4px) rotate(-.6deg); } 25% { transform: translate(8px, -6px) rotate(.5deg); } 40% { transform: translate(-7px, -3px); } 55% { transform: translate(6px, 5px) rotate(-.3deg); } 70% { transform: translate(-4px, 2px); } 85% { transform: translate(2px, -2px); } }
@keyframes quake { 0%, 100% { transform: none; } 5% { transform: translate(-10px, 3px) rotate(-1deg); } 10% { transform: translate(9px, -4px) rotate(1deg); } 15% { transform: translate(-11px, -2px) rotate(-1.2deg); } 20% { transform: translate(10px, 5px) rotate(.8deg); } 30% { transform: translate(-8px, 3px) rotate(-.8deg); } 40% { transform: translate(7px, -3px) rotate(.6deg); } 55% { transform: translate(-5px, 2px); } 70% { transform: translate(4px, -2px); } 85% { transform: translate(-2px, 1px); } }
@keyframes drunk { 25% { transform: rotate(-2.2deg) skewX(2deg); } 50% { transform: rotate(1.8deg) skewX(-2deg); } 75% { transform: rotate(-1deg); } }
.particle { position: absolute; z-index: 9; width: 7px; height: 7px; border-radius: 50%; pointer-events: none; }
.particle.big { width: 10px; height: 10px; box-shadow: 0 0 8px rgba(255, 160, 0, .8); }
.poof { position: absolute; z-index: 8; pointer-events: none; }
.poof .pc { position: absolute; inset: 0; }
.tornado { position: absolute; left: 0; top: 0; z-index: 10; pointer-events: none; filter: drop-shadow(0 8px 10px rgba(0,0,0,.45)); }
.tornado svg { width: 100%; height: 100%; }
.confetti { position: fixed; top: -20px; z-index: 200; width: 9px; height: 14px; border-radius: 2px; pointer-events: none; }
.die.roll { animation: dieroll .7s cubic-bezier(.3,1.4,.5,1); }
@keyframes dieroll { 0% { transform: rotate(-540deg) scale(.3); } 70% { transform: rotate(20deg) scale(1.15); } 100% { transform: none; } }

/* ---------- Mode effects ---------- */
.board-frame { position: relative; }
.throw-bar { display: flex; gap: 6px; padding: 4px; margin-bottom: 8px; background: var(--panel); border-radius: 10px; }
.throw-bar button { flex: 1; padding: 9px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 800; }
.throw-bar button.on { background: #ff8a00; color: #fff; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.throw-bar button.on.portal { background: #2f8cff; }
.throw-bar button.on.nuke { background: #6cb41b; }
.board.nuking .sq { cursor: crosshair; }
.board.nuking .sq:hover::before { content: ''; position: absolute; inset: -100%; z-index: 4; pointer-events: none;
  background: rgba(155, 226, 45, .28); border: 3px dashed #9be22d; border-radius: 6px; }
.sq .lava { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(circle at 30% 35%, #ffd23f 0%, #ff8a00 30%, #e8380d 65%, #8a1c05 100%);
  box-shadow: inset 0 0 14px rgba(120, 20, 0, .8); animation: lava 1.8s ease-in-out infinite alternate; }
@keyframes lava { to { filter: brightness(1.18) hue-rotate(-8deg); } }
.sq .pc.special.ghostfx img { opacity: .75; }
.board.throwing .sq { cursor: crosshair; }
/* Portal Chess */
.sq .portal { position: absolute; inset: 8% 14%; z-index: 1; border-radius: 50%; pointer-events: none; animation: portal 2.2s linear infinite; }
.sq .portal.blue { border: 4px solid #2f8cff; box-shadow: 0 0 10px #2f8cff, inset 0 0 12px #2f8cff; background: radial-gradient(rgba(47,140,255,.35), rgba(47,140,255,.08)); }
.sq .portal.orange { border: 4px solid #ff8a00; box-shadow: 0 0 10px #ff8a00, inset 0 0 12px #ff8a00; background: radial-gradient(rgba(255,138,0,.35), rgba(255,138,0,.08)); }
.sq .portal.picked { inset: 2% 8%; border-width: 5px; }
@keyframes portal { 50% { transform: scale(1.06, .94); } }
.sq.portal-dest::before { content: ''; position: absolute; inset: 38%; border-radius: 50%; background: rgba(47, 140, 255, .55); z-index: 1; }
/* Infinite Pawns */
.sq.placeable::before { content: ''; position: absolute; inset: 0; z-index: 1; background: rgba(232, 177, 0, .18); box-shadow: inset 0 0 0 2px rgba(232, 177, 0, .45); }
.sq.placeable:hover::before { background: rgba(232, 177, 0, .45); }
/* piece held on the cursor (Infinite Pawns, Recruiter) */
.held-piece { position: fixed; left: 0; top: 0; z-index: 90; pointer-events: none; filter: drop-shadow(0 10px 8px rgba(0,0,0,.45)); }
.held-piece .pcw { animation: bob 1.1s ease-in-out infinite; }
.held-piece.pop .pcw { animation: popin .25s ease-out, bob 1.1s ease-in-out .25s infinite; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-4deg); } }
@keyframes popin { from { transform: scale(.2); opacity: 0; } }
.board.holding .sq { cursor: none; }
.board.holding .sq.placeable:hover::before { background: rgba(232, 177, 0, .55); }
/* Recruiter reserve */
.reserve { display: flex; flex-wrap: wrap; gap: 8px; }
.res-piece { position: relative; width: 52px; height: 52px; padding: 4px; border-radius: 10px; border: 2px solid transparent; background: var(--panel-hi); }
.res-piece:hover:not(:disabled) { background: #48453f; }
.res-piece.on { border-color: var(--green); background: rgba(129, 182, 76, .2); }
.res-n { position: absolute; right: -6px; top: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--green); font-size: 12px; font-weight: 800; line-height: 20px; }
.res-hint { font-size: 13px; margin-top: 8px; }
/* Dice Chess */
.sq.dim .pc { opacity: .45; filter: grayscale(.6); }
.die-row { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.die { width: 52px; height: 52px; padding: 5px; border-radius: 12px; background: #fff; box-shadow: inset 0 -4px 0 #d8d8d8, 0 4px 10px rgba(0,0,0,.35); }
/* Weird Stockfish */
.elo { display: flex; align-items: baseline; gap: 6px; }
.elo-num { font-size: 32px; font-weight: 900; letter-spacing: -.02em; }
.elo-unit { color: var(--muted); font-weight: 700; }
.elo-delta { margin-left: auto; font-weight: 900; padding: 2px 8px; border-radius: 6px; }
.elo-delta.down { background: rgba(224, 72, 62, .2); color: #ff6b61; }
.elo-delta.up { background: rgba(47, 191, 113, .2); color: #4fd98a; }
.elo-bar { height: 8px; border-radius: 99px; background: var(--panel-hi); margin-top: 8px; overflow: hidden; }
.elo-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4fd98a, #f4c247, #e0483e); border-radius: 99px; transition: width .4s; }
.phys-layer { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.phys-piece { position: absolute; left: 0; top: 0; will-change: transform; }
.phys-piece.thrown { filter: drop-shadow(0 6px 6px rgba(0,0,0,.45)); z-index: 2; }
.board.simulating .sq .pc { visibility: hidden; }
.aim { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; overflow: visible; }
.sq.fog { background: #07070c !important; }
.sq.fog::before { background: none !important; }
.sq.fog .coord { color: #333 !important; }
.board.flat .sq.fog, .sq.fog { box-shadow: inset 0 0 18px #000; }
.sq .eyes { position: absolute; inset: 15%; z-index: 3; pointer-events: none; animation: eyes 3s ease-in-out infinite; }
.sq .eyes svg { width: 100%; height: 100%; }
@keyframes eyes { 0%, 44%, 52%, 100% { opacity: .95; transform: scaleY(1); } 48% { opacity: .9; transform: scaleY(.1); } }
.sq .monster { position: absolute; inset: -4% 4% 0; z-index: 3; pointer-events: none; filter: drop-shadow(0 4px 4px rgba(0,0,0,.45)); }
.sq .monster svg { width: 100%; height: 100%; }
.sq .puddle { position: absolute; inset: 6%; z-index: 1; border-radius: 46% 54% 42% 58%; pointer-events: none;
  background: radial-gradient(circle at 45% 45%, #000 0%, #120c06 55%, rgba(30, 18, 6, .75) 72%, transparent 76%); animation: ooze 2.4s ease-in-out infinite alternate; }
@keyframes ooze { to { transform: scale(1.08) rotate(8deg); border-radius: 55% 45% 58% 42%; } }
.sq.danger::before { content: ''; position: absolute; inset: 0; z-index: 1; background: rgba(220, 20, 20, .22); }
.sq.scare::after { content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none; background: rgba(160, 0, 0, .55); animation: scare 1.2s ease-out forwards; }
@keyframes scare { 0% { opacity: 1; } 100% { opacity: 0; } }
.sq .pc.zombie img { filter: sepia(1) hue-rotate(55deg) saturate(2.6) brightness(.9); }
.horror-status { font-size: 14px; line-height: 1.5; color: var(--text-2); }
.horror-status .tag { margin-right: 6px; }
.pocket { font-size: 13px; margin-top: 8px; }
.ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; filter: drop-shadow(0 8px 8px rgba(0,0,0,.4)); }

.player { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 2px; }
.avatar { width: 42px; height: 42px; flex: none; border-radius: 8px; padding: 4px; background: var(--panel-hi); border: 2px solid transparent; }
.avatar.bot { background: #4a4743; }
.player.turn .avatar { border-color: var(--green); }
.pinfo { min-width: 0; }
.player .name { font-weight: 800; font-size: 15px; }
.player .sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .caps { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.player .caps .cap { width: 20px; height: 20px; margin-left: -6px; flex: none; }
.player .adv { font-size: 12px; color: var(--muted); margin-left: 6px; font-weight: 700; }

/* ---------- Sidebar ---------- */
.side { width: 360px; max-width: 100%; display: flex; flex-direction: column; gap: 10px; padding-top: 58px; }
.panel-head { background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.mini-preview { aspect-ratio: 5 / 2.2; overflow: hidden; }
.mini-preview svg { display: block; width: 100%; height: 100%; }
.ph-text { padding: 12px 16px 14px; display: flex; flex-direction: column; align-items: flex-start; }
.ph-text h2 { font-family: var(--head); font-weight: 900; font-size: 22px; margin: 0; }
.card { background: var(--panel); border-radius: var(--radius); padding: 14px 16px; }
.card h3 { margin: 0 0 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.how ol { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.how li + li { margin-top: 4px; }
.status { font-weight: 700; display: flex; align-items: center; gap: 10px; min-height: 50px; }
.tag { font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.tag.green { background: var(--green); }
.tag.red { background: #e0302a; }
.status .spinner { width: 16px; height: 16px; flex: none; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--green); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.variant .pips { display: flex; align-items: center; gap: 8px; }
.variant .pip { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 20px; background: var(--panel-hi); color: var(--muted); }
.variant .pip.on { background: #ff3355; color: #fff; box-shadow: 0 0 10px rgba(255,51,85,.6); }
.moves { max-height: 200px; overflow: auto; }
.move-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 34px 1fr 1fr; gap: 2px 6px; font-size: 14px; font-variant-numeric: tabular-nums; }
.move-list .n { color: var(--muted); padding: 2px 0; }
.move-list .mv { padding: 2px 6px; border-radius: 5px; font-weight: 600; }
.move-list .mv.cur { background: rgba(255,255,255,.12); }
.move-list .empty { grid-column: 1 / -1; color: var(--muted); }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.controls .wide { grid-column: 1 / -1; }

/* ---------- Buttons ---------- */
.btn { padding: 11px 14px; border-radius: 10px; border: 0; background: var(--panel-hi); color: var(--text); font-weight: 800; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); transition: background .12s, transform .08s; }
.btn:hover:not(:disabled) { background: #48453f; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--green); box-shadow: inset 0 -4px 0 var(--green-dark); }
.btn.primary:hover:not(:disabled) { background: #8fc45a; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--muted); }
.btn.big { padding: 15px 18px; font-size: 18px; font-family: var(--head); font-weight: 900; }
.setup-body .btn.big { width: 100%; margin-top: 22px; font-size: 20px; }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .65); animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: relative; width: min(520px, 100%); max-height: 94vh; overflow: auto; background: var(--panel); border-radius: 16px; padding: 24px; box-shadow: 0 30px 70px -20px #000; animation: pop .18s ease; }
.sheet.small { width: min(400px, 100%); }
.sheet.center { text-align: center; }
@keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.close { position: absolute; top: 10px; right: 10px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 22px; line-height: 1; }
.sheet-title { font-family: var(--head); font-weight: 900; font-size: 26px; margin: 0 0 6px; }
.sheet h4 { margin: 20px 0 10px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.setup-sheet { width: min(600px, 100%); padding: 0; }
.setup-preview { aspect-ratio: 5 / 2.6; overflow: hidden; }
.setup-preview svg { display: block; width: 100%; height: 100%; }
.setup-body { padding: 18px 24px 24px; }
.setup-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.setup-title h2 { font-family: var(--head); font-weight: 900; font-size: 30px; margin: 0; }
.setup-title .chip { margin-top: 0; }
.setup-desc { color: var(--text-2); font-size: 16px; line-height: 1.5; margin: 8px 0 14px; }
.how-box { background: var(--bg); border-radius: 10px; padding: 12px 16px; }
.how-box h4 { margin: 0 0 6px; }
.how-box ol { margin: 0; padding-left: 20px; color: var(--text-2); line-height: 1.55; font-size: 14.5px; }
.slider-box { background: var(--bg); border-radius: 10px; padding: 12px 16px 10px; }
.slider-top { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: 8px; }
.slider-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
input[type="range"] { --fill: 100%; width: 100%; height: 8px; appearance: none; -webkit-appearance: none; border-radius: 99px; outline: none; cursor: pointer;
  background: linear-gradient(90deg, var(--green) var(--fill), var(--panel-hi) var(--fill)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--green); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 4px solid var(--green); }
.seg { display: flex; gap: 6px; padding: 4px; background: var(--bg); border-radius: 10px; }
.seg button { flex: 1; padding: 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 800; }
.seg button.on { background: var(--panel-hi); color: #fff; }
.sound-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sound-row .seg { flex: 0 0 auto; }
.sound-row .seg button { padding: 10px 16px; }
.vol { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 14px; color: var(--text-2); }
.vol input { flex: 1; }
.settings-sheet { width: min(760px, 100%); }
.settings-preview { display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 8 / 1; border-radius: 6px; overflow: hidden; background: #b58863 top / 100% auto no-repeat; }
.settings-preview img { width: 100%; height: 100%; display: block; }
.pick-grid { display: grid; gap: 8px; }
.pick-grid.boards { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); }
.pick-grid.pieces { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.pick { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px; border-radius: 10px; border: 2px solid transparent; background: var(--bg); font-size: 12px; font-weight: 700; color: var(--text-2); }
.pick:hover { background: var(--panel-hi); }
.pick.on { border-color: var(--green); color: #fff; }
.pick img { display: block; }
.boards .pick img, .boards .pick .sw { display: block; width: 100%; aspect-ratio: 1; border-radius: 4px; object-fit: cover; }
.custom-row { display: none; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 10px; padding: 10px 14px; background: var(--bg); border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.custom-row.open { display: flex; }
.custom-row label { display: flex; align-items: center; gap: 8px; }
.custom-row input[type="color"] { width: 40px; height: 32px; padding: 0; border: 2px solid var(--line); border-radius: 6px; background: none; cursor: pointer; }
.btn.small { padding: 6px 12px; font-size: 13px; margin-left: auto; }
.pieces .pick .pp { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; }
.pieces .pick .pp img { width: 100%; aspect-ratio: 1; }
.fine { font-size: 12px; color: var(--muted); margin: 16px 0 0; }
.promo-row { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
.promo-row button { width: 76px; height: 76px; padding: 6px; border-radius: 10px; border: 0; background: #f0d9b5; }
.promo-row button:hover { background: #fff; }
.over-icon { display: flex; justify-content: center; gap: 4px; height: 80px; margin-bottom: 8px; }
.over-icon .pcw { width: 80px; height: 80px; }
.ghost .pcw { width: 100%; height: 100%; }
.sheet.center h2 { font-family: var(--head); font-weight: 900; font-size: 30px; margin: 0; }
.over-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 80; max-width: min(560px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 12px;
  background: #fff; color: #1d1d1f; font-weight: 600; box-shadow: 0 12px 30px -8px rgba(0,0,0,.6); transform: translate(-50%, 20px); opacity: 0; transition: transform .25s, opacity .25s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1120px) { .side { padding-top: 0; width: var(--size); } }
@media (max-width: 860px) {
  .featured { grid-template-columns: 1fr; }
  .feat-text { padding: 0 6px 6px; }
  .nav { display: none; }
}
@media (max-width: 560px) {
  .engine-pill #engineText { display: none; }
  .mode-grid { grid-template-columns: 1fr; }
  .setup-body { padding: 16px; }
}
