/* Recorded game and saved alternatives remain available at the same position. */
body.analysis-table #history-line-menu{position:static;display:flex;align-items:center;gap:calc(8px * var(--ui-scale, 1));flex:none;padding:calc(5px * var(--ui-scale, 1)) calc(10px * var(--ui-scale, 1));background:#ffffff03;border:0;border-bottom:1px solid var(--line);box-shadow:none}
body.analysis-table #history-line-menu[hidden]{display:none}
body.analysis-table #history-line-menu .line-picker{display:flex;flex:1;margin:0;padding:0;min-width:0}
body.analysis-table #history-line-menu select{min-height:calc(32px * var(--ui-scale, 1));height:calc(32px * var(--ui-scale, 1));padding:calc(3px * var(--ui-scale, 1)) calc(8px * var(--ui-scale, 1));font-size:max(11px, calc(13px * var(--ui-scale, 1)));border:1px solid var(--line);background:var(--ui-control,var(--soft));color:var(--text);border-radius:calc(4px * var(--ui-scale, 1))}
body.analysis-table #history-main-line{flex:none;min-height:calc(32px * var(--ui-scale, 1));height:auto;padding:calc(4px * var(--ui-scale, 1)) calc(8px * var(--ui-scale, 1));font-size:max(11px, calc(13px * var(--ui-scale, 1)));background:var(--ui-accent-soft);border:1px solid var(--ui-accent-border);color:var(--ui-accent);border-radius:calc(4px * var(--ui-scale, 1));white-space:nowrap}
/* One compact row: dice luck stays separate; move quality colors the notation. */
body.comfort-ui.analysis-table #timeline.assessed-history .history-moments{grid-template-columns:calc(62px * var(--ui-scale, 1)) minmax(0,1fr);grid-template-rows:auto;min-height:calc(30px * var(--ui-scale, 1));align-items:stretch;padding:0}
body.comfort-ui.analysis-table #timeline.assessed-history .history-moments>button{height:auto;min-height:calc(30px * var(--ui-scale, 1));padding:calc(4px * var(--ui-scale, 1)) calc(5px * var(--ui-scale, 1));line-height:max(14px, calc(20px * var(--ui-scale, 1)));align-self:stretch}
body.comfort-ui.analysis-table #timeline.assessed-history .history-moments>[data-stage=after]{overflow:visible;white-space:normal;overflow-wrap:anywhere}
body.comfort-ui.analysis-table #timeline.assessed-history .history-notation{white-space:normal;line-height:inherit;font-size:inherit}
body.comfort-ui.analysis-table #timeline.assessed-history .history-notation[data-quality=good]{color:var(--text)}
body.comfort-ui.analysis-table #timeline.assessed-history .history-notation[data-quality=inaccuracy]{color:#dfc574}
body.comfort-ui.analysis-table #timeline.assessed-history .history-notation[data-quality=mistake]{color:#e9a46c}
body.comfort-ui.analysis-table #timeline.assessed-history .history-notation[data-quality=blunder]{color:#ef8387}
body.comfort-ui.analysis-table #timeline.assessed-history .history-notation:is([data-quality=pending],[data-quality=unavailable]){color:var(--muted)}
body.comfort-ui.analysis-table #timeline.assessed-history .history-moments>[data-stage=roll]{grid-row:1;align-self:stretch;padding:calc(3px * var(--ui-scale, 1))}
body.comfort-ui.analysis-table #timeline.assessed-history .history-moments:not([data-event=""]){grid-template-rows:auto;min-height:calc(30px * var(--ui-scale, 1))}
body.comfort-ui.analysis-table #timeline .history-cube-decision{grid-row:auto;grid-column:1/-1}
/* Selection is amber; the actually played move has a persistent, labelled edge. */
body.comfort-ui.analysis-table #candidate-list .candidate.played{height:auto;min-height:max(calc(38px * var(--ui-scale, 1)),var(--candidate-row-height));border-right:calc(3px * var(--ui-scale, 1)) solid #c5c0b4;background-image:linear-gradient(90deg,transparent,#ffffff06)}
body.analysis-table #candidate-list{position:relative}
body.comfort-ui.analysis-table #candidate-list .candidate.played .candidate-heading{position:relative;padding-bottom:calc(14px * var(--ui-scale, 1))}
body.comfort-ui.analysis-table #candidate-list .candidate.played .candidate-select{height:auto;min-height:calc(var(--candidate-row-height) - 1px)}
.candidate-played{position:absolute;bottom:0;left:calc(22px * var(--ui-scale, 1));font-size:max(10px, calc(10px * var(--ui-scale, 1)));line-height:calc(13px * var(--ui-scale, 1));font-weight:500;letter-spacing:.02em;color:#c5c0b4}
#analysis-history-split{display:block;flex:0 0 calc(12px * var(--ui-scale, 1));height:calc(12px * var(--ui-scale, 1));min-height:calc(12px * var(--ui-scale, 1));cursor:row-resize;touch-action:none;user-select:none;position:relative;background:#ffffff03;border-top:1px solid var(--line);border-bottom:1px solid var(--line);z-index:3}
#analysis-history-split::after{content:'';position:absolute;left:calc(50% - calc(20px * var(--ui-scale, 1)));top:calc(4px * var(--ui-scale, 1));width:calc(40px * var(--ui-scale, 1));height:calc(2px * var(--ui-scale, 1));border-radius:calc(2px * var(--ui-scale, 1));background:#858177}
#analysis-history-split:hover::after,#analysis-history-split.dragging::after,#analysis-history-split:focus-visible::after{background:var(--ui-accent);height:calc(3px * var(--ui-scale, 1))}
#analysis-history-split:focus-visible{outline:calc(2px * var(--ui-scale, 1)) solid var(--ui-accent);outline-offset:calc(-2px * var(--ui-scale, 1))}
#analysis-history-split[hidden]{display:none}
@media(min-width:801px){
 body.comfort-ui.analysis-table:not(.analysis-mobile) .study-panel>#pane-analysis,body.comfort-ui.analysis-table:not(.analysis-mobile) .study-panel>#pane-history{flex-grow:0;flex-shrink:0;min-height:0;max-height:none}
}
body.comfort-ui.analysis-table.analysis-mobile-wide .study-panel{overflow-y:auto;overflow-x:hidden}
body.comfort-ui.analysis-table.analysis-mobile-wide .study-panel>#pane-analysis,body.comfort-ui.analysis-table.analysis-mobile-wide .study-panel>#pane-history{flex:0 0 auto;min-height:0;max-height:none;overflow:hidden}
body.comfort-ui.analysis-table.analysis-mobile-wide #pane-analysis>.engine-panel{height:100%;min-height:0;overflow:auto}
body.comfort-ui.analysis-table.analysis-mobile-wide #candidates{flex:1;min-height:calc(60px * var(--ui-scale, 1));display:flex;flex-direction:column}
body.comfort-ui.analysis-table.analysis-mobile-wide #candidate-list{flex:1;min-height:calc(60px * var(--ui-scale, 1));max-height:none;overflow:auto}
body.comfort-ui.analysis-table.analysis-mobile-wide #history-line-menu{gap:calc(4px * var(--ui-scale, 1));padding:calc(3px * var(--ui-scale, 1)) calc(5px * var(--ui-scale, 1))}
body.comfort-ui.analysis-table.analysis-mobile-wide #history-line-menu :is(button,select){font-size:max(11px, calc(11px * var(--ui-scale, 1)));padding:calc(3px * var(--ui-scale, 1));min-height:calc(30px * var(--ui-scale, 1));height:calc(30px * var(--ui-scale, 1))}
body.comfort-ui.analysis-table.analysis-mobile-wide #timeline.assessed-history .history-moments{grid-template-columns:calc(50px * var(--ui-scale, 1)) minmax(0,1fr);min-height:calc(32px * var(--ui-scale, 1))}
body.comfort-ui.analysis-table.analysis-mobile-wide #timeline.assessed-history .history-moments>button{min-height:calc(32px * var(--ui-scale, 1))}
body.comfort-ui.analysis-table.analysis-mobile-wide #timeline.assessed-history .history-moments>[data-stage=after]{font-size:max(11px, calc(12px * var(--ui-scale, 1)));line-height:max(14px, calc(17px * var(--ui-scale, 1)))}
body.analysis-table .candidate-columns{display:flex;align-items:center;justify-content:space-between;gap:calc(6px * var(--ui-scale, 1))}
body.analysis-table .candidate-columns .candidate-find-played{border:0;background:none;box-shadow:none;color:#c5c0b4;padding:0;min-height:calc(22px * var(--ui-scale, 1));font-size:max(11px, calc(11px * var(--ui-scale, 1)));line-height:max(14px, calc(20px * var(--ui-scale, 1)));font-weight:400;white-space:nowrap}
