:root {
  --bg: #312e2b;
  --panel: #262421;
  --panel-2: #21201d;
  --panel-3: #3a3733;
  --border: #3d3a36;
  --text: #f0eeeb;
  --muted: #a3a09b;
  --faint: #8f8b86;
  --accent: #81b64c;
  --accent-dark: #5d8a32;
  --danger: #e2533f;
  --graph-bg: #403d39;
  --graph-fg: #f4f3f1;
  --graph-mid: #8a8782;
  --light: #ebecd0;
  --dark: #739552;
  --coord-light: #739552;
  --coord-dark: #ebecd0;
  --bsize: min(calc(100vh - 217px), calc(100vw - 560px));
  color-scheme: dark;
}
body.theme-brown { --light: #f0d9b5; --dark: #b58863; --coord-light: #b58863; --coord-dark: #f0d9b5; }
body.theme-blue  { --light: #dee3e6; --dark: #8ca2ad; --coord-light: #788a94; --coord-dark: #dee3e6; }
body.theme-gray  { --light: #e3e3e3; --dark: #9a9a9a; --coord-light: #858585; --coord-dark: #e3e3e3; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* ---------- top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 20px; background: var(--panel-2); border-bottom: 1px solid #1a1917;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: .2px; }
.brand img { width: 30px; height: 30px; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--panel-3); border: 0; border-radius: 6px; padding: 8px 14px;
  font-weight: 600; cursor: pointer; color: var(--text); white-space: nowrap;
  box-shadow: 0 2px 0 rgba(0,0,0,.25);
  transition: filter .12s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--accent-dark); }
.btn.big { padding: 12px 18px; font-size: 16px; }
.btn.small { padding: 5px 10px; font-size: 12.5px; }
.btn.icon { padding: 8px 10px; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn:disabled { opacity: .45; cursor: default; filter: none; }
.btn.grow { flex: 1; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; padding: 0; }
.link:hover { color: var(--text); }

/* ---------- layout */
.layout {
  display: grid; grid-template-columns: auto minmax(360px, 440px);
  gap: 18px; padding: 14px 18px; justify-content: center; align-items: start;
}
.board-area { display: flex; flex-direction: column; gap: 6px; }
.board-row { display: flex; gap: 8px; }
.board-holder { width: max(300px, var(--bsize)); height: max(300px, var(--bsize)); }

/* ---------- eval bar */
.evalbar {
  position: relative; width: 26px; flex: none; background: #403d39; border-radius: 3px; overflow: hidden;
}
.eb-white { position: absolute; left: 0; right: 0; bottom: 0; height: 50%; background: #f4f3f1; transition: height .35s ease; }
.evalbar.flipped .eb-white { top: 0; bottom: auto; }
.eb-text {
  position: absolute; left: 0; right: 0; text-align: center; font-size: 10.5px; font-weight: 700; z-index: 1;
}
.eb-text.at-bottom { bottom: 4px; color: #403d39; }
.eb-text.at-top { top: 4px; color: #f4f3f1; }

/* ---------- player bars */
.player-bar { display: flex; align-items: center; gap: 10px; min-height: 34px; padding-left: 34px; }
.pb-avatar { width: 30px; height: 30px; border-radius: 4px; display: grid; place-items: center; flex: none; }
.pb-avatar.w { background: #f4f3f1; }
.pb-avatar.b { background: #1b1a18; border: 1px solid #555; }
.pb-avatar img { width: 24px; height: 24px; }
.pb-name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-rating { color: var(--muted); }
.pb-captured { display: flex; align-items: center; margin-left: 2px; min-width: 0; overflow: hidden; }
.pb-captured img { width: 16px; height: 16px; margin-right: -5px; }
.pb-diff { color: var(--muted); font-size: 12px; margin-left: 8px; }
.pb-clock {
  margin-left: auto; flex: none; background: #1b1a18; color: #bdbbb8; padding: 3px 10px; border-radius: 4px;
  font-variant-numeric: tabular-nums; font-weight: 600; min-width: 74px; text-align: right;
}
.pb-clock.active { background: #f4f3f1; color: #262421; }
.pb-me { font-size: 11px; background: var(--accent); color: #fff; border-radius: 3px; padding: 0 5px; font-weight: 700; }

/* ---------- nav */
.nav-controls { display: flex; gap: 6px; padding-left: 34px; }
.nav-controls button {
  flex: 1; height: 40px; border: 0; border-radius: 6px; background: var(--panel-3); cursor: pointer;
  font-size: 16px; color: var(--text); box-shadow: 0 2px 0 rgba(0,0,0,.25);
}
.nav-controls button:hover { filter: brightness(1.2); }

/* ---------- board */
.board {
  position: relative; width: 100%; height: 100%; border-radius: 3px; overflow: hidden;
  user-select: none; touch-action: none; -webkit-user-select: none;
}
.b-squares { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); }
.sq { position: relative; }
.sq.light { background: var(--light); }
.sq.dark { background: var(--dark); }
.sq::before, .sq::after { content: ''; position: absolute; pointer-events: none; }
.sq.hl::before { inset: 0; background: var(--hl, rgba(255, 255, 51, .5)); }
.sq.sel::before { inset: 0; background: rgba(255, 255, 51, .5); }
.sq.mark::before { inset: 0; background: rgba(235, 97, 80, .8); }
.sq.check::after { inset: 0; background: radial-gradient(circle, rgba(255,0,0,.95) 0%, rgba(231,0,0,.6) 30%, rgba(169,0,0,0) 72%); }
.sq.dest::after { left: 34%; top: 34%; width: 32%; height: 32%; border-radius: 50%; background: rgba(0,0,0,.16); }
.sq.dest-cap::after { inset: 2%; border-radius: 50%; border: 6px solid rgba(0,0,0,.16); }
.sq.over { box-shadow: inset 0 0 0 4px rgba(255,255,255,.65); }
.sq.hint::after { inset: 4%; border-radius: 50%; border: 4px solid rgba(38, 194, 163, .95); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.88); opacity: .6; } }
.c-rank, .c-file { position: absolute; font-size: max(10px, calc(var(--bsize) * .022)); font-weight: 700; pointer-events: none; z-index: 1; }
.c-rank { top: 2px; left: 3px; }
.c-file { bottom: 0; right: 3px; }
.sq.light .c-rank, .sq.light .c-file { color: var(--coord-light); }
.sq.dark .c-rank, .sq.dark .c-file { color: var(--coord-dark); }

.b-arrows { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.b-pieces { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.piece {
  position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%;
  background-size: 100% 100%; transition: transform .17s ease-out; will-change: transform;
}
.piece.dragging { transition: none; z-index: 20; filter: drop-shadow(0 6px 6px rgba(0,0,0,.35)); }
.board.movable { cursor: pointer; }
.wK { background-image: url(../img/pieces/wK.svg); } .wQ { background-image: url(../img/pieces/wQ.svg); }
.wR { background-image: url(../img/pieces/wR.svg); } .wB { background-image: url(../img/pieces/wB.svg); }
.wN { background-image: url(../img/pieces/wN.svg); } .wP { background-image: url(../img/pieces/wP.svg); }
.bK { background-image: url(../img/pieces/bK.svg); } .bQ { background-image: url(../img/pieces/bQ.svg); }
.bR { background-image: url(../img/pieces/bR.svg); } .bB { background-image: url(../img/pieces/bB.svg); }
.bN { background-image: url(../img/pieces/bN.svg); } .bP { background-image: url(../img/pieces/bP.svg); }
.b-badges { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
/* the classification icon on the moved piece: solid and bright, like chess.com */
.b-badges .badge { position: absolute; width: 6.6%; height: 6.6%; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); animation: pop .25s ease-out; }
.b-badges .badge svg { width: 100%; height: 100%; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.b-promo { position: absolute; inset: 0; background: rgba(0,0,0,.45); z-index: 30; }
.promo-choice { position: absolute; width: 12.5%; height: 12.5%; background: #f4f3f1; border-radius: 50%; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.4); }
.promo-choice:hover { background: #fff; transform: scale(1.04); }
.promo-choice .piece { position: static; }

/* ---------- panel */
.panel {
  background: var(--panel); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column;
  height: calc(max(300px, var(--bsize)) + 132px); min-height: 520px;
}
.panel-tabs { display: flex; background: var(--panel-2); }
.panel-tabs button {
  flex: 1; padding: 12px; background: none; border: 0; cursor: pointer; color: var(--muted); font-weight: 700;
  border-bottom: 3px solid transparent;
}
.panel-tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.panel-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.view { flex: 1; overflow-y: auto; padding: 14px 16px; min-height: 0; }
#viewReview { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
#viewReview > * { flex-shrink: 0; }
#viewReview > .movelist { flex-shrink: 1; }
.view-title { margin: 2px 0 12px; font-size: 20px; }

.progress { padding: 10px 16px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.progress-top { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 13px; }
.progress-track { height: 8px; background: #3d3a36; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--accent); transition: width .25s; }

/* ---------- load view */
.seg { display: flex; background: var(--panel-2); border-radius: 8px; padding: 3px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px 4px; border-radius: 6px; cursor: pointer; color: var(--muted); font-weight: 600; }
.seg button.active { background: var(--panel-3); color: var(--text); }
.row { display: flex; gap: 8px; margin: 8px 0; align-items: center; }
.row.end { justify-content: flex-end; }
input[type=text], input:not([type]), textarea, select {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; outline: none;
}
input:not([type]), input[type=text] { flex: 1; min-width: 0; width: 100%; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { width: 100%; height: 220px; resize: vertical; font-family: Consolas, monospace; font-size: 12.5px; }
.load-depth { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; color: var(--muted); }
.hint-text { color: var(--faint); font-size: 12.5px; margin: 12px 0 0; }

.game-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.game-item {
  display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px;
  background: var(--panel-2); border-radius: 6px; padding: 8px 10px; cursor: pointer; border: 1px solid transparent;
}
.game-item:hover { border-color: var(--accent); }
.gi-icon { font-size: 18px; text-align: center; color: var(--muted); }
.gi-players { font-size: 13px; line-height: 1.35; min-width: 0; }
.gi-players div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gi-players .dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.dot.w { background: #f4f3f1; } .dot.b { background: #111; border: 1px solid #666; }
.gi-players .me { font-weight: 700; }
.gi-meta { text-align: right; font-size: 12px; color: var(--muted); }
.gi-result { font-weight: 700; font-size: 13px; }
.gi-result.win { color: var(--accent); } .gi-result.loss { color: var(--danger); } .gi-result.draw { color: var(--muted); }
.gi-acc { font-size: 11.5px; color: var(--muted); }

/* Time control badges: Bullet / Blitz / Rapid / Classical / Daily, with the clock. */
.tc-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.tc-badge svg { flex: none; }
.lib-sub .tc-badge { margin-right: 8px; }
.tc-stacked { flex-direction: column; gap: 1px; line-height: 1.15; text-align: center; }
.tc-stacked .tc-name { font-size: 10.5px; }
.tc-stacked .tc-clock { font-size: 10.5px; font-weight: 400; color: var(--muted); }
.tc-bullet { color: #e0913a; } .tc-blitz { color: #e8c547; } .tc-rapid { color: #8cc152; } .tc-classical { color: #5aaed6; } .tc-daily { color: #f0a637; }
body.light .tc-bullet { color: #a95a17; } body.light .tc-blitz { color: #826600; } body.light .tc-rapid { color: #4a7a1e; }
body.light .tc-classical { color: #276b93; } body.light .tc-daily { color: #9a5a00; }
.list-msg { color: var(--muted); padding: 10px 2px; }
.list-error { color: #ff8a7a; padding: 10px 2px; }

/* ---------- summary */
.sum-head { text-align: center; margin-bottom: 8px; }
.sum-head .opening { color: var(--muted); font-size: 13px; }
.sum-players { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 10px 0 6px; }
.sp { text-align: center; min-width: 0; }
.sp-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-rating { color: var(--muted); font-size: 12.5px; }
.acc-box { display: inline-block; min-width: 82px; margin-top: 6px; padding: 8px 10px; border-radius: 6px; font-size: 24px; font-weight: 800; }
.sp.w .acc-box { background: #f4f3f1; color: #262421; }
.sp.b .acc-box { background: #1b1a18; color: #f4f3f1; border: 1px solid #4a4743; }
.acc-label { color: var(--muted); font-size: 12px; margin-top: 3px; }
.sp-vs { text-align: center; color: var(--muted); font-size: 12px; }
.sp-vs b { display: block; color: var(--text); font-size: 18px; }
.sum-graph { height: 70px; margin: 8px 0 12px; }
.cls-table { width: 100%; border-collapse: collapse; }
.cls-table td { padding: 4px 6px; }
.cls-table td.n { width: 46px; text-align: center; font-weight: 700; font-size: 15px; }
.cls-table td.lbl { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.cls-table tr.zero td.n { color: var(--faint); font-weight: 400; }
/* Counts and names in the summary table jump to those moves */
.cls-count, .cls-name { background: none; border: 0; padding: 2px 8px; border-radius: 6px; font: inherit; color: inherit; cursor: pointer; }
.cls-name { display: inline-flex; align-items: center; gap: 8px; padding-left: 0; }
.cls-count:hover, .cls-name:hover, .cls-count:focus-visible, .cls-name:focus-visible { background: var(--panel-3); }
.cls-jump { display: flex; align-items: center; gap: 8px; font-size: 13px; background: var(--panel-2); border-radius: 6px; padding: 6px 10px; flex: none; }
.cls-jump span { flex: 1; }
.cls-jump .cls-icon { width: 16px; height: 16px; flex: none; }
.coach-voice { margin-left: auto; background: none; border: 0; cursor: pointer; font-size: 18px; padding: 2px 4px; border-radius: 6px; flex: none; }
.coach-voice:hover, .coach-voice:focus-visible { background: var(--panel-3); }
.coach-note.feedback { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.coach-note.feedback .cls-icon { width: 18px; height: 18px; flex: none; }
/* ---------- coach mascot (speech bubble beside it) */
.coach-wrap { display: flex; gap: 8px; align-items: flex-start; }
.coach-wrap > .coach { flex: 1; min-width: 0; position: relative; }
.coach-wrap > .coach::before { content: ''; position: absolute; left: -8px; top: 22px; border: 8px solid transparent; border-left: 0; border-right-color: var(--panel-2); }
.coach-wrap.no-mascot .mascot, .coach-wrap.no-mascot > .coach::before { display: none; }
.mascot { width: 54px; height: 54px; flex: none; margin-top: 8px; animation: mascot-bob 3.2s ease-in-out infinite; }
.mascot.small { width: 46px; height: 46px; margin: 0; }
.mascot-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.mascot.pop { animation: mascot-pop .45s cubic-bezier(.3, 1.6, .5, 1), mascot-bob 3.2s .45s ease-in-out infinite; }
.m-blink { transform-box: fill-box; transform-origin: center; animation: mascot-blink 5s infinite; }
@keyframes mascot-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes mascot-pop { 0% { transform: scale(.7) rotate(-8deg); } 60% { transform: scale(1.12) rotate(4deg); } 100% { transform: scale(1); } }
@keyframes mascot-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.12); } }
.practice-title { display: flex; align-items: center; gap: 10px; }
.practice-title h3 { margin: 0; }
.play-form { display: grid; gap: 10px; margin: 12px 0; }
.play-form label { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.play-form label.check { justify-content: flex-start; }
/* ---------- progress page */
.daily-card { margin: 12px 0; }
.daily-card .practice-title { align-items: flex-start; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.award { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 8px; border-radius: 8px; background: var(--panel-2); opacity: .45; filter: grayscale(1); }
.award.got { opacity: 1; filter: none; box-shadow: inset 0 0 0 1px rgba(129,182,76,.5); }
.award .b-icon { grid-row: span 2; font-size: 24px; text-align: center; }
.award b { font-size: 13px; }
.award small { color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.chart-box { display: flex; gap: 6px; align-items: stretch; }
.chart { flex: 1; height: 110px; background: var(--panel-2); border-radius: 6px; }
.chart .grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-axis { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--muted); padding: 2px 0; }
.chart-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin: 4px 0 2px; }
.chart-legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.play-moves { font-size: 13px; line-height: 1.7; max-height: 160px; overflow-y: auto; margin: 10px 0; color: var(--muted); }
/* ---------- celebrations */
.board-holder { position: relative; }
.sparkles { position: absolute; width: 0; height: 0; z-index: 20; pointer-events: none; }
.sparkles i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 2px; opacity: 0; animation: sparkle-fly 1.1s ease-out forwards; }
.sparkles i:nth-child(3n) { width: 6px; height: 6px; border-radius: 50%; }
@keyframes sparkle-fly { 0% { transform: translate(0, 0) scale(.4) rotate(0); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1) rotate(200deg); opacity: 0; } }
.board-holder.shake { animation: board-shake .5s ease-in-out; }
@keyframes board-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.reveal .sum-players, .reveal .sum-graph, .reveal .cls-table, .reveal .sum-section, .reveal .sum-actions { animation: rise .5s ease-out both; }
.reveal .sum-graph { animation-delay: .1s; }
.reveal .cls-table { animation-delay: .2s; }
.reveal .sum-section { animation-delay: .35s; }
.reveal .sum-actions { animation-delay: .5s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mascot, .mascot.pop, .m-blink { animation: none; } }
@media (max-width: 960px) { .mascot { width: 44px; height: 44px; } }
.sum-section { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 10px; }
.sum-row { display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; padding: 4px 6px; }
.sum-row .mid { text-align: center; color: var(--muted); font-weight: 600; }
.sum-row .side { display: flex; justify-content: center; align-items: center; font-weight: 700; }
.rating-chip { background: var(--panel-3); border-radius: 4px; padding: 3px 6px; font-weight: 800; font-size: 13px; }
.insights .ins-title { font-weight: 800; margin-bottom: 4px; }
.insights .ins-side { color: var(--muted); font-weight: 700; font-size: 12px; margin-top: 6px; }
.insights ul { margin: 4px 0 0; padding-left: 18px; color: #dcdad6; font-size: 13px; }
.insights li { margin: 3px 0; }
.insights a { color: #8fc1ff; }
.rating-chip.rough { opacity: .75; }
.sum-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.sum-actions .row { flex-wrap: wrap; }
.sum-note { color: var(--faint); font-size: 11.5px; text-align: center; margin-top: 8px; }

/* ---------- coach */
.coach { background: var(--panel-2); border-radius: 8px; padding: 12px; min-height: 104px; flex: none; }
.coach-head { display: flex; align-items: center; gap: 10px; }
.coach-head .cls-icon { width: 30px; height: 30px; flex: none; }
.coach-title { font-weight: 800; font-size: 16px; flex: 1; min-width: 0; }
.eval-chip { font-weight: 800; font-size: 12.5px; padding: 2px 7px; border-radius: 4px; background: #f4f3f1; color: #262421; font-variant-numeric: tabular-nums; }
.eval-chip.neg { background: #1b1a18; color: #f4f3f1; border: 1px solid #4a4743; }
.coach-text { margin: 8px 0 0; color: #dcdad6; }
.coach-line { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.8; }
.coach-line .lbl { color: var(--text); font-weight: 600; margin-right: 4px; }
.san { display: inline-block; padding: 0 4px; border-radius: 3px; cursor: pointer; color: #dcdad6; }
.san:hover { background: var(--panel-3); color: #fff; }
.san.first { font-weight: 700; color: #fff; }
.coach-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.coach-time { font-size: 12px; color: var(--faint); margin-left: auto; }

/* ---------- engine lines */
.engine { flex: none; font-size: 13px; }
.engine-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.engine-line { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; white-space: nowrap; overflow: hidden; }
.engine-line .eval-chip { flex: none; min-width: 52px; text-align: center; }
.engine-line .pv { overflow: hidden; text-overflow: ellipsis; }

/* ---------- graph */
.graph { position: relative; height: 64px; flex: none; border-radius: 4px; overflow: hidden; cursor: pointer; }
.graph-svg { width: 100%; height: 100%; display: block; }
.graph-tip { position: absolute; top: 2px; background: rgba(0,0,0,.8); color: #fff; font-size: 11.5px; padding: 1px 6px; border-radius: 3px; pointer-events: none; white-space: nowrap; }

/* ---------- move list */
.movelist { flex: 1; overflow-y: auto; min-height: 80px; background: var(--panel-2); border-radius: 6px; padding: 4px 0; }
.mrow { display: grid; grid-template-columns: 42px 1fr 1fr; align-items: center; }
.mrow:nth-child(even) { background: rgba(255,255,255,.025); }
.mnum { color: var(--faint); padding-left: 10px; font-size: 12.5px; }
.mv { display: flex; align-items: center; gap: 5px; padding: 3px 6px; margin: 1px 4px 1px 0; border-radius: 4px; cursor: pointer; font-weight: 600; }
.mv:hover { background: var(--panel-3); }
.mv.cur { background: #4b4844; box-shadow: inset 0 -2px 0 var(--accent); }
.mv .cls-icon { width: 16px; height: 16px; flex: none; }
.mv.prelim .cls-icon { opacity: .5; }
.mv-flag { font-size: 11px; color: #e3c178; margin-left: -2px; cursor: help; }
.mv-flag.changed { color: #9fc6ec; }
.mv-flag.bm { color: #f2c94c; }
/* your saved side lines (under the move they replace) and the notes bar under the moves */
.mline { display: flex; align-items: flex-start; gap: 4px; margin: 1px 6px 3px 42px; padding: 2px 4px 2px 8px; border-left: 2px solid var(--border); font-size: 12.5px; color: var(--muted); }
.ml-moves { flex: 1; line-height: 1.7; }
.lmv { padding: 1px 3px; border-radius: 3px; cursor: pointer; white-space: nowrap; }
.lmv:hover { background: var(--panel-3); color: var(--text); }
.lmv.cur { background: var(--panel-3); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.lnum { color: var(--faint); margin-right: 2px; }
.ml-del { background: none; border: 0; color: var(--faint); cursor: pointer; padding: 0 4px; font-size: 14px; line-height: 1.4; }
.ml-del:hover { color: var(--danger); }
.study-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 0; margin: 6px 0 0; }
.study-bar:empty { display: none; }
.study-bar .hint-text { margin: 0; }
.study-bar .bm-note { flex: 1; min-width: 140px; padding: 4px 8px; font-size: 12.5px; }
.btn.bm-on { color: #f2c94c; }
.saved-tag { font-size: 12.5px; color: var(--muted); align-self: center; }
.turning .tp-row { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; color: var(--text); padding: 5px 4px;
  border-radius: 6px; cursor: pointer; font: inherit; text-align: left; }
.turning .tp-row:hover { background: var(--panel-3); }
.turning .tp-row .cls-icon { width: 18px; height: 18px; flex: none; }
.turning .tp-row span { color: var(--muted); font-size: 12.5px; margin-left: auto; }
.label-check { text-align: center; }
.mv.prelim > span:not(.mv-time) { text-decoration: underline dotted rgba(255,255,255,.4); text-underline-offset: 3px; }
.prelim-note, .coach-note.prelim-note { color: #e3c178; }
.sum-prelim { margin: 8px 4px 0; font-size: 12.5px; text-align: center; }
.mv.empty { cursor: default; }
.mv-time { margin-left: auto; color: var(--faint); font-size: 11px; font-weight: 400; }
.review-foot { display: flex; gap: 6px; align-items: center; flex: none; }
.review-foot select { flex: 1; padding: 5px; font-size: 12.5px; }
.var-banner { background: #2f3b4a; color: #cfe3ff; border-radius: 6px; padding: 6px 10px; font-size: 12.5px; display: flex; gap: 8px; align-items: center; }

/* ---------- practice */
.practice-card { background: var(--panel-2); border-radius: 8px; padding: 16px; text-align: center; }
.practice-card h3 { margin: 4px 0 6px; font-size: 18px; }
.practice-card .sub { color: var(--muted); font-size: 13px; }
.practice-feedback { margin: 14px 0 4px; padding: 10px; border-radius: 6px; font-weight: 600; }
.practice-feedback.good { background: rgba(129,182,76,.18); color: #b5e08a; }
.practice-feedback.bad { background: rgba(250,65,45,.15); color: #ff9b8c; }
.practice-feedback.info { background: rgba(116,155,191,.18); color: #b9d5f0; }
.practice-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.practice-progress { display: flex; gap: 4px; justify-content: center; margin: 10px 0; }
.practice-progress span { width: 22px; height: 6px; border-radius: 3px; background: var(--panel-3); }
.practice-progress span.done { background: var(--accent); }
.practice-progress span.failed { background: var(--danger); }
.practice-progress span.cur { background: #f4f3f1; }
.pz-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: center; font-size: 12.5px; color: var(--muted); margin: 2px 0 6px; }
.pz-rating { background: var(--panel-3); color: var(--text); border-radius: 10px; padding: 1px 8px; font-weight: 700; }
.pz-explain { text-align: left; background: var(--panel-3); border-radius: 6px; padding: 8px 10px; margin-top: 10px; font-size: 13px; }
.pz-explain p { margin: 6px 0 0; line-height: 1.45; }
.pz-themes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.theme-tag { background: rgba(116,155,191,.22); color: #cfe2f5; border-radius: 10px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.pz-change { margin-left: auto; font-size: 12px; font-weight: 700; }
.pz-change.up { color: #a7d77a; }
.pz-change.down { color: #ff9b8c; }
.rush-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 6px; }
.rush-clock { font: 700 22px/1 ui-monospace, Consolas, monospace; background: var(--panel-3); padding: 4px 10px; border-radius: 6px; }
.rush-clock.low { color: #ff9b8c; }
.rush-strikes { display: flex; gap: 4px; }
.rush-strikes i { width: 14px; height: 14px; border-radius: 50%; background: var(--panel-3); }
.rush-strikes i.x { background: var(--danger); }
/* Your openings */
.op-tabs { margin: 0 0 10px; }
.op-path { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; margin: 4px 0; }
.op-nav { display: flex; gap: 6px; }
.op-moves tr.mine td:first-child .link { font-weight: 800; }
.op-moves small.book { color: #c9a77d; font-size: 11px; }
.op-moves .v-good { color: #a7d77a; }
.op-moves .v-dubious { color: #f7c045; }
.op-moves .v-bad { color: #ff9b8c; }
.op-theory { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0; }
.theory-chip { background: var(--panel-3); color: var(--text); border: 0; border-radius: 12px; padding: 3px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.theory-chip:hover { filter: brightness(1.15); }
/* Learn */
.plan-card { text-align: left; margin: 12px 0; }
.plan-card .practice-title { align-items: flex-start; }
.plan-list { margin: 10px 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.plan-list li span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.plan-list .link { font-weight: 700; font-size: 14px; }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.lesson-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 10px; cursor: pointer; font: inherit; }
.lesson-card:hover { filter: brightness(1.12); }
.lesson-card .l-icon { font-size: 22px; }
.lesson-card small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.lesson-card .l-progress { margin-top: auto; padding-top: 4px; font-size: 12px; color: var(--faint); }
.lesson-card.done { border-color: var(--accent-dark); }
.lesson-card.done .l-progress { color: #a7d77a; }
.lesson .lesson-why { line-height: 1.5; margin: 4px 0 0; }
.lesson-rules { margin: 6px 0 0; padding-left: 20px; line-height: 1.5; }
.lesson-rules li { margin: 3px 0; }
.lesson-ex { display: flex; flex-wrap: wrap; gap: 6px; }
.lesson-ex .btn.solved { color: #a7d77a; }
body.learning .evalbar { visibility: hidden; }
.theme-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.theme-chip { background: var(--panel-3); color: var(--text); border: 0; border-radius: 14px; padding: 5px 11px; font-size: 13px; cursor: pointer; }
.theme-chip:hover { filter: brightness(1.15); }
.theme-chip b { margin-left: 4px; }
.theme-chip small { color: var(--muted); }
.pz-history td.ok { color: #a7d77a; }
.pz-history td.miss { color: #ff9b8c; }

/* ---------- library */
.lib-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; background: var(--panel-2); border-radius: 6px; padding: 10px; margin-bottom: 6px; cursor: pointer; border: 1px solid transparent; }
.lib-item:hover { border-color: var(--accent); }
.lib-sub { color: var(--muted); font-size: 12px; }
.lib-acc { font-size: 12px; color: var(--muted); text-align: right; }

/* ---------- settings dialog */
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 0; width: min(420px, 92vw); }
dialog::backdrop { background: rgba(0,0,0,.55); }
.share-dialog form { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.share-dialog h2 { margin: 0; font-size: 18px; }
.share-dialog img { width: 100%; max-width: 340px; aspect-ratio: 1080 / 1350; align-self: center; border-radius: 10px; background: var(--panel-2); box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.share-dialog .hint-text { text-align: center; margin: 0; }
/* Delete all my data */
.btn.danger { background: var(--danger); color: #fff; box-shadow: 0 3px 0 #8f2f22; }
.delete-dialog form { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.delete-dialog h2 { margin: 0; font-size: 18px; }
.delete-dialog p { margin: 0; }
.confirm-word { display: flex; align-items: center; gap: 10px; }
.confirm-word input { flex: 1; min-width: 0; }
.settings { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.settings h2 { margin: 0 0 4px; }
.settings label { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.settings label.check { justify-content: flex-start; }
.settings select { min-width: 190px; }
.about { font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 8px; }
.about summary { cursor: pointer; color: var(--text); font-weight: 600; }
.about p { margin: 6px 0 0; line-height: 1.45; }
.about a { color: #9fcf6c; }
/* High contrast (Settings): brighter grey text (at least 4.5:1 on the backgrounds) and dark text on green buttons */
body.hc { --muted: #cfccc7; --faint: #bdb9b3; --graph-mid: #b3afa9; }
body.hc .btn.primary { color: #12200a; }
body.hc .btn:disabled { opacity: .6; }
body.hc .prelim-note, body.hc .coach-note.prelim-note { color: #f2d391; }

/* Move-quality colours used as text (style="--cc: …"); darker on the light theme so they stay readable */
.cc { color: var(--cc) !important; }

/* ---------- light theme (Settings > Appearance). The board, the evaluation bar and graph, and the white/black
   chips keep their colours; coloured text is darker so it reads at least 4.5:1 on the light panels. */
body.light {
  --bg: #f1efeb; --panel: #ffffff; --panel-2: #f7f6f3; --panel-3: #e6e3de; --border: #d4d0ca;
  --text: #1f1e1c; --muted: #5b5853; --faint: #6b6761; --danger: #c43a27;
  color-scheme: light;
}
body.light .cc { color: color-mix(in srgb, var(--cc) 55%, #000) !important; }
body.light .topbar { border-bottom-color: var(--border); }
body.light .btn { box-shadow: 0 2px 0 rgba(0,0,0,.13); }
body.light .btn:not(.primary):not(:disabled):hover { filter: brightness(.95); }
body.light .btn.primary { box-shadow: 0 3px 0 var(--accent-dark); }
body.light .btn.ghost { box-shadow: none; }
body.light .coach-text, body.light .san, body.light .insights ul, body.light .coach-note b, body.light .stats-line { color: #34322e; }
body.light .san:hover, body.light .san.first { color: #000; }
body.light .mv.cur { background: #dcd8d1; }
body.light .mrow:nth-child(even) { background: rgba(0,0,0,.03); }
body.light .mv.prelim > span:not(.mv-time) { text-decoration-color: rgba(0,0,0,.4); }
body.light .progress-track { background: #e2ded8; }
body.light .var-banner { background: #dde9f6; color: #1d4a7a; }
body.light .server-banner { background: #fbe1dc; color: #7a1d12; }
body.light .share-dialog img { box-shadow: 0 6px 20px rgba(0,0,0,.18); }
body.light dialog::backdrop { background: rgba(0,0,0,.35); }
body.light .pz-change.up, body.light .op-moves .v-good, body.light .lesson-card.done .l-progress, body.light .lesson-ex .btn.solved,
body.light .pz-history td.ok, body.light .about a, body.light .prep-table td.weak, body.light .gi-result.win,
body.light .practice-feedback.good { color: #3b7a17; }
body.light .pz-change.down, body.light .rush-clock.low, body.light .op-moves .v-bad, body.light .pz-history td.miss,
body.light .list-error, body.light .prep-table td.strong, body.light .gi-result.loss, body.light .practice-feedback.bad,
body.light .coach-threat.serious { color: #b3261e; }
body.light .mv-flag, body.light .prelim-note, body.light .coach-note.prelim-note, body.light .op-moves .v-dubious { color: #8a6500; }
body.light .mv-flag.changed, body.light .insights a, body.light .practice-feedback.info, body.light .coach-threat,
body.light .theme-tag { color: #1f5a96; }
body.light .op-moves small.book { color: #82603a; }
body.light .mv-flag.bm, body.light .btn.bm-on { color: #9a6b00; }
body.light .queue-list li.running .q-state { color: #3b7a17; }
body.light.hc { --muted: #3d3a36; --faint: #46433f; }
body.light.hc .prelim-note, body.light.hc .coach-note.prelim-note { color: #684c00; }

/* report card style picker (share dialog) */
.card-styles { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.card-styles button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--panel-2);
  color: var(--text); border-radius: 14px; padding: 3px 11px; font-size: 12.5px; cursor: pointer; }
.card-styles button i { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(128,128,128,.55); }
.card-styles button.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 700; }
.engine-box { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px 4px; display: flex; flex-direction: column; gap: 6px; }
.engine-box legend { color: var(--muted); font-size: 12.5px; padding: 0 4px; }
.engine-box .row { margin: 2px 0; flex-wrap: wrap; }
.engine-box .hint-text { margin: 0 0 4px; }

/* ---------- banner, side picker, coach extras */
.server-banner { background: #5b2420; color: #ffd9d3; padding: 10px 20px; text-align: center; font-size: 13.5px; }
.me-select { display: flex; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 12.5px; margin: 6px 0 4px; }
.me-select button { background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); border-radius: 5px; padding: 3px 9px; cursor: pointer; font-size: 12.5px; }
.me-select button.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.coach-note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.coach-note b { color: #dcdad6; }
.coach-threat { margin-top: 8px; font-size: 13px; padding: 6px 9px; border-radius: 6px; background: rgba(116,155,191,.15); color: #b9d5f0; }
.coach-threat.serious { background: rgba(226,83,63,.16); color: #ffb3a7; }

/* ---------- library stats */
.stats { background: var(--panel-2); border-radius: 8px; padding: 12px; margin-bottom: 12px; }
.stats-title { font-weight: 800; margin-bottom: 8px; }
.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.stat { background: var(--panel-3); border-radius: 6px; padding: 8px 6px; text-align: center; min-width: 0; }
.stat b { display: block; font-size: 17px; }
.stat span { color: var(--muted); font-size: 11px; }
.stats-line { margin: 8px 0 0; font-size: 13px; color: #dcdad6; }
.stats-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12.5px; }
.stats-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 3px 4px; border-bottom: 1px solid var(--border); }
.stats-table td { padding: 3px 4px; }
.lib-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
/* analysis queue (Saved games), queue buttons in the game lists, the PC speed test */
.queue-box:empty { display: none; }
.queue-box { margin-bottom: 12px; }
.queue-box .ins-title { font-weight: 800; margin-bottom: 2px; }
/* endgame tablebase: the line under the engine lines, and its coach note */
.tb-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 5px 2px 2px; font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--border); margin-top: 4px; }
.tb-line b { color: var(--text); }
.tb-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--faint); }
.tb-move small { margin-left: 3px; color: var(--faint); }
.tb-move.win small { color: #a7d77a; } .tb-move.loss small { color: #ff9b8c; }
body.light .tb-move.win small { color: #3b7a17; } body.light .tb-move.loss small { color: #b3261e; }
.queue-list { list-style: none; margin: 4px 0 6px; padding: 0; font-size: 13px; }
.queue-list li { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.queue-list .q-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-list .q-state { color: var(--muted); font-size: 12px; white-space: nowrap; }
.queue-list li.running .q-state { color: var(--accent); font-weight: 700; }
.q-badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.feed-actions { display: flex; justify-content: flex-end; margin: 0 0 6px; }
.gi-queue { font-size: 11.5px; margin-top: 2px; }
.speed-row { margin: 0; }
#speedResult { margin: 0; line-height: 1.5; }
/* ---------- opponent prep */
.prep-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.prep-form input { flex: 1 1 140px; min-width: 0; }
.prep-form select { min-width: 0; max-width: 100%; }
.prep-head { margin-bottom: 10px; }
.prep-plan { margin: 10px 0; }
.prep-h { font-size: 14px; margin: 16px 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.prep-table td.weak { color: #81b64c; font-weight: 700; }
.prep-table td.strong { color: #e2533f; font-weight: 700; }
.prep-bar { display: grid; grid-template-columns: 110px 1fr 32px; align-items: center; gap: 8px; font-size: 13px; margin: 4px 0; }
.prep-bar i { display: block; height: 8px; border-radius: 4px; background: var(--accent); min-width: 2px; }
.prep-bar b { text-align: right; }
.prep-loss { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.settings input[name="myNames"] { flex: 1; max-width: 220px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #111; color: #fff; padding: 10px 16px; border-radius: 6px; z-index: 100; box-shadow: 0 4px 16px rgba(0,0,0,.4); pointer-events: none; }

.empty-state { text-align: center; color: var(--muted); padding: 30px 10px; }

/* ---------- responsive */
@media (max-width: 960px) {
  :root { --bsize: min(calc(100vw - 66px), 640px); }
  .layout { grid-template-columns: minmax(0, 1fr); padding: 10px 16px; }
  .board-holder { flex: 1 1 auto; min-width: 0; max-width: 640px; width: auto; height: auto; aspect-ratio: 1 / 1; }
  .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .load-depth { flex-wrap: wrap; }
  .load-depth select { min-width: 0; max-width: 100%; }
  .sp-name { white-space: normal; overflow-wrap: anywhere; }
  .panel { height: auto; min-height: 0; }
  #viewReview { overflow: visible; }
  .movelist { max-height: 280px; }
  .topbar { flex-direction: column; align-items: flex-start; }
}

/* ---------- phones */
@media (max-width: 600px) {
  :root { --bsize: min(calc(100vw - 54px), 640px); }
  .topbar { padding: 8px 10px; gap: 6px; }
  .brand { font-size: 16px; }
  .brand img { width: 26px; height: 26px; }
  /* One row of buttons that scrolls sideways instead of three rows above the board. */
  .top-actions { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 3px; scrollbar-width: none; }
  .top-actions::-webkit-scrollbar { display: none; }
  .top-actions .btn { flex: none; padding: 7px 11px; font-size: 13.5px; }
  .layout { padding: 8px 10px; gap: 10px; }
  /* Pages that don't use the board (choosing a game, saved games, opponent prep, progress) come first. */
  body[data-view="load"] .board-area, body[data-view="library"] .board-area,
  body[data-view="prep"] .board-area, body[data-view="progress"] .board-area { display: none; }
  .play-form { grid-template-columns: minmax(0, 1fr); }
  .play-form label:not(.check) { flex-direction: column; align-items: stretch; gap: 4px; text-align: left; }
  .play-form select { width: 100%; min-width: 0; }
  .game-item { gap: 8px; padding: 8px; }
  .lib-item { padding: 8px; }
}

/* ---------- the web version (tools/build-web.mjs) has no laptop-only parts; the desktop app shows no web notes */
body[data-mode="web"] .desktop-only { display: none !important; }
body:not([data-mode="web"]) .web-only { display: none !important; }
