/* Generated by tools/build-trainer.js from trainer/src. Edit the source, not this file. */
.trainer :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.trainer .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.trainer .app { display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); height: 100%; }
.trainer .top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.trainer .brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font: 800 1.02rem var(--font-display); font-stretch: 112%; white-space: nowrap; }
.trainer .brand svg { width: 24px; height: 24px; fill: var(--accent); }
.trainer .brand small { font: 500 0.72rem var(--font-mono); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-stretch: 100%; }
.trainer .course { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.trainer .course::-webkit-scrollbar { display: none; }
.trainer .stage { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.trainer .stage-name { font: 600 0.78rem var(--font-body); color: var(--muted); }
.trainer .stage.is-current { border-color: var(--accent); }
.trainer .stage.is-current .stage-name { color: var(--ink); }
.trainer .step { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font: 600 0.68rem var(--font-mono); color: var(--muted); display: grid; place-items: center; padding: 0; }
.trainer .step.done { background: var(--up-soft); border-color: var(--up); color: var(--up); }
.trainer .step.current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.trainer .step:disabled { opacity: .45; cursor: not-allowed; }
.trainer .step.gated { color: var(--accent-strong); border-color: var(--accent); background: var(--accent-soft); }
.trainer .signup-card { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft); }
.trainer .signup-card h2 { margin: 0; }
.trainer .top-actions { display: flex; gap: 8px; margin-left: auto; }
.trainer .linkbtn { border: 0; background: none; color: var(--muted); font-size: 0.82rem; text-decoration: underline; padding: 4px; }
.trainer .main { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); min-height: 0; height: 100%; }
.trainer .panel { border-right: 1px solid var(--line); background: var(--surface); padding: 18px max(16px, env(safe-area-inset-left, 0px)) 24px 18px; overflow-y: auto; display: grid; align-content: start; gap: 14px; }
.trainer .eyebrow { margin: 0; font: 600 0.7rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent-strong); }
.trainer .panel .ex-title { margin: 0; font: 800 1.45rem/1.15 var(--font-display); font-stretch: 108%; text-wrap: balance; }
.trainer .panel h2 { margin: 0; font: 700 1.02rem var(--font-body); }
.trainer .panel p { margin: 0; }
.trainer .lesson-text { display: grid; gap: 10px; }
.trainer .example { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); overflow: hidden; }
.trainer .example canvas { display: block; width: 100%; height: 190px; }
.trainer .example figcaption { padding: 8px 12px 10px; font-size: 0.84rem; color: var(--muted); border-top: 1px solid var(--line); }
.trainer .task { padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.trainer .hint { font-size: 0.85rem; color: var(--muted); }
.trainer .btns { display: flex; flex-wrap: wrap; gap: 8px; }
.trainer .btn { min-height: 40px; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); font-weight: 600; }
.trainer .btn:hover { background: var(--accent-strong); }
.trainer .btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); font-weight: 500; }
.trainer .btn-ghost:hover { background: var(--surface-2); border-color: var(--muted); }
.trainer .btn:disabled { opacity: .5; cursor: not-allowed; }
.trainer .score { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.trainer .score-n { font: 800 2rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.trainer .score-n small { font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.trainer .chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font: 600 0.72rem var(--font-mono); text-transform: uppercase; letter-spacing: .05em; }
.trainer .chip-pass { background: var(--up-soft); color: var(--up); }
.trainer .chip-fail { background: var(--down-soft); color: var(--down); }
.trainer .fb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.trainer .fb-list button { width: 100%; text-align: left; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 0.88rem; line-height: 1.45; }
.trainer .fb-list button:hover { border-color: var(--accent); }
.trainer .fb-ic { font: 700 0.8rem var(--font-mono); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.trainer .st-ok .fb-ic { background: var(--up-soft); color: var(--up); }
.trainer .st-near .fb-ic { background: var(--accent-soft); color: var(--accent-strong); }
.trainer .st-miss .fb-ic, .trainer .st-extra .fb-ic { background: var(--down-soft); color: var(--down); }
.trainer .legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.78rem; color: var(--muted); }
.trainer .legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.trainer .lg-ok::before { background: var(--up); }
.trainer .lg-near::before { background: var(--accent); }
.trainer .lg-miss::before { background: var(--down); }
.trainer .work { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; }
.trainer .toolbar { display: flex; gap: 6px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface); overflow-x: auto; scrollbar-width: thin; }
.trainer .tool { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 0.84rem; font-weight: 500; white-space: nowrap; }
.trainer .tool svg { width: 16px; height: 16px; flex: none; }
.trainer .tool[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.trainer .tool:hover:not([aria-pressed="true"]) { border-color: var(--muted); }
.trainer .tool-sep { width: 1px; align-self: stretch; background: var(--line); margin: 2px 4px; flex: none; }
.trainer .tag-sh, .trainer .tag-sl { color: var(--accent-strong); }
.trainer .tag-bos { color: var(--ln-1); }
.trainer .tag-choch { color: var(--ln-2); }
.trainer .chart-wrap { position: relative; min-height: 360px; background: var(--surface); }
.trainer .chart-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }
.trainer .chart-wrap canvas.tool-pan { cursor: grab; }
.trainer .chart-wrap canvas.tool-pan.dragging { cursor: grabbing; }
.trainer .chart-wrap canvas.tool-draw { cursor: crosshair; }
.trainer .status { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 6px 12px; border-top: 1px solid var(--line); background: var(--surface); font: 500 0.76rem var(--font-mono); color: var(--muted); min-height: 32px; flex-wrap: wrap; }
.trainer .status b { color: var(--ink); font-weight: 500; }
.trainer .trade-form { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.trainer .side { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.trainer .side button { min-height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.trainer .side button[aria-pressed="true"].long { background: var(--up); border-color: var(--up); color: var(--surface); }
.trainer .side button[aria-pressed="true"].short { background: var(--down); border-color: var(--down); color: var(--surface); }
.trainer .field { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.trainer .field label { font-size: 0.84rem; font-weight: 600; }
.trainer .field input { min-height: 38px; width: 100%; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.trainer .field button { min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 0.8rem; }
.trainer .field button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.trainer .rr { font: 500 0.82rem var(--font-mono); color: var(--muted); }
.trainer .form-err { color: var(--down); font-size: 0.84rem; }
.trainer .trades { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.trainer .trade { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; gap: 6px; font-size: 0.88rem; }
.trainer .trade-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-family: var(--font-mono); font-size: 0.8rem; }
.trainer .trade.res-target { border-color: var(--up); }
.trainer .trade.res-stopped { border-color: var(--down); }
.trainer .verdict { font-weight: 700; }
.trainer .verdict.good { color: var(--up); }
.trainer .verdict.bad { color: var(--down); }
.trainer .why { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
@media (max-width: 860px) {
.trainer .app { height: auto; min-height: 100%; }
.trainer .main { grid-template-columns: minmax(0, 1fr); height: auto; }
.trainer .course { order: 3; flex-basis: 100%; }
.trainer .panel { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px max(16px, env(safe-area-inset-right, 0px)) 18px max(16px, env(safe-area-inset-left, 0px)); overflow: visible; }
.trainer .chart-wrap { height: 64vh; min-height: 320px; }
.trainer .work { grid-template-rows: auto auto auto; }
.trainer .brand small { display: none; }
}
.trainer .tr-bar { position: static; }
.trainer .tr-title { margin: 0; display: flex; align-items: baseline; gap: 8px; font: 800 1.02rem var(--font-display); font-stretch: 112%; white-space: nowrap; }
.trainer .tr-title small { font: 500 0.72rem var(--font-mono); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-stretch: 100%; }
@media (max-width: 860px) {
.trainer .tr-title small { display: none; }
}
/* trainer page: full-width app under the site header */
[data-page="trainer"] main.wrap { max-width: none; padding: 0; }
.trainer { --shade: rgba(21, 32, 43, 0.07); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .trainer { --shade: rgba(0, 0, 0, 0.32); } }
:root[data-theme="dark"] .trainer { --shade: rgba(0, 0, 0, 0.32); }
.trainer .app { height: calc(100vh - 57px - env(safe-area-inset-top, 0px)); min-height: 600px; }
@media (max-width: 860px) { .trainer .app { height: auto; min-height: 0; } }
