/* The training screen, laid out the way lichess.org/training is: the board on the left,
   a box of tools on the right (the moves, then what to do), the controls and the chapter
   strip under the board. Measured on lichess at 1440 by 900: board and tools share one
   height, a 4px gap, tools 240 to 400px wide, the feedback panel on the zebra ground. */

.puzzle {
  overflow-x: clip;
  grid-column: 1 / -1;
  display: grid;
  gap: 8px 10px;
  grid-template-columns: minmax(0, min(78vh, calc(100vw - 460px))) minmax(260px, 380px);
  grid-template-areas:
    "turn tools"
    "board tools"
    "controls side"
    "strip side";
  align-items: start;
  justify-content: center;
}
.puzzle__board { grid-area: board; position: relative; }
/* Whose move it is, right above the board: that side's king and the words. */
.puzzle__turn { grid-area: turn; display: flex; align-items: center; gap: 6px; min-height: 32px; font-size: 15px; font-weight: 600; color: var(--c-font-clear); }
/* A light circle behind the king, so a black king shows on the dark page as well as a white one. */
.puzzle__dot { position: relative; display: block; width: 28px; height: 28px; flex: none; border-radius: 50%; background: #d9d4cc; box-shadow: inset 0 0 0 1px #0003; }
.puzzle__dot piece { position: absolute; inset: 3px; width: auto; height: auto; background-size: cover; display: block; transform: none; }
.puzzle__board .cg-wrap { width: 100%; padding-bottom: 100%; height: 0; position: relative; }
.puzzle__board .cg-wrap cg-container { position: absolute; inset: 0; }
.puzzle__board cg-board { border-radius: var(--radius); box-shadow: var(--box-shadow); }

.puzzle__tools {
  grid-area: tools;
  background: var(--c-bg-box);
  border-radius: var(--radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-height: 0;
}
.puzzle__head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.puzzle__head .icon { width: 44px; height: 33px; opacity: 0.8; flex: none; color: var(--c-font); }
.puzzle__head .icon svg { width: 100%; height: 100%; }
.puzzle__head b { display: block; font-family: var(--font-head); font-weight: 400; font-size: 17px; color: var(--c-font-clear); }
.puzzle__head small { color: var(--c-font-dim); font-size: 12px; }
.puzzle__title { flex: 1 1 auto; min-width: 0; }
.puzzle__nav { display: flex; gap: 8px; margin-top: 10px; }
.puzzle__nav .button { padding: 0.55em 1.1em; font-size: 0.9rem; min-height: 40px; }
.puzzle__nav .button:disabled { opacity: 0.45; cursor: default; }

.puzzle__moves {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 90px;
  border-bottom: 1px solid var(--c-border);
  display: grid;
  grid-template-columns: 3em 1fr 1fr;
  align-content: start;
  font-size: 15px;
}
.puzzle__moves .ix {
  color: var(--c-font-dimmer);
  background: var(--c-bg-zebra);
  text-align: center;
  padding: 6px 0;
  border-right: 1px solid var(--c-border);
}
.puzzle__moves .mv { padding: 6px 10px; color: var(--c-font); font-family: var(--font-body); }
.puzzle__moves .mv.good { color: var(--c-good); }
.puzzle__moves .mv.shown { color: var(--c-font-dim); font-style: italic; }
.puzzle__moves .mv.given { color: var(--c-mistake); }
.puzzle__moves .mv.empty { color: var(--c-font-dimmer); }

.puzzle__feedback {
  background: var(--c-bg-zebra);
  padding: 22px 24px;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.puzzle__feedback .player { display: flex; align-items: center; gap: 14px; }
.puzzle__feedback .no-square { width: 58px; height: 58px; flex: none; position: relative; box-sizing: border-box; }
.puzzle__feedback .no-square.cg-wrap piece { position: absolute; inset: 0; width: 100%; height: 100%; background-size: cover; display: block; transform: none; }
.puzzle__feedback .mark {
  width: 58px; height: 58px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; line-height: 1; font-family: var(--font-head);
}
.puzzle__feedback.good .mark { color: var(--c-good); }
.puzzle__feedback.fail .mark { color: var(--c-bad); }
.puzzle__feedback .instruction strong { display: block; font-size: 1.45em; font-weight: 700; color: var(--c-font-clear); margin-bottom: 3px; }
.puzzle__feedback .instruction em { font-style: normal; color: var(--c-font); line-height: 1.45; display: block; }
.puzzle__feedback.good .instruction strong { color: var(--c-good); }
.puzzle__feedback.fail .instruction strong { color: var(--c-bad); }
.puzzle__feedback .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.puzzle__feedback .actions .button { padding: 0.65em 1em; font-size: 0.9rem; }
.puzzle__feedback .refute-line { display: block; margin-top: 6px; font-size: 13px; color: var(--c-font-dim); }

.puzzle__continue {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--c-primary); color: var(--c-over);
  text-transform: uppercase; font-family: var(--font-head); font-size: 1.25em;
  padding: 1.4em; border: 0; cursor: pointer; width: 100%;
}
.puzzle__continue:hover { background: hsl(from var(--c-primary) h s calc(l + 10)); color: var(--c-over); }

.puzzle__controls {
  grid-area: controls;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
.puzzle__controls .group { display: flex; gap: 4px; }
.puzzle__controls .button { padding: 0.6em 0.9em; font-size: 0.85rem; }

.puzzle__side {
  grid-area: side;
  background: var(--c-bg-box);
  border-radius: var(--radius);
  box-shadow: var(--box-shadow);
  padding: max(2vmin, 14px);
  line-height: 1.5;
}
.puzzle__side .infos { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--c-border); }
.puzzle__side .infos .icon { width: 48px; height: 36px; opacity: 0.7; flex: none; }
.puzzle__side .infos .icon svg { width: 100%; height: 100%; }
.puzzle__side .infos b { color: var(--c-font-clear); font-weight: 400; }
.puzzle__side p { margin: 0 0 6px; }
.puzzle__side .dim { color: var(--c-font-dim); font-size: 12.5px; }
.puzzle__side .scan { display: block; width: 100%; max-width: 280px; margin-top: 8px; border-radius: 4px; background: #fff; }
.puzzle__side .scan-strip { display: block; width: 100%; max-width: 280px; margin-top: 2px; background: #fff; }

/* The chapter strip: one small square for each position, like the lichess session. */
.puzzle__strip { grid-area: strip; display: flex; flex-wrap: wrap; gap: 4px; padding-top: 2px; }
.puzzle__strip a {
  min-width: 30px; height: 26px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  font-size: 11px; color: var(--c-font-dim);
  background: var(--c-bg-zebra2);
}
.puzzle__strip a:hover { color: var(--c-font-clear); }
.puzzle__strip a.clean { background: var(--c-good); color: var(--c-over); }
.puzzle__strip a.miss { background: var(--c-bad); color: var(--c-over); }
.puzzle__strip a.shown { background: var(--c-shade); color: var(--c-font-clear); }
.puzzle__strip a.current { outline: 2px solid var(--c-primary); outline-offset: 1px; color: var(--c-font-clear); }

/* Choosing a piece when a pawn reaches the last rank. */
.promotion {
  position: absolute; inset: 0; z-index: 20;
  background: var(--c-mask);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
}
.promotion .choices { display: flex; gap: 8px; background: var(--c-bg-box); padding: 10px; border-radius: var(--radius); box-shadow: var(--box-shadow); }
.promotion button.cg-wrap {
  width: 76px; height: 76px; border: 0; border-radius: 50%; padding: 0;
  background: var(--c-bg-zebra2); cursor: pointer; position: relative; display: block; box-sizing: border-box;
}
.promotion button.cg-wrap:hover { background: var(--c-primary); }
.promotion button.cg-wrap piece { position: absolute; inset: 6px; width: auto; height: auto; background-size: cover; display: block; transform: none; }

/* The book's own picture, shown on request. */
.sheet {
  position: fixed; inset: 0; z-index: 90;
  background: var(--c-mask);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.sheet .box { max-width: 520px; width: 100%; padding: 22px; }
.sheet img { width: 100%; display: block; background: #fff; border-radius: 4px; }
.sheet .row-end { display: flex; justify-content: flex-end; margin-top: 14px; gap: 8px; }
.sheet p { line-height: 1.5; }

/* The live index. */
.index-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1em; }
.index-filters .button { padding: 0.5em 0.9em; font-size: 0.85rem; }
.index-filters .button.active { background: var(--c-secondary); color: var(--c-over); }
.index-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 6px 24px; margin-bottom: 0.5em; }
.index-steps .dim, .puzzle__side .dim { grid-column: 1 / -1; color: var(--c-font-dim); margin: 0.3em 0 0; }
.index-step { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: baseline; }
.index-step b { font-weight: 400; color: var(--c-font-clear); font-variant-numeric: tabular-nums; }
.index-step .bar { grid-column: 1 / -1; display: block; height: 4px; border-radius: 2px; background: var(--c-bg-zebra2); overflow: hidden; }
.index-step .bar i { display: block; height: 100%; background: var(--c-good); transition: width 0.4s; }
.index-part { font-family: var(--font-head); font-weight: 400; font-size: 18px; color: var(--c-font-clear); padding: 0 var(--box-pad); margin: 1.2em 0 0.6em; }
.index-part em { font-style: normal; font-weight: 300; font-size: 14px; color: var(--c-font-dimmer); margin-inline-start: 1ch; }
.index-grid {
  display: grid; gap: 8px; padding: 0 var(--box-pad);
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}
.index-tile {
  display: flex; flex-direction: column; gap: 3px;
  padding: 5px; border-radius: var(--radius);
  background: var(--c-bg-zebra); color: var(--c-font);
  border: 1px solid transparent; transition: background-color 0.15s, border-color 0.15s;
}
.index-tile:hover { background: color-mix(in oklab, var(--c-primary) 12%, var(--c-bg-box)); color: var(--c-font-clear); }
.index-tile img { width: 100%; aspect-ratio: 440 / 515; object-fit: cover; object-position: top; background: #fff; border-radius: 3px; }
.index-tile .n { font-size: 12px; color: var(--c-font-clear); }
.index-tile .s { font-size: 11px; color: var(--c-font-dim); }
.index-tile[data-stage="checked"] { border-color: color-mix(in oklab, var(--c-good) 60%, transparent); }
.index-tile[data-stage="checked"] .s { color: var(--c-good); }
.index-tile[data-stage="look"] { border-color: color-mix(in oklab, var(--c-bad) 60%, transparent); }
.index-tile[data-stage="look"] .s { color: var(--c-bad); }
.index-tile[data-stage="engine"] .s, .index-tile[data-stage="read"] .s { color: var(--c-link); }
.index-read { display: grid; grid-template-columns: 180px 1fr; gap: 12px; align-items: center; margin-top: 12px; }
.index-read .cg-wrap { width: 180px; height: 180px; }
.sheet .box { max-height: 92vh; overflow-y: auto; }

@media (max-width: 900px) {
  .puzzle {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "turn" "board" "tools" "controls" "strip" "side";
  }
  .puzzle__tools { align-self: auto; }
  .puzzle__moves { max-height: 120px; min-height: 0; }
  /* On a phone an empty list of moves was a blank band between the board and "Your turn". */
  .puzzle__moves:empty { display: none; }
  .puzzle__feedback { min-height: 0; padding: 16px 18px; }
  /* Shorter head on a phone, so Next puzzle sits higher. */
  .puzzle__head { padding: 10px 14px; }
  .puzzle__nav { margin-top: 8px; }
  .puzzle__turn { min-height: 28px; }
}

/* Set aside: fixing a position by hand. The printed solution runs across the top, large
   enough to read. Under it: the printed diagram, the board, and the tools. */
.fix-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 0.6em; }
.fix-sum a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius); background: var(--c-bg-zebra); color: var(--c-font); }
.fix-sum a:hover { color: var(--c-font-clear); background: var(--c-bg-zebra2); }
.fix-sum b { font-family: var(--font-head); font-weight: 300; font-size: 26px; color: var(--c-font-clear); font-variant-numeric: tabular-nums; }
.fix-sum span { font-size: 12.5px; line-height: 1.35; }
.fix-note { color: var(--c-font-dim); padding: 0 var(--box-pad); margin: 0 0 0.7em; max-width: 78ch; line-height: 1.5; }

.fix {
  overflow-x: clip;        /* the board's file letters reach past its edge when Black is at the bottom */
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(200px, 290px) minmax(0, min(66vh, 560px)) minmax(290px, 400px);
  grid-template-areas: "head head head" "sol sol sol" "book board tools";
  align-items: start;
  justify-content: center;
}
.fix .box { padding: 12px 16px; }
.fix h3 { font-family: var(--font-head); font-weight: 400; font-size: 14px; color: var(--c-font-dim); margin: 0 0 8px; }
.fix__head { grid-area: head; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fix__head h1 { font-family: var(--font-head); font-weight: 300; font-size: 26px; color: var(--c-font-clear); margin: 0; }
.fix__head .group { display: flex; gap: 6px; flex-wrap: wrap; }
.fix__head .button, .fix__line .button { padding: 0.55em 0.9em; font-size: 0.85rem; }
.fix__sol { grid-area: sol; min-width: 0; }
/* The printed lines keep a size a person can read; on a narrow screen the picture scrolls
   sideways inside its own box, never the page. */
.fix__solpic { overflow-x: auto; background: #fff; border-radius: 4px; padding: 6px; }
.fix__solpic img { display: block; width: auto; max-width: 100%; height: auto; }   /* its least width is set from the picture's own, in app.js */
.fix__sol .dim { margin: 8px 0 0; }
.fix__book { grid-area: book; min-width: 0; }
.fix__book img { display: block; width: 100%; background: #fff; border-radius: 4px; }
.fix__board { grid-area: board; position: relative; min-width: 0; }
.fix__board .cg-wrap { width: 100%; padding-bottom: 100%; height: 0; position: relative; }
.fix__board .cg-wrap cg-container { position: absolute; inset: 0; }
.fix__board cg-board { border-radius: var(--radius); box-shadow: var(--box-shadow); }
.fix__tools { grid-area: tools; display: flex; flex-direction: column; gap: 10px; min-width: 0; line-height: 1.45; }
.fix__tools p { margin: 0; }
.fix .why { color: var(--c-bad); }
.fix .ready { color: var(--c-good); }
.fix .dim { color: var(--c-font-dim); font-size: 12.5px; }
.fix .raw { margin-top: 8px; overflow-wrap: anywhere; }
.seg { display: inline-flex; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--c-border); }
.seg button { border: 0; background: var(--c-bg-zebra); color: var(--c-font); padding: 0.55em 0.95em; font: inherit; font-size: 13.5px; cursor: pointer; }
.seg button + button { border-inline-start: 1px solid var(--c-border); }
.seg button.active { background: var(--c-secondary); color: var(--c-over); }
.seg button[disabled] { opacity: 0.45; cursor: not-allowed; }
#mark-move button, #mark-pos button { padding: 0.5em 0.6em; min-width: 2.2em; }
.fix__line .seg { flex-wrap: wrap; }
.fix__line .steps { margin: 2px 0 0; padding-inline-start: 1.3em; font-size: 13px; color: var(--c-font); line-height: 1.45; }
.fix__line .steps li { margin-bottom: 2px; }
/* The live engine, laid out the way lichess's is: a switch, the score, the depth with a
   thin bar that fills as it goes deeper, then one row for each line. */
.ceval { position: relative; margin: -12px -16px 4px; border-bottom: 1px solid var(--c-border); }
.ceval__bar { height: 3px; background: transparent; }
.ceval__bar span { display: block; height: 100%; width: 0; background: var(--c-secondary); transition: width 0.3s; }
.ceval__head { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 8px; }
.ceval .pearl { font-family: var(--font-body); font-size: 22.4px; font-weight: 700; line-height: 38px; min-width: 3.3ch; color: var(--c-font-clear); font-variant-numeric: tabular-nums; }
.ceval:not(.on) .pearl { display: none; }
.ceval__info { display: flex; flex-direction: column; font-size: 12px; line-height: 16px; color: var(--c-font-dim); flex: 1; min-width: 0; }
.ceval__lines { border: 1px solid var(--c-border); background: var(--c-bg-zebra); color: var(--c-font-dim); border-radius: var(--radius); font: inherit; font-size: 12px; padding: 4px 8px; cursor: pointer; }
.ceval__lines:hover { color: var(--c-font-clear); }
.ceval__pvs { background: var(--c-bg-zebra); }
.ceval .pv { font-size: 13px; line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 10px; border-top: 1px solid var(--c-border); color: var(--c-font); }
.ceval .pv strong { display: inline-block; min-width: 4.6ch; font-weight: 700; color: var(--c-font-clear); margin-inline-end: 4px; }
.ceval .pv .n { color: var(--c-font-dim); margin-inline: 4px 1px; }
.ceval .pv .pv-san { margin-inline-start: 4px; cursor: pointer; border-radius: 3px; padding: 0 1px; }
.ceval .pv .pv-san:hover { background: var(--c-primary); color: var(--c-over); }
.ceval__preview { position: absolute; z-index: 30; width: 200px; height: 200px; box-shadow: var(--box-shadow); border-radius: var(--radius); overflow: hidden; }
.ceval__preview .cg-wrap { width: 200px; height: 200px; }
/* The switch, the way lichess draws its toggles. */
.switch { position: relative; width: 40px; height: 22px; flex: none; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--c-bg-zebra2); border-radius: 11px; transition: background 0.2s; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; border-radius: 50%; background: var(--c-font-dim); transition: transform 0.2s, background 0.2s; }
.switch input:checked + span { background: var(--c-secondary); }
.switch input:checked + span::before { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--c-primary); outline-offset: 2px; }
/* The bar beside the board: White's share from the bottom, as lichess draws it. */
.fix__board { display: grid; grid-template-columns: minmax(0, 1fr) 14px; gap: 6px; align-items: stretch; }
.gauge { position: relative; border-radius: 7px; overflow: hidden; background: #fff; }
.gauge.idle { visibility: hidden; }
.gauge i { position: absolute; left: 0; right: 0; top: 0; height: 50%; background: #403d39; transition: height 0.6s; }
.gauge.flip { transform: rotate(180deg); }
.gauge b { position: absolute; left: 0; right: 0; height: 2px; background: rgba(128, 128, 128, 0.5); }
.gauge b.zero { background: rgba(214, 79, 0, 0.6); height: 3px; }
.fix__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.fix__row > span { color: var(--c-font-dim); font-size: 13px; }
.palette { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.palette button { aspect-ratio: 1; border: 1px solid transparent; border-radius: var(--radius); background: var(--c-bg-zebra2); color: var(--c-font); cursor: pointer; padding: 0; position: relative; font: inherit; font-size: 11.5px; min-width: 0; }
.palette button.cg-wrap piece { position: absolute; inset: 2px; width: auto; height: auto; background-size: cover; display: block; transform: none; }
.palette button.active { border-color: var(--c-primary); background: color-mix(in oklab, var(--c-primary) 30%, var(--c-bg-zebra2)); color: var(--c-font-clear); }
.fix__line { display: flex; flex-direction: column; gap: 6px; background: var(--c-bg-zebra); border-radius: var(--radius); padding: 10px 12px; }
.fix__line b { font-weight: 400; color: var(--c-font-dim); font-size: 13px; }
.fix__line #line { color: var(--c-font-clear); font-size: 15px; overflow-wrap: anywhere; }
.fix__line p { font-size: 12.5px; }
/* A line as written, with its side lines in brackets. Each move can be pressed. */
.movetext { line-height: 1.9; }
.movetext .mvt { display: inline-block; padding: 0 4px; border-radius: 3px; color: var(--c-font-clear); cursor: pointer; white-space: nowrap; }
.movetext .mvt i { font-style: normal; color: var(--c-font-dim); margin-inline-end: 3px; }
.movetext .mvt.side { color: var(--c-font); }
.movetext .mvt:hover { background: var(--c-bg-zebra2); }
.movetext .mvt.now { background: var(--c-primary); color: var(--c-over); }
.movetext .mvt.now i { color: var(--c-over); }
.movetext .par { color: var(--c-font-dim); }
.fix__line .group { display: flex; gap: 6px; flex-wrap: wrap; }
/* Typing moves or a position in, the way lichess takes them. */
.fix__type { display: flex; gap: 6px; }
.fix__type input { flex: 1; min-width: 0; box-sizing: border-box; background: var(--c-bg-input); color: var(--c-font-clear); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 8px 10px; font: inherit; font-size: 14px; }
.fix__type input:focus { outline: 2px solid var(--c-primary, currentColor); outline-offset: -1px; }
.fix__line a.typed-fill { font-size: 12.5px; cursor: pointer; }
.fix__tools textarea { width: 100%; box-sizing: border-box; background: var(--c-bg-zebra); color: var(--c-font); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 8px 10px; font: inherit; font-size: 13.5px; resize: vertical; }
.fix__tools .actions { display: flex; flex-wrap: wrap; gap: 6px; }
.fix__tools .actions .button { padding: 0.65em 1em; font-size: 0.88rem; }
.verdict { background: var(--c-bg-zebra); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.verdict:empty { display: none; }
.verdict.good b { color: var(--c-good); }
.verdict.bad b, .verdict.bad > p:first-child { color: var(--c-bad); }

@media (max-width: 1080px) {
  .fix { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); grid-template-areas: "head head" "sol sol" "book board" "tools tools"; }
}
@media (max-width: 640px) {
  .fix { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "sol" "book" "board" "tools"; }
  .fix__book img { max-width: 260px; }
}

/* After a puzzle: the book's line written out, and the player's own moves under it. */
.puzzle__moves.as-text { display: block; padding: 10px 14px; }
.booktext { margin-bottom: 12px; }
.booktext > b { display: block; font-weight: 400; color: var(--c-font-dim); font-size: 12.5px; margin-bottom: 2px; }
.booktext .group { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.booktext .button { padding: 0.5em 0.85em; font-size: 0.8rem; }
.booktext .dim { color: var(--c-font-dim); font-size: 12px; margin: 6px 0 0; }
tr.tried { cursor: pointer; }
tr.tried:hover td { background: var(--c-bg-zebra2); }
.tried-board { width: 100%; padding-bottom: 100%; height: 0; position: relative; }
.tried-board cg-container { position: absolute; inset: 0; }
