@charset "UTF-8";
/* Common imports for all CSS modules */
/*
 * This source is generated by bin/gen/licon.py. Run licon.py after changing public/font/lichess.sfd
 *
 * Constant names and values are pulled from private use characters defined in the sfd file.
 *
 * Character names can be edited in fontforge's "glyph info" dialog, or by editing the StartChar: line that
 * begins each character chunk in lichess.sfd
 *
 * To make these characters visible in your editor, install the lichess.ttf font (which is also generated by
 * licon.py) and then add it to your editor's font list.
 */
/* Uniboard: keep the same page layout across pages */
.analyse__fork glyph, .engine-error h2, .tview2 glyph, .piece-letter #analyse-cm .title, #analyse-cm .piece-letter .title, .piece-letter .analyse__fork move, .analyse__fork .piece-letter move, .piece-letter .practice-box .comment move san, .practice-box .comment move .piece-letter san, .piece-letter .explorer-box .tablebase td:first-child, .explorer-box .tablebase .piece-letter td:first-child, .piece-letter .explorer-box .moves td:first-child, .explorer-box .moves .piece-letter td:first-child, .piece-letter .pv_box .pv span, .pv_box .pv .piece-letter span, .piece-letter .tview2 move, .tview2 .piece-letter move {
  font-family: "Noto Sans", sans-serif;
}

.analyse__underboard__menu > button, .analysis-settings-view fieldset legend, .material score, .analyse__fork eval, .explorer-box .moves th, .mchat__messages a:not(.user-link), .mchat__tab, .game__tournament .clock, .ceval .engine .cloud,
.ceval .engine .infinite, .tview2 comment .by, .tview2 eval, #analyse-cm .title draw, .analyse__fork move draw, .practice-box .comment move san draw, .explorer-box .tablebase td:first-child draw, .explorer-box .moves td:first-child draw, .pv_box .pv span draw, .tview2 move draw {
  font-family: Roboto, sans-serif;
  font-weight: 300;
}

#analyse-cm .title, .analyse__fork move, .practice-box .comment move san, .explorer-box .tablebase td:first-child, .explorer-box .moves td:first-child, .pv_box .pv span, .tview2 move {
  font-family: "Noto Chess", "Noto Sans";
}

#analyse-cm .title draw, .analyse__fork move draw, .practice-box .comment move san draw, .explorer-box .tablebase td:first-child draw, .explorer-box .moves td:first-child draw, .pv_box .pv span draw, .tview2 move draw {
  margin-inline-start: 1ch;
  font-weight: normal;
}

/* text printed directly on the page background deserves special treatment (transp theme) */
.analyse__underboard__menu > button, .analyse__controls .fbt:not(.active, :hover), .chat__members {
  color: var(--c-font-page);
}

.analyse__underboard__menu > button, .analyse__controls .fbt:not(.active, :hover), .chat__members {
  text-shadow: 0 1px 0 var(--c-font-shadow);
}

.analyse__clock, #analyse-cm .title, .analyse__tools .comp-off__hint, .ceval, .cmn-toggle input:disabled + label::before, .cmn-toggle input:disabled + label::after, .crosstable__users, .crosstable__score {
  box-shadow: inset 0 1px 3px -2px hsl(0, 0%, 45%), inset 0 -4px 8px -3px hsl(from var(--c-body-gradient) h s calc(l + 3)/0.8);
}
:where(html.light) .analyse__clock, :where(html.light) #analyse-cm .title, #analyse-cm :where(html.light) .title, :where(html.light) .analyse__tools .comp-off__hint, .analyse__tools :where(html.light) .comp-off__hint, :where(html.light) .ceval, :where(html.light) .cmn-toggle input:disabled + label::before, .cmn-toggle :where(html.light) input:disabled + label::before, :where(html.light) .cmn-toggle input:disabled + label::after, .cmn-toggle :where(html.light) input:disabled + label::after, :where(html.light) .crosstable__users, :where(html.light) .crosstable__score {
  box-shadow: inset 0 3px 3px -2px rgba(255, 255, 255, 0.4), inset 0 -4px 8px -3px hsl(from var(--c-body-gradient) h s calc(l + 5)/0.8);
}
.analyse__clock, #analyse-cm .title, .analyse__tools .comp-off__hint, .ceval, .cmn-toggle input:disabled + label::before, .cmn-toggle input:disabled + label::after, .crosstable__users, .crosstable__score {
  background-image: linear-gradient(to bottom, var(--c-metal-top), var(--c-metal-bottom));
}

.explorer__config .choices button, .cmn-toggle label::after, .crosstable povs:hover {
  box-shadow: inset 0 1px 3px -2px hsl(0, 0%, 45%), inset 0 -4px 8px -3px hsl(from var(--c-body-gradient) h s calc(l + 3)/0.8), 0 1px 3px 0 hsla(0, 0%, 0%, 0.2);
}
:where(html.light) .explorer__config .choices button, .explorer__config .choices :where(html.light) button, :where(html.light) .cmn-toggle label::after, .cmn-toggle :where(html.light) label::after, :where(html.light) .crosstable povs:hover, .crosstable :where(html.light) povs:hover {
  box-shadow: inset 0 3px 3px -2px rgba(255, 255, 255, 0.4), inset 0 -4px 8px -3px hsl(from var(--c-body-gradient) h s calc(l + 5)/0.8), 0 1px 3px 0 hsla(0, 0%, 0%, 0.18);
}
.explorer__config .choices button, .cmn-toggle label::after, .crosstable povs:hover {
  background: linear-gradient(to bottom, var(--c-metal-top), var(--c-metal-bottom));
  text-shadow: 0.5px 0.5px 0 rgb(from var(--c-dimmer) r g b/calc(alpha * 0.8)) !important;
}
.explorer__config .choices button:hover:not(.disabled, :disabled, [disabled]), .cmn-toggle label:hover:not(.disabled, :disabled, [disabled])::after, .crosstable povs:hover:not(.disabled, :disabled, [disabled]) {
  box-shadow: inset 0 1px 3px -2px var(--c-border-light), inset 0 -5px 16px -3px hsl(from var(--c-body-gradient) h s calc(l + 5)/0.8), 0 2px 4px 0 hsla(0, 0%, 0%, 0.24);
}
:where(html.light) .explorer__config .choices button:hover:not(.disabled, :disabled, [disabled]), .explorer__config .choices :where(html.light) button:hover:not(.disabled, :disabled, [disabled]), :where(html.light) .cmn-toggle label:hover:not(.disabled, :disabled, [disabled])::after, .cmn-toggle :where(html.light) label:hover:not(.disabled, :disabled, [disabled])::after, :where(html.light) .crosstable povs:hover:not(.disabled, :disabled, [disabled]), .crosstable :where(html.light) povs:hover:not(.disabled, :disabled, [disabled]) {
  box-shadow: inset 0 4px 3px -2px rgba(255, 255, 255, 0.4), inset 0 -5px 8 16px -3px hsl(from var(--c-body-gradient) h s calc(l + 7)/0.8), 0 2px 4px 0 hsla(0, 0%, 0%, 0.21);
}
.explorer__config .choices button:hover:not(.disabled, :disabled, [disabled]), .cmn-toggle label:hover:not(.disabled, :disabled, [disabled])::after, .crosstable povs:hover:not(.disabled, :disabled, [disabled]) {
  background: linear-gradient(to bottom, var(--c-metal-top-hover), var(--c-metal-bottom-hover));
}
:where(html.transp) .explorer__config .choices button:hover:not(.disabled, :disabled, [disabled]), .explorer__config .choices :where(html.transp) button:hover:not(.disabled, :disabled, [disabled]), :where(html.transp) .cmn-toggle label:hover:not(.disabled, :disabled, [disabled])::after, .cmn-toggle :where(html.transp) label:hover:not(.disabled, :disabled, [disabled])::after, :where(html.transp) .crosstable povs:hover:not(.disabled, :disabled, [disabled]), .crosstable :where(html.transp) povs:hover:not(.disabled, :disabled, [disabled]) {
  box-shadow: inset 0 1px 3px -2px var(--c-border-light), inset 0 -5px 16px -3px hsl(from var(--c-body-gradient) h s calc(l + 5)/0.8), 0 2px 4px 0 hsla(0, 0%, 0%, 0.15);
}
:where(html.light) :where(html.transp) .explorer__config .choices button:hover:not(.disabled, :disabled, [disabled]), .explorer__config .choices :where(html.light) :where(html.transp) button:hover:not(.disabled, :disabled, [disabled]), :where(html.light) :where(html.transp) .cmn-toggle label:hover:not(.disabled, :disabled, [disabled])::after, .cmn-toggle :where(html.light) :where(html.transp) label:hover:not(.disabled, :disabled, [disabled])::after, :where(html.light) :where(html.transp) .crosstable povs:hover:not(.disabled, :disabled, [disabled]), .crosstable :where(html.light) :where(html.transp) povs:hover:not(.disabled, :disabled, [disabled]) {
  box-shadow: inset 0 4px 3px -2px rgba(255, 255, 255, 0.4), inset 0 -5px 8 16px -3px hsl(from var(--c-body-gradient) h s calc(l + 7)/0.8), 0 2px 4px 0 hsla(0, 0%, 0%, 0.12);
}

:where(html.transp) #ceval-settings::before, :where(html.transp) .board-menu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  backdrop-filter: blur(6px);
}
#ceval-settings, .board-menu {
  box-shadow: -1px 5px 6px rgba(0, 0, 0, 0.3);
}

:where(html.transp) #analyse-cm, :where(html.transp) .pv_box .pv-board .pv-board-square cg-board, .pv_box .pv-board .pv-board-square :where(html.transp) cg-board {
  backdrop-filter: blur(6px);
}
#analyse-cm, .pv_box .pv-board .pv-board-square cg-board {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.15), 0 10px 10px rgba(0, 0, 0, 0.12);
}

.form-check__input input:not(:disabled):focus-visible + .form-check__label {
  box-shadow: 0 0 12px var(--c-font-dimmer);
}

#acpl-chart-container-loader span, .mchat__tab, .context-streamer, .ceval .engine, .tview2 move {
  white-space: nowrap;
  overflow: hidden;
}

.analyse__underboard__menu > button, .advice-summary__acpl > div span, .advice-summary__phase span, .mchat__tab span, .game__meta .user-tv, .pv_box .pv.pv--nowrap, .tview2 comment .by, .copy-me__target {
  white-space: nowrap;
}

.mchat__messages, .tview2-column > interrupt > comment {
  overflow-wrap: break-word;
  word-break: normal;
}

.explorer-box .games td span, .explorer-box .title, #ceval-settings .setting select, .crosstable__users, .analyse__underboard__menu > button, .advice-summary__acpl > div span, .advice-summary__phase span, .mchat__tab span, .game__meta .user-tv, .pv_box .pv.pv--nowrap, .tview2 comment .by, .copy-me__target {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv_box .pv-board .pv-board-square {
  position: relative;
  display: block;
  height: 0;
  padding-bottom: 100%;
  width: 100%;
}

.tview2 shapes::before, .cmn-toggle label::before {
  font-size: 1.2em;
  vertical-align: middle;
  font-family: lichess;
  font-style: normal;
  font-weight: normal;
  text-transform: none;
  speak: none;
  content: attr(data-icon);
  opacity: 0.9;
  unicode-bidi: isolate;
}

.explorer-box .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.pv_box .pv-board .pv-board-square .cg-wrap {
  position: absolute;
  width: 100%;
  height: 100%;
}

.analyse-controls, .cmn-toggle input {
  touch-action: manipulation;
}

.cmn-toggle input, .form-check__input input {
  position: absolute;
  inset-inline-start: -99999px;
}

.explorer__config__player__choice .previous, .action-menu .autoplay, .tview2-column {
  display: flex;
  flex-flow: row wrap;
}

.advice-summary__sections, .analyse__fork move, .analyse__fork, .explorer__config .name > div, .action-menu span, .ceval .cmn-toggle {
  /* extends %flex-wrap */
  display: flex;
  flex-flow: row wrap;
  align-items: center;
}

.gif-export-dialog .gif-actions, .gif-export-dialog .setting, .analyse__underboard .fen-pgn > div, .analyse__underboard__menu, .advice-summary__acpl > div, .advice-summary__phase, .analyse__puzzle a, .analyse__persistence__help, .material, #analyse-cm a, .explorer-box .explorer-title .active, .explorer-box .explorer-title, .action-menu .cmn-toggle-wrap, .chat__members__number, .game__meta__infos, .context-streamer, #ceval-settings .setting, .form-check__container, .copy-me, .board-menu .setting {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
}

.training-box .choices {
  /* extends %flex-center */
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: space-between;
}

.analyse__persistence__actions, .explorer__config .date label, .engine-info-popup li {
  /* extends %flex-center */
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: space-between;
}

.gif-export-dialog .gif-options, .gif-export-dialog, .advice-summary__sections > div, .advice-summary, .analyse--wiki .analyse__side, .ceval .practice-mode, .training-box .instruction, .training-box, .explorer-box .message, .action-menu, .analyse__tools, .mchat__content, .mchat, #ceval-settings, .engine-error, .crosstable povs, .crosstable__users, .crosstable__score, .crosstable__matchup, .continue-with, .board-menu section, .board-menu > div, .board-menu {
  display: flex;
  flex-flow: column;
}

.setting-popup, .help-container img,
.help-container video,
.setting-popup img,
.setting-popup video, #analyse-cm, .explorer-box .games result, .explorer-box .bar span[style*="width: 100%"], .context-streamer, .eval-gauge::after, .eval-gauge, .ceval .engine .cloud,
.ceval .engine .infinite, .cmn-toggle label::before, .cmn-toggle label, .form-check__label, .copy-me, .analyse__tools, .mchat, .game__meta, .crosstable {
  border-radius: var(---ui-roundness, 7px);
}

/* helps with clipping background into border-radius */
.analyse__tools, .mchat, .game__meta, .crosstable {
  overflow: hidden;
}

.explorer-box .bar span:first-child, .explorer-box .bar span[style="width: 0%"] + span:not(:last-child, [style*="width: 100%"]) {
  border-start-start-radius: var(---ui-roundness, 7px);
  border-end-start-radius: var(---ui-roundness, 7px);
}

.explorer-box .bar span:last-child, .explorer-box .bar span:not(:first-child):has(+ [style="width: 0%"]) {
  border-start-end-radius: var(---ui-roundness, 7px);
  border-end-end-radius: var(---ui-roundness, 7px);
}

.explorer__config .choices button:first-child, .copy-me__target:is(a):focus-visible, .copy-me__target, .crosstable .sep {
  border-radius: var(---ui-roundness, 7px) 0 0 var(---ui-roundness, 7px);
}

.explorer__config .choices button:last-child, .copy-me__button {
  border-radius: 0 var(---ui-roundness, 7px) var(---ui-roundness, 7px) 0;
}

.analyse__underboard__menu > button, .mchat__tab {
  border-radius: var(---ui-roundness, 7px) var(---ui-roundness, 7px) 0 0;
}

.mchat__say, .analyse-controls .fbt, #ceval-settings {
  border-radius: 0 0 var(---ui-roundness, 7px) var(---ui-roundness, 7px);
}

.analyse__tools, .mchat, .game__meta, .crosstable {
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.08), 0 3px 1px -2px rgba(0, 0, 0, 0.18), 0 1px 5px 0 rgba(0, 0, 0, 0.1);
}

:where(html.transp) .analyse__tools, :where(html.transp) .mchat, :where(html.transp) .game__meta, :where(html.transp) .crosstable {
  backdrop-filter: blur(6px);
}

coords {
  font-size: 8px;
}
@media (min-width: 300px) {
  coords {
    font-size: calc(8px + 4 * (100vw - 300px) / 900);
  }
}
@media (min-width: 1200px) {
  coords {
    font-size: 12px;
  }
}
coords {
  user-select: none;
  /* handle inner coords */
  position: absolute;
  display: flex;
  pointer-events: none;
  color: #fff;
  text-shadow: 0 1px 2px #000;
  font-weight: bold;
  /* handle hidden coords */
}
.coords-no coords {
  display: none;
}
coords.ranks {
  flex-flow: column-reverse;
  top: 1px;
  right: 0;
  height: 100%;
  width: 0.8em;
}
coords.ranks.black {
  flex-flow: column;
}
coords.files {
  bottom: 0;
  left: 0;
  text-align: left;
  flex-flow: row;
  width: 100%;
  height: 1.4em;
}
coords.files.black {
  flex-flow: row-reverse;
}
coords.files coord {
  padding-left: 4px;
}
coords coord {
  flex: 1 1 auto;
}
coords {
  /* negate inner coords colors */
}
coords .is3d .cg-wrap coords coord {
  color: #fff !important;
  text-shadow: 0 1px 2px #000 !important;
}
coords .is3d .cg-wrap coords.files {
  bottom: calc(1px - 2.5%);
}
coords .is3d .cg-wrap coords.files coord {
  padding-left: 3px;
}

coords {
  text-shadow: var(---cg-cs, 0 1px 2px #000);
  /** Alternating colors in rank/file/square labels */
}
coords .coord-light {
  color: var(---cg-ccb, #fff);
}
coords .coord-dark {
  color: var(---cg-ccw, #fff);
}

/* handle outer coords */
@media (width >= 800px), (orientation: landscape) {
  .coords-out coords {
    text-shadow: none;
  }
  .coords-out coords.ranks {
    right: -15px;
    top: 0;
    width: 12px;
  }
  .coords-out coords.ranks coord {
    transform: translateY(42%);
  }
  .coords-out coords.files {
    bottom: -15px;
    left: 0;
    text-align: center;
  }
  .coords-out coords.ranks coord,
  .coords-out .is2d coords.files coord {
    color: var(--c-font-page) !important;
  }
  .coords-out .main-board {
    margin-bottom: 12px;
  }
}
body {
  ---board-scale: 1;
}
@media (width >= 800px) and (height >= 500px) {
  body {
    ---board-scale: calc((var(---zoom) / 100) * 0.75 + 0.25);
  }
}
body {
  ---col2-uniboard-width: calc(min(calc(100vw - var(---block-gap) - 240px - 2 * var(---main-margin, 0px) - 20px), calc(100vh - calc(var(---site-header-height) + var(---site-header-margin) + var(---sticky-gap)) - 1rem)) * var(---board-scale));
  ---col3-uniboard-width: calc(min(calc(100vw - var(---col3-uniboard-side-min, 250px) - var(---block-gap) - 240px - 2 * var(---main-margin, 0px) - 20px), calc(100vh - calc(var(---site-header-height) + var(---site-header-margin) + var(---sticky-gap)) - 1rem)) * var(---board-scale));
}

@media (width < 800px) and (orientation: portrait) {
  .main-board cg-board {
    border-radius: 0;
  }
}
.board-menu {
  user-select: none;
  background: var(--c-bg-popup);
  padding: 0.5em 1.5em;
}
@media (min-width: 799.3px) {
  .board-menu {
    position: absolute;
    right: 0;
    min-width: 100%;
    z-index: 4;
  }
}
@media (max-width: 799.29px) {
  .board-menu {
    border-radius: var(---ui-roundness, 7px);
    position: fixed;
    top: 50% !important;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 108;
    min-width: 80%;
  }
}
.board-menu > div {
  gap: 2em;
  text-align: start;
}
.board-menu section {
  gap: 1.5em;
  padding: 1.2em 0;
}
.board-menu section:not(:last-child) {
  border-bottom: 1px solid var(--c-border);
}
.board-menu .setting {
  flex: 0 0 auto;
}
.board-menu .setting label {
  flex: 4 1 auto;
  cursor: pointer;
}

body.resizing {
  user-select: none;
}

cg-resize {
  display: none;
}
@media (width >= 800px) {
  cg-resize {
    display: block;
    position: absolute;
    right: -9px;
    bottom: -9px;
    width: 22px;
    height: 22px;
    cursor: nwse-resize;
    z-index: 10;
  }
  cg-resize::before, cg-resize::after {
    background: #000;
    content: "";
    position: absolute;
    width: 12px;
    height: 1px;
    left: 0;
  }
  cg-resize::before {
    width: 5px;
    transform: translate(7px, 8px) rotate(-45deg);
  }
  cg-resize::after {
    transform: translate(1px, 6px) rotate(-45deg);
  }
  cg-resize:hover {
    border-radius: 50%;
    background: var(--c-accent-cloud);
  }
  .resizing cg-resize {
    border-radius: 50%;
    background: rgb(from var(--c-secondary) r g b/calc(alpha * 0.5));
  }
}

@media (hover: none) {
  .continue-with {
    padding: 2em;
  }
}
.continue-with > *:not(:first-child) {
  margin-top: 1em;
}

.color-icon.white::before {
  content: "\e028";
}
.color-icon.black::before {
  content: "\e029";
}
:where(html.light) .color-icon.white::before {
  content: "\e029";
}
:where(html.light) .color-icon.black::before {
  content: "\e028";
}
.color-icon.random::before {
  content: "\e04a";
}

.crosstable__users {
  flex: 1 1 auto;
}

.crosstable {
  width: 100%;
  line-height: 1.9em;
  display: flex;
}
.crosstable fill,
.crosstable povs {
  background: var(--c-bg-box);
  flex: 1 1 auto;
}
.crosstable povs, .crosstable__users, .crosstable__score, .crosstable__matchup {
  text-align: center;
}
.crosstable__users {
  max-width: 40vw;
  text-align: left;
}
.crosstable__users a {
  padding-inline-start: var(---block-gap);
}
.crosstable__score {
  flex: 0 0 auto;
  font-weight: bold;
}
.crosstable__score span {
  padding: 0 var(---block-gap);
}
.crosstable__matchup {
  flex: 1 1 auto;
  font-weight: bold;
  background: color-mix(in oklab, var(--c-primary) 20%, var(--c-bg));
}
.crosstable povs a {
  color: var(--c-font-dim);
  flex: 0 0 50%;
}
.crosstable povs:hover a {
  opacity: 1 !important;
}
.crosstable povs a.loss {
  opacity: 0.2;
}
.crosstable povs.current a {
  background: color-mix(in oklab, var(--c-accent) 70%, var(--c-bg));
  color: #fff;
  opacity: 1 !important;
}
.crosstable povs.new {
  border: var(--c-border);
}
@media (max-width: 649.29px) {
  .crosstable povs {
    display: none;
  }
  .crosstable povs:nth-last-child(-n+12) {
    display: flex;
  }
}
.crosstable .sep {
  border-inline-start: 1px solid var(--c-border);
  margin-inline-start: 0.3em;
}
.crosstable .win {
  font-weight: bold;
  color: var(--c-good);
}
.crosstable .loss {
  color: var(--c-bad);
}

.fbt {
  color: var(--c-font);
  text-transform: uppercase;
  line-height: 1.5;
  transition: all 150ms ease;
}
@media (hover: hover) {
  .fbt:hover:not(.disabled, [disabled]) {
    background: color-mix(in oklab, var(--c-secondary) 75%, var(--c-bg));
    color: #fff;
  }
}
.fbt.active {
  background: var(--c-secondary) !important;
  color: var(--c-over);
}
.fbt.disabled, .fbt[disabled] {
  opacity: 0.5;
  cursor: default;
}

:where(html.transp) .copy-me {
  backdrop-filter: blur(6px);
}
.copy-me {
  background: var(--c-bg-input);
}
.copy-me__target {
  flex: 1 1 auto;
  padding: 0 1em;
  outline: 0;
  background: none;
  border: 1px solid var(--c-border);
  border-right: 0;
  min-height: 44px;
}
.copy-me__target:is(a) {
  line-height: 40px;
}
.copy-me__target:is(a):focus-visible {
  outline-offset: -2px;
}
.copy-me__button {
  flex: 0 0 auto;
  border: 1px solid var(--c-border);
  border-left: 0;
  padding: 0 1em;
  min-height: 44px;
}

.form-check__container {
  user-select: none;
}
.form-check__container .form-label {
  margin-bottom: 0;
  cursor: pointer;
}
.form-check__container:has(.form-label:hover) .form-check__label {
  border-color: var(--c-good);
}

.form-check__input {
  position: relative;
  cursor: pointer;
}

.form-check__input + .form-label {
  margin-inline-start: 0.75rem;
}

.form-check__label {
  position: relative;
  display: block;
  margin-bottom: 0;
  background-color: var(--c-bg-input);
  border: 1px solid var(--c-border);
  cursor: pointer;
  height: 24px;
  width: 24px;
  transition: background-color 0.1s ease-in-out ease, border-color 0.1s ease-in-out ease;
}
.form-check__label:hover {
  border-color: var(--c-good);
}
.form-check__label::after {
  border: 2.5px solid #fff;
  border-top: none;
  border-right: none;
  content: "";
  width: 12px;
  height: 6px;
  left: 50%;
  top: 50%;
  opacity: 0;
  position: absolute;
  transform: translate(-50%, -58%) rotate(-45deg);
}

.form-check__input input {
  position: absolute;
}
.form-check__input input:disabled + .form-check__label {
  opacity: 0.6;
  cursor: not-allowed !important;
}
.form-check__input input:not(:disabled):focus-visible + .form-check__label {
  border-color: var(--c-font);
}
.form-check__input input:checked + .form-check__label {
  background-color: var(--c-good);
  border-color: var(--c-good);
}
.form-check__input input:checked:hover + .form-check__label {
  background-color: rgb(from var(--c-good) r g b/calc(alpha * 0.8));
}
.form-check__input input:checked + .form-check__label::after {
  opacity: 1;
}

.cmn-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.8ch;
  cursor: pointer;
  user-select: none;
}

.cmn-toggle label {
  user-select: none;
  transition: background 150ms ease, box-shadow 150ms ease;
  display: block;
  position: relative;
  cursor: pointer;
  outline: none;
  padding: 1px;
  width: 40px;
  height: 24px;
  border: 1px solid var(--c-border);
  background-clip: padding-box;
  background-color: var(--c-font-dimmer);
}
.cmn-toggle label::before, .cmn-toggle label::after {
  display: block;
  position: absolute;
  content: "";
  width: 23px;
  height: 23px;
  bottom: 0;
}
html:not([dir=rtl]) .cmn-toggle label::before, html:not([dir=rtl]) .cmn-toggle label::after {
  left: 0;
}
html[dir=rtl] .cmn-toggle label::before, html[dir=rtl] .cmn-toggle label::after {
  right: 0;
}
.cmn-toggle label::before {
  transition: margin 150ms ease, color 150ms ease;
  font-size: 1em;
  z-index: 1;
  text-align: center;
  line-height: 23px;
  content: "\e02a";
  color: var(--c-font-dimmer);
}
.cmn-toggle label::after {
  transition: margin 150ms ease, box-shadow 150ms ease;
  border-radius: calc(var(---ui-roundness, 7px) - 1px);
}
:where(html.transp) .cmn-toggle label::after {
  background: linear-gradient(to bottom, hsl(var(---site-hue), 7%, 22%), hsl(var(---site-hue), 5%, 19%) 100%);
}
:where(html.transp.light) .cmn-toggle label::after {
  background: linear-gradient(to bottom, hsl(var(---site-hue), 7%, 88%), hsl(var(---site-hue), 5%, 91%) 100%);
}
:where(html.transp) .cmn-toggle label:hover::after {
  background: linear-gradient(to bottom, hsl(var(---site-hue), 7%, 26%), hsl(var(---site-hue), 5%, 23%) 100%);
}
:where(html.transp.light) .cmn-toggle label:hover::after {
  background: linear-gradient(to bottom, hsl(var(---site-hue), 7%, 90%), hsl(var(---site-hue), 5%, 93%) 100%);
}

.cmn-toggle input:checked + label {
  background-color: var(--c-good);
}
.cmn-toggle input:checked + label::before, .cmn-toggle input:checked + label::after {
  margin-inline-start: 16px;
}
.cmn-toggle input:checked + label::before {
  content: "\e023";
  color: var(--c-good);
}

.cmn-toggle input:disabled + label {
  opacity: 0.6;
  cursor: not-allowed !important;
}
.cmn-toggle input:disabled + label::before, .cmn-toggle input:disabled + label::after {
  box-shadow: none;
}

.cmn-toggle input:focus-visible:not(:disabled) + label {
  box-shadow: 0 0 12px var(--c-font-dimmer);
  border-color: var(--c-primary);
}

input.range {
  appearance: none;
  background: none;
  border: 0;
}
input.range:focus {
  outline: none;
}
input.range::-webkit-slider-runnable-track {
  width: 100%;
  height: 1em;
  cursor: pointer;
  background: var(--c-shade);
  border-radius: var(---ui-roundness, 7px);
}
input.range::-webkit-slider-thumb {
  border: 1px solid var(--c-font-dimmer);
  height: 1em;
  width: 1.5em;
  border-radius: var(---ui-roundness, 7px);
  background: var(--c-bg-box);
  cursor: pointer;
  appearance: none;
}
input.range::-moz-range-track {
  width: 100%;
  height: 1em;
  cursor: pointer;
  background: var(--c-shade);
  border-radius: var(---ui-roundness, 7px);
}
input.range::-moz-range-thumb {
  border: 1px solid var(--c-font-dimmer);
  height: 1em;
  width: 1.5em;
  border-radius: var(---ui-roundness, 7px);
  background: var(--c-bg-box);
  cursor: pointer;
}
input.range::-ms-track {
  width: 100%;
  height: 1em;
  cursor: pointer;
  background: var(--c-shade);
  border-radius: var(---ui-roundness, 7px);
}
input.range::-ms-fill-lower {
  background: rgba(191, 191, 191, 0.78);
}
input.range::-ms-fill-upper {
  background: rgba(214, 214, 214, 0.78);
}
input.range::-ms-thumb {
  border: 1px solid var(--c-font-dimmer);
  height: 1em;
  width: 1.5em;
  border-radius: var(---ui-roundness, 7px);
  background: var(--c-bg-box);
  cursor: pointer;
  border-color: transparent;
  color: transparent;
}
input.range:-moz-focusring::-moz-range-thumb {
  outline: 2px solid var(--c-primary);
}
input.range:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--c-primary);
}

.tview2 {
  white-space: normal;
  --c-base: var(--c-font);
}
.tview2 .active {
  --c-base: var(--c-primary);
}
.tview2 .inaccuracy {
  --c-base: var(--c-inaccuracy);
}
.tview2 .inaccuracy,
.tview2 .inaccuracy + lines:not(lines lines) > branch, .tview2-inline .inaccuracy + interrupt:not(:has(interrupt)) {
  --c-annotation-border: rgb(from var(--c-inaccuracy) r g b / calc(alpha * 0.6));
}
.tview2 .inaccuracy interrupt,
.tview2 .inaccuracy + lines:not(lines lines) > branch interrupt, .tview2-inline .inaccuracy + interrupt:not(:has(interrupt)) interrupt {
  --c-annotation-border: var(--c-annotation-border, rgb(from var(--c-font) r g b/calc(alpha * 0.2)));
}
.tview2 .inaccuracy.active {
  --c-annotation-border: var(--c-inaccuracy);
}
.tview2 .mistake {
  --c-base: var(--c-mistake);
}
.tview2 .mistake,
.tview2 .mistake + lines:not(lines lines) > branch, .tview2-inline .mistake + interrupt:not(:has(interrupt)) {
  --c-annotation-border: rgb(from var(--c-mistake) r g b / calc(alpha * 0.6));
}
.tview2 .mistake interrupt,
.tview2 .mistake + lines:not(lines lines) > branch interrupt, .tview2-inline .mistake + interrupt:not(:has(interrupt)) interrupt {
  --c-annotation-border: var(--c-annotation-border, rgb(from var(--c-font) r g b/calc(alpha * 0.2)));
}
.tview2 .mistake.active {
  --c-annotation-border: var(--c-mistake);
}
.tview2 .blunder {
  --c-base: var(--c-blunder);
}
.tview2 .blunder,
.tview2 .blunder + lines:not(lines lines) > branch, .tview2-inline .blunder + interrupt:not(:has(interrupt)) {
  --c-annotation-border: rgb(from var(--c-blunder) r g b / calc(alpha * 0.6));
}
.tview2 .blunder interrupt,
.tview2 .blunder + lines:not(lines lines) > branch interrupt, .tview2-inline .blunder + interrupt:not(:has(interrupt)) interrupt {
  --c-annotation-border: var(--c-annotation-border, rgb(from var(--c-font) r g b/calc(alpha * 0.2)));
}
.tview2 .blunder.active {
  --c-annotation-border: var(--c-blunder);
}
.tview2 .good {
  --c-base: var(--c-good);
}
.tview2 .good,
.tview2 .good + lines:not(lines lines) > branch, .tview2-inline .good + interrupt:not(:has(interrupt)) {
  --c-annotation-border: rgb(from var(--c-good) r g b / calc(alpha * 0.6));
}
.tview2 .good interrupt,
.tview2 .good + lines:not(lines lines) > branch interrupt, .tview2-inline .good + interrupt:not(:has(interrupt)) interrupt {
  --c-annotation-border: var(--c-annotation-border, rgb(from var(--c-font) r g b/calc(alpha * 0.2)));
}
.tview2 .good.active {
  --c-annotation-border: var(--c-good);
}
.tview2 .brilliant {
  --c-base: var(--c-brilliant);
}
.tview2 .brilliant,
.tview2 .brilliant + lines:not(lines lines) > branch, .tview2-inline .brilliant + interrupt:not(:has(interrupt)) {
  --c-annotation-border: rgb(from var(--c-brilliant) r g b / calc(alpha * 0.6));
}
.tview2 .brilliant interrupt,
.tview2 .brilliant + lines:not(lines lines) > branch interrupt, .tview2-inline .brilliant + interrupt:not(:has(interrupt)) interrupt {
  --c-annotation-border: var(--c-annotation-border, rgb(from var(--c-font) r g b/calc(alpha * 0.2)));
}
.tview2 .brilliant.active {
  --c-annotation-border: var(--c-brilliant);
}
.tview2 .interesting {
  --c-base: var(--c-interesting);
}
.tview2 .interesting,
.tview2 .interesting + lines:not(lines lines) > branch, .tview2-inline .interesting + interrupt:not(:has(interrupt)) {
  --c-annotation-border: rgb(from var(--c-interesting) r g b / calc(alpha * 0.6));
}
.tview2 .interesting interrupt,
.tview2 .interesting + lines:not(lines lines) > branch interrupt, .tview2-inline .interesting + interrupt:not(:has(interrupt)) interrupt {
  --c-annotation-border: var(--c-annotation-border, rgb(from var(--c-font) r g b/calc(alpha * 0.2)));
}
.tview2 .interesting.active {
  --c-annotation-border: var(--c-interesting);
}
.tview2 .anchor {
  position: relative;
}
.tview2 * {
  overflow: visible;
}

.tview2.hidden {
  visibility: hidden;
}

.tview2 move {
  display: inline-block;
  color: var(--c-base);
  padding: 0.25em 0.17em;
  font-size: 1.092em;
  cursor: pointer;
}
@media (hover: none) {
  .tview2 move {
    user-select: none;
  }
}
.tview2 move.active {
  color: white;
  background: color-mix(in oklab, var(--c-base) 85%, transparent);
}
.tview2 move.active shapes,
.tview2 move.active eval,
.tview2 move.active index {
  color: white;
}
.tview2 move.active .disclosure {
  background-color: white;
}
.tview2 move.current {
  border: 1px solid var(--c-accent);
}
.tview2 move.nongame {
  font-style: italic;
}
.tview2 move.empty {
  pointer-events: none;
  color: var(--c-font-dimmer);
}
.tview2 move.context-menu {
  border: 0;
  background: var(--c-accent) !important;
  color: var(--c-over) !important;
}
.tview2 move.context-menu index {
  color: var(--c-over);
}
.tview2 move.pending-deletion {
  border-radius: unset;
  background: color-mix(in oklab, var(--c-bad) 30%, transparent) !important;
}
.tview2 move.pending-copy {
  border-radius: unset;
  background: color-mix(in oklab, var(--c-good) 30%, transparent) !important;
}

.tview2 eval {
  margin-inline-start: auto;
  font-size: 0.8em;
  color: var(--c-font-dim);
}

.tview2 glyph {
  margin-inline-start: 0.08em;
  vertical-align: bottom;
}

.tview2 shapes {
  margin-inline-start: 0.4em;
  color: var(--c-good);
}
.tview2 shapes::before {
  vertical-align: baseline;
  font-size: 13px;
  content: "\e029";
}

.tview2 move index {
  font-size: 90%;
  color: var(--c-font-dim);
}

.tview2 interrupt > interrupt {
  display: block;
  margin-inline-start: 9px;
}

.tview2 > interrupt {
  font-size: 95%;
}
.tview2 > interrupt move {
  margin-inline: 2px 0;
}
.tview2 > interrupt inline lines {
  margin-inline-start: 0;
}

.tview2 comment .by {
  display: inline-block;
  vertical-align: middle;
  color: var(--c-font);
  opacity: 0.8;
  max-width: 9em;
}

.tview2 line {
  display: block;
  padding-inline-start: 7px;
  position: relative;
}
.tview2 line comment {
  font-size: 90%;
}
.tview2 line > branch {
  border-inline-start: 2px solid var(--c-annotation-border, rgb(from var(--c-font) r g b/calc(alpha * 0.2)));
  margin-inline-start: -9px;
  position: absolute;
  width: 8px;
  height: 100%;
}
.tview2 line > branch::after {
  margin-top: calc(1.15em - 2px);
  content: " ";
  border-top: 2px solid var(--c-annotation-border, rgb(from var(--c-font) r g b/calc(alpha * 0.2)));
  position: absolute;
  width: 7px;
  height: 2px;
}
.tview2 line:last-child > branch {
  height: 1.15em;
}

.tview2 lines {
  display: block;
  margin-block: 2px;
  padding-inline-start: 2px;
  overflow-x: clip;
}
.tview2 lines.single {
  border-inline-start: none;
}
.tview2 lines:last-child {
  margin-bottom: 0;
}
.tview2 lines lines move {
  font-size: 13px;
}

.tview2 inline {
  display: inline;
  font-style: italic;
  font-size: 0.9em;
  opacity: 0.8;
}
.tview2 inline move {
  margin-inline-start: 0;
}
.tview2 inline::before, .tview2 inline::after {
  vertical-align: 7px;
  opacity: 0.7;
  font-size: 1.1em;
}
.tview2 inline::before {
  content: "(";
  margin-inline: 2px -2px;
}
.tview2 inline::after {
  content: ")";
  margin-inline: -1px 1px;
}

.tview2 .conceal {
  opacity: 0.4;
}

.tview2 .hide {
  display: none;
}

.tview2 .disclosure {
  display: inline-block;
  background-color: var(--c-annotation-border, rgb(from var(--c-font) r g b/calc(alpha * 0.2)));
  vertical-align: -2px;
  align-self: center;
  width: calc(15px + var(---button-size-pointer-adjust, 0px));
  height: calc(15px + var(---button-size-pointer-adjust, 0px));
  mask: url("/assets/images/buttons/plus-button-mask.webp") 0 0/contain no-repeat;
}
.tview2 .disclosure + san::before,
.tview2 .disclosure + index::before {
  content: "-";
  color: transparent;
}

.tview2 .disclosure.expanded {
  mask: url("/assets/images/buttons/minus-button-mask.webp") 0 0/contain no-repeat;
}
.tview2 .disclosure.expanded + san::before,
.tview2 .disclosure.expanded + index::before {
  color: var(--c-annotation-border, rgb(from var(--c-font) r g b/calc(alpha * 0.2)));
}

.tview2 .disclosure-connector {
  position: absolute;
  pointer-events: none;
  inset-inline-start: 0;
  border-inline-start: 2px solid var(--c-annotation-border, rgb(from var(--c-font) r g b/calc(alpha * 0.2)));
  border-top: 2px solid var(--c-annotation-border, rgb(from var(--c-font) r g b/calc(alpha * 0.2)));
}

.tview2 .disclosure-connector.riser {
  inset-inline: unset;
  inset-inline-end: 0;
  top: calc(-2px - (10px - var(---button-size-pointer-adjust, 0px)) / 2);
  height: calc((10px - var(---button-size-pointer-adjust, 0px)) / 2);
  width: 2px;
}

.tview2-column move {
  font-size: 1.092em;
  padding: 2px;
}

.tview2-column > move {
  flex: 0 0 43.5%;
  display: flex;
  font-size: 1.185em;
  line-height: 1.75em;
  padding: 0 0.3em 0 0.5em;
}
.tview2-column > move index {
  padding-inline-start: 5px;
}
.tview2-column > move index:first-child {
  padding-inline-start: 0;
}
.tview2-column > move glyph {
  flex: 0 1 auto;
  text-align: center;
  overflow: hidden;
  font-size: 0.82em;
}
.tview2-column > move.active {
  font-weight: bold;
}

.tview2-column > index {
  flex: 0 0 13%;
  display: flex;
  justify-content: center;
  border-inline-end: 1px solid var(--c-border);
  background: var(--c-bg-zebra);
  line-height: 2.07em;
  color: var(--c-font-dimmer);
}
.tview2-column > index + move {
  border-inline-end: var(--c-annotation-border, rgb(from var(--c-font) r g b/calc(alpha * 0.2)));
}

.tview2-column line move {
  border-radius: calc(var(---ui-roundness, 7px) / 2);
}
.tview2-column line comment {
  display: inline;
  overflow-wrap: break-word;
  padding: 0 5px 0 3px;
  vertical-align: 7px;
}

.tview2-column lines lines > .disclosure-connector + line > branch {
  margin-top: 0;
  height: 100%;
}

.tview2-column > interrupt > lines > line > branch {
  margin-top: -2px;
  height: calc(100% + 2px);
}

.tview2-column > interrupt {
  flex: 0 0 100%;
  max-width: 100%;
  background: var(--c-bg-zebra);
  border-top: 1px solid var(--c-annotation-border, rgb(from var(--c-font) r g b/calc(alpha * 0.2)));
  border-bottom: 1px solid var(--c-annotation-border, rgb(from var(--c-font) r g b/calc(alpha * 0.2)));
}
.tview2-column > interrupt > comment {
  color: var(--c-base);
  display: block;
  padding: 3px 5px;
  border-inline-start: 2px solid var(--c-annotation-border, rgb(from var(--c-font) r g b/calc(alpha * 0.2)));
}

.tview2-inline {
  padding-inline: 7px 3px;
  padding-top: 7px;
  padding-bottom: 7px;
}
.tview2-inline .mainline {
  font-weight: bold;
  background: color-mix(in oklab, var(--c-clearer) 4%, transparent);
}
.tview2-inline move {
  border-radius: calc(var(---ui-roundness, 7px) / 2);
  margin-inline-end: 2px;
  font-size: 13px;
  font-weight: bold;
}
.tview2-inline move index {
  padding-inline-end: 0.2em;
  line-height: 111.11%;
}
.tview2-inline comment {
  vertical-align: 45%;
  overflow-wrap: break-word;
  margin: 0 0.2em 0 0.1em;
  font-size: 0.9em;
  color: var(--c-base);
}
.tview2-inline inline::before,
.tview2-inline inline::after {
  vertical-align: 0.7em;
}
.tview2-inline .disclosure {
  width: 13px;
  height: 13px;
  margin-inline-start: 2px;
}

@media (pointer: coarse) {
  .tview2 {
    ---button-size-pointer-adjust: 4px;
  }
}
@media (hover: hover) {
  .tview2 move:not(.active):hover {
    background: var(--c-bg-zebra2);
    background: color-mix(in oklab, var(--c-base) 15%, transparent);
    color: var(--c-font-clear);
  }
  .tview2 move:not(.active):hover eval,
  .tview2 move:not(.active):hover index {
    color: var(--c-font);
  }
  .tview2 move:not(.active):hover .disclosure {
    background-color: var(--c-font-dimmer);
  }
  .tview2 move.active:hover {
    cursor: default;
  }
  .tview2 move.active:hover .disclosure:hover {
    background-color: #ddd;
  }
  .tview2 move:hover .disclosure:hover {
    background-color: var(--c-font-dim);
    cursor: pointer;
  }
}
@supports not (color: color-mix(in oklab, red, blue)) {
  .tview2 move.active {
    background: var(--c-primary);
  }
}
.ceval {
  position: relative;
  display: flex;
  column-gap: 6px;
  align-items: stretch;
  padding-top: 3px;
}
.ceval.enabled .show-threat {
  visibility: visible;
}
.ceval .cmn-toggle {
  flex: 0 0 40px;
  margin-inline-start: 6px;
}
.ceval pearl {
  flex: 1 0 auto;
  line-height: 38px;
  font-size: 1.6em;
  text-align: center;
  font-weight: bold;
}
.ceval .is-red::before {
  vertical-align: -3px;
}
.ceval .engine {
  flex: 2 1 auto;
  font-size: 12px;
  line-height: 16px;
  margin-top: 3px;
  color: var(--c-font-dim);
  user-select: none;
}
.ceval .engine .cloud,
.ceval .engine .infinite {
  margin-inline-start: 4px;
  background: var(--c-secondary-dim);
  color: var(--c-over);
  padding: 1px 3px;
  text-transform: uppercase;
  font-size: 11px;
}
.ceval .engine .info {
  display: block;
  white-space: nowrap;
}
.ceval .engine .deeper {
  color: var(--c-primary);
  margin-inline-end: 4px;
}
.ceval .engine .deeper::before {
  vertical-align: top;
}
.ceval .show-threat {
  flex: 0 0 18px;
  color: var(--c-font-dim);
  font-size: 16px;
  margin-top: -3px;
  overflow: hidden;
  visibility: hidden;
}
.ceval .show-threat:hover:not(.hidden), .ceval .show-threat.active {
  color: var(--c-bad);
}
.ceval .show-threat.hidden {
  opacity: 0.3;
  cursor: default;
}
.ceval .settings-gear {
  color: var(--c-font-dim);
  font-size: 16px;
  padding: 0 6px;
  margin-inline-end: 6px;
  margin-top: -3px;
}
.ceval .settings-gear:hover {
  color: var(--c-font);
}
.ceval .settings-gear.active {
  color: white;
  background-color: var(--c-primary);
}
.ceval .technology {
  margin-inline-start: 5px;
}
.ceval .technology.good {
  color: var(--c-good);
}
.ceval .bar {
  position: absolute;
  width: 100%;
  height: 3px;
  top: 0;
}
@keyframes bar-anim {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 100000px 0;
  }
}
.ceval .bar span {
  display: block;
  height: 3px;
  width: 0;
  background: var(--c-good);
  transition: width 1s;
}
.ceval .bar span.threat {
  background: var(--c-bad);
}
.ceval.computing .bar span {
  background-image: url("../images/bar-highlight.png");
  animation: bar-anim 1000s linear infinite;
}

.engine-error {
  align-items: center;
  row-gap: 1em;
  padding: 3em;
  text-align: left;
  max-width: 60vw;
}
@media (max-width: 979.29px) {
  .engine-error {
    max-width: 80vw;
  }
}
@media (max-width: 499.29px) {
  .engine-error {
    max-width: unset;
    width: 96vw;
  }
}
.engine-error h2 {
  font-size: 1.3em;
}
.engine-error li {
  margin: 0 2em;
  line-height: 1.5em;
  list-style: disc;
  text-align: start;
}
.engine-error pre {
  width: 100%;
  border: 1px solid #888;
  box-shadow: inset 0 0 2px var(--c-font-dim);
  padding: 1em;
  margin-bottom: 1em;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.pv_box {
  position: relative;
  background: var(--c-bg-box);
  font-size: 13px;
}
.pv_box .pv {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  line-height: 2em;
  border-top: 1px solid var(--c-border);
  padding-inline-end: 14px;
  min-height: 2em;
}
.pv_box .pv.pv--nowrap {
  display: block;
  flex-wrap: initial;
  height: 2em;
}
.pv_box .pv strong {
  display: inline-block;
  width: 34px;
  text-align: center;
}
.pv_box .pv span {
  margin-inline-start: 4px;
}
html:not([dir=rtl]) .pv_box .pv .pv-wrap-toggle {
  right: 0;
}
html[dir=rtl] .pv_box .pv .pv-wrap-toggle {
  left: 0;
}
.pv_box .pv .pv-wrap-toggle {
  position: absolute;
  top: 0;
  padding: 0 4px;
  margin: 0;
  cursor: pointer;
}
.pv_box .pv .pv-wrap-toggle::before {
  content: "▲";
}
.pv_box .pv.pv--nowrap .pv-wrap-toggle {
  transform: rotate(180deg);
}
html:not([dir=rtl]) .pv_box .pv-board {
  left: 34px;
}
html[dir=rtl] .pv_box .pv-board {
  right: 34px;
}
.pv_box .pv-board {
  position: absolute;
  inset-block-start: 100%;
  width: min(80%, 240px, 40vmin);
  margin-block-start: 4px;
  z-index: 5;
}
@media (hover: hover) and (pointer: fine) {
  .pv_box .pv[data-uci]:hover {
    background: color-mix(in oklab, var(--c-secondary) 20%, var(--c-bg));
    cursor: pointer;
  }
  .pv_box .pv[data-uci] .pv-san:hover {
    color: var(--c-primary);
  }
  .pv_box .pv .pv-wrap-toggle:hover {
    background: var(--c-secondary);
    color: var(--c-over);
  }
}
@media (width < 800px) and (orientation: portrait) {
  .pv_box {
    background: color-mix(in oklab, var(--c-secondary) 20%, var(--c-bg));
    padding-inline: 8px;
  }
  .pv_box .pv {
    font-size: 1.2em;
    padding-inline-end: 20px;
  }
  .pv_box .pv strong {
    padding-inline-end: 8px;
  }
  .pv_box .pv .pv-wrap-toggle {
    padding: 0;
  }
}
#ceval-settings-anchor {
  position: relative;
}

#ceval-settings {
  position: absolute;
  border-top: 2px solid var(--c-primary);
  z-index: 4;
  width: 100%;
  background: var(--c-bg-high);
  gap: 1.5em;
  padding: 1.5em;
}
@media (max-width: 799.29px) {
  #ceval-settings {
    gap: 1em;
  }
  #ceval-settings br {
    display: none;
  }
}
#ceval-settings .setting {
  white-space: nowrap;
}
#ceval-settings .setting input[type=range],
#ceval-settings .setting span {
  cursor: pointer;
  flex: 1 4 auto;
  padding: 0;
  height: 21px;
  width: 100%;
  margin: 0 1ch;
}
#ceval-settings .setting select {
  flex: 1 4 auto;
  min-width: 0;
  margin-inline-start: 1ch;
  padding: 4px;
}
#ceval-settings .setting #select-engine {
  padding: 0.5em;
}
#ceval-settings .setting .range_value {
  direction: ltr;
  flex: 0 0 15%;
  text-align: left;
}
#ceval-settings .setting button.button-red {
  margin-left: 0.6em;
  padding: 0.6em 0.75em;
}
#ceval-settings .setting span {
  position: relative;
}
#ceval-settings .setting span input[type=range] {
  height: 100%;
  margin: 0;
}
#ceval-settings .setting .tick {
  position: absolute;
  top: -12.5px;
  height: 46px;
  border-color: var(--c-primary);
}
#ceval-settings .setting .tick div {
  position: absolute;
  left: -4px;
  width: 9px;
  height: 9px;
  border-left: 3px solid var(--c-primary);
  border-bottom: 3px solid var(--c-primary);
}
#ceval-settings .setting .tick div:hover {
  border-color: color-mix(in oklab, var(--c-primary) 80%, white);
}
#ceval-settings .setting .tick div.arrow-down {
  transform: rotate(-45deg);
  top: 0;
}
#ceval-settings .setting .tick div.arrow-up {
  transform: rotate(135deg);
  bottom: 0;
}
#ceval-settings .setting .tick.recommended div {
  border-color: var(--c-secondary);
}
#ceval-settings .setting .tick.recommended div:hover {
  border-color: color-mix(in oklab, var(--c-secondary) 80%, white);
}
#ceval-settings .engine-info-button {
  color: var(--c-font-dim);
  margin-inline-start: 1em;
}
#ceval-settings .engine-info-button:hover {
  color: var(--c-primary);
}

.engine-info-popup a {
  font-size: 0.9em;
}
.engine-info-popup ol {
  text-align: start;
}
.engine-info-popup li {
  list-style: decimal inside;
}

@property --eval-percent {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 50%;
}
.eval-gauge {
  width: var(---block-gap);
  height: var(---cg-height, 100%);
  position: relative;
  background: linear-gradient(to bottom, #444 var(--eval-percent), #c0c0c0 var(--eval-percent));
  transition: --eval-percent 1s ease;
  overflow: hidden;
}
:where(html.light) .eval-gauge {
  background: linear-gradient(to bottom, #606060 var(--eval-percent), #fff var(--eval-percent));
}
@media (width < 800px) and (orientation: portrait) {
  .eval-gauge {
    display: none;
  }
}
.eval-gauge.empty {
  opacity: 0.5;
}
.eval-gauge.reverse {
  transform: rotateX(180deg);
}
.eval-gauge::after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5) inset;
}
html:not([dir=rtl]) .eval-gauge tick {
  left: 0;
}
html[dir=rtl] .eval-gauge tick {
  right: 0;
}
.eval-gauge tick {
  position: absolute;
  top: 0;
  width: 100%;
  opacity: 0.4;
  border-bottom: 2px ridge #888;
}
:where(html.light) .eval-gauge tick {
  border-bottom-color: #ccc;
}
.eval-gauge tick.zero {
  top: 6px;
  opacity: 1;
  border-bottom: 7px solid var(--c-accent-cloud) !important;
  margin-top: -3px;
}

:where(html.transp) .analyse-controls {
  backdrop-filter: blur(6px);
}
.analyse-controls {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
}
.analyse-controls .fbt {
  user-select: none;
  -webkit-touch-callout: none;
  text-align: center;
}
.analyse-controls [data-act=opening-explorer],
.analyse-controls [data-act=engine-mode] {
  order: 1;
}
.analyse-controls [data-act=menu] {
  order: 3;
}
.analyse-controls .hidden {
  visibility: hidden;
}
.analyse-controls .jumps {
  font-size: 1.3rem;
  display: flex;
  padding: 4px;
  order: 2;
}
.analyse-controls .jumps .fbt {
  border-radius: var(---ui-roundness, 7px);
  flex: 3;
}
.analyse-controls .jumps .fbt[data-act=first], .analyse-controls .jumps .fbt[data-act=last] {
  font-size: 0.75em;
}
.analyse-controls .jumps .fbt[data-act=line] {
  font-size: 0.9em;
}
@media (width < 800px) and (orientation: portrait) {
  .analyse-controls .jumps .fbt[data-act=prev],
  .analyse-controls .jumps .fbt[data-act=next] {
    padding-inline: 6px;
    font-size: 1.2em;
  }
}
@media (hover: hover) {
  .analyse-controls .jumps .fbt:hover:not(.disabled, :disabled) {
    background-color: color-mix(in oklab, var(--c-primary) 30%, var(--c-bg));
  }
}

html:not([dir=rtl]) #promotion-choice {
  right: 0;
}
html[dir=rtl] #promotion-choice {
  left: 0;
}
#promotion-choice {
  background: rgb(from var(--c-bg) r g b/calc(alpha * 0.7));
  z-index: 205;
  position: absolute;
  width: var(---cg-width, 100%);
  height: var(---cg-height, 100%);
}
#promotion-choice square {
  transition: all 150ms ease;
  cursor: pointer;
  border-radius: 50%;
  background-color: #b0b0b0;
  box-shadow: inset 0 0 25px 3px #808080;
  pointer-events: all;
}
#promotion-choice square:hover {
  box-shadow: inset 0 0 48px 8px var(--c-accent);
  border-radius: 0;
}
#promotion-choice piece {
  pointer-events: none;
  opacity: 1;
}
.is2d #promotion-choice piece {
  transition: all 150ms ease;
  width: 100%;
  height: 100%;
  transform: scale(0.8);
}
.is2d #promotion-choice square:hover piece {
  transform: none;
}

html:not([dir=rtl]) .variant-racingKings .cg-wrap.cg-wrap cg-container::before {
  left: 0;
}
html[dir=rtl] .variant-racingKings .cg-wrap.cg-wrap cg-container::before {
  right: 0;
}
.variant-racingKings .cg-wrap.cg-wrap cg-container::before {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  background: hsla(0, 0%, 90%, 0.2);
  width: 100%;
  height: 12.5%;
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
}
.variant-racingKings .cg-wrap.orientation-white cg-container::before {
  top: 0;
}
.variant-racingKings .cg-wrap.orientation-black cg-container::before {
  bottom: 0;
}

html:not([dir=rtl]) .variant-kingOfTheHill cg-container::before {
  left: 37.5%;
}
html[dir=rtl] .variant-kingOfTheHill cg-container::before {
  right: 37.5%;
}
.variant-kingOfTheHill cg-container::before {
  width: 25%;
  height: 25%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  background: hsla(0, 0%, 90%, 0.2);
  content: "";
  position: absolute;
  top: 37.5%;
  z-index: 1;
  pointer-events: none;
}

.context-streamers {
  max-height: 20vh;
  overflow-y: auto;
}

.context-streamer {
  transition: all 150ms ease;
  height: 2em;
  padding-inline-start: 0.2em;
  background: var(--c-bg-box);
  color: var(--c-font-dim);
  margin-top: 2px;
}
.context-streamer strong {
  color: var(--c-brag);
  font-weight: normal;
  padding-inline-end: 0.7ch;
}
.context-streamer::before {
  font-size: 1.3em;
  color: var(--c-brag);
}
.context-streamer:hover {
  color: var(--c-font-dim);
  background: var(--c-bg-zebra);
}

/* shared with analysis */
.game__meta {
  background: var(--c-bg-box);
  padding: 1.5em;
}
.game__meta section:not(:last-child) {
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 0.8rem;
  padding-bottom: 0.8rem;
}
.game__meta__infos {
  position: relative;
  /* for bookmark */
}
.game__meta__infos::before {
  font-size: 3rem;
  margin-inline-end: 4%;
}
.game__meta__infos p {
  margin: 0;
}
.game__meta__infos time {
  opacity: 1;
}
.game__meta__infos form.delete button {
  color: var(--c-bad);
}
.game__meta .status {
  text-align: center;
}
.game__meta__players {
  margin-top: 0.3rem;
  font-size: 90%;
}
.game__meta__players abbr {
  text-decoration: none;
  color: color-mix(in oklab, var(--c-primary) 50%, var(--c-font));
}
html:not([dir=rtl]) .game__meta .bookmark {
  right: 0;
}
html[dir=rtl] .game__meta .bookmark {
  left: 0;
}
.game__meta .bookmark {
  position: absolute;
  z-index: 2;
  color: var(--c-font-dim);
}
.game__meta .bookmark:not(.bookmarked) .on, .game__meta .bookmark.bookmarked .off {
  display: none;
}
.game__meta .user-tv {
  font-size: 1.2em;
}

.game__tournament .clock {
  font-size: 2em;
  text-align: center;
  margin-top: 0.2em;
}

@media (hover: hover) {
  .game__meta .bookmark {
    display: none;
  }
  .game__meta:hover .bookmark {
    display: block;
  }
}
.cmn-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.8ch;
  cursor: pointer;
  user-select: none;
}

.cmn-toggle label {
  user-select: none;
  transition: background 150ms ease, box-shadow 150ms ease;
  display: block;
  position: relative;
  cursor: pointer;
  outline: none;
  padding: 1px;
  width: 40px;
  height: 24px;
  border: 1px solid var(--c-border);
  background-clip: padding-box;
  background-color: var(--c-font-dimmer);
}
.cmn-toggle label::before, .cmn-toggle label::after {
  display: block;
  position: absolute;
  content: "";
  width: 23px;
  height: 23px;
  bottom: 0;
}
html:not([dir=rtl]) .cmn-toggle label::before, html:not([dir=rtl]) .cmn-toggle label::after {
  left: 0;
}
html[dir=rtl] .cmn-toggle label::before, html[dir=rtl] .cmn-toggle label::after {
  right: 0;
}
.cmn-toggle label::before {
  transition: margin 150ms ease, color 150ms ease;
  font-size: 1em;
  z-index: 1;
  text-align: center;
  line-height: 23px;
  content: "\e02a";
  color: var(--c-font-dimmer);
}
.cmn-toggle label::after {
  transition: margin 150ms ease, box-shadow 150ms ease;
  border-radius: calc(var(---ui-roundness, 7px) - 1px);
}
:where(html.transp) .cmn-toggle label::after {
  background: linear-gradient(to bottom, hsl(var(---site-hue), 7%, 22%), hsl(var(---site-hue), 5%, 19%) 100%);
}
:where(html.transp.light) .cmn-toggle label::after {
  background: linear-gradient(to bottom, hsl(var(---site-hue), 7%, 88%), hsl(var(---site-hue), 5%, 91%) 100%);
}
:where(html.transp) .cmn-toggle label:hover::after {
  background: linear-gradient(to bottom, hsl(var(---site-hue), 7%, 26%), hsl(var(---site-hue), 5%, 23%) 100%);
}
:where(html.transp.light) .cmn-toggle label:hover::after {
  background: linear-gradient(to bottom, hsl(var(---site-hue), 7%, 90%), hsl(var(---site-hue), 5%, 93%) 100%);
}

.cmn-toggle input:checked + label {
  background-color: var(--c-good);
}
.cmn-toggle input:checked + label::before, .cmn-toggle input:checked + label::after {
  margin-inline-start: 16px;
}
.cmn-toggle input:checked + label::before {
  content: "\e023";
  color: var(--c-good);
}

.cmn-toggle input:disabled + label {
  opacity: 0.6;
  cursor: not-allowed !important;
}
.cmn-toggle input:disabled + label::before, .cmn-toggle input:disabled + label::after {
  box-shadow: none;
}

.cmn-toggle input:focus-visible:not(:disabled) + label {
  box-shadow: 0 0 12px var(--c-font-dimmer);
  border-color: var(--c-primary);
}

.mchat__tabs {
  flex: 0 0 auto;
  display: flex;
}
.mchat__tab {
  flex: 1 1 auto;
  text-align: center;
  padding: 0.4em 10px;
  cursor: pointer;
  color: var(--c-font-page);
  transition: all 150ms ease;
}
.mchat__tab:hover {
  background: color-mix(in oklab, var(--c-accent) 15%, var(--c-bg));
}
.mchat__tab-active {
  color: var(--c-font);
  background: var(--c-bg-box) !important;
}
.mchat__tab:last-child {
  border-inline-end: none;
}
.mchat-optional .mchat__tab.discussion {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat__members {
  font-size: 0.9em;
  height: 100%;
  overflow: hidden;
}
.chat__members__inner {
  display: flex;
  align-items: flex-start;
}
.chat__members__number {
  margin-inline-end: 1ch;
}
.chat__members__number::before {
  font-size: 1em;
  color: var(--c-font-dim);
  margin-inline-end: 0.2ch;
}

.mchat__messages {
  flex: 1 1 auto;
  max-height: 50vh;
}
@media (width >= 1260px) {
  .mchat__messages {
    max-height: none;
  }
}
.mchat__messages {
  overflow-y: auto;
  overflow-x: hidden;
  cursor: initial;
  font-size: 0.9em;
}
.mchat__messages li {
  padding-inline: 10px 5px;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  position: relative;
  line-height: 1.2em;
  overflow-y: hidden;
  user-select: text;
  overflow-wrap: anywhere;
}
.mchat__messages li.me {
  border-inline-start: 3px solid var(--c-secondary-dim);
  padding-inline-start: 7px;
}
.mchat__messages li.host {
  background-color: var(--c-chat-host-bg);
}
.mchat__messages li.mentioned {
  background-color: var(--c-chat-mention-bg);
}
.mchat__messages .deleted {
  opacity: 0.5;
}
.mchat__messages .system {
  display: block;
  opacity: 0.8;
  font-style: italic;
  font-size: 0.9em;
  margin-inline-start: 0;
  text-align: center;
}
.mchat__messages .color,
.mchat__messages .user-link {
  display: inline-block;
  font-weight: bold;
  padding: 0;
  color: var(--c-font-dim);
  letter-spacing: -1px;
  padding-inline-end: 0.4em;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
.mchat__messages .patron {
  font-size: 1.1em;
  width: 1.2em;
  text-align: left;
}
.mchat__messages .utitle {
  margin-right: 3px;
}
html:not([dir=rtl]) .mchat__messages action {
  right: 0;
}
html[dir=rtl] .mchat__messages action {
  left: 0;
}
.mchat__messages action {
  display: none;
  position: absolute;
  top: 5px;
  cursor: pointer;
  margin-inline-end: 3px;
  padding: 1px 5px;
  opacity: 0.7;
  color: var(--c-accent);
}
.mchat__messages action:hover {
  opacity: 1;
}
html:not([dir=rtl]) .mchat__messages action.reply {
  right: 25px;
}
html[dir=rtl] .mchat__messages action.reply {
  left: 25px;
}
.mchat__messages li:hover action {
  display: block;
  text-shadow: 0 0 2px var(--c-bg-box), 0 0 5px var(--c-bg-box), 0 0 10px var(--c-bg-box);
}
.mchat__messages li.me action {
  display: none !important;
}
.mchat__messages.as-mod li:hover {
  background: color-mix(in oklab, var(--c-accent) 10%, var(--c-bg));
}
.mchat__messages::-webkit-scrollbar, .mchat__messages::-webkit-scrollbar-corner {
  background: unset;
}
.mchat__say {
  padding-inline: 4px 20px;
  padding-top: 3px;
  padding-bottom: 3px;
  flex: 0 0 auto;
  border: 0;
  padding-inline: 6px;
  border-top: 1px solid var(--c-border);
}
.mchat__say:focus {
  outline: 1px solid var(--c-primary);
}
.mchat__say.whisper {
  color: var(--c-good);
  font-weight: bold;
  font-style: italic;
}

.mchat {
  grid-area: chat;
  justify-content: stretch;
}
.mchat__content {
  background: var(--c-bg-box);
  flex: 1 1 auto;
  overflow: hidden;
}
.mchat__content.note textarea {
  font-size: 0.9em;
  flex-grow: 1;
  border: 1px solid transparent;
  background-color: transparent;
  line-height: 1.7em;
  outline: none;
  resize: none;
}
.mchat__content.note textarea:focus {
  border-color: var(--c-primary);
}
.mchat {
  min-height: 15em;
}

/* analyse a game replay */
.action-menu, .analyse__tools .sub-box {
  border-bottom: 1px solid var(--c-border);
}
@media (width >= 800px), (orientation: landscape) {
  .action-menu, .analyse__tools .sub-box {
    border-bottom: 3px solid var(--c-secondary);
  }
}

body {
  /* prevents scroll bar flicker on page height changes */
  overflow-y: scroll;
}

#main-wrap {
  ---main-max-width: calc(100vh - calc(var(---site-header-height) + var(---site-header-margin) + var(---sticky-gap)) - 5rem);
}
@media (width >= 800px), (orientation: landscape) {
  #main-wrap {
    ---main-max-width: auto;
  }
}

.analyse {
  grid-area: main;
  display: grid;
  ---analyse-gauge-col: var(---block-gap);
  ---analyse-gauge-offset: calc(var(---analyse-gauge-col) - 4px);
}
.analyse.gauge-on {
  ---analyse-gauge-col: calc(var(---block-gap) + 4px * 2);
}
.analyse__side {
  grid-area: side;
  justify-content: start;
}
.analyse__board {
  grid-area: board;
}
html:not([dir=rtl]) .analyse__board cg-container {
  right: 0;
}
html[dir=rtl] .analyse__board cg-container {
  left: 0;
}
.analyse__tools {
  grid-area: tools;
}
.analyse__controls {
  grid-area: controls;
}
.analyse__underboard {
  grid-area: under;
}
@media (width < 800px) and (orientation: portrait) {
  .analyse__underboard {
    overflow: hidden;
  }
}
.analyse__round-training {
  grid-area: round-training;
}
.analyse__puzzle {
  grid-area: puzzle;
}
.analyse .chat__members {
  grid-area: uchat;
}
.analyse .eval-gauge {
  grid-area: gauge;
  display: none;
  margin: 0 4px;
}
.analyse .keyboard-move {
  display: none;
}
.analyse {
  ---chat-height: fit-content(0);
}
.analyse--wiki {
  ---chat-height: 0;
}
.analyse .mchat {
  margin: var(---block-gap) 0 0 0;
}
.analyse {
  grid-template-rows: auto auto auto minmax(20em, 40vh);
  grid-template-areas: "board" "controls" "kb-move" "tools" "side" "round-training" "under" "chat" "uchat";
}
@media (width >= 800px), (orientation: landscape) {
  .analyse {
    grid-template-columns: var(---col2-uniboard-width) var(---analyse-gauge-col) minmax(calc(240px - var(---analyse-gauge-offset)), calc(400px - var(---analyse-gauge-offset)));
    grid-template-rows: fit-content(0);
    grid-template-areas: "board      gauge tools" "kb-move    .     controls" "under      .     controls" "under      .     round-training" "under      .     side" "chat       .     side" "uchat      .     side";
    row-gap: 0;
  }
  .analyse__side {
    margin: var(---block-gap) 0 0 0;
  }
  .analyse__tools {
    height: var(---cg-height, 100%);
  }
  .analyse .chat__members {
    margin: calc(var(---block-gap) / 2) 0 0 0;
  }
  .analyse__underboard {
    margin-top: var(---block-gap);
  }
  .analyse .eval-gauge {
    display: block;
  }
  .analyse .keyboard-move {
    display: block;
    grid-area: kb-move;
    margin: var(---block-gap) 0;
  }
}
@media (width < 800px) and (orientation: landscape) {
  .analyse {
    grid-template-columns: minmax(55vmin, calc(100vh - calc(var(---site-header-height) + var(---site-header-margin) + var(---sticky-gap)) - var(---block-gap))) var(---analyse-gauge-col) minmax(calc(200px - var(---analyse-gauge-offset)), calc(240px - var(---analyse-gauge-offset)));
  }
}
@media (width >= 1260px) {
  .analyse {
    grid-template-columns: minmax(var(---col3-uniboard-side-min, 250px), 350px) var(---block-gap) var(---col3-uniboard-width) var(---analyse-gauge-col) minmax(calc(240px - var(---analyse-gauge-offset)), calc(400px - var(---analyse-gauge-offset)));
    grid-template-rows: auto var(---chat-height) auto 2.5em 1fr;
    grid-template-areas: "side    . board   gauge tools" "chat    . board   gauge tools" "uchat   . kb-move .     controls" "uchat   . under   .     controls" "uchat   . under   .     round-training";
  }
  .analyse__side {
    margin-top: 0;
  }
  .analyse .mchat {
    margin-top: 0;
    min-height: 10em;
  }
  .analyse .crosstable__users {
    flex: 7 1 auto;
  }
}

.blind-mode .analyse {
  display: block;
}

.analyse__tools {
  position: relative;
  background: var(--c-bg-box);
}
.analyse__tools .ceval {
  flex: 0 0 44px;
}
.analyse__tools .sub-box {
  user-select: none;
}
.analyse__tools .sub-box .title {
  font-size: 0.9rem;
  line-height: 1.9em;
  background: color-mix(in oklab, var(--c-secondary) 40%, var(--c-bg));
  padding: 0 1rem;
}
.analyse__tools .sub-box .title a {
  font-weight: bold;
}
.analyse__tools .comp-off__hint {
  opacity: 0.8;
  padding: 0.3em 1em;
  text-align: center;
}
.analyse__tools .comp-off__hint button {
  margin-inline-start: 1em;
  color: var(--c-link);
}
.analyse__tools .comp-off__hint button:hover {
  color: var(--c-link-hover);
}

.analyse__moves {
  user-select: none;
  flex: 2 1 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  /* required so line::before scrolls along the moves! */
}
.analyse__moves .result,
.analyse__moves .status {
  background: var(--c-bg-zebra);
  text-align: center;
}
.analyse__moves .result {
  border-top: 1px solid var(--c-border);
  font-weight: bold;
  font-size: 1.2em;
  padding: 5px 0 3px 0;
}
.analyse__moves .status {
  font-size: 1em;
  font-style: italic;
  padding-bottom: 7px;
}
.analyse__moves button.next {
  border: 0;
  background: var(--c-bg-box);
  color: var(--c-link);
  padding: 0.5em;
  width: 100%;
  transition: all 150ms ease;
}
.analyse__moves button.next:hover {
  color: var(--c-link-hover);
}
.analyse__moves button.next::before {
  margin-inline-end: 0.3em;
}
.analyse__moves button.next.highlighted {
  background: color-mix(in oklab, var(--c-primary) 80%, var(--c-bg));
  color: var(--c-over);
}
.analyse__moves button.next.highlighted:hover {
  background: var(--c-primary);
}

.analyse__controls {
  height: 3rem;
  align-items: stretch;
}
.analyse__controls .cmn-toggle {
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
}
.analyse__controls .jumps {
  flex: 3 1 auto;
}
.analyse__controls .fbt {
  flex: 0 0 2.5rem;
  transition: visibility 0s;
}
.analyse__controls .active {
  margin-top: -3px;
  padding-top: 3px;
  color: var(--c-over);
}
.analyse__controls .fbt.latent {
  background-color: rgb(from var(--c-secondary) r g b/calc(alpha * 0.5));
}

@media (width < 800px) and (orientation: portrait) {
  .analyse__tools {
    border-radius: 0;
  }
  .analyse__tools .sub-box {
    order: 0;
  }
  .analyse__tools .ceval,
  .analyse__tools .pv_box,
  .analyse__tools .analyse__fork,
  .analyse__tools .gamebook-edit {
    order: 1;
  }
  .analyse__tools .analyse__moves {
    order: 2;
  }
  .analyse__tools .ceval .engine {
    margin-inline-start: 12px;
  }
  .analyse__tools .ceval .cmn-toggle,
  .analyse__tools .ceval pearl {
    display: none;
  }
  .analyse__controls {
    height: auto;
    touch-action: pan-y;
    flex-wrap: wrap;
  }
  .analyse__controls .fbt {
    flex: 1;
    margin: 3px 2px 0;
    border: 1px solid rgb(from var(--c-clearer) r g b/calc(alpha * 0.05));
    border-bottom: none;
    border-radius: var(---ui-roundness, 7px) var(---ui-roundness, 7px) 0 0;
    background: color-mix(in oklab, var(--c-bg) 50%, var(--c-bg-page));
  }
  .analyse__controls .fbt:not(.move) {
    min-height: 3em;
  }
  .analyse__controls .fbt.active {
    padding-top: 0;
    border-bottom: none;
  }
  .analyse__controls .jumps {
    order: 1;
    padding: 2px;
    margin-bottom: 2px;
    width: 100%;
    height: 3em;
  }
  .analyse__controls .jumps .move {
    background: color-mix(in oklab, var(--c-bg) 50%, var(--c-bg-page));
    border: 1px solid rgb(from var(--c-clearer) r g b/calc(alpha * 0.05));
  }
  .analyse__controls .jumps .move[data-act=first], .analyse__controls .jumps .move[data-act=last] {
    flex: 2;
  }
  .analyse__controls eval {
    font-variant-numeric: tabular-nums;
    font-weight: bold;
    font-size: 1.25em;
    pointer-events: none;
  }
  .analyse__controls [data-mode] {
    position: relative;
    overflow-x: hidden;
    min-width: max(24vw, 80px);
    display: flex;
    align-items: center;
    text-shadow: none;
    justify-content: center;
  }
  .analyse__controls [data-mode] .cmn-toggle {
    margin-inline-start: 10px;
  }
}
@media (width < 800px) and (orientation: portrait) and (max-width: 399.29px) {
  .analyse__controls [data-mode] .cmn-toggle {
    transform: scale(0.8);
    margin-inline-start: 0;
  }
}
@media (width < 800px) and (orientation: portrait) {
  .analyse__controls [data-mode] .cmn-toggle label {
    background-color: var(--c-font-dimmer) !important;
  }
  .analyse__controls [data-mode]::before,
  .analyse__controls [data-mode]::after {
    font-size: 1.3em;
    font-family: lichess;
  }
  .analyse__controls [data-mode=practice]::before {
    content: "\e05c";
    padding-inline-end: 8px;
  }
  .analyse__controls [data-mode=retro]::before {
    font-size: 1.5em;
    content: "\e018";
  }
  .analyse__controls [data-mode=practice].active::after,
  .analyse__controls [data-mode=retro].active::after {
    position: absolute;
    top: -2px;
    right: 1px;
    font-size: 0.9em;
    color: color-mix(in oklab, var(--c-bg) 50%, var(--c-secondary));
    content: "\e02a";
  }
  .analyse__controls [data-mode=ceval]::after {
    content: "\e04c";
    color: var(--c-font-dimmer);
    padding-inline-end: 10px;
  }
  .analyse__controls [data-mode=ceval]:has(eval)::after {
    content: "";
  }
  .analyse__controls [data-mode] .bar {
    display: none;
  }
  .analyse__controls [data-mode]:not(.active) .bar {
    position: absolute;
    display: block;
    left: 0;
    right: 0;
    top: 0;
    height: 5px;
    opacity: 0;
    transition: opacity 0.3s ease-in, opacity 0.6s ease-out;
    animation: computing 1.6s linear reverse infinite paused;
    background: linear-gradient(to bottom, rgb(from var(--c-good) r g b/0.1), rgb(from var(--c-good) r g b/0.7), rgb(from var(--c-good) r g b/0.1)) 0 0/100% 100% no-repeat, linear-gradient(45deg, transparent, rgb(from var(--c-good) r g b/0.7), transparent) -100% 0/200% 100% no-repeat;
  }
  .analyse__controls [data-mode].computing:not([data-mode=ceval].active) .bar {
    opacity: 1;
    animation-play-state: running;
  }
  @keyframes computing {
    to {
      background-position: 0 0, 200% 0;
    }
  }
  .analyse[data-active-tool] .analyse__tools,
  .analyse[data-active-mode] .analyse__tools {
    border-radius: 0 0 var(---ui-roundness, 7px) var(---ui-roundness, 7px);
  }
  .analyse[data-active-tool] .analyse__tools,
  .analyse[data-active-mode=retro] .analyse__tools {
    border-top: 3px solid var(--c-secondary);
  }
  .analyse[data-active-mode=practice] .analyse__tools .ceval {
    order: 0;
  }
  .analyse[data-active-mode=practice] .analyse__fork,
  .analyse[data-active-mode=retro] .analyse__fork {
    display: none;
  }
}
.analyse__tools:has(.action-menu) {
  box-shadow: none;
}

.action-menu {
  background: var(--c-bg-opaque);
}
.action-menu .inner {
  display: flex;
  flex-direction: column;
  padding: 0 1rem 1rem;
  gap: 1rem;
}
.action-menu h2 {
  font-size: 1em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  display: table;
}
.action-menu h2::before, .action-menu h2::after {
  border-top: 1px solid var(--c-border);
  content: "";
  display: table-cell;
  position: relative;
  top: 0.5em;
  width: 45%;
}
html:not([dir=rtl]) .action-menu h2::before {
  right: 8px;
}
html[dir=rtl] .action-menu h2::before {
  left: 8px;
}
html:not([dir=rtl]) .action-menu h2::after {
  left: 8px;
}
html[dir=rtl] .action-menu h2::after {
  right: 8px;
}
.action-menu__tools {
  display: grid;
  gap: 0 1em;
  grid-template-columns: repeat(auto-fill, minmax(15ch, 1fr));
}
.action-menu__tools button,
.action-menu__tools > a {
  color: var(--c-font);
  display: flex;
  align-items: center;
  min-height: 4em;
}
.action-menu__tools button::before,
.action-menu__tools > a::before {
  padding-inline-end: 8px;
  font-size: 1.5em;
  color: var(--c-font-dim);
}
.action-menu__tools button:hover,
.action-menu__tools > a:hover {
  color: var(--c-primary);
}
.action-menu__tools button:hover::before,
.action-menu__tools > a:hover::before {
  color: var(--c-primary-dim);
}
.action-menu .autoplay .button {
  font-size: 0.9em;
  flex: 1 1 auto;
  padding: 7px 0;
  text-align: center;
}
.action-menu .autoplay .button-empty {
  color: var(--c-font-dim);
}
.action-menu form.delete {
  text-align: right;
  margin-top: 6px;
}
.action-menu form.delete .button::before {
  font-size: 1.2em;
}
.action-menu .cmn-toggle-wrap {
  flex: 0 0 auto;
}
.action-menu .cmn-toggle-wrap label {
  flex: 4 1 auto;
  cursor: pointer;
  white-space: nowrap;
}
.action-menu .cmn-toggle-wrap input[type=range] {
  flex: 1 4 auto;
  height: 1.6em;
  width: 100%;
  margin: 0 1ch;
  padding: 0;
}
.action-menu .cmn-toggle-wrap .range_value {
  direction: ltr;
  flex: 0 0 auto;
  display: block;
  text-align: right;
}
.action-menu span {
  justify-content: start;
  gap: 0.6em;
}

.explorer__config section {
  margin: 0.4em var(---block-gap) 0 var(---block-gap);
}
.explorer__config section.save {
  text-align: center;
  padding: 1em 0 0.7em 0;
}
.explorer__config label {
  font-weight: bold;
  display: block;
  line-height: 2em;
}
.explorer__config .choices {
  display: flex;
}
.explorer__config .choices button {
  transition: all 150ms ease;
  flex-grow: 1;
  padding: 5px 0;
  text-align: center;
  cursor: pointer;
  border: 1px solid var(--c-border);
  border-width: 1px 0 1px 1px;
  text-transform: capitalize;
  text-shadow: 0 1px 0 var(--c-font-shadow);
}
.explorer__config .choices button:last-child {
  border-right-width: 1px;
}
.explorer__config .choices button[aria-pressed=true], .explorer__config .choices button.active {
  background: var(--c-secondary);
  color: var(--c-over);
  font-weight: bold;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2) inset !important;
}
:where(html.light) .explorer__config .choices button[aria-pressed=true], :where(html.light) .explorer__config .choices button.active {
  text-shadow: 0 1px 0 var(--c-font) !important;
}
.explorer__config .choices button[aria-pressed=true]:hover, .explorer__config .choices button.active:hover {
  background: hsl(from var(--c-secondary) h s calc(l + 5));
}
.explorer__config .name .player-name {
  border-radius: var(---ui-roundness, 7px) !important;
  font-weight: bold;
  padding-left: 1em;
  padding-right: 1em;
  text-transform: none;
  margin-inline-end: 0.5em;
}
.explorer__config .name .player-name.active:hover {
  background: color-mix(in oklab, var(--c-secondary) 80%, white);
}
.explorer__config .name .color {
  margin-inline-start: 1ch;
}
.explorer__config .toggle {
  font-weight: bold;
  display: block;
  line-height: 2em;
}
.explorer__config .date input {
  border: none;
  background: none;
  padding: 0.1em 0.5em;
}
.explorer__config .date input:invalid {
  background: color-mix(in oklab, var(--c-bad) 30%, var(--c-bg));
}
.explorer__config__player__choice {
  max-width: 70ch !important;
}
.explorer__config__player__choice > div {
  overflow: visible !important;
}
.explorer__config__player__choice .input-wrapper {
  overflow: visible !important;
  position: relative;
  display: inline-block;
  padding-top: 2em;
  margin-bottom: 2em;
}
.explorer__config__player__choice .previous {
  gap: 0.4em;
}
.explorer__config__player__choice .previous .button {
  margin: 0.3em 0.2em;
  text-transform: none;
}
html:not([dir=rtl]) .explorer__config__player__choice .previous .remove {
  right: -0.65em;
}
html[dir=rtl] .explorer__config__player__choice .previous .remove {
  left: -0.65em;
}
.explorer__config__player__choice .previous .remove {
  margin-inline-start: -1.75em;
  width: 1.75em;
  height: 1.75em;
  top: -1.5em;
  background-color: var(--c-bg-popup);
  position: relative;
  border-radius: 50%;
}
.explorer__config__player__choice .previous .remove:hover {
  background-color: var(--c-error);
}

.explorer-box {
  transition: all 150ms ease;
  position: relative;
  flex: 3 1 0;
  white-space: nowrap;
  transition-delay: 0.3s;
  overflow-x: hidden;
  overflow-y: auto;
  font-size: 0.9em;
}
.explorer-box.reduced {
  flex: 0.3 3 0;
}
.explorer-box.reduced:hover {
  flex: 1 2 0;
}
.explorer-box .overlay {
  display: none;
}
.explorer-box.loading .overlay {
  display: block;
}
.explorer-box tbody {
  transition: all 150ms ease;
}
.explorer-box.loading tbody {
  opacity: 0.4;
}
.explorer-box .title {
  user-select: text;
}
:where(html.transp) .explorer-box .explorer-title {
  backdrop-filter: blur(6px);
}
.explorer-box .explorer-title {
  align-items: stretch;
  font-size: 0.9rem;
  line-height: 1.9em;
  padding: 0;
  background: color-mix(in oklab, var(--c-secondary) 30%, var(--c-bg));
  position: sticky;
  top: 0;
  z-index: 2;
}
.explorer-box .explorer-title .ddloader {
  padding-inline-start: 7px;
}
.explorer-box .explorer-title .active {
  direction: ltr;
  padding: 0 7px;
  color: var(--c-font-clear);
  background: color-mix(in oklab, var(--c-secondary) 40%, var(--c-bg));
}
.explorer-box .explorer-title .active strong {
  margin-inline-end: 0.5ch;
}
.explorer-box .explorer-title .active.player {
  cursor: pointer;
}
.explorer-box .explorer-title .long {
  letter-spacing: -0.1ch;
}
.explorer-box .explorer-title button {
  display: inline-block;
  padding: 0 0.5ch;
  margin-inline-start: 1px;
  color: var(--c-font-dim);
}
.explorer-box .explorer-title button:hover {
  color: var(--c-font-clear);
  background: color-mix(in oklab, var(--c-secondary) 50%, var(--c-bg));
}
.explorer-box .empty {
  display: flex;
  flex-flow: column;
  height: 100%;
}
.explorer-box .empty .message {
  text-align: center;
}
.explorer-box tr:nth-child(even) {
  background: var(--c-bg-zebra);
}
.explorer-box tr:hover {
  background: color-mix(in oklab, var(--c-secondary) 20%, var(--c-bg));
}
.explorer-box td {
  cursor: pointer;
  padding-inline-start: 7px;
}
.explorer-box .moves {
  will-change: transform, opacity; /* Prevents flicker in Safari */
}
.explorer-box .moves th {
  font-size: 0.8rem;
  line-height: 1.8em;
  background: color-mix(in oklab, var(--c-secondary) 40%, var(--c-bg));
  padding-inline-start: 7px;
}
.explorer-box .moves td:first-child {
  line-height: 30px;
  padding-inline-start: 7px;
}
.explorer-box .moves td:nth-child(2),
.explorer-box .moves td:nth-child(3) {
  font-size: 0.75em;
  text-align: right;
}
.explorer-box .moves td:last-child {
  width: 100%;
  padding-inline-end: 7px;
}
.explorer-box .moves tbody tr.sum {
  background: color-mix(in oklab, var(--c-primary) 25%, var(--c-bg));
  font-weight: bold;
}
@media (width >= 800px) and (min-width: 399.3px), (orientation: landscape) and (min-width: 399.3px) {
  .explorer-box .moves tbody tr.sum {
    position: sticky;
    bottom: 0;
  }
}
:where(html.transp) .explorer-box .moves tbody tr.sum td {
  backdrop-filter: blur(6px);
}
.explorer-box .moves tbody tr.sum td {
  cursor: default;
}
.explorer-box .bar span {
  text-align: center;
  display: inline-block;
  overflow: hidden;
  vertical-align: middle;
  background-clip: padding-box;
  border-width: 1px 0;
  border-style: solid;
  border-color: rgb(from var(--c-font) r g b/calc(alpha * 0.17));
  height: 16px;
  line-height: 14px;
  font-size: 0.9em;
  transition: width 1s;
}
.explorer-box .white {
  background: #ccc;
  box-shadow: 0 -5px 7px rgba(0, 0, 0, 0.25) inset;
}
:where(html.light) .explorer-box .white {
  background: #fff;
  box-shadow: 0 -5px 7px rgba(0, 0, 0, 0.1) inset;
}
:where(html:not(.light)) .explorer-box .white {
  color: #222;
}
.explorer-box .draws,
.explorer-box .black {
  color: #ddd;
  box-shadow: 0 5px 7px rgba(255, 255, 255, 0.1) inset;
}
:where(html.light) .explorer-box .draws,
:where(html.light) .explorer-box .black {
  color: #fff;
  box-shadow: 0 5px 7px rgba(255, 255, 255, 0.2) inset;
}
.explorer-box .draws {
  background: #666;
}
:where(html.light) .explorer-box .draws {
  background: #a0a0a0;
}
.explorer-box .black {
  background: #333;
}
:where(html.light) .explorer-box .black {
  background: #555;
}
.explorer-box .black {
  color: #ddd;
}
.explorer-box .games {
  width: 100%;
}
.explorer-box .games td {
  padding-inline: 7px 0;
  padding-top: 5px;
  padding-bottom: 5px;
}
.explorer-box .games td span {
  display: block;
}
.explorer-box .games td.game-rating {
  width: 40px;
}
.explorer-box .games td.game-type {
  width: 28px;
}
.explorer-box .games td.game-date {
  width: 60px;
}
.explorer-box .games result {
  display: block;
  text-align: center;
  padding: 3px 5px;
  font-size: 0.9em;
}
.explorer-box .game_menu {
  background: var(--c-secondary);
  cursor: default;
  padding: 0;
}
.explorer-box .game_menu .game_title {
  text-align: center;
  color: var(--c-over);
  margin: 3px 0 1px 0;
}
.explorer-box .game_menu .menu {
  display: flex;
  justify-content: space-between;
  text-transform: uppercase;
}
.explorer-box .game_menu .menu a {
  color: #fff;
  padding: 4px 8px;
}
.explorer-box .game_menu .menu a:hover {
  background: rgba(255, 255, 255, 0.2);
}
.explorer-box .tablebase {
  width: 100%;
}
.explorer-box .tablebase td:first-child {
  font-size: 14px;
  line-height: 30px;
  padding-inline-start: 7px;
}
.explorer-box .tablebase td:last-child {
  padding-inline-end: 7px;
  text-align: right;
}
.explorer-box .tablebase result {
  padding: 3px 5px;
  margin-inline-start: 5px;
  border-radius: 3px;
  font-size: 0.9em;
}
html:not([dir=rtl]) .explorer-box .toconf {
  right: 0;
}
html[dir=rtl] .explorer-box .toconf {
  left: 0;
}
.explorer-box .toconf {
  position: absolute;
  top: 0;
  right: 0;
  cursor: pointer;
  display: block;
  font-size: 1.2em;
  width: 1.5em;
  height: 100%;
  text-align: center;
  opacity: 0.8;
  z-index: 3;
}
.explorer-box .toconf:hover {
  opacity: 1;
}
.explorer-box .toconf::before {
  position: relative;
  top: -1px;
  margin: 0 0 0 -2px;
}
html[dir=rtl] .explorer-box .toconf::before {
  margin: 0 -2px 0 0;
}
.explorer-box .message {
  flex: 1 1 auto;
  justify-content: center;
  text-align: center;
  font-style: italic;
}
.explorer-box .message strong {
  font-weight: bold;
  margin: 1em 0;
}
.explorer-box:not(.reduced) .message h3, .explorer-box.reduced:hover .message h3 {
  font-weight: bold;
}
.explorer-box .message p {
  white-space: normal;
  padding: 0 8px;
  margin: 0 0 8px 0;
}
.explorer-box.reduced .message p, .explorer-box.reduced .message button {
  display: none;
}
.explorer-box.reduced:hover .message p, .explorer-box.reduced:hover .message button {
  display: block;
}
.explorer-box .message .button {
  margin: 0 2em;
}

@media (width < 800px) and (orientation: portrait) {
  .explorer-box .explorer-title {
    line-height: 3em;
  }
  .explorer-box button.toconf {
    font-size: 1.5em;
    margin-inline-end: 8px;
  }
}
.training-box {
  flex: 1.5 1 0px;
}
.training-box .feedback {
  flex: 1 1 100%;
  display: flex;
  flex-flow: column;
  justify-content: center;
}
@media (width < 800px) and (orientation: portrait) {
  .training-box .feedback.view, .training-box .feedback.win {
    flex-flow: row;
  }
}
.training-box .feedback .find,
.training-box .feedback .fail {
  padding-top: 5px;
  padding-bottom: 8px;
}
.training-box .progress {
  margin-top: 5px;
  opacity: 0.8;
  width: 100%;
  height: 4px;
  background: var(--c-shade);
}
.training-box .progress div {
  background: var(--c-good);
  height: 4px;
  transition: width 0.5s;
  max-width: 100%;
}
.training-box .player {
  display: flex;
  align-items: center;
  margin: 0 1em;
}
.training-box .no-square {
  width: 64px;
  height: 64px;
  margin-inline-end: 10px;
}
.is3d .training-box div.no-square {
  height: 82px;
}
.training-box piece {
  position: inherit;
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.training-box .icon {
  display: block;
  width: 64px;
  height: 64px;
  margin-inline-end: 10px;
  font-size: 64px;
  line-height: 64px;
  text-align: center;
}
.training-box .instruction {
  flex: 1;
}
.training-box .instruction > strong {
  font-weight: normal;
  font-size: 1.2em;
}
.training-box .choices {
  line-height: 1.6em;
  margin: 5px 0 -5px 0;
}
.training-box .choices a {
  display: block;
}

.practice-box {
  user-select: none;
  flex: 0 0 135px;
}
.practice-box .comment {
  flex: 0 0 30px;
  display: flex;
  align-items: stretch;
  background: var(--c-bg-zebra);
  white-space: nowrap;
  line-height: 30px;
}
.practice-box .comment move {
  cursor: pointer;
  margin-inline-start: 5px;
  color: var(--c-link);
  transition: 0.3s;
}
.practice-box .comment .next {
  border: 0;
  background: color-mix(in oklab, var(--c-primary) 80%, var(--c-bg));
  color: var(--c-over);
  width: 100%;
  transition: all 150ms ease;
}
.practice-box .comment .next:hover {
  background: var(--c-primary);
}
.practice-box .progress div {
  background: var(--c-shade);
}
.practice-box.goodMove .progress div {
  background: var(--c-good);
  color: #fff;
}
.practice-box.inaccuracy .title, .practice-box.inaccuracy .progress div {
  background: var(--c-brag);
  color: #fff;
}
.practice-box.mistake .title, .practice-box.blunder .title, .practice-box.mistake .progress div, .practice-box.blunder .progress div {
  background: var(--c-bad);
  color: #fff;
}
.practice-box .comment .wait {
  padding-inline-start: 15px;
}
.practice-box .verdict {
  font-weight: bold;
  margin-inline-end: 10px;
  display: flex;
}
.practice-box .verdict::before {
  width: 30px;
  height: 100%;
  color: #fff;
  margin-inline-end: 7px;
  text-align: center;
  font-size: 1.4em;
  font-weight: normal;
}
.practice-box.goodMove .verdict {
  color: var(--c-good);
}
.practice-box.goodMove .verdict::before {
  background: var(--c-good);
  content: "✓";
  font-size: 1.7em;
}
.practice-box.inaccuracy .verdict {
  color: var(--c-brag);
}
.practice-box.inaccuracy .verdict::before {
  background: var(--c-brag);
  content: "?";
}
.practice-box.mistake .verdict, .practice-box.blunder .verdict {
  color: var(--c-bad);
}
.practice-box.mistake .verdict::before, .practice-box.blunder .verdict::before {
  background: var(--c-bad);
  content: "✗";
}

.ceval .practice-mode {
  justify-content: center;
  flex: 1 0 auto;
  height: 38px;
  width: 64px;
  text-align: center;
  font-weight: bold;
}
.ceval .practice-mode p {
  margin: 0;
  font-size: 1rem;
}
.ceval .practice-mode p.secondary {
  font-size: 0.9rem;
  opacity: 0.6;
}

.ceval p.status {
  margin: 0;
  color: var(--c-primary);
}

.analyse__fork {
  flex: 0 0 auto;
}
.analyse__fork move {
  user-select: none;
  background: color-mix(in oklab, var(--c-primary) 25%, var(--c-bg));
  color: var(--c-font-clear);
  flex: 0 0 50%;
  cursor: pointer;
  padding: 0.2em 1em;
  border-bottom: 1px solid var(--c-bg-box);
  -webkit-touch-callout: none;
}
.analyse__fork move:nth-child(odd) {
  border-inline-end: 1px solid var(--c-bg-box);
}
.analyse__fork move.correct {
  background: color-mix(in oklab, var(--c-secondary) 25%, var(--c-bg));
}
.analyse__fork move.wrong {
  background: color-mix(in oklab, var(--c-bad) 25%, var(--c-bg));
}
@media (width < 800px) and (orientation: portrait) {
  .analyse__fork move {
    justify-content: center;
    padding-block: 0.5em;
    font-size: 1.5em;
    border: 1px solid var(--c-bg-box);
    flex: 1 1 auto;
  }
  .analyse__fork move index,
  .analyse__fork move eval {
    display: none;
  }
}
.analyse__fork glyph {
  margin-inline-start: 2px;
}
.analyse__fork eval {
  flex: 3 0 auto;
  text-align: right;
  font-size: 0.9em;
}
@media (hover: hover) {
  .analyse__fork move:hover, .analyse__fork:not(:hover) move.selected {
    background: var(--c-primary);
    color: #fff;
  }
  .analyse__fork move:hover.correct, .analyse__fork:not(:hover) move.selected.correct {
    background: var(--c-secondary);
  }
  .analyse__fork move:hover.wrong, .analyse__fork:not(:hover) move.selected.wrong {
    background: var(--c-bad);
  }
}

.analyse__side {
  align-self: start;
}
.analyse__side .back-to-game {
  text-align: center;
  margin-top: 2em;
}
@media (width >= 1260px) {
  .analyse__side .back-to-game {
    margin-top: 10vh;
  }
}
.analyse__side .back-to-game .button {
  margin: 0 auto;
}
.analyse__side .analyse__wiki {
  margin: 2vh 0;
  flex: 1 1 auto;
}
@media (width >= 1260px) {
  .analyse__side .analyse__wiki {
    flex: 1 1 0;
  }
}
.analyse__side .analyse__wiki.empty {
  visibility: hidden;
}
.analyse--wiki .analyse__side {
  align-self: auto;
}
.analyse__wiki {
  overflow-y: auto;
  padding: 1rem 1rem 0 1rem;
  scrollbar-gutter: stable both-edges;
}
.analyse__wiki p {
  text-align: justify;
  line-height: 1.4;
}
.analyse__wiki ul,
.analyse__wiki ol {
  line-height: 1.4;
  margin-bottom: 1rem;
  padding-left: 1rem;
}
.analyse__wiki ul li {
  list-style: disc;
}
.analyse__wiki ol li {
  list-style: decimal;
}
.analyse__wiki h1,
.analyse__wiki h2 {
  font-size: 17px;
}
@media (min-width: 300px) {
  .analyse__wiki h1,
  .analyse__wiki h2 {
    font-size: calc(17px + 6 * (100vw - 300px) / 900);
  }
}
@media (min-width: 1200px) {
  .analyse__wiki h1,
  .analyse__wiki h2 {
    font-size: 23px;
  }
}
.analyse__wiki h1,
.analyse__wiki h2 {
  margin-bottom: 1rem;
}
.analyse__wiki h3 {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 0.7rem;
}

#analyse-cm {
  user-select: none;
  background: var(--c-bg-box);
  position: absolute;
  display: none;
  z-index: 108;
  cursor: default;
  overflow: hidden;
}
#analyse-cm.visible {
  display: block;
}
#analyse-cm .title {
  padding: 0.4em;
  text-align: center;
  font-size: 1.2em;
  border-bottom: 1px solid var(--c-border);
  margin: 0;
}
#analyse-cm a {
  padding-inline: 0.3em 0.6em;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  color: var(--c-font);
}
#analyse-cm a::before {
  width: 2em;
  text-align: center;
}
#analyse-cm a:hover {
  background: rgb(from var(--c-primary) r g b/calc(alpha * 0.3));
}
#analyse-cm.transparent {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.material {
  pointer-events: none;
}
.material div {
  display: inline-block;
  margin-inline-start: 10px;
}
.material mpiece {
  margin-inline-start: -10px;
  background-size: cover;
  display: inline-block;
}
.material mpiece.pawn {
  background-image: url("../piece/mono/P.svg");
}
.material mpiece.bishop {
  background-image: url("../piece/mono/B.svg");
}
.material mpiece.knight {
  background-image: url("../piece/mono/N.svg");
}
.material mpiece.rook {
  background-image: url("../piece/mono/R.svg");
}
.material mpiece.queen {
  background-image: url("../piece/mono/Q.svg");
}
.material mpiece.king {
  background-image: url("../piece/mono/K.svg");
}
:where(html.transp) .material mpiece {
  filter: brightness(1.3) drop-shadow(0 1px 1px var(--c-font-shadow));
}
:where(html.transp.light) .material mpiece {
  filter: brightness(0.7) drop-shadow(0 1px 1px var(--c-font-shadow));
}
html:not([dir=rtl]) .analyse__player_strip {
  right: 0;
}
html[dir=rtl] .analyse__player_strip {
  left: 0;
}
.analyse__player_strip {
  position: absolute;
  display: flex;
}
.analyse__player_strip.top {
  top: -20px;
  z-index: 107;
}
.is3d .analyse__player_strip.top {
  top: -55px;
}
.analyse__player_strip.bottom {
  top: var(---cg-height, 100%);
  z-index: 1;
}
.coords-out .is2d .analyse__player_strip.bottom {
  top: calc(var(---cg-height, 100%) + 15px);
}
.is3d .analyse__player_strip.bottom {
  top: calc(var(---cg-height, 100%) + 15px);
}
.analyse__player_strip {
  /* Where to put them in col1 layout? It moves the entire board and controls down for little benefit */
}
@media (width < 800px) and (orientation: portrait) {
  .analyse__player_strip {
    display: none;
  }
}

:where(html.transp) .analyse__clock {
  backdrop-filter: blur(6px);
}
.analyse__clock {
  padding: 0 0.5em;
  margin-inline-start: 12px;
  height: 20px;
  font-weight: bold;
  text-align: center;
}
.analyse__clock.active {
  background: color-mix(in oklab, var(--c-primary) 30%, var(--c-bg));
  box-shadow: none;
}
.analyse__clock tenths {
  font-size: 80%;
}
.analyse__clock icon {
  font-size: 0.7em;
  margin-inline-end: 0.4em;
  color: var(--c-accent);
}

.material {
  padding-inline-end: 1px;
}
.material mpiece {
  width: 20px;
  height: 20px;
}
.material mpiece.pawn {
  margin-inline-start: -10px;
}
.material score {
  margin-top: -2px;
}

.material-top {
  margin-top: -1px;
}

.material-bottom {
  margin-top: 1px;
}

.analyse__persistence__help {
  font-size: 0.9em;
  background: var(--c-bg-zebra);
  padding: 0.4em 0.8em;
  margin: 0;
}
.analyse__persistence__help icon {
  font-size: 1.5em;
  margin-right: 0.4em;
}
.analyse__persistence__actions {
  font-size: 0.9em;
}
.analyse__persistence__actions .button::before {
  margin-right: 0.4em;
}

.keyboard-help td.mouse li {
  list-style: disc inside;
  margin-inline-start: 1em;
}

.analysis-settings-dialog {
  width: min(96vw, 720px);
  display: flex;
  flex-direction: column;
  gap: 1em;
}
.analysis-settings-dialog h2 {
  display: none;
}
@media (max-width: 599.29px) {
  .analysis-settings-dialog h2 {
    display: block;
  }
}

.analysis-settings-dialog .analysis-settings-view {
  gap: 1.5em;
}
.analysis-settings-dialog .analysis-settings-view * {
  gap: 1em;
}
.analysis-settings-dialog .analysis-settings-view fieldset legend {
  font-weight: 500;
}
.analysis-settings-dialog .analysis-settings-view .setting {
  font-size: 1em;
  color: var(--c-font-dim);
}

.analysis-settings-view {
  display: flex;
  flex-wrap: wrap;
  justify-content: stretch;
  touch-action: pan-x pan-y;
  -webkit-tap-highlight-color: transparent;
  gap: 2em;
  height: 100%;
  text-align: start;
}
@media (max-width: 599.29px) {
  .analysis-settings-view {
    flex-direction: column;
  }
}
.analysis-settings-view * {
  gap: 1.5em;
}
.analysis-settings-view div,
.analysis-settings-view fieldset {
  display: flex;
  flex-direction: column;
}
.analysis-settings-view fieldset {
  flex: initial;
  border: 1px solid var(--c-border);
  border-radius: var(---ui-roundness, 7px);
  background: var(--c-bg-mid);
  padding: 1em;
}
.analysis-settings-view fieldset legend {
  font-size: 1.3em;
  color: var(--c-font-dim);
  padding: 6px 6px 0;
}
.analysis-settings-view .column {
  justify-content: space-between;
  flex: 1;
}
.analysis-settings-view .setting {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: space-between;
  font-size: 1.1em;
  cursor: pointer;
}
.analysis-settings-view .setting.inert {
  cursor: default;
}
.analysis-settings-view .help-container {
  display: none;
  overflow: hidden;
  align-items: stretch;
}
@media (min-width: 599.3px) {
  .analysis-settings-view .help-container {
    display: flex;
  }
}
.analysis-settings-view .help-container fieldset {
  gap: 1em;
}
.analysis-settings-view .help-button {
  font-size: 1.2em;
  color: var(--c-font-dim);
  outline: none;
}
.analysis-settings-view .help-button::before {
  font-size: 18px;
  margin-inline-end: 0.5em;
  vertical-align: sub;
}
.analysis-settings-view .show-all {
  margin-inline: auto;
}
.analysis-settings-view .hover-hint {
  color: var(--c-font-dim);
  display: none;
}
@media (hover: hover) and (pointer: fine) and (min-width: 599.3px) {
  .analysis-settings-view :has(.help-pane[data-key=keyboardShortcuts]) .hover-hint {
    display: block;
  }
}
@media (hover: none) or (pointer: coarse) {
  .analysis-settings-view legend {
    display: none;
  }
}

.help-container fieldset:has(video, img),
.setting-popup fieldset:has(video, img) {
  align-items: center;
}
.help-container img,
.help-container video,
.setting-popup img,
.setting-popup video {
  border: 1px solid var(--c-border);
  max-width: 248px;
  max-height: 248px;
  min-width: 0;
  min-height: 0;
}

.help-pane {
  max-height: 300px;
}

.setting-popup {
  display: block;
  touch-action: none;
  background: var(--c-bg-zebra2);
}

.retro-box .title {
  display: flex;
  justify-content: space-between;
}
.retro-box .player.center {
  justify-content: center;
}
.retro-box:not(.find) .player {
  height: 100%;
}
.retro-box .win .icon:not(.off) {
  color: #759900;
}
.retro-box .fail .icon:not(.off) {
  color: #dc322f;
}
.retro-box .instruction glyph {
  font-weight: normal;
  opacity: 0.7;
}
.retro-box .half {
  flex: 1 1 50%;
}
.retro-box .continue {
  display: flex;
  font-size: 1.3em;
  background: rgba(56, 147, 232, 0.8);
  color: #fff;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  padding: 0 10px;
}
.retro-box .continue:hover {
  background: rgb(56, 147, 232);
}
.retro-box .continue icon::before {
  font-size: 2.5em;
  margin-inline-end: 10px;
}

.analyse__puzzle {
  margin-top: var(---block-gap);
}
.analyse__puzzle a {
  text-transform: inherit;
  text-align: start;
}
.analyse__puzzle a::before {
  font-size: 2.8em;
}

.advice-summary {
  color: var(--c-font-page);
  font-size: 0.9em;
}
.advice-summary__player {
  text-align: center;
  font-weight: bold;
  margin-bottom: 0.5em;
}
.advice-summary__sections > div {
  flex: 1 0 auto;
}
.advice-summary__sections icon,
.advice-summary__sections strong {
  flex: 0 1 5ch;
  text-align: center;
}
.advice-summary__sections .symbol {
  cursor: pointer;
}
.advice-summary__sections .good {
  color: var(--c-good);
}
.advice-summary__sections .inaccuracy {
  color: var(--c-inaccuracy);
}
.advice-summary__sections .inaccuracy.symbol:hover {
  color: color-mix(in oklab, var(--c-inaccuracy) 70%, var(--c-font));
}
.advice-summary__sections .mistake {
  color: var(--c-mistake);
}
.advice-summary__sections .mistake.symbol:hover {
  color: color-mix(in oklab, var(--c-mistake) 70%, var(--c-font));
}
.advice-summary__sections .blunder {
  color: var(--c-blunder);
}
.advice-summary__sections .blunder.symbol:hover {
  color: color-mix(in oklab, var(--c-blunder) 70%, var(--c-font));
}
.advice-summary .color-icon::before {
  vertical-align: text-bottom;
}
.advice-summary .button {
  margin: 0.6em 0;
}
@media (width < 800px) and (orientation: portrait) {
  .advice-summary {
    margin: var(---block-gap) 0;
  }
}

#acpl-chart-container {
  cursor: pointer;
}

#acpl-chart-container-loader {
  padding-inline: 0 10px;
  padding-top: 7px;
  padding-bottom: 7px;
  font-size: 0.9em;
  position: absolute;
  top: 91px;
  background: var(--c-bg-box);
  line-height: 20px;
  box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.3);
  display: flex;
  border: 1px solid var(--c-border);
  border-radius: 0 99px 99px 0;
}
#acpl-chart-container-loader span {
  margin-inline-start: 7px;
  opacity: 1;
  transition: 0.5s;
  width: 100px;
  display: block;
}
.analyse__underboard:hover #acpl-chart-container-loader span {
  margin-inline-start: 0;
  width: 0;
  opacity: 0;
}
#acpl-chart-container-loader .spinner {
  width: 32px;
  height: 32px;
  display: inline-block;
  margin-inline-start: 10px;
}

.comp-off .analyse__underboard:not(:has(.future-game-analysis)) .computer-analysis {
  display: none !important;
}

.analyse__underboard__menu {
  justify-content: center;
  align-items: flex-start;
}
.analyse__underboard__menu > button {
  flex: 1 1 0;
  text-align: center;
  font-size: 0.9em;
  padding: 0.4em 0.1em;
  cursor: pointer;
  position: relative;
  border-bottom: 1px solid var(--c-border);
}
.analyse__underboard__menu > button:hover {
  background: var(--c-body-gradient);
}
.analyse__underboard__menu > button.active {
  border-color: var(--c-accent);
}
.analyse-hunter .analyse__underboard__menu {
  display: none;
}
.analyse__underboard__panels {
  ---panel-height: 30vh;
}
@media (width >= 800px), (orientation: landscape) {
  .analyse__underboard__panels {
    ---panel-height: 240px;
  }
}
.analyse__underboard__panels > div {
  height: var(---panel-height);
  display: none;
  text-align: left;
}
.analyse__underboard__panels > div.active {
  display: block;
}
.analyse__underboard__panels .crosstable table {
  margin-top: 60px;
}
.analyse-hunter .analyse__underboard__panels > div {
  display: block;
}
.analyse__underboard .ctable {
  align-items: flex-start;
  justify-content: center;
  padding: 0.5em 0 0 0;
}
.analyse__underboard .ctable.active {
  display: flex;
}
.analyse__underboard .computer-analysis {
  position: relative;
}
.analyse__underboard .future-game-analysis {
  text-align: center;
  margin-top: 2em;
}
.analyse__underboard .fen-pgn {
  overflow-x: visible;
  overflow-y: auto;
  font-size: 0.9em;
  padding: 0.5em 0.7em 0 0;
}
.analyse__underboard .fen-pgn > div {
  gap: 1em;
  margin-bottom: 1em;
}
.analyse__underboard .fen-pgn .copy-me {
  flex: 1 1 auto;
}
.analyse__underboard .fen-pgn .pgn {
  white-space: pre-wrap;
  font-family: monospace;
  direction: ltr;
}
.analyse__underboard__fen {
  width: 100%;
}

#acpl-chart-container,
#movetimes-chart-container {
  width: 100%;
  height: var(---panel-height);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0) 20%, rgba(128, 128, 128, 0.2) 50%, rgba(255, 255, 255, 0) 80%, rgba(255, 255, 255, 0) 100%);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.game-duration {
  position: absolute;
  bottom: 0;
  right: 1.5em;
  pointer-events: none;
  font-family: Roboto, sans-serif;
}

.gif-export-dialog {
  gap: 1.5em;
}
.gif-export-dialog .gif-options {
  gap: 0.8em;
}
.gif-export-dialog .setting {
  gap: 1em;
}
.gif-export-dialog .setting label {
  cursor: pointer;
  user-select: none;
}
.gif-export-dialog .gif-actions {
  gap: 1em;
}
