/* Opening trainer – design tokens and shared styles (see .claude/skills/flowerfocus-chess-ui).
   Everything is scoped under .ot-root so other pages (Focus, Valentine …) are not affected.
   .ot-root only defines tokens + font; .ot-page adds the dark page surface. */

.ot-root {
    /* surfaces: warm dark grey */
    --ot-bg-0: #1f1e1c;
    --ot-bg-1: #2a2926;
    --ot-bg-2: #34322e;
    --ot-bg-3: #3f3c37;
    --ot-border: #45423c;
    --ot-text-1: #f3f1ed;
    --ot-text-2: #bdb8ae;
    --ot-text-3: #9f9b93;

    /* actions and status */
    /* button green: white text >= 4.5:1 (accent 5.25, hover 4.65, pressed 6.37) */
    --ot-accent: #537630;
    --ot-accent-hover: #5a7f34;
    --ot-accent-press: #49682b;
    --ot-on-accent: #ffffff;
    --ot-success: #81b64c;
    --ot-danger: #ea8378;         /* red text/markers on dark surfaces */
    --ot-danger-strong: #d03321;  /* red button background, white text */
    --ot-on-danger: #ffffff;
    --ot-warning: #f0b43c;
    --ot-info: #5ea3e0;
    --ot-streak: #ff8a3d;
    --ot-streak-off: #8c877d;
    --ot-streak-on-light: #bf4c00;      /* streak number in the light site header */
    --ot-streak-off-on-light: #747067;

    /* disabled controls: paler but readable (>= 3:1) */
    --ot-disabled-bg: #34322e;
    --ot-disabled-text: #8d887f;

    /* board (own colors) */
    --ot-sq-light: #e9e4c9;
    --ot-sq-dark: #6f9a5b;
    /* coordinates: light text can't reach 4.5:1 on the green squares, so dark ink on both (4.64:1 / 6.08:1) */
    --ot-coord-on-dark: #1c2a14;
    --ot-coord-on-light: #3d5a2e;
    /* library previews: last move on the small boards */
    --ot-mini-last: rgb(240 194 59 / .5);

    /* drawings of the user on the board (right mouse button): arrows and marked squares */
    --ot-pen-orange: #f2a53a;
    --ot-pen-green: #6fae3f;
    --ot-pen-red: #e2594a;
    --ot-pen-blue: #4f97d8;

    /* check / checkmate / stalemate overlay (spec 12) */
    --ot-check-inner: rgb(226 89 74 / .9);
    --ot-check-mid: rgb(226 89 74 / .45);
    --ot-mate-square: rgb(208 51 33 / .55);
    --ot-crown: #e8b931;
    --ot-on-crown: #2b2104;
    --ot-draw: #bdb8ae;
    --ot-on-draw: #1f1e1c;

    /* move ratings (spec 13): own colors, symbol contrast >= 5.4:1 on every badge */
    --ot-q-brilliant: #0e7470;
    --ot-q-great: #2f5fae;
    --ot-q-best: #3e7128;
    --ot-q-excellent: #a5d06f;
    --ot-q-good: #c9d8ae;
    --ot-q-book: #8a6236;
    --ot-q-inaccuracy: #f0c23b;
    --ot-q-mistake: #f08c3a;
    --ot-q-blunder: #c4352a;
    --ot-q-analysing: #5a5650;
    --ot-q-ink-light: #ffffff;
    --ot-q-ink-dark: #1f1e1c;

    /* light site header (login widget sits on it) */
    --ot-header-text: #2b2a28;
    --ot-header-border: #d6d5d5;
    --ot-header-surface: #ffffff;

    /* shape */
    --ot-radius-s: 6px;
    --ot-radius-m: 10px;
    --ot-radius-l: 14px;
    --ot-space-1: 4px;
    --ot-space-2: 8px;
    --ot-space-3: 12px;
    --ot-space-4: 16px;
    --ot-space-5: 24px;
    --ot-space-6: 32px;
    --ot-shadow-1: 0 1px 2px rgb(0 0 0 / .35);
    --ot-shadow-2: 0 6px 20px rgb(0 0 0 / .35);
    --ot-bevel: inset 0 -4px 0 rgb(0 0 0 / .22);
    --ot-bevel-pressed: inset 0 -2px 0 rgb(0 0 0 / .22);

    /* type */
    --ot-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --ot-mono: ui-monospace, Consolas, monospace;
    --ot-fs-xs: 12px;
    --ot-fs-s: 14px;
    --ot-fs-m: 16px;
    --ot-fs-l: 20px;
    --ot-fs-xl: 28px;

    /* motion */
    --ot-ease: cubic-bezier(.2, .8, .2, 1);
    --ot-dur-fast: 120ms;
    --ot-dur: 200ms;
    --ot-dur-slow: 320ms;

    /* layout */
    --ot-bar-h: 40px;
    /* site header + sub nav + both player bars stay visible */
    --ot-board-size: min(calc(100vh - 200px), 100%);

    font-family: var(--ot-font);
}

/* ---------- page ---------- */

.ot-root.ot-page {
    background: var(--ot-bg-0);
    color: var(--ot-text-1);
    border-radius: var(--ot-radius-l);
    padding: var(--ot-space-3) var(--ot-space-4) var(--ot-space-4);
    margin: calc(-1 * var(--ot-space-2)) 0 var(--ot-space-5);
    max-width: 1200px;
}

.ot-root h1 { font-size: var(--ot-fs-l); font-weight: 700; margin: 0 0 var(--ot-space-2); }
.ot-root h2 { font-size: var(--ot-fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ot-text-2); margin: var(--ot-space-4) 0 var(--ot-space-2); }
.ot-root a { color: var(--ot-info); }
.ot-root .ot-muted { color: var(--ot-text-2); }
.ot-root .ot-small { font-size: var(--ot-fs-xs); }
.ot-root .ot-error { color: var(--ot-danger); margin: var(--ot-space-2) 0 0; }
.ot-root .ot-success { color: var(--ot-success); margin: var(--ot-space-2) 0 0; }
.ot-root .ot-narrow { max-width: 34rem; margin-bottom: var(--ot-space-4); }
.ot-root .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ot-root :focus-visible { outline: 2px solid var(--ot-info); outline-offset: 2px; }
/* headings get focus programmatically after navigation (FocusOnNavigate) – no ring there */
.ot-root [tabindex="-1"]:focus-visible { outline: none; }

/* ---------- sub navigation ---------- */

.ot-root .ot-subnav { display: flex; flex-wrap: wrap; gap: var(--ot-space-1); margin-bottom: var(--ot-space-3); }
.ot-root .ot-subnav a { color: var(--ot-text-2); text-decoration: none; padding: 6px var(--ot-space-3); border-radius: var(--ot-radius-s); font-weight: 600; font-size: var(--ot-fs-s); transition: background-color var(--ot-dur-fast) var(--ot-ease), color var(--ot-dur-fast) var(--ot-ease); }
.ot-root .ot-subnav a:hover { color: var(--ot-text-1); background: var(--ot-bg-2); }
.ot-root .ot-subnav a.active { color: var(--ot-text-1); background: var(--ot-bg-3); }

/* ---------- buttons (only inside .ot-root) ---------- */

.ot-root .ot-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--ot-space-2);
    min-height: 48px; padding: 0 var(--ot-space-4);
    border: none; border-radius: var(--ot-radius-m);
    background: var(--ot-bg-2); color: var(--ot-text-1); box-shadow: var(--ot-bevel);
    font: 700 var(--ot-fs-s) var(--ot-font); text-decoration: none; cursor: pointer;
    transition: background-color var(--ot-dur-fast) var(--ot-ease), transform var(--ot-dur-fast) var(--ot-ease);
}
.ot-root .ot-btn:hover:not(:disabled) { background: var(--ot-bg-3); color: var(--ot-text-1); }
.ot-root .ot-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: var(--ot-bevel-pressed); }
.ot-root .ot-btn:disabled { background: var(--ot-disabled-bg); color: var(--ot-disabled-text); box-shadow: none; cursor: not-allowed; }
.ot-root .ot-btn-primary { background: var(--ot-accent); color: var(--ot-on-accent); }
.ot-root .ot-btn-primary:hover:not(:disabled) { background: var(--ot-accent-hover); color: var(--ot-on-accent); }
.ot-root .ot-btn-primary:active:not(:disabled) { background: var(--ot-accent-press); }
.ot-root .ot-btn-ghost { background: transparent; box-shadow: none; color: var(--ot-text-2); }
.ot-root .ot-btn-ghost:hover:not(:disabled) { background: var(--ot-bg-2); }
.ot-root .ot-btn-danger { background: var(--ot-danger-strong); color: var(--ot-on-danger); }
.ot-root .ot-btn-danger:hover:not(:disabled) { background: var(--ot-danger-strong); filter: brightness(.92); }
.ot-root .ot-btn-small { min-height: 36px; padding: 0 var(--ot-space-3); font-size: var(--ot-fs-xs); }
.ot-root .ot-btn .ot-icon { width: 18px; height: 18px; }
.ot-root .ot-kbd { font: 600 var(--ot-fs-xs) var(--ot-mono); color: var(--ot-text-3); }

.ot-root .ot-actions { display: flex; flex-wrap: wrap; gap: var(--ot-space-2); margin-top: var(--ot-space-3); }

/* ---------- icons ---------- */

.ot-root .ot-icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- play layout: board left, panel right ---------- */

.ot-root .ot-play {
    display: grid;
    grid-template-columns: minmax(0, var(--ot-board-size)) minmax(360px, 400px);
    gap: var(--ot-space-5);
    align-items: stretch;
    justify-content: center;
}

.ot-root .ot-board-area { min-width: 0; display: flex; flex-direction: column; }
.ot-root .ot-board-wrap { position: relative; width: 100%; aspect-ratio: 1; }

.ot-root .ot-bar {
    height: var(--ot-bar-h); display: flex; align-items: center; gap: var(--ot-space-2);
    font-size: var(--ot-fs-s); font-weight: 600; color: var(--ot-text-1);
}
.ot-root .ot-bar-avatar {
    width: 28px; height: 28px; border-radius: var(--ot-radius-s); display: inline-flex; align-items: center; justify-content: center;
    background: var(--ot-bg-2); color: var(--ot-text-2);
}
.ot-root .ot-bar-avatar .ot-icon { width: 18px; height: 18px; }
.ot-root .ot-bar-meta { margin-left: auto; display: inline-flex; align-items: center; gap: var(--ot-space-2); color: var(--ot-text-2); font-weight: 500; font-size: var(--ot-fs-xs); }
.ot-root .ot-turn-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ot-success); }

/* panel: same height as board + bars; header / scrolling body / footer */
.ot-root .ot-side { position: relative; min-height: 420px; }
.ot-root .ot-panel {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    background: var(--ot-bg-1); border: 1px solid var(--ot-border); border-radius: var(--ot-radius-l);
    box-shadow: var(--ot-shadow-1); overflow: hidden;
}
.ot-root .ot-panel-head { padding: var(--ot-space-4) var(--ot-space-4) var(--ot-space-3); border-bottom: 1px solid var(--ot-border); }
.ot-root .ot-panel-body { flex: 1; overflow-y: auto; padding: var(--ot-space-3) var(--ot-space-4); }
.ot-root .ot-panel-foot { display: flex; gap: var(--ot-space-2); padding: var(--ot-space-3) var(--ot-space-4); border-top: 1px solid var(--ot-border); background: var(--ot-bg-1); }
.ot-root .ot-panel-foot .ot-btn { flex: 1; }
.ot-root .ot-panel-title { display: flex; align-items: center; gap: var(--ot-space-2); flex-wrap: wrap; font-size: var(--ot-fs-l); margin: 0; }
.ot-root .ot-panel-sub { margin: var(--ot-space-1) 0 0; font-size: var(--ot-fs-s); color: var(--ot-text-2); }

/* simple panel for other pages (library, account …) */
.ot-root .ot-card { background: var(--ot-bg-1); border: 1px solid var(--ot-border); border-radius: var(--ot-radius-l); padding: var(--ot-space-4); }

/* ---------- progress ---------- */

.ot-root .ot-progress { margin-top: var(--ot-space-3); }
.ot-root .ot-progress-track { height: 6px; border-radius: 3px; background: var(--ot-bg-3); overflow: hidden; }
.ot-root .ot-progress-fill { height: 100%; width: 100%; border-radius: 3px; background: var(--ot-success); transform-origin: left center; transition: transform var(--ot-dur) var(--ot-ease); }
.ot-root .ot-progress-row { display: flex; align-items: center; justify-content: space-between; margin-top: var(--ot-space-2); font-size: var(--ot-fs-xs); color: var(--ot-text-2); }
.ot-root .ot-dots { display: inline-flex; gap: 3px; }
.ot-root .ot-dot { width: 7px; height: 7px; border-radius: 50%; }
.ot-root .ot-dot-mistake { background: var(--ot-danger); }
.ot-root .ot-dot-hint { background: var(--ot-warning); }

/* ---------- feedback card ---------- */

.ot-root .ot-feedback {
    display: flex; gap: var(--ot-space-3); align-items: flex-start;
    min-height: 72px; padding: var(--ot-space-3);
    background: var(--ot-bg-2); border-left: 4px solid var(--ot-info); border-radius: var(--ot-radius-m);
    animation: ot-fade-in var(--ot-dur) var(--ot-ease);
}
.ot-root .ot-feedback .ot-icon { width: 24px; height: 24px; color: var(--ot-info); }
.ot-root .ot-feedback-title { display: block; font-size: var(--ot-fs-m); font-weight: 700; }
.ot-root .ot-feedback-text { display: block; font-size: var(--ot-fs-s); color: var(--ot-text-2); margin-top: 2px; }
.ot-root .ot-feedback-correct { border-left-color: var(--ot-success); }
.ot-root .ot-feedback-correct .ot-icon { color: var(--ot-success); }
.ot-root .ot-feedback-wrong { border-left-color: var(--ot-danger); }
.ot-root .ot-feedback-wrong .ot-icon { color: var(--ot-danger); }
.ot-root .ot-feedback-hint { border-left-color: var(--ot-warning); }
.ot-root .ot-feedback-hint .ot-icon { color: var(--ot-warning); }

/* rating cards: same symbol and color as the badge on the board */
.ot-root .ot-feedback-qicon {
    width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font: 800 12px/1 var(--ot-font); letter-spacing: -.5px;
}
.ot-root .ot-feedback-qicon .ot-q-svg { width: 15px; height: 15px; stroke-width: 2.25; }
.ot-root .ot-feedback-q-brilliant { border-left-color: var(--ot-q-brilliant); }
.ot-root .ot-feedback-q-great { border-left-color: var(--ot-q-great); }
.ot-root .ot-feedback-q-best { border-left-color: var(--ot-q-best); }
.ot-root .ot-feedback-q-excellent { border-left-color: var(--ot-q-excellent); }
.ot-root .ot-feedback-q-good { border-left-color: var(--ot-q-good); }
.ot-root .ot-feedback-q-book { border-left-color: var(--ot-q-book); }
.ot-root .ot-feedback-q-inaccuracy { border-left-color: var(--ot-q-inaccuracy); }
.ot-root .ot-feedback-q-mistake { border-left-color: var(--ot-q-mistake); }
.ot-root .ot-feedback-q-blunder { border-left-color: var(--ot-q-blunder); }
@keyframes ot-fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* status badge on the target square (overlay, the board itself is untouched) */
.ot-root .ot-square-badge {
    position: absolute; z-index: 5; pointer-events: none;
    width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    transform: translate(-60%, -40%); box-shadow: var(--ot-shadow-1);
    animation: ot-pop var(--ot-dur) var(--ot-ease);
}
.ot-root .ot-square-badge .ot-icon { width: 12px; height: 12px; stroke-width: 3; color: var(--ot-text-1); }
.ot-root .ot-square-badge-correct { background: var(--ot-success); }
.ot-root .ot-square-badge-wrong { background: var(--ot-danger); }
@keyframes ot-pop { from { opacity: 0; transform: translate(-60%, -40%) scale(.6); } to { opacity: 1; transform: translate(-60%, -40%) scale(1); } }

/* ---------- check / checkmate / stalemate (overlay above the board) ---------- */

.ot-root .ot-state-layer { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.ot-root .ot-check-glow {
    position: absolute;
    background: radial-gradient(circle, var(--ot-check-inner) 0%, var(--ot-check-mid) 40%, transparent 72%);
    mix-blend-mode: multiply;
    animation: ot-check-pulse var(--ot-dur-slow) var(--ot-ease) 1;
}
@keyframes ot-check-pulse { 0% { opacity: 0; scale: .6; } 60% { opacity: 1; scale: 1.15; } 100% { opacity: 1; scale: 1; } }
.ot-root .ot-mate-square { position: absolute; background: var(--ot-mate-square); mix-blend-mode: multiply; }
.ot-root .ot-state-badge {
    position: absolute; z-index: 6; width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    translate: -70% -30%; box-shadow: var(--ot-shadow-1); pointer-events: none;
    font: 800 13px/1 var(--ot-font);
    animation: ot-badge-pop var(--ot-dur) var(--ot-ease);
}
.ot-root .ot-state-badge .ot-icon { width: 14px; height: 14px; stroke-width: 2.25; }
.ot-root .ot-state-badge-mate { background: var(--ot-danger-strong); color: var(--ot-on-danger); }
.ot-root .ot-state-badge-crown { background: var(--ot-crown); color: var(--ot-on-crown); }
.ot-root .ot-state-badge-draw { background: var(--ot-draw); color: var(--ot-on-draw); }
@keyframes ot-badge-pop { from { opacity: 0; scale: .6; } to { opacity: 1; scale: 1; } }

.ot-root .ot-result-card {
    position: absolute; z-index: 8; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(320px, 86%); padding: var(--ot-space-4) var(--ot-space-5);
    background: var(--ot-bg-1); border: 1px solid var(--ot-border); border-radius: var(--ot-radius-l);
    box-shadow: var(--ot-shadow-2); text-align: center;
    animation: ot-card-in var(--ot-dur) var(--ot-ease) 400ms both;
}
@keyframes ot-card-in { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
.ot-root .ot-result-title { margin: 0; font-size: var(--ot-fs-xl); font-weight: 800; }
.ot-root .ot-result-text { margin: var(--ot-space-1) 0 var(--ot-space-3); color: var(--ot-text-2); font-size: var(--ot-fs-m); }
.ot-root .ot-result-actions { display: flex; flex-direction: column; gap: var(--ot-space-2); }

/* ---------- move ratings (badge on the target square, marks in the move list) ---------- */

.ot-root .ot-q-badge {
    position: absolute; z-index: 7; width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    translate: -70% -30%; box-shadow: var(--ot-shadow-1); pointer-events: none;
    font: 800 11px/1 var(--ot-font); letter-spacing: -.5px;
    animation: ot-badge-pop var(--ot-dur) var(--ot-ease);
}
.ot-root .ot-q-badge .ot-q-svg { width: 14px; height: 14px; stroke-width: 2.25; }
.ot-root .ot-q-analysing { background: var(--ot-q-analysing); color: var(--ot-q-ink-light); animation: ot-pulse 1.2s ease-in-out infinite; }
.ot-root .ot-q-mark {
    display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
    min-width: 16px; height: 16px; padding: 0 3px; margin-left: 4px; border-radius: 8px;
    font: 800 10px/1 var(--ot-font); letter-spacing: -.5px;
}
.ot-root .ot-q-mark .ot-q-svg { width: 11px; height: 11px; stroke-width: 2.5; }
.ot-root .ot-q-brilliant { background: var(--ot-q-brilliant); color: var(--ot-q-ink-light); }
.ot-root .ot-q-great { background: var(--ot-q-great); color: var(--ot-q-ink-light); }
.ot-root .ot-q-best { background: var(--ot-q-best); color: var(--ot-q-ink-light); }
.ot-root .ot-q-excellent { background: var(--ot-q-excellent); color: var(--ot-q-ink-dark); }
.ot-root .ot-q-good { background: var(--ot-q-good); color: var(--ot-q-ink-dark); }
.ot-root .ot-q-book { background: var(--ot-q-book); color: var(--ot-q-ink-light); }
.ot-root .ot-q-inaccuracy { background: var(--ot-q-inaccuracy); color: var(--ot-q-ink-dark); }
.ot-root .ot-q-mistake { background: var(--ot-q-mistake); color: var(--ot-q-ink-dark); }
.ot-root .ot-q-blunder { background: var(--ot-q-blunder); color: var(--ot-q-ink-light); }
.ot-root .ot-rating-counts { display: flex; flex-wrap: wrap; gap: var(--ot-space-2); margin-top: var(--ot-space-2); font-size: var(--ot-fs-xs); color: var(--ot-text-2); }
.ot-root .ot-rating-counts .ot-q-mark { margin: 0 var(--ot-space-1) 0 0; }
.ot-root .ot-status-line { margin: var(--ot-space-2) 0 0; font-size: var(--ot-fs-xs); color: var(--ot-text-2); }

/* ---------- move list ---------- */

.ot-root .ot-movelist { border-radius: var(--ot-radius-m); overflow: hidden; border: 1px solid var(--ot-border); }
.ot-root .ot-movelist table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: var(--ot-fs-s); }
.ot-root .ot-movelist tr { height: 32px; }
.ot-root .ot-movelist tr:nth-child(odd) { background: var(--ot-bg-1); }
.ot-root .ot-movelist tr:nth-child(even) { background: var(--ot-bg-2); }
.ot-root .ot-movelist td { padding: 0 var(--ot-space-3); width: 42%; }
.ot-root .ot-movelist td.ot-movelist-number { width: 16%; color: var(--ot-text-3); }
.ot-root .ot-movelist td.ot-move-current { background: var(--ot-bg-3); font-weight: 700; border-radius: var(--ot-radius-s); }
.ot-root .ot-movelist-empty { margin: 0; padding: var(--ot-space-3); color: var(--ot-text-3); font-size: var(--ot-fs-s); }

/* ---------- summary ---------- */

.ot-root .ot-summary { margin-top: var(--ot-space-3); padding: var(--ot-space-4); background: var(--ot-bg-2); border-radius: var(--ot-radius-m); animation: ot-fade-in var(--ot-dur-slow) var(--ot-ease); }
.ot-root .ot-summary-name { font-size: var(--ot-fs-l); font-weight: 700; margin: 0; }
.ot-root .ot-summary-eco { font-size: var(--ot-fs-xs); color: var(--ot-text-2); }
.ot-root .ot-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--ot-space-2); margin-top: var(--ot-space-3); }
.ot-root .ot-tile { background: var(--ot-bg-1); border-radius: var(--ot-radius-s); padding: var(--ot-space-2) var(--ot-space-3); text-align: center; }
.ot-root .ot-tile-value { display: block; font-size: var(--ot-fs-l); font-weight: 700; font-variant-numeric: tabular-nums; }
.ot-root .ot-tile-label { display: block; font-size: var(--ot-fs-xs); color: var(--ot-text-2); }

/* ---------- week strip ---------- */

.ot-root .ot-week { display: flex; justify-content: space-between; gap: var(--ot-space-1); margin: var(--ot-space-3) 0 0; }
.ot-root .ot-week-day { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: var(--ot-fs-xs); color: var(--ot-text-3); flex: 1; }
.ot-root .ot-week-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ot-border); }
.ot-root .ot-week-trained .ot-week-dot { background: var(--ot-streak); border-color: var(--ot-streak); }
.ot-root .ot-week-today .ot-week-label { color: var(--ot-text-1); font-weight: 700; }

/* ---------- guest note ---------- */

/* ways to practise under "Train": one row of choices above the board */
.ot-root .ot-modes { display: flex; flex-wrap: wrap; gap: var(--ot-space-2); margin-bottom: var(--ot-space-3); }
.ot-root .ot-modes a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--ot-space-3); border: 1px solid var(--ot-border); border-radius: 999px; background: var(--ot-bg-1); color: var(--ot-text-2); font-size: var(--ot-fs-s); font-weight: 600; text-decoration: none; transition: background-color var(--ot-dur-fast) var(--ot-ease), color var(--ot-dur-fast) var(--ot-ease); }
.ot-root .ot-modes a:hover { background: var(--ot-bg-2); color: var(--ot-text-1); }
.ot-root .ot-modes a:focus-visible { outline: 2px solid var(--ot-info); outline-offset: 2px; }
.ot-root .ot-modes a.ot-mode-on { background: var(--ot-bg-3); border-color: var(--ot-success); color: var(--ot-text-1); }
@media (hover: none) { .ot-root .ot-modes a { min-height: 44px; } }

/* repertoire as a branching list: one row per run of forced moves, a nested list at every fork */
.ot-root .ot-tree, .ot-root .ot-tree ul { list-style: none; margin: 0; padding: 0; }
.ot-root .ot-tree ul { margin-left: var(--ot-space-2); padding-left: var(--ot-space-3); border-left: 1px solid var(--ot-border); }
.ot-root .ot-tree li { padding: 2px 0; font-size: var(--ot-fs-s); line-height: 1.5; color: var(--ot-text-2); font-variant-numeric: tabular-nums; }
.ot-root .ot-tree .ot-tree-on { color: var(--ot-text-1); font-weight: 700; }
.ot-root .ot-tree .ot-tree-name { display: block; color: var(--ot-text-3); font-size: var(--ot-fs-xs); }

/* stepping through the moves and the opening name of every move (Daily) */
.ot-root .ot-step-row { display: flex; flex-wrap: wrap; gap: var(--ot-space-2); margin-bottom: var(--ot-space-3); }
.ot-root .ot-namelist { list-style: none; margin: var(--ot-space-2) 0 0; padding: 0; }
.ot-root .ot-namelist button { display: grid; grid-template-columns: 5.5em 1fr; gap: var(--ot-space-2); align-items: center; width: 100%; min-height: 32px; padding: var(--ot-space-1) var(--ot-space-2); border: 0; border-radius: var(--ot-radius-s); background: var(--ot-bg-1); color: var(--ot-text-2); font: inherit; font-size: var(--ot-fs-s); text-align: left; cursor: pointer; }
.ot-root .ot-namelist li:nth-child(even) button { background: var(--ot-bg-2); }
.ot-root .ot-namelist button:hover { background: var(--ot-bg-3); }
.ot-root .ot-namelist button:focus-visible { outline: 2px solid var(--ot-info); outline-offset: -2px; }
.ot-root .ot-namelist button.ot-namelist-on { background: var(--ot-bg-3); color: var(--ot-text-1); font-weight: 600; }
.ot-root .ot-namelist-move { font-variant-numeric: tabular-nums; color: var(--ot-text-1); }
.ot-root .ot-draw-tip { margin: var(--ot-space-2) 0 0; }
@media (hover: none) { .ot-root .ot-draw-tip { display: none; } .ot-root .ot-namelist button { min-height: 44px; } }

/* recall modes */
.ot-root .ot-blind .cm-chessboard .pieces { opacity: 0; }   /* blindfold: squares, markers and arrows stay */
.ot-root .ot-quiz-options { display: grid; gap: var(--ot-space-2); margin-top: var(--ot-space-3); }
.ot-root .ot-quiz-options .ot-btn { justify-content: flex-start; height: auto; min-height: 48px; padding-block: var(--ot-space-2); text-align: left; white-space: normal; }
.ot-root .ot-quiz-right { outline: 2px solid var(--ot-success); outline-offset: -2px; color: var(--ot-text-1); }
.ot-root .ot-quiz-wrong { outline: 2px solid var(--ot-danger); outline-offset: -2px; color: var(--ot-text-1); }

/* review plan: what is due today, entry to the weak-spot drill */
.ot-root .ot-plan { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ot-space-2); margin-top: var(--ot-space-3); padding: var(--ot-space-2) var(--ot-space-3); border-radius: var(--ot-radius-m); background: var(--ot-bg-2); font-size: var(--ot-fs-s); color: var(--ot-text-2); }
.ot-root .ot-guest-note { margin-top: var(--ot-space-4); padding: var(--ot-space-3); border-radius: var(--ot-radius-m); background: var(--ot-bg-2); font-size: var(--ot-fs-s); color: var(--ot-text-2); }
.ot-root .ot-guest-note .ff-login-buttons { margin-top: var(--ot-space-2); flex-direction: row; flex-wrap: wrap; }
.ot-root .ot-guest-note .ff-auth-note { display: none; }

/* ---------- forms ---------- */

.ot-root .ot-label { display: block; margin-top: var(--ot-space-3); font-size: var(--ot-fs-xs); color: var(--ot-text-2); }
.ot-root .ot-input {
    min-height: 44px; border-radius: var(--ot-radius-s); border: 1px solid var(--ot-border);
    background: var(--ot-bg-0); color: var(--ot-text-1); padding: 0 var(--ot-space-3); font: var(--ot-fs-s) var(--ot-font);
}
.ot-root .ot-input-mono { font-family: var(--ot-mono); font-size: var(--ot-fs-xs); }
.ot-root .ot-fen-row { display: flex; gap: var(--ot-space-2); }
.ot-root .ot-fen-row .ot-input { flex: 1; min-width: 0; }
.ot-root .ot-input-wide { width: 100%; }
.ot-root textarea.ot-input { height: auto; min-height: 96px; padding: var(--ot-space-2) var(--ot-space-3); resize: vertical; font-family: inherit; line-height: 1.4; }
.ot-root .ot-input-eco { width: 5rem; }
.ot-root .ot-check { display: inline-flex; gap: var(--ot-space-2); align-items: center; color: var(--ot-text-2); cursor: pointer; font-size: var(--ot-fs-s); min-height: 44px; }

/* ---------- skeleton ---------- */

.ot-root .ot-skeleton { background: var(--ot-bg-2); border-radius: var(--ot-radius-m); animation: ot-pulse 1.4s ease-in-out infinite; }
.ot-root .ot-skeleton-board { width: 100%; aspect-ratio: 1; }
.ot-root .ot-skeleton-line { height: 14px; margin-bottom: var(--ot-space-2); }
@keyframes ot-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* ---------- credits ---------- */

.ot-root .ot-credits { margin-top: var(--ot-space-5); font-size: var(--ot-fs-xs); color: var(--ot-text-3); }
.ot-root .ot-credits a { color: var(--ot-text-2); }

/* ---------- library, editor, account ---------- */

.ot-root .ot-layout { display: grid; grid-template-columns: minmax(0, var(--ot-board-size)) minmax(320px, 400px); gap: var(--ot-space-5); align-items: start; }
.ot-root .ot-layout .ot-card .ot-actions .ot-btn { min-height: 44px; }
.ot-root .ot-tabs { display: flex; gap: var(--ot-space-1); margin: var(--ot-space-3) 0 var(--ot-space-4); border-bottom: 1px solid var(--ot-border); }
.ot-root .ot-tab { border: none; background: transparent; color: var(--ot-text-2); font: 700 var(--ot-fs-s) var(--ot-font); padding: var(--ot-space-3) var(--ot-space-4); border-bottom: 3px solid transparent; cursor: pointer; min-height: 44px; }
.ot-root .ot-tab-active { color: var(--ot-text-1); border-bottom-color: var(--ot-success); }
.ot-root .ot-filters { display: flex; flex-wrap: wrap; gap: var(--ot-space-2); align-items: center; margin-bottom: var(--ot-space-2); }
.ot-root .ot-filters input[type=search] { flex: 1 1 14rem; }
.ot-root .ot-list { list-style: none; padding: 0; margin: var(--ot-space-2) 0 var(--ot-space-4); display: flex; flex-direction: column; gap: var(--ot-space-2); }
.ot-root .ot-row { display: flex; flex-wrap: wrap; gap: var(--ot-space-3); justify-content: space-between; align-items: center; background: var(--ot-bg-1); border: 1px solid var(--ot-border); border-radius: var(--ot-radius-m); padding: var(--ot-space-3) var(--ot-space-4); }
.ot-root .ot-row:hover { background: var(--ot-bg-2); }
.ot-root .ot-row-main { display: flex; flex-direction: column; gap: var(--ot-space-1); min-width: 0; flex: 1 1 18rem; }
.ot-root .ot-row-title { font-weight: 700; }
.ot-root .ot-row-meta { display: flex; flex-wrap: wrap; gap: var(--ot-space-2); align-items: center; font-size: var(--ot-fs-xs); color: var(--ot-text-2); }
.ot-root .ot-row-moves { font-size: var(--ot-fs-xs); color: var(--ot-text-3); font-family: var(--ot-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ot-root .ot-row-actions { display: flex; flex-wrap: wrap; gap: var(--ot-space-2); align-items: center; }
.ot-root .ot-row-signin { flex-basis: 100%; }
.ot-root .ot-added { color: var(--ot-success); font-weight: 600; font-size: var(--ot-fs-s); display: inline-flex; gap: var(--ot-space-1); align-items: center; }
.ot-root .ot-tag { display: inline-block; padding: 1px var(--ot-space-2); border-radius: 999px; background: var(--ot-bg-3); color: var(--ot-text-1); font-size: var(--ot-fs-xs); font-weight: 600; }
.ot-root .ot-tag-white { background: var(--ot-text-1); color: var(--ot-bg-0); }
.ot-root .ot-tag-black { background: var(--ot-bg-0); color: var(--ot-text-1); border: 1px solid var(--ot-border); }
.ot-root .ot-tag-gambit { background: var(--ot-bg-3); color: var(--ot-warning); }
.ot-root .ot-danger-zone { border-color: var(--ot-danger); }
.ot-root .ot-toggle { display: inline-flex; border-radius: var(--ot-radius-s); overflow: hidden; border: 1px solid var(--ot-border); }
.ot-root .ot-toggle button { border: none; background: var(--ot-bg-0); color: var(--ot-text-2); padding: 0 var(--ot-space-4); min-height: 44px; font-weight: 600; cursor: pointer; }
.ot-root .ot-toggle button.ot-toggle-on { background: var(--ot-accent); color: var(--ot-on-accent); }
.ot-root .ot-editor-row { display: flex; flex-wrap: wrap; gap: var(--ot-space-4); align-items: flex-end; margin-top: var(--ot-space-2); }
.ot-root .ot-suggestions { list-style: none; padding: 0; margin: var(--ot-space-2) 0 0; display: flex; flex-direction: column; gap: var(--ot-space-1); }
.ot-root .ot-suggestions button { width: 100%; text-align: left; border: 1px solid var(--ot-border); background: var(--ot-bg-0); color: var(--ot-text-1); border-radius: var(--ot-radius-s); padding: var(--ot-space-2) var(--ot-space-3); font-size: var(--ot-fs-s); cursor: pointer; min-height: 44px; }
.ot-root .ot-suggestions button:hover { background: var(--ot-bg-2); }

/* ---------- mobile ---------- */

@media (max-width: 899.98px) {
    .ot-root { --ot-board-size: 100%; }
    .ot-root.ot-page { padding: var(--ot-space-2) var(--ot-space-2) calc(96px + env(safe-area-inset-bottom)); border-radius: var(--ot-radius-m); }
    .ot-root .ot-play,
    .ot-root .ot-layout { grid-template-columns: minmax(0, 1fr); gap: var(--ot-space-3); }
    .ot-root .ot-side { min-height: 0; }
    .ot-root .ot-panel { position: static; overflow: visible; }
    .ot-root .ot-panel-body { overflow: visible; }
    /* action bar fixed in the thumb zone */
    .ot-root .ot-panel-foot {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
        padding: var(--ot-space-2) var(--ot-space-3) calc(var(--ot-space-2) + env(safe-area-inset-bottom));
        box-shadow: var(--ot-shadow-2);
    }
    .ot-root .ot-btn { min-height: 52px; }
    /* compact result card so the final position stays visible */
    .ot-root .ot-result-card { width: min(300px, 80%); padding: var(--ot-space-3) var(--ot-space-4); }
    .ot-root .ot-result-title { font-size: var(--ot-fs-l); }
    .ot-root .ot-result-text { margin-bottom: var(--ot-space-2); font-size: var(--ot-fs-s); }
    .ot-root .ot-result-actions { flex-direction: row; }
    .ot-root .ot-result-actions .ot-btn { flex: 1; min-height: 44px; }
    .ot-root .ot-btn-small { min-height: 44px; }
}

/* ---------- reduced motion: everything except the board's own moves ---------- */

@media (prefers-reduced-motion: reduce) {
    .ot-root .ot-feedback,
    .ot-root .ot-summary,
    .ot-root .ot-square-badge,
    .ot-root .ot-skeleton,
    .ot-root .ot-progress-fill,
    .ot-root .ot-btn,
    .ot-root .ff-streak-bump,
    .ot-root .ot-check-glow,
    .ot-root .ot-state-badge,
    .ot-root .ot-result-card,
    .ot-root .ot-q-badge { animation: none !important; transition: none !important; }
}

/* ---------- header widgets (light site header, wrapped in .ot-root) ---------- */

.ot-root.ot-header-auth { display: inline-flex; align-items: center; gap: var(--ot-space-2); }
.ot-root.ot-header-auth .ff-streak { margin: 0; color: var(--ot-streak-off-on-light); }
.ot-root.ot-header-auth .ff-streak.ff-streak-active { color: var(--ot-streak-on-light); }
.ot-root .ff-streak { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; color: var(--ot-streak-off); text-decoration: none; font-size: var(--ot-fs-m); font-variant-numeric: tabular-nums; }
.ot-root .ff-streak .ot-icon { width: 20px; height: 20px; }
.ot-root .ff-streak-active { color: var(--ot-streak); }
.ot-root .ff-streak-active .ot-icon { fill: currentColor; fill-opacity: .25; }
.ot-root .ff-streak-bump { animation: ff-streak-bump var(--ot-dur-slow) var(--ot-ease) 1; }
@keyframes ff-streak-bump { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }

.ot-root .ff-login-buttons { display: flex; flex-direction: column; gap: var(--ot-space-2); }
.ot-root .ff-login-button {
    min-height: 44px; border: 1px solid var(--ot-border); border-radius: var(--ot-radius-m); background: var(--ot-bg-2); color: var(--ot-text-1);
    padding: 0 var(--ot-space-3); font: 600 var(--ot-fs-s) var(--ot-font); text-align: left; cursor: pointer; box-shadow: var(--ot-bevel);
}
.ot-root .ff-login-button:hover:not(:disabled) { background: var(--ot-bg-3); }
.ot-root .ff-auth-note { font-size: var(--ot-fs-xs); color: var(--ot-text-3); margin: var(--ot-space-1) var(--ot-space-1) 0; }
.ot-root .ff-auth-consent { font-size: var(--ot-fs-xs); line-height: 1.45; color: var(--ot-text-2); margin: var(--ot-space-1) var(--ot-space-1) 0; max-width: 22rem; }
/* p.… raises specificity above the template header rule (.top-row a: margin-left, nowrap, no underline) */
.ot-root p.ff-auth-consent a { color: var(--ot-info); text-decoration: underline; margin-left: 0; white-space: normal; }
.ot-root .ot-guest-note .ff-auth-consent { flex-basis: 100%; }
.ot-root .ff-auth-error { font-size: var(--ot-fs-xs); color: var(--ot-danger); margin: var(--ot-space-1); }

/* Daily Challenge */
.ot-root .ot-daily-intro p { margin: 0 0 var(--ot-space-2); line-height: 1.5; }
.ot-root .ot-daily-moves { font-variant-numeric: tabular-nums; color: var(--ot-text-1); }
.ot-root .ot-daily-done { padding: var(--ot-space-2) var(--ot-space-3); border-left: 4px solid var(--ot-info); background: var(--ot-bg-2); border-radius: var(--ot-radius-s); font-size: var(--ot-fs-s); }
.ot-root .ot-daily-computer {
    display: flex; gap: var(--ot-space-2); align-items: flex-start; margin-top: var(--ot-space-2);
    padding: var(--ot-space-2) var(--ot-space-3); background: var(--ot-bg-1); border: 1px solid var(--ot-border); border-radius: var(--ot-radius-m);
    font-size: var(--ot-fs-s); color: var(--ot-text-2); animation: ot-fade-in var(--ot-dur) var(--ot-ease);
}
.ot-root .ot-daily-computer .ot-icon { flex-shrink: 0; margin-top: 2px; color: var(--ot-text-2); }
.ot-root .ot-daily-computer strong { display: block; color: var(--ot-text-1); }
.ot-root .ot-daily-review { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--ot-space-2); }
.ot-root .ot-daily-review li { padding: var(--ot-space-2) var(--ot-space-3); background: var(--ot-bg-2); border-radius: var(--ot-radius-s); font-size: var(--ot-fs-s); }
.ot-root .ot-daily-review-move { display: flex; align-items: center; gap: var(--ot-space-2); }
.ot-root .ot-daily-review-move .ot-q-mark { margin: 0; }
.ot-root .ot-daily-review-why { display: block; margin-top: var(--ot-space-1); color: var(--ot-text-2); line-height: 1.45; }
@media (prefers-reduced-motion: reduce) { .ot-root .ot-daily-computer { animation: none; } }
.ot-root .ot-summary .ot-daily-note { margin: var(--ot-space-2) 0 0; }

/* Free board: opponent setup */
.ot-root .ot-free-setup { display: flex; flex-direction: column; gap: var(--ot-space-2); margin-bottom: var(--ot-space-3); }
.ot-root .ot-free-setup .ot-toggle { align-self: flex-start; }
.ot-root .ot-free-setup .ot-toggle button { display: inline-flex; align-items: center; gap: var(--ot-space-1); }
.ot-root .ot-free-setup p { margin: 0; }
.ot-root .ot-free-row { display: flex; align-items: center; gap: var(--ot-space-3); flex-wrap: wrap; }
.ot-root .ot-free-row .ot-label { margin: 0; min-width: 7.5rem; }
.ot-root .ot-free-row select.ot-input { flex: 1; min-width: 10rem; min-height: 44px; }

/* Free board: which library opening is on the board */
.ot-root .ot-opening { display: flex; flex-direction: column; gap: 2px; margin-top: var(--ot-space-3); padding: var(--ot-space-2) var(--ot-space-3); background: var(--ot-bg-2); border-radius: var(--ot-radius-s); }
.ot-root .ot-opening-label { font-size: var(--ot-fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ot-text-2); }
.ot-root .ot-opening-name { font-size: var(--ot-fs-s); line-height: 1.4; }
.ot-root .ot-tag-gambit { background: var(--ot-info); color: var(--ot-bg-0); }

/* Free board: hint */
.ot-root .ot-hint-row { display: flex; gap: var(--ot-space-2); margin-top: var(--ot-space-2); }
.ot-root .ot-hint-row .ot-btn { display: inline-flex; align-items: center; gap: var(--ot-space-1); min-height: 44px; }
.ot-root .ot-hint-text { margin: var(--ot-space-2) 0 0; padding: var(--ot-space-2) var(--ot-space-3); border-left: 4px solid var(--ot-warning);
    background: var(--ot-bg-2); border-radius: var(--ot-radius-s); font-size: var(--ot-fs-s); line-height: 1.45; color: var(--ot-text-2);
    animation: ot-fade-in var(--ot-dur) var(--ot-ease); }
.ot-root .ot-hint-text strong { color: var(--ot-text-1); }
@media (prefers-reduced-motion: reduce) { .ot-root .ot-hint-text { animation: none; } }

/* Library: preset cards with a board preview (grid: 4 per row on wide screens, 3 below ~1100 px) */
.ot-root .ot-preset-grid { list-style: none; padding: 0; margin: var(--ot-space-2) 0 var(--ot-space-4);
    display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--ot-space-3); }
.ot-root .ot-preset-card { display: flex; flex-direction: column; gap: var(--ot-space-2); min-width: 0;
    background: var(--ot-bg-1); border: 1px solid var(--ot-border); border-radius: var(--ot-radius-m); padding: var(--ot-space-3);
    transition: background-color var(--ot-dur-fast) var(--ot-ease); }
.ot-root .ot-preset-card:hover, .ot-root .ot-preset-card.ot-preview-playing { background: var(--ot-bg-2); }
.ot-root .ot-preset-info { display: flex; flex-direction: column; gap: var(--ot-space-1); min-width: 0; }
.ot-root .ot-preset-card .ot-row-actions { margin-top: auto; }
.ot-root .ot-preview-board { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: none;
    border-radius: var(--ot-radius-s); overflow: hidden; cursor: pointer; }
.ot-root .ot-preview-board:focus-visible { outline: 2px solid var(--ot-info); outline-offset: 2px; }
.ot-root .ot-mini-board { display: block; width: 100%; height: 100%; }
.ot-root .ot-mini-light { fill: var(--ot-sq-light); }
.ot-root .ot-mini-dark { fill: var(--ot-sq-dark); }
.ot-root .ot-mini-last { fill: var(--ot-mini-last); }
.ot-root .ot-preview-counter { position: absolute; top: var(--ot-space-1); right: var(--ot-space-1); padding: 1px var(--ot-space-2);
    border-radius: 999px; background: var(--ot-bg-0); color: var(--ot-text-1); font-size: var(--ot-fs-xs); font-weight: 700;
    font-variant-numeric: tabular-nums; }
.ot-root .ot-preview-play { position: absolute; right: var(--ot-space-2); bottom: var(--ot-space-2); width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--ot-bg-0); color: var(--ot-text-1); }
.ot-root .ot-preview-play .ot-icon { width: 16px; height: 16px; fill: currentColor; }
@media (hover: hover) and (pointer: fine) { .ot-root .ot-preview-play { display: none; } }  /* mouse: hovering plays */
.ot-root .ot-preview-moves { margin: 0; font-family: var(--ot-mono); font-size: var(--ot-fs-xs); line-height: 1.6; color: var(--ot-text-3);
    height: calc(1.6em * 3); overflow: hidden; overflow-wrap: anywhere; }
.ot-root .ot-preview-playing .ot-preview-moves { overflow-y: auto; }
.ot-root .ot-preview-no { color: var(--ot-text-3); margin-right: 2px; }
.ot-root .ot-preview-current { background: var(--ot-bg-3); color: var(--ot-text-1); font-weight: 700; border-radius: 3px; padding: 0 2px; }

@media (max-width: 599.98px) {
    /* phone: one card per row – small board left, name and moves right, buttons below */
    .ot-root .ot-preset-grid { grid-template-columns: 1fr; }
    .ot-root .ot-preset-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: var(--ot-space-3); row-gap: var(--ot-space-2);
        grid-template-areas: "board info" "board moves" "actions actions"; }
    .ot-root .ot-preview-board { grid-area: board; width: 104px; height: 104px; align-self: start; }
    .ot-root .ot-preset-info { grid-area: info; }
    .ot-root .ot-preview-moves { grid-area: moves; height: calc(1.6em * 2); }
    .ot-root .ot-preset-card .ot-row-actions { grid-area: actions; }
    .ot-root .ot-preset-card .ot-row-signin { grid-column: 1 / -1; }
    .ot-root .ot-preview-play { width: 26px; height: 26px; right: var(--ot-space-1); bottom: var(--ot-space-1); }

    /* trainer tabs in one line: tighter, and on very narrow screens scrollable instead of a second line */
    .ot-root .ot-subnav { flex-wrap: nowrap; gap: 2px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
    .ot-root .ot-subnav::-webkit-scrollbar { display: none; }
    /* the five labels need 224 px: with 6 px per side they fit from 360 px up and spread evenly on wider phones */
    .ot-root .ot-subnav a { flex: 1 0 auto; justify-content: center; white-space: nowrap; padding: 0 6px; min-height: 44px; display: inline-flex; align-items: center; font-size: 13.5px; }
    .ot-root .ot-subnav.ot-subnav-scrolls:not(.ot-subnav-end) { mask-image: linear-gradient(to right, #000 82%, transparent); -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .ot-root .ot-preset-card { transition: none; } }
