/* Shared layout for the dojo pages (reversi, chess, puzzles): board on the left, scoresheet panels on the right. */
.dojo { max-width: 1120px; margin: 0 auto; padding: 14px 16px 8px; display: grid; gap: 14px; }
@media (min-width: 920px) {
  .dojo { grid-template-columns: minmax(0, 1fr) 390px; align-items: start; }
  .dojo .head { grid-column: 1 / -1; }
  .dojo .right { position: sticky; top: 12px; }
}
.dojo .left, .dojo .right { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.dojo .head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; justify-content: space-between; border-bottom: 3px solid var(--ink); padding-bottom: 10px; }
.dojo h1 { font-family: var(--display); font-weight: 400; font-size: clamp(22px, 3vw, 30px); letter-spacing: .02em; line-height: 1.15; margin: 0; }
.dojo h1 small { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.headctl { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
label.sel { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: grid; gap: 3px; }
.dojo select, .dojo button { font-family: var(--sans); font-size: 13.5px; color: var(--ink); background: var(--surface); border: 1.5px solid var(--ink); border-radius: 0; padding: 7px 11px; cursor: pointer; }
.dojo button { font-weight: 700; transition: transform .08s; }
.dojo button.primary { box-shadow: 2px 2px 0 var(--hl); }
.dojo button:hover { background: var(--hl); color: var(--hl-ink); }
.dojo button:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.dojo button.primary { background: var(--btn); color: var(--btn-ink); }
.dojo button:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.dojo button:disabled:hover { background: var(--surface); color: var(--ink); }

.strip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tally { display: flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tally .who { font-family: var(--sans); font-size: 11.5px; font-weight: 400; color: var(--muted); }
.tally.on { background: var(--hl); color: var(--hl-ink); padding: 0 6px; }
.tally.on .who { color: var(--hl-ink); }
.evalbar { flex: 1; min-width: 90px; height: 10px; background: #f4f6f8; overflow: hidden; border: 2px solid var(--ink); }
.evalfill { height: 100%; background: #0f1419; transition: width .35s ease; }
.evalnum { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.status { font-size: 13px; color: var(--ink-2); min-height: 22px; }
.ctl { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.thinking { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 8; padding: 5px 12px; background: var(--ink); color: var(--paper); font-family: var(--sans); font-weight: 700; font-size: 12.5px; letter-spacing: .08em; box-shadow: 3px 3px 0 var(--hl); pointer-events: none; white-space: nowrap; }

/* panels look like sections of a scoresheet */
.card { background: var(--surface); border: 1px solid var(--rule-2); padding: 0; }
.card > h2, .card .card-h { margin: 0; padding: 7px 12px; border-bottom: 1px solid var(--rule-2); font-family: var(--mono); font-size: 10px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.card > :not(h2) { margin-left: 12px; margin-right: 12px; }
.card > :last-child { margin-bottom: 12px; }
.card.verdict { border: 2px solid var(--ink); border-left-width: 8px; border-left-color: var(--grade, var(--ink)); padding-top: 12px; }
.vhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chip { display: inline-block; font-family: var(--sans); font-weight: 700; font-size: 14px; letter-spacing: .1em; line-height: 1; padding: 6px 9px 5px; border: 2px solid var(--grade, var(--ink)); color: var(--grade, var(--ink)); background: var(--surface); transform: rotate(-4deg); }
.loss { font-family: var(--mono); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vmain { margin-top: 10px; font-size: 14.5px; }
.vmain b { font-family: var(--mono); font-weight: 700; }
.vsub { margin-top: 7px; font-size: 13px; color: var(--ink-2); }
.notes { margin-top: 8px; margin-bottom: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.notes li { margin: 4px 0; }
.pvline { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 6px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.pvline span { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--rule-2); padding: 1px 6px; }
.pvline .pvlabel { border: 0; padding-left: 0; font-family: var(--sans); color: var(--muted); }
.vacts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.vacts button { font-size: 12.5px; padding: 5px 10px; }
.vacts .btn { font-size: 12.5px; padding: 6px 11px; box-shadow: 2px 2px 0 var(--ink); }
.alert { margin-top: 10px; font-size: 13px; color: var(--warn); display: flex; gap: 8px; align-items: flex-start; font-weight: 700; }
.alert::before { content: "!"; flex: none; width: 18px; height: 18px; display: grid; place-items: center; background: var(--warn); color: #fff; font-family: var(--mono); font-size: 11px; margin-top: 2px; }
.card .kifu { padding-top: 10px; }
.kifu { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 0; max-height: 220px; overflow-y: auto; font-family: var(--mono); font-size: 12px; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.kifu span { display: flex; align-items: center; gap: 5px; padding: 4px 6px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.kifu em { font-style: normal; color: var(--muted); font-size: 10px; min-width: 1.6em; }
.kifu i { width: 7px; height: 7px; background: var(--g); flex: none; }
.kifu .pass { color: var(--muted); }
.kifu .empty { grid-column: 1 / -1; color: var(--muted); font-family: var(--sans); border-right: 1px solid var(--rule); }
.switch { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; margin-top: 8px; }
.card > .switch:first-of-type { margin-top: 12px; }
.switch input { accent-color: var(--ink); width: 15px; height: 15px; flex: none; margin-top: 3px; }
.res { font-family: var(--sans); font-weight: 700; font-size: 21px; margin: 12px 0 2px; }
.gradegrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 10px; text-align: center; border: 1px solid var(--rule-2); }
.gradegrid div { padding: 6px 2px; font-size: 10.5px; color: var(--ink-2); border-top: 5px solid var(--g); border-right: 1px solid var(--rule); }
.gradegrid div:last-child { border-right: 0; }
.gradegrid b { display: block; font-family: var(--mono); font-size: 17px; color: var(--ink); }
.hist { display: grid; gap: 0; font-size: 12px; color: var(--ink-2); padding-top: 8px; }
.hist div { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.hist div:last-child { border-bottom: 0; }
.hist .r { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 11px; }
@media (prefers-reduced-motion: no-preference) {
  .chip.press { animation: press .32s cubic-bezier(.2, 1.4, .4, 1); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* keep the whole board and its buttons on screen on desktops */
@media (min-width: 920px) { .dojo .boardbox, .dojo .cboardbox { max-width: min(580px, calc(100vh - 300px)); min-width: 340px; } }

/* link styled as a button (review links, LINE share) */
.btnlike { display: inline-flex; align-items: center; padding: 7px 11px; border: 1.5px solid var(--ink); font-weight: 700; font-size: 13.5px; text-decoration: none; background: var(--surface); color: var(--ink); }
.btnlike.primary { background: var(--btn); color: var(--btn-ink); box-shadow: 2px 2px 0 var(--hl); }
.btnlike:hover { background: var(--hl); color: var(--hl-ink); }
.notes li.learn { list-style: none; margin-left: -18px; }
.notes li.learn a { font-weight: 700; }
.opening { margin: 6px 12px 0; font-size: 13px; color: var(--ink-2); }
.opening a { font-weight: 700; }
