/* NX Shaxmat */
:root {
  --bg: #14110f;
  --bg2: #1b1714;
  --card: #221d19;
  --card2: #2a241f;
  --line: rgba(255, 255, 255, .07);
  --line2: rgba(255, 255, 255, .12);
  --tx: #f3ece5;
  --mut: #a8998b;
  --mut2: #7a6d61;
  --acc: #c8894a;
  --acc2: #e0a565;
  --acc-bg: rgba(200, 137, 74, .14);
  --good: #6fbf73;
  --bad: #e2675a;
  --light: #f0d9b5;
  --dark: #b58863;
  --hl-last: rgba(255, 214, 89, .42);
  --hl-sel: rgba(255, 214, 89, .62);
  --radius: 14px;
  --board: min(calc(100vw - 470px), calc(100vh - 215px), 760px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(200, 137, 74, .10), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(200, 137, 74, .06), transparent 60%),
    var(--bg);
  color: var(--tx);
  font: 15px/1.45 "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; opacity: .38; }
#sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; max-width: 1240px; width: 100%; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--acc2), var(--acc)); color: #1a120b;
  font-weight: 800; letter-spacing: .5px; box-shadow: 0 6px 18px rgba(200, 137, 74, .3);
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt b { font-size: 18px; }
.brand-txt small { color: var(--mut); font-size: 12px; }
.top-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--line); color: var(--mut); transition: .15s;
}
.icon-btn:hover { color: var(--tx); border-color: var(--line2); }

/* ---------- layout ---------- */
.layout {
  flex: 1; display: flex; gap: 22px; justify-content: center; align-items: flex-start;
  padding: 0 24px 16px; max-width: 1240px; width: 100%; margin: 0 auto;
}
.stage { display: flex; flex-direction: column; gap: 10px; }
.board-row { display: flex; gap: 10px; }

/* ---------- player cards ---------- */
.player-card {
  display: flex; align-items: center; gap: 12px; height: 54px;
  padding: 0 6px 0 32px; /* aligns with board (evalbar width + gap) */
}
.pc-ava {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: var(--card2); border: 1px solid var(--line); font-size: 20px;
}
.pc-ava svg { width: 32px; height: 32px; }
.pc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pc-name { font-weight: 650; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.pc-tag { font-size: 11px; font-weight: 600; color: var(--acc2); background: var(--acc-bg); padding: 2px 7px; border-radius: 99px; }
.pc-caps { display: flex; align-items: center; min-height: 18px; color: var(--mut); font-size: 12px; }
.pc-caps svg { width: 18px; height: 18px; margin-right: -6px; }
.pc-caps .grp { display: flex; margin-right: 10px; }
.pc-caps .adv { margin-left: 4px; font-weight: 600; color: var(--mut); }
.pc-thinking { font-size: 12px; color: var(--acc2); display: none; }
.player-card.thinking .pc-thinking { display: inline; }
.clock {
  min-width: 98px; padding: 8px 14px; border-radius: 11px; text-align: right;
  font: 600 22px/1 "JetBrains Mono", "Consolas", ui-monospace, monospace; letter-spacing: .5px;
  background: var(--card); border: 1px solid var(--line); color: var(--mut); transition: .2s;
}
.clock.on { background: #f3ece5; color: #14110f; border-color: transparent; }
.clock.low.on { background: var(--bad); color: #fff; }
.clock.none { display: none; }
.player-card.turn .pc-ava { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-bg); }

/* ---------- eval bar ---------- */
.evalbar {
  width: 22px; border-radius: 8px; overflow: hidden; position: relative; flex: none;
  background: #3b3530; border: 1px solid var(--line);
}
.eval-fill {
  position: absolute; left: 0; right: 0; bottom: 0; height: 50%;
  background: linear-gradient(#fbf7f2, #e6ddd2); transition: height .6s var(--ease);
}
.evalbar.flipped .eval-fill { bottom: auto; top: 0; }
.eval-txt {
  position: absolute; left: 0; right: 0; text-align: center; font-size: 9.5px; font-weight: 700;
  bottom: 4px; color: #3b3530; writing-mode: horizontal-tb; letter-spacing: -.3px;
}
.eval-txt.top { bottom: auto; top: 4px; }
.eval-txt.lt { color: #e6ddd2; }
.evalbar.off { visibility: hidden; width: 0; margin-right: -10px; }

/* ---------- board ---------- */
.board-wrap {
  position: relative; width: var(--board); height: var(--board); flex: none;
  border-radius: 6px; box-shadow: 0 18px 50px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0,0,0,.4);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.board {
  position: absolute; inset: 0; display: grid; grid-template: repeat(8, 1fr) / repeat(8, 1fr);
  border-radius: 6px; overflow: hidden;
}
.sq { position: relative; background: var(--light); }
.sq.d { background: var(--dark); }
.sq::before { content: ""; position: absolute; inset: 0; pointer-events: none; }
.sq.last::before { background: var(--hl-last); }
.sq.sel::before { background: var(--hl-sel); }
.sq.check::before {
  background: radial-gradient(circle, rgba(255, 40, 30, .95) 0%, rgba(230, 30, 20, .55) 35%, rgba(200, 0, 0, 0) 72%);
}
.sq.hover::before { box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .65); }
.sq.mv::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 30%; height: 30%;
  transform: translate(-50%, -50%); border-radius: 50%; background: rgba(20, 30, 20, .26); pointer-events: none; z-index: 3;
}
.sq.cap::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; z-index: 3;
  background: radial-gradient(transparent 0, transparent 70%, rgba(20, 30, 20, .3) 71%);
}
.no-dots .sq.mv::after, .no-dots .sq.cap::after { display: none; }
.sq .pc {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none;
  will-change: transform;
}
.sq .pc.ghosted { opacity: .3; }
.sq .co { position: absolute; font-size: max(10px, calc(var(--board) * .018)); font-weight: 700; z-index: 1; pointer-events: none; opacity: .9; }
.sq .co.r { left: 4%; top: 3%; }
.sq .co.f { right: 5%; bottom: 2%; }
.sq.d .co { color: var(--light); }
.sq:not(.d) .co { color: var(--dark); }
.no-coords .sq .co { display: none; }
.board.interactive .sq.own { cursor: grab; }
.drag-ghost {
  position: fixed; z-index: 1000; pointer-events: none; transform: translate(-50%, -50%) scale(1.12);
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45));
}
.arrows { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

/* promotion */
.promo { position: absolute; inset: 0; z-index: 20; background: rgba(10, 8, 6, .45); border-radius: 6px; }
.promo-col {
  position: absolute; width: 12.5%; display: flex; flex-direction: column;
  background: #f6f1ea; border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); overflow: hidden;
}
.promo-col button { aspect-ratio: 1; display: grid; place-items: center; transition: background .12s; }
.promo-col button:hover { background: #e8d3b4; }
.promo-col svg { width: 92%; height: 92%; }

/* loading */
.loading {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 30;
  display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 99px;
  background: rgba(20, 17, 15, .88); border: 1px solid var(--line2); font-size: 13px; color: var(--mut);
  backdrop-filter: blur(6px); transition: opacity .3s;
}
.loading.done { opacity: 0; pointer-events: none; }
.loading.err { color: #ffb4a8; border-color: rgba(226, 103, 90, .5); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--acc); animation: spin .8s linear infinite; }
.loading.err .spinner { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- panel ---------- */
.panel {
  width: 350px; flex: none; display: flex; flex-direction: column; gap: 12px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 14px;
  margin-top: 64px; height: calc(var(--board) + 2px);
}
.status-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.status { font-weight: 650; font-size: 16px; display: flex; align-items: center; gap: 8px; min-height: 24px; }
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--good); flex: none; }
.status .dot.wait { background: var(--acc); animation: pulse 1s ease-in-out infinite; }
.status .dot.end { background: var(--mut2); }
.status .chk { color: var(--bad); font-weight: 700; }
@keyframes pulse { 50% { opacity: .3; } }
.opening { color: var(--mut); font-size: 13px; margin-top: 4px; min-height: 19px; }
.opening b { color: var(--acc2); font-weight: 600; }
.engine-line { color: var(--mut2); font-size: 12px; margin-top: 2px; font-family: "JetBrains Mono", Consolas, monospace; min-height: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.review-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--acc-bg); border: 1px solid rgba(200, 137, 74, .35); color: var(--acc2);
  border-radius: 12px; padding: 8px 10px 8px 14px; font-size: 13px;
}
.review-banner[hidden] { display: none; }
.review-banner button { background: var(--acc); color: #1a120b; font-weight: 650; padding: 6px 10px; border-radius: 9px; font-size: 12.5px; }

.moves {
  flex: 1; min-height: 120px; overflow-y: auto; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 6px; display: grid; grid-template-columns: 40px 1fr 1fr;
  align-content: start; row-gap: 2px; scrollbar-width: thin; scrollbar-color: #3a322b transparent;
}
.moves .no { color: var(--mut2); font-size: 13px; display: flex; align-items: center; justify-content: center; }
.moves .m {
  text-align: left; padding: 5px 10px; border-radius: 8px; font-weight: 550; font-size: 14.5px;
  font-variant-emoji: text; transition: background .12s;
}
.moves .m:hover { background: var(--card2); }
.moves .m.cur { background: var(--acc); color: #1a120b; }
.moves .empty { grid-column: 1 / -1; color: var(--mut2); text-align: center; padding: 30px 10px; font-size: 13.5px; }
.moves .res { grid-column: 1 / -1; text-align: center; padding: 8px; font-weight: 700; color: var(--acc2); }

.nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.nav-btn {
  height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--mut);
  background: var(--card); border: 1px solid var(--line); transition: .12s;
}
.nav-btn:hover:not(:disabled) { color: var(--tx); border-color: var(--line2); }

.actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tile {
  height: 62px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: var(--card); border: 1px solid var(--line); color: var(--mut); font-size: 11.5px; font-weight: 600; transition: .12s;
}
.tile:hover:not(:disabled) { color: var(--tx); border-color: var(--line2); background: var(--card2); }
.tile.danger:hover:not(:disabled) { color: #ffb4a8; border-color: rgba(226, 103, 90, .45); }
.tile i { display: grid; place-items: center; height: 20px; }
.tile .badge { font-size: 10px; }

.primary {
  height: 48px; border-radius: 13px; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(180deg, var(--acc2), var(--acc)); color: #1a120b; font-weight: 750; font-size: 15.5px;
  box-shadow: 0 8px 22px rgba(200, 137, 74, .25), inset 0 1px 0 rgba(255, 255, 255, .3); transition: transform .1s, filter .15s;
}
.primary:hover { filter: brightness(1.06); }
.primary:active { transform: translateY(1px); }
.primary i { display: grid; }
.secondary {
  height: 46px; border-radius: 13px; background: var(--card2); border: 1px solid var(--line2); font-weight: 650; padding: 0 16px;
}
.ghost { height: 42px; border-radius: 12px; color: var(--mut); font-weight: 600; padding: 0 14px; }
.ghost:hover { color: var(--tx); background: var(--card); }
.mini-links { display: flex; justify-content: center; gap: 8px; color: var(--mut2); font-size: 12.5px; }
.mini-links button { color: var(--mut); }
.mini-links button:hover { color: var(--acc2); }

.foot { text-align: center; color: var(--mut2); font-size: 12px; padding: 10px 16px 18px; }
.foot a { color: var(--mut); }

/* ---------- modals ---------- */
.modal {
  position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 16px;
  background: rgba(8, 6, 5, .62); backdrop-filter: blur(5px); animation: fade .18s ease;
}
.modal[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--bg2); border: 1px solid var(--line2); border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  animation: pop .22s var(--ease);
}
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 8px; }
.sheet-head h2 { margin: 0; font-size: 19px; }
.x { width: 34px; height: 34px; border-radius: 10px; font-size: 22px; line-height: 1; color: var(--mut); }
.x:hover { background: var(--card); color: var(--tx); }
.sheet-body { padding: 4px 20px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.sheet-foot { padding: 12px 20px 18px; display: flex; flex-direction: column; }
.sec { background: var(--card); border: 1px solid var(--line); border-radius: 15px; padding: 12px 14px 14px; }
.sec[hidden] { display: none; }
.sec h3 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--mut); font-weight: 700; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; border-radius: 11px; background: var(--card2); border: 1px solid var(--line);
  font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; transition: .12s;
}
.chip small { color: var(--mut); font-weight: 500; font-size: 11.5px; }
.chip.big { flex: 1; padding: 12px 14px; justify-content: center; }
.chip.big b { font-size: 20px; }
.chip:hover { border-color: var(--line2); }
.chip.on { border-color: var(--acc); background: var(--acc-bg); color: var(--acc2); }
.chip.on small { color: var(--acc2); opacity: .8; }

.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.swatch {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border-radius: 13px;
  background: var(--card2); border: 1px solid var(--line); transition: .12s;
}
.swatch:hover { border-color: var(--line2); }
.swatch.on { border-color: var(--acc); background: var(--acc-bg); }
.swatch small { font-weight: 600; color: var(--mut); }
.swatch.on small { color: var(--acc2); }
.sw-pc { width: 46px; height: 46px; display: grid; place-items: center; }
.sw-pc svg { width: 46px; height: 46px; }
.sw-rand { font-size: 26px; font-weight: 800; border-radius: 12px; color: var(--acc2);
  background: linear-gradient(135deg, #f3ece5 0 50%, #2b2520 50% 100%); -webkit-background-clip: padding-box; }
.sw-rand { color: transparent; position: relative; }
.sw-rand::after { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--acc); font-size: 26px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }

.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.lvl {
  padding: 9px 6px 8px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 1px; transition: .12s;
}
.lvl:hover { border-color: var(--line2); }
.lvl b { font-size: 19px; }
.lvl span { font-size: 11.5px; font-weight: 600; color: var(--tx); white-space: nowrap; }
.lvl small { font-size: 10.5px; color: var(--mut); }
.lvl em { font-style: normal; font-size: 10px; color: var(--mut2); margin-top: 2px; }
.lvl.on { border-color: var(--acc); background: var(--acc-bg); }
.lvl.on b, .lvl.on span { color: var(--acc2); }

.themes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.theme {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border-radius: 12px;
  background: var(--card2); border: 1px solid var(--line);
}
.theme.on { border-color: var(--acc); background: var(--acc-bg); }
.theme small { font-size: 11px; font-weight: 600; color: var(--mut); }
.theme.on small { color: var(--acc2); }
.theme .mini { width: 44px; height: 44px; border-radius: 7px; overflow: hidden; display: grid; grid-template: 1fr 1fr / 1fr 1fr; }

.toggles { display: flex; flex-direction: column; }
.tg { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.tg:first-child { border-top: 0; padding-top: 2px; }
.tg span { display: flex; flex-direction: column; }
.tg small { color: var(--mut); font-size: 12px; }
.sw { width: 44px; height: 26px; border-radius: 99px; background: #3a322b; position: relative; transition: .2s; flex: none; }
.sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #d9cfc4; transition: .2s var(--ease); }
.tg.on .sw { background: var(--acc); }
.tg.on .sw::after { left: 21px; background: #fff; }

.stats-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 24px; }
.stat small { color: var(--mut); font-weight: 600; font-size: 12px; }
.stat.w b { color: var(--good); } .stat.l b { color: var(--bad); } .stat.d b { color: var(--acc2); }
.stats-table { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.st-row { display: grid; grid-template-columns: 1fr 52px 52px 52px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 13.5px; align-items: center; }
.st-row:first-child { border-top: 0; color: var(--mut); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.st-row > :not(:first-child) { text-align: center; }
.st-row small { color: var(--mut); }

.sheet.over { width: min(400px, 100%); padding: 26px 22px 20px; text-align: center; position: relative; align-items: center; }
.sheet.over .x { position: absolute; right: 12px; top: 12px; }
.over-icon { font-size: 54px; line-height: 1; margin-bottom: 8px; animation: bounce .6s var(--ease); }
@keyframes bounce { 0% { transform: scale(.3); } 60% { transform: scale(1.15); } }
.sheet.over h2 { margin: 0; font-size: 26px; }
.sheet.over p { margin: 6px 0 0; color: var(--mut); }
.over-meta { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 16px 0 4px; }
.over-meta span { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 4px 11px; font-size: 12.5px; color: var(--mut); }
.over-btns { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 16px; }
.over-btns [hidden] { display: none; }

body.no-eval .player-card { padding-left: 6px; }
.tile.armed { color: #ffb4a8; border-color: rgba(226, 103, 90, .6); background: rgba(226, 103, 90, .1); }
.tile b.half { font-size: 20px; line-height: 20px; font-weight: 800; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); opacity: 0; z-index: 900;
  background: #f3ece5; color: #14110f; padding: 10px 18px; border-radius: 12px; font-weight: 600; font-size: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45); transition: .25s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 800; width: 100%; height: 100%; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  :root { --board: min(calc(100vw - 420px), calc(100vh - 215px), 760px); }
  .panel { width: 300px; }
  .tile span { font-size: 10.5px; }
}
@media (max-width: 900px) {
  :root { --board: min(calc(100vw - 52px), 640px); }
  .layout { flex-direction: column; align-items: center; gap: 12px; padding: 0 12px 12px; }
  .top { padding: 10px 14px; }
  .panel { width: calc(var(--board) + 32px); height: auto; margin-top: 0; padding: 12px; }
  .moves { display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; min-height: 0; flex: none; padding: 6px; gap: 2px; align-items: center; }
  .moves .no { padding: 0 2px 0 8px; flex: none; }
  .moves .m { flex: none; padding: 5px 8px; }
  .moves .empty, .moves .res { padding: 6px 10px; flex: none; }
  .panel { display: grid; grid-template-columns: minmax(0, 1fr); }
  .panel > * { min-width: 0; }
  .status-box { order: 1; } .review-banner { order: 2; } .moves { order: 3; } .nav { order: 5; } .actions { order: 4; } .primary { order: 6; } .mini-links { order: 7; }
}
@media (max-width: 520px) {
  :root { --board: calc(100vw - 48px); }
  .panel { width: calc(var(--board) + 22px); }
  body.no-eval .panel { width: var(--board); }
  .player-card { padding-left: 26px; height: 48px; }
  .evalbar { width: 16px; }
  .board-row { gap: 6px; }
  .pc-ava { width: 34px; height: 34px; }
  .clock { min-width: 82px; font-size: 19px; padding: 7px 10px; }
  .levels { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .lvl span { font-size: 10px; }
  .themes { grid-template-columns: repeat(5, 1fr); gap: 5px; }
  .theme .mini { width: 36px; height: 36px; }
  .tile { height: 56px; }
  .brand-txt small { display: none; }
}

a.brand { color: inherit; text-decoration: none; }
a.brand:hover .logo { filter: brightness(1.08); }
