:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color-scheme:dark;--bg:#0f172a;--panel:#111827;--panel2:#0b1620;--ink:#f8fafc;--muted:#94a3b8;--line:#334155;--light:#dbe4d0;--dark:#607c5d;--accent:#fbbf24}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--bg);color:var(--ink)}body{padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.app{height:100%;max-width:1180px;margin:auto;display:grid;grid-template-rows:auto 1fr;gap:8px}.topbar{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:42px}.brand{font-weight:850;font-size:1.12rem;white-space:nowrap}.top-actions{display:flex;gap:7px;align-items:center}.btn,select{border:1px solid var(--line);background:#1e293b;color:var(--ink);border-radius:10px;padding:9px 11px;font:inherit;font-weight:700}.btn{cursor:pointer}.btn:disabled{opacity:.45;cursor:not-allowed}.btn.small{padding:8px 10px;font-size:.86rem}.game-layout{min-height:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:8px}.board-area{min-height:0;display:flex;align-items:center;justify-content:center}.board-shell{width:min(100%,calc(100vh - 205px));max-width:700px;aspect-ratio:1/1;border:2px solid #475569;border-radius:10px;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,.25)}.board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr));width:100%;height:100%;min-width:0;min-height:0;background:#000}.sq{position:relative;border:0;margin:0;padding:0;min-width:0;min-height:0;width:100%;height:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;touch-action:manipulation}.sq.light{background:var(--light)}.sq.dark{background:var(--dark)}.sq:focus-visible{outline:3px solid #38bdf8;outline-offset:-3px;z-index:3}.sq.last::after{content:"";position:absolute;inset:0;background:rgba(250,204,21,.22)}.sq.selected::after{content:"";position:absolute;inset:5%;border:4px solid #38bdf8;border-radius:8px;z-index:2}.sq.legal::before{content:"";position:absolute;width:24%;height:24%;border-radius:50%;background:rgba(15,23,42,.46);z-index:2}.sq.legal-capture::before{content:"";position:absolute;inset:7%;border:5px solid rgba(190,24,93,.66);border-radius:50%;z-index:2}.sq.check::before{content:"!";position:absolute;right:5%;top:2%;z-index:4;width:24%;aspect-ratio:1;border-radius:50%;background:#b91c1c;color:#fff;font-size:clamp(10px,2.2vw,18px);font-weight:900;display:grid;place-items:center}.piece{display:block;width:82%;height:82%;max-width:82%;max-height:82%;min-width:0;min-height:0;z-index:1;filter:drop-shadow(0 2px 1px rgba(0,0,0,.25))}.piece.white{--pf:url(#piece-white-grad);--ps:#6b5530;--pc:#6b5530;--pe:#5b4526}.piece.black{--pf:url(#piece-black-grad);--ps:#d9e1ec;--pc:#cbd5e1;--pe:#eef2f7}.piece .piece-main{fill:var(--pf);stroke:var(--ps);stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round}.piece .piece-cut{fill:none;stroke:var(--pc);stroke-width:3;stroke-linecap:round}.piece .piece-eye{fill:var(--pe);stroke:none}.file-label,.rank-label{position:absolute;z-index:4;font-size:clamp(8px,1.6vw,12px);font-weight:800;color:rgba(15,23,42,.72);pointer-events:none}.dark .file-label,.dark .rank-label{color:rgba(248,250,252,.72)}.file-label{right:3px;bottom:1px}.rank-label{left:3px;top:1px}.side{min-height:0;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:10px;display:grid;grid-template-columns:1fr auto;grid-template-areas:"status controls" "setup setup" "material material" "history history";gap:8px}.statusbox{grid-area:status;min-width:0}.status{font-size:1rem;font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status.alert{color:#fecaca}.substatus,.thinking{font-size:.76rem;color:var(--muted);margin-top:2px}.thinking{color:#fde68a;font-weight:750;min-height:1em;line-height:1em;visibility:visible}.thinking[hidden]{display:block!important;visibility:hidden}.controls{grid-area:controls;display:flex;gap:6px;align-items:start}.history{grid-area:history;min-height:48px;max-height:90px;overflow:auto;background:var(--panel2);border-radius:10px;padding:7px;font-size:.78rem}.move-row{display:grid;grid-template-columns:2.2em 1fr 1fr;gap:5px;line-height:1.55}.move-row span:first-child{color:var(--muted)}.empty-history{color:var(--muted);text-align:center;padding:12px}.setup{grid-area:setup;display:flex;gap:6px;flex-wrap:wrap}.computer-settings{display:contents}.computer-settings[hidden]{display:none}.setup label{font-size:.7rem;color:var(--muted);display:flex;align-items:center;gap:4px}.setup select{padding:7px 8px;font-size:.78rem}.promo{border:0;border-radius:16px;background:var(--panel);color:var(--ink);padding:16px;box-shadow:0 20px 50px rgba(0,0,0,.5)}.promo::backdrop{background:rgba(2,6,23,.68)}.promo h2{margin:0 0 12px;font-size:1.05rem}.promo-choices{display:grid;grid-template-columns:repeat(4,64px);gap:8px}.promo button{width:64px;height:64px;border:1px solid var(--line);border-radius:10px;background:#dbe4d0;padding:4px}.promo .piece{width:100%;height:100%}
@media (orientation:landscape) and (min-width:620px){.game-layout{grid-template-columns:minmax(0,1fr) minmax(220px,330px);grid-template-rows:1fr}.board-shell{width:min(100%,calc(100vh - 68px));max-width:none}.side{grid-template-columns:1fr;grid-template-areas:"status" "controls" "setup" "material" "history";grid-template-rows:auto auto auto auto 1fr;padding:12px}.controls{flex-wrap:wrap}.history{max-height:none;min-height:0}.setup{align-content:start}.status{font-size:1.12rem}}
@media (min-width:900px) and (orientation:portrait){.game-layout{grid-template-columns:minmax(0,1fr) 290px;grid-template-rows:1fr}.board-shell{width:min(100%,calc(100vh - 70px))}.side{grid-template-columns:1fr;grid-template-areas:"status" "controls" "setup" "material" "history";grid-template-rows:auto auto auto auto 1fr}.history{max-height:none}}
@media(max-width:520px){.brand{font-size:1rem}.top-actions .btn.small:nth-child(2){display:none}.board-shell{width:min(100%,calc(100vh - 220px))}.side{padding:8px}.controls .btn{padding:8px}.setup{gap:4px}.setup select{max-width:112px}.history{max-height:70px}}

/* v1.2 board geometry hard-lock */
.board{grid-template:repeat(8,minmax(0,1fr))/repeat(8,minmax(0,1fr));grid-auto-rows:0;grid-auto-columns:0;}
.sq{align-self:stretch;justify-self:stretch;}

/* v1.5 visual refresh, compact material strip, modal help */
.material{grid-area:material;min-height:28px;display:flex;align-items:center;gap:8px;padding:3px 7px;border:1px solid rgba(51,65,85,.65);border-radius:9px;background:rgba(11,22,32,.55);overflow:hidden;font-size:.72rem}
.material-score{font-weight:850;white-space:nowrap;color:#e2e8f0;min-width:max-content}.material-score.ahead{color:#fde68a}.capture-group{display:flex;align-items:center;gap:2px;min-width:0}.capture-label{color:var(--muted);font-weight:700;margin-right:1px}.capture-item{display:inline-flex;align-items:center;gap:0;white-space:nowrap}.capture-item .piece{width:21px;height:21px;filter:drop-shadow(0 1px 1px rgba(0,0,0,.28))}.capture-count{font-size:.64rem;color:var(--muted);margin-left:-1px}.material-spacer{flex:1;min-width:2px}
.help-dialog{width:min(92vw,430px);max-height:80vh;overflow:auto;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--ink);padding:18px;box-shadow:0 20px 55px rgba(0,0,0,.55)}.help-dialog::backdrop{background:rgba(2,6,23,.72)}.help-dialog h2{margin:0 36px 10px 0;font-size:1.18rem}.help-dialog h3{margin:16px 0 6px;font-size:.95rem}.help-dialog p{margin:7px 0;color:#cbd5e1;font-size:.82rem;line-height:1.45}.help-dialog a{color:#fff}.help-dialog .version{color:var(--muted);font-size:.72rem;margin-top:16px}.dialog-close{position:absolute;right:10px;top:8px;width:34px;height:34px;border:0;border-radius:9px;background:#1e293b;color:#fff;font-size:1.35rem;cursor:pointer}
@media(max-width:520px){.topbar{min-height:38px}.brand{font-size:.98rem}.top-actions{gap:5px}.btn.small{padding:7px 9px}.board-shell{width:min(100%,calc(100vh - 216px))}.side{gap:5px}.material{min-height:24px;padding:1px 5px;gap:5px}.capture-item .piece{width:18px;height:18px}.capture-label{font-size:.64rem}.material-score{font-size:.68rem}.history{max-height:66px}.status{font-size:.98rem}}

/* v1.6: Staunton visual refresh and board-adjacent player/capture strips */
.piece .piece-shine{fill:none;stroke:var(--ph);stroke-width:3;stroke-linecap:round;opacity:.78}
.piece.white{--pf:url(#piece-white-grad);--ps:#6a512e;--pc:#715a35;--pe:#5a4224;--ph:url(#piece-white-hi)}
.piece.black{--pf:url(#piece-black-grad);--ps:#05080c;--pc:#aeb7c4;--pe:#eef2f7;--ph:url(#piece-black-hi)}
.piece{width:86%;height:86%;max-width:86%;max-height:86%;filter:drop-shadow(0 2px 1px rgba(0,0,0,.34)) drop-shadow(0 0 1px rgba(255,255,255,.18))}
.board-stack{width:min(100%,calc(100vh - 205px));max-width:700px;display:grid;grid-template-rows:28px auto 28px;gap:3px;min-width:0;min-height:0}
.board-shell{width:100%;max-width:none}
.player-strip{height:28px;min-width:0;border:1px solid rgba(71,85,105,.72);border-radius:8px;background:rgba(15,23,42,.9);display:flex;align-items:center;gap:7px;padding:2px 7px;overflow:hidden;font-size:.68rem}
.player-label{font-weight:800;white-space:nowrap;color:#e5e7eb;flex:0 0 auto}
.strip-captures{display:flex;align-items:center;gap:3px;min-width:0;overflow:hidden;flex:1}
.capture-item{display:inline-flex;align-items:center;gap:0;white-space:nowrap;flex:0 1 auto;min-width:0}
.capture-item .piece{width:20px;height:20px;min-width:16px;flex:0 1 20px}
.capture-count{font-size:.58rem;color:#cbd5e1;margin-left:-1px;line-height:1}
.capture-empty{color:#64748b}
.strip-score{font-weight:900;font-size:.78rem;min-width:1.7em;text-align:right;color:#94a3b8;white-space:nowrap}
.strip-score.ahead{color:#86efac}
.material{display:none!important}
.side{grid-template-areas:"status controls" "setup setup" "history history"}
@media (orientation:landscape) and (min-width:620px){
  .board-stack{width:min(100%,calc(100vh - 68px));max-width:none;grid-template-rows:24px auto 24px;gap:2px}
  .player-strip{height:24px;border-radius:7px;padding:1px 6px;font-size:.64rem}
  .capture-item .piece{width:18px;height:18px}
  .side{grid-template-areas:"status" "controls" "setup" "history";grid-template-rows:auto auto auto 1fr}
}
@media (min-width:900px) and (orientation:portrait){
  .board-stack{width:min(100%,calc(100vh - 70px));max-width:700px}
  .side{grid-template-areas:"status" "controls" "setup" "history";grid-template-rows:auto auto auto 1fr}
}
@media(max-width:520px){
  .board-stack{width:min(100%,calc(100vh - 220px));grid-template-rows:24px auto 24px;gap:2px}
  .player-strip{height:24px;padding:1px 5px;gap:4px;font-size:.61rem}
  .player-label{max-width:30%;overflow:hidden;text-overflow:ellipsis}
  .strip-captures{gap:1px}
  .capture-item .piece{width:17px;height:17px;min-width:13px;flex-basis:17px}
  .capture-count{font-size:.53rem}
  .strip-score{font-size:.69rem;min-width:1.55em}
}
@media(max-width:370px){
  .player-label{max-width:24%;font-size:.56rem}.capture-item .piece{width:15px;height:15px;min-width:12px}.player-strip{gap:2px;padding-inline:4px}
}

/* v1.7: Android-safe inline SVG colors and stronger captured-piece contrast */
.piece.white .piece-main{fill:url(#piece-white-grad);stroke:#6a512e;stroke-width:2.6;stroke-linejoin:round;stroke-linecap:round}
.piece.white .piece-cut{fill:none;stroke:#715a35;stroke-width:3;stroke-linecap:round}
.piece.white .piece-eye{fill:#5a4224;stroke:none}
.piece.white .piece-shine{fill:none;stroke:rgba(255,255,255,.82);stroke-width:3;stroke-linecap:round;opacity:.9}
.piece.black .piece-main{fill:url(#piece-black-grad);stroke:#d8e1ec;stroke-width:2.7;stroke-linejoin:round;stroke-linecap:round}
.piece.black .piece-cut{fill:none;stroke:#d8e1ec;stroke-width:3;stroke-linecap:round}
.piece.black .piece-eye{fill:#f8fafc;stroke:none}
.piece.black .piece-shine{fill:none;stroke:rgba(255,255,255,.62);stroke-width:3;stroke-linecap:round;opacity:.92}
.capture-item{border-radius:5px;padding:0 2px}
.capture-item.black-captured{background:rgba(226,232,240,.12);box-shadow:inset 0 0 0 1px rgba(226,232,240,.16)}
.capture-item.black-captured .piece{filter:drop-shadow(0 0 1px #f8fafc) drop-shadow(0 1px 1px rgba(0,0,0,.55))}
.capture-item.white-captured{background:rgba(15,23,42,.2)}
.player-strip{background:#172033;border-color:#526177}

/* v1.8: mobile viewport-fit corrections */
html,body{width:100%;max-width:100%;height:100%;height:100dvh;overflow:hidden}
body{min-width:0;min-height:0}
.app{width:100%;height:100%;min-width:0;min-height:0}
.game-layout,.board-area,.board-stack,.side{min-width:0}
.board-area{overflow:hidden}

/* Leave a tiny inline safety margin on narrow portrait browsers so borders,
   rounding and dynamic viewport calculations can never clip horizontally. */
@media (orientation:portrait) and (max-width:899px){
  .board-stack{width:min(calc(100% - 4px),calc(100dvh - 220px));max-width:700px}
}

/* The board stack includes two 24px capture strips plus their gaps.  Earlier
   landscape sizing budgeted only for the square board, making the complete
   stack about 50px taller than the usable viewport. */
@media (orientation:landscape) and (min-width:620px){
  .board-stack{width:min(100%,calc(100dvh - 118px));max-width:none}
}


/* v1.9: landscape uses the viewport as a two-column game canvas.
   The brand is hidden in phone landscape and the navigation stays above the
   side panel, freeing vertical space so the board stack can grow. */
@media (orientation:landscape) and (min-width:620px) and (max-height:600px){
  .app{
    max-width:none;
    grid-template-rows:1fr;
    gap:0;
  }
  .topbar{
    position:absolute;
    top:max(4px,env(safe-area-inset-top));
    right:max(8px,env(safe-area-inset-right));
    z-index:20;
    min-height:36px;
  }
  .brand{display:none}
  .top-actions{gap:5px}
  .btn.small{padding:6px 9px;font-size:.78rem}
  .game-layout{
    height:100%;
    grid-template-columns:minmax(0,1fr) minmax(280px,38vw);
    grid-template-rows:1fr;
    gap:10px;
  }
  .board-area{
    height:100%;
    align-items:center;
    justify-content:center;
  }
  .board-stack{
    width:min(calc(100vw - min(38vw,390px) - 34px),calc(100dvh - 12px));
    grid-template-rows:22px auto 22px;
    gap:2px;
  }
  .player-strip{
    height:22px;
    padding:0 5px;
    font-size:.59rem;
  }
  .capture-item .piece{width:16px;height:16px;min-width:13px}
  .strip-score{font-size:.65rem}
  .side{
    padding:46px 10px 8px;
    border-radius:12px;
    gap:6px;
  }
}

/* v2.0: warm board, flatter traditional pieces, restored landscape captures */
:root{--light:#ead2ad;--dark:#a77b50}
.board-shell{border-color:#5f4937}
.sq.last::after{background:rgba(214,170,45,.28)}
.piece{filter:drop-shadow(0 1px 1px rgba(0,0,0,.28))}
.piece.white .piece-main{fill:#f7f3e8;stroke:#59483b;stroke-width:2.7}
.piece.white .piece-cut{stroke:#766150;stroke-width:2.7}
.piece.white .piece-eye{fill:#4b3d33}
.piece.white .piece-shine{stroke:rgba(255,255,255,.55);stroke-width:2;opacity:.55}
.piece.black .piece-main{fill:#25282c;stroke:#e3e7eb;stroke-width:2.25}
.piece.black .piece-cut{stroke:#cbd1d8;stroke-width:2.5}
.piece.black .piece-eye{fill:#f8fafc}
.piece.black .piece-shine{stroke:rgba(255,255,255,.28);stroke-width:2;opacity:.55}
@media (orientation:landscape) and (min-width:620px) and (max-height:600px){
 .board-area{overflow:visible}
 .board-stack{display:grid;grid-template-rows:22px minmax(0,1fr) 22px;height:min(calc(100dvh - 8px),calc(100vw - min(38vw,390px) - 34px));width:min(calc(100dvh - 8px),calc(100vw - min(38vw,390px) - 34px));gap:2px}
 .board-shell{width:auto;height:100%;max-width:100%;aspect-ratio:1/1;justify-self:center}
 .player-strip{display:flex!important}
}

/* v2.3: cleaner traditional Staunton rendering */
.piece{width:88%;height:88%;max-width:88%;max-height:88%;filter:drop-shadow(0 1px 1px rgba(0,0,0,.3))}
.piece.white .piece-main{fill:#f6f1e5;stroke:#4d4036;stroke-width:2.4}
.piece.white .piece-cut{stroke:#6a584a;stroke-width:2.5}
.piece.black .piece-main{fill:#202327;stroke:#d9dee5;stroke-width:2.1}
.piece.black .piece-cut{stroke:#bfc6cf;stroke-width:2.35}
.piece.black .piece-eye{fill:#f8fafc}
.piece.white .piece-eye{fill:#3f352e}
.piece-shine{display:none}

/* v2.9: approved chessboardjs PNG pieces on the stable v2.3 layout */
.sq>.piece{display:block;width:82%;height:82%;max-width:82%;max-height:82%;min-width:0;min-height:0;object-fit:contain;object-position:center center;flex:0 0 auto;margin:0;filter:none}
.capture-item .piece{object-fit:contain;object-position:center center;flex:0 0 auto}
.promo .piece{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center center;filter:none}

/* v3.0: responsive board fit from the actual board-area rectangle.
   Keeps the approved normalized PNG pieces and avoids viewport subtraction guesses. */
.board-stack{
  width:var(--board-size,560px)!important;
  height:auto!important;
  max-width:100%!important;
  grid-template-rows:auto var(--board-size,560px) auto!important;
  justify-self:center;
}
.board-shell{
  width:var(--board-size,560px)!important;
  height:var(--board-size,560px)!important;
  max-width:100%!important;
  aspect-ratio:1/1!important;
}
.statusbox{display:grid;grid-template-rows:auto auto 1em;align-content:start}
.thinking{height:1em;min-height:1em;line-height:1em;white-space:nowrap;overflow:hidden;margin-top:2px}
.thinking[hidden]{display:block!important;visibility:hidden}
.player-strip{line-height:1;contain:layout paint}
@media (orientation:portrait){.board-area{align-items:flex-start}}
@media (orientation:landscape){.board-area{align-items:center}}


/* v3.1: keep stacked desktop controls from growing upward into the board.
   In medium-width desktop windows, controls/status stay on the left while
   move history gets a dedicated right column with internal scrolling. */
@media (min-width:680px) and (max-width:899px) and (orientation:portrait){
  .side{
    grid-template-columns:minmax(260px,.95fr) minmax(300px,1.35fr);
    grid-template-areas:
      "status history"
      "controls history"
      "setup history";
    grid-template-rows:auto auto auto;
    align-items:start;
    gap:6px 12px;
    padding:10px 12px;
  }
  .statusbox{min-width:0}
  .controls{justify-content:flex-start;align-items:center;flex-wrap:nowrap}
  .setup{align-items:center;align-content:start;flex-wrap:nowrap;min-width:0}
  .setup label{min-width:0}
  .setup select{max-width:125px}
  .history{
    align-self:stretch;
    min-height:0;
    height:100%;
    max-height:none;
    overflow:auto;
    padding:7px 9px;
  }
}

/* v3.2: rebalance medium-width desktop/window controls.
   Keep history narrow and on the far right; allow setup controls to wrap
   inside the left column instead of flowing underneath history. */
@media (min-width:620px) and (max-width:1050px) and (orientation:portrait){
  .side{
    grid-template-columns:minmax(0,1fr) 250px;
    grid-template-areas:
      "status history"
      "controls history"
      "setup history";
    grid-template-rows:auto auto auto;
    column-gap:22px;
    row-gap:6px;
    align-items:start;
    padding:10px 12px;
  }
  .statusbox,.controls,.setup{min-width:0;max-width:100%}
  .controls{justify-content:flex-start;flex-wrap:wrap}
  .setup{
    flex-wrap:wrap;
    align-items:center;
    align-content:start;
    gap:5px 7px;
    overflow:hidden;
  }
  .setup label{min-width:0;flex:0 1 auto}
  .setup select{max-width:118px}
  .history{
    width:250px;
    height:auto;
    min-height:72px;
    max-height:124px;
    align-self:start;
    justify-self:end;
    overflow:auto;
    background:transparent;
    border-radius:0;
    border-left:1px solid rgba(71,85,105,.55);
    padding:4px 4px 4px 14px;
    font-size:.75rem;
  }
  .move-row{grid-template-columns:2em 1fr 1fr;gap:4px}
}


/* v3.3: medium-width desktop polish. Keep status and primary actions on one
   row while preserving the narrow right-side history column. */
.status-actions{display:contents}
@media (min-width:620px) and (max-width:1050px) and (orientation:portrait){
  .side{
    grid-template-areas:
      "statusactions history"
      "setup history";
    grid-template-rows:auto auto;
  }
  .status-actions{
    grid-area:statusactions;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    min-width:0;
  }
  .status-actions .statusbox{flex:1 1 auto;min-width:0}
  .status-actions .controls{
    flex:0 0 auto;
    display:flex;
    flex-wrap:nowrap;
    align-items:flex-start;
    justify-content:flex-end;
  }
}

/* v3.5: allow move history to be selected/copied without changing the
   board, buttons, or other touch interactions. */
.history,
.history *{
  -webkit-user-select:text;
  user-select:text;
  -webkit-touch-callout:default;
}
.history{cursor:text}
\n\n/* v3.8: optional clocks and resign control. Clocks live at the far right of\n   the existing captured-piece strips so they do not consume board space. */\n.player-clock{\n  margin-left:auto;\n  flex:0 0 auto;\n  min-width:4.35em;\n  text-align:right;\n  font-variant-numeric:tabular-nums;\n  font-weight:850;\n  font-size:.86rem;\n  letter-spacing:.01em;\n  color:#e2e8f0;\n}\n.player-clock.active{color:#fde68a}\n.player-clock.low{color:#fecaca}\n.player-clock[hidden]{display:none}\n#resignBtn{border-color:rgba(248,113,113,.45)}\n#resignBtn:disabled{border-color:var(--line)}\n@media(max-width:520px){\n  .player-clock{font-size:.76rem;min-width:3.9em}\n}\n
.engine-debug{margin-top:14px;padding-top:12px;border-top:1px solid #334155}
.engine-debug h3{margin:0 0 6px}
.engine-debug-actions{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.engine-log{width:100%;min-height:150px;max-height:280px;resize:vertical;border:1px solid #475569;border-radius:10px;background:#020617;color:#e2e8f0;padding:9px;font:12px/1.35 ui-monospace,SFMono-Regular,Consolas,monospace;user-select:text;-webkit-user-select:text}
.engine-log-status{min-height:1.2em;color:#94a3b8;font-size:.82rem;margin:.4rem 0 0}
