/* EloScanner Game Review: compact, two-player report inspired by the supplied reference. */
.tool-page .review-side-stats{
 background:#10283e!important;
 border:1px solid #315570!important;
 border-radius:12px!important;
 padding:16px!important;
 color:#edf7fd!important;
 min-width:0!important;
 overflow:hidden!important;
}
.review-side-stats>h3{
 font-size:17px!important;
 font-weight:800!important;
 margin:0 0 15px!important;
 color:#e3f4ff!important;
}
.review-graph{
 position:relative;
 width:100%;
 height:82px;
 margin-bottom:16px;
 overflow:hidden;
 background:#343a40;
 border-radius:5px;
}
.review-graph svg{display:block;width:100%;height:100%}
.review-players{
 display:grid;
 grid-template-columns:minmax(80px,1fr) minmax(0,1fr) minmax(0,1fr);
 column-gap:8px;
 align-items:end;
 margin-bottom:12px;
 font-size:12px;
 font-weight:700;
}
.review-player{display:flex;flex-direction:column;align-items:center;gap:6px;min-width:0}
.review-player-avatar{
 width:43px;height:43px;
 border:2px solid #7ebf69;border-radius:8px;
 background:#f4f8fb;color:#18354d;
 display:flex;align-items:center;justify-content:center;
 font-size:21px;font-weight:800;
}
.review-player-avatar.black{background:#34485a;color:#fff;border-color:#657b90}
.review-player-name{text-align:center;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.review-metric{
 display:grid;grid-template-columns:minmax(80px,1fr) minmax(0,1fr) minmax(0,1fr);
 align-items:center;gap:8px;
 margin:0 0 12px;
 font-size:13px;
}
.review-metric>strong{
 display:block;
 min-width:0;text-align:center;
 padding:9px 3px;
 border-radius:6px;
 background:#23435a;
 font-size:18px;
 font-variant-numeric:tabular-nums;
 color:#fff;
}
.review-accuracy{padding-bottom:14px;border-bottom:1px solid #315570;margin-bottom:15px}
.review-accuracy>strong:first-of-type{background:#f4f8fb;color:#17364d}
.review-breakdown-head{
 font-size:12px;text-transform:uppercase;letter-spacing:.07em;
 color:#8cb5ca;font-weight:750;margin:0 0 10px;
}
.review-classification{
 display:grid;
 grid-template-columns:minmax(72px,1fr) 25px 30px 25px;
 align-items:center;
 column-gap:7px;
 min-height:31px;
 font-size:13px;
}
.review-classification>strong{font-size:15px;font-weight:800;text-align:center;font-variant-numeric:tabular-nums}
.review-classification:nth-of-type(4n) strong{color:#c4e9fc}
.review-class-icon{
 display:flex;align-items:center;justify-content:center;
 width:25px;height:25px;border-radius:50%;
 font-size:11px;font-weight:850;
 color:#fff;background:#5b8baf;
}
.review-class-brilliant{background:#12bfa9}
.review-class-great{background:#82abd2}
.review-class-book{background:#c69b79}
.review-class-best{background:#81c665}
.review-class-excellent{background:#8ac768}
.review-class-good{background:#8eb97b}
.review-class-inaccuracy{background:#e3bb33}
.review-class-mistake{background:#f19a52}
.review-class-miss{background:#ee6d6d}
.review-class-blunder{background:#dd5757}
.review-scoring-note,.review-rating-note{
 margin:14px 0 16px;
 color:#9cb5c4;font-size:11px;line-height:1.45;
}
.review-rating{border-top:1px solid #315570;padding-top:15px;margin-top:5px}
.review-rating>strong{font-size:15px}
.review-placeholder{font-size:13px;color:#9bb9cc;line-height:1.65;margin:0}
.game-review{
 background:#10283e;
 border:1px solid #315570;border-radius:14px;
 padding:22px 24px;margin:18px 0 22px;
}
.game-review h2{margin:0 0 16px;font-size:23px}
.game-review .review-import-heading{font-size:15px;color:#d3e8f7;margin:4px 0 12px}
.game-review #review-import-slot{display:flex;flex-direction:column;gap:10px;max-width:780px}
.game-review #review-import-slot .tab-row{display:flex;gap:8px;flex-wrap:wrap}
.game-review #import-value{
 width:100%;box-sizing:border-box;
 min-height:94px;max-width:100%;resize:vertical;
 border-radius:9px;background:#092138;color:#f0faff;
 border:1px solid #426580;padding:12px 14px;
 font-size:14px;line-height:1.55;font-family:inherit;
}
.game-review .review-actions{display:flex;gap:10px;align-items:center;margin-top:14px}
.game-review #review-start{background:#17ab91;color:white;border:0;border-radius:8px;font-weight:800;padding:12px 22px;cursor:pointer}
.game-review #review-start:hover{background:#129d83}
.game-review #review-start:disabled{cursor:wait;opacity:.55}
.game-review #review-cancel{padding:12px 18px}
.game-review [hidden]{display:none!important}
.game-review #review-status,.game-review #import-status{font-size:13px;color:#b1cadd;min-height:0}
@media(min-width:1250px){
 .tool-page .tool-card:first-of-type{
  grid-template-columns:minmax(235px,.7fr) minmax(440px,1.55fr) minmax(330px,1.1fr)!important;
 }
}
@media(max-width:1249px){
 .review-side-stats{max-width:680px}
}

/* Review annotation follows the selected move, rather than annotating
   every square of a game. Ordinary Good/Excellent moves stay unmarked. */
.tool-page #board button { position:relative; isolation:isolate; overflow:visible; }
.tool-page #board button.review-move-highlight::after {
 content:"";
 position:absolute;
 inset:0;
 z-index:1;
 background:var(--review-square-color, #ed5555);
 opacity:.46;
 pointer-events:none;
}
.tool-page #board button.review-move-highlight .chess-piece{
 position:relative;
 z-index:2!important;
}
.tool-page #board button .review-move-badge{
 position:absolute;
 right:-5px;
 top:-8px;
 z-index:9;
 display:flex;
 align-items:center;
 justify-content:center;
 width:29%;
 aspect-ratio:1;
 min-width:18px;
 max-width:30px;
 border-radius:50%;
 color:white;
 font-size:clamp(10px,1.35vw,16px);
 font-weight:850;
 line-height:1;
 border:1px solid rgba(255,255,255,.5);
 box-shadow:0 1px 5px rgba(0,0,0,.4);
 pointer-events:none;
}
.tool-page #board button .legal-move-dot,
.tool-page #board button .legal-capture-ring{
 z-index:5;
}
.tool-page #notation-moves .notation-move{
 display:flex;
 align-items:center;
 justify-content:flex-start;
 gap:5px;
 min-width:0;
 white-space:nowrap;
 overflow:hidden;
 text-overflow:ellipsis;
 padding:7px 5px;
}
.tool-page #notation-moves .notation-review-glyph{
 display:inline-flex;
 align-items:center;
 justify-content:center;
 flex:0 0 17px;
 width:17px;
 height:17px;
 border-radius:50%;
 color:#fff;
 font-size:10px;
 font-weight:850;
 line-height:1;
}
.tool-page #notation-moves .notation-move[class*="notation-highlight-"]{
 font-weight:700;
}
.tool-page #notation-moves .notation-move.notation-highlight-blunder,
.tool-page #notation-moves .notation-move.notation-highlight-miss{
 color:#ffb4b3!important;
}
.tool-page #notation-moves .notation-move.notation-highlight-brilliant{
 color:#7cf0e0!important;
}
.tool-page #notation-moves .notation-move.notation-highlight-best{
 color:#b5e2a2!important;
}
/* More room for engine variations; keep the board at its existing size. */
@media(min-width:1250px){
 .tool-page{width:min(2000px,calc(100% - 20px))!important}
 .tool-page .tool-card:first-of-type{
  grid-template-columns:minmax(220px,300px) minmax(0,calc(var(--elo-board-size) + 42px)) minmax(330px,1fr)!important;
  column-gap:20px!important;
 }
 .tool-page .tool-card:first-of-type>.live-notation{
  min-width:0!important;
  width:100%!important;
 }
 .tool-page .tool-card:first-of-type .live-notation .engine-lines-panel{
  min-width:0!important;
  width:100%!important;
 }
}

/* Game Review: clickable classification counts navigate to matching moves. */
.review-classification .review-class-count{
 appearance:none;
 display:inline-flex;
 align-items:center;
 justify-content:center;
 min-width:25px;
 min-height:27px;
 padding:2px 0;
 margin:0;
 border:1px solid transparent;
 border-radius:5px;
 background:transparent;
 color:#e5f4ff;
 font-family:inherit;
 line-height:1;
 font-size:15px;
 font-weight:800;
 font-variant-numeric:tabular-nums;
 cursor:pointer;
}
.review-classification .review-class-count:not(:disabled):hover{
 background:#214a67;
 border-color:#5ba6cc;
 color:#fff;
}
.review-classification .review-class-count:not(:disabled):focus-visible{
 outline:2px solid #76d9ff;
 outline-offset:1px;
}
.review-classification .review-class-count:disabled{
 opacity:.58;
 cursor:default;
}

/* EloScanner original SVG icon set, designed for 25px review rows. */
.review-classification .review-class-icon,
.review-key-moments .review-class-icon{
 background:transparent!important;
 overflow:visible;
}
.review-icon-svg{display:block;width:100%;height:100%;flex:0 0 auto}
.review-class-icon .review-icon-svg{width:25px;height:25px}
.review-move-badge .review-icon-svg{width:100%;height:100%}
.review-move-badge:has(.review-icon-svg){
 background:transparent!important;
 border:0!important;
 box-shadow:0 1px 5px rgba(0,0,0,.2)!important;
}
.notation-review-glyph:has(.review-icon-svg){
 background:transparent!important;
}
.notation-review-glyph .review-icon-svg{width:17px;height:17px}
.review-key-moments{
 display:grid;
 grid-template-columns:minmax(72px,1fr) 30px 32px;
 gap:7px;
 align-items:center;
 min-height:46px;
 margin-top:10px;
 padding:12px 0 6px;
 border-top:1px solid #315570;
 color:#e9f5ff;
 font-size:13px;
 font-weight:700;
}
.review-key-moments .review-class-icon{justify-self:center}
.review-key-count{
 display:inline-flex;
 align-items:center;
 justify-content:center;
 min-width:29px;
 min-height:28px;
 padding:2px;
 border:1px solid transparent;
 border-radius:5px;
 background:#214a67;
 color:#fff;
 font:800 15px/1 Arial,sans-serif;
 font-variant-numeric:tabular-nums;
 cursor:pointer;
}
.review-key-count:hover:not(:disabled){background:#356c8c;border-color:#69b3d3}
.review-key-count:focus-visible{outline:2px solid #8fe2ff;outline-offset:2px}
.review-key-count:disabled{opacity:.5;cursor:default}

/* Slightly larger classification labels, without changing icon/count spacing. */
.review-side-stats .review-classification{font-size:15.5px}
.review-side-stats .review-key-moments{font-size:15.5px}

/* Game Review GIF export - appears only after analysis succeeds. */
.game-review .review-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:15px 0}
.game-review #review-gif{background:#086b90;border:1px solid #21d4ee;color:#fff;font-weight:800;letter-spacing:.2px;padding:11px 17px;border-radius:9px;cursor:pointer}
.game-review #review-gif:hover:not(:disabled){background:#0a89ac}
.game-review #review-gif:disabled{opacity:.6;cursor:progress}
.game-review #review-gif-download{color:#79edff;font-size:14px;text-decoration:underline;text-underline-offset:3px;font-weight:650}
.game-review #review-gif-status{color:#a9d3e4;font-size:13px;line-height:1.5;min-height:0}
.game-review #review-gif-status:not(:empty){margin:6px 0 10px}
.game-review [hidden]{display:none!important}
