/* Moved from app/views/training/show.html.erb in B2, scoped to .ctx-public. Rebuilt in its own phase. */
.ctx-public .tl-wrap { max-width: 720px; margin: 0 auto; padding: 0 var(--space-md) var(--space-xxl); }
.ctx-public .tl-style {
    text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--foreground-muted); margin: 8px 0 0;
  }
.ctx-public .tl-back {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--foreground-muted); text-decoration: none;
    font-size: 0.9rem; margin: var(--space-lg) 0 var(--space-md);
    min-height: 44px;
  }
.ctx-public .tl-back:hover { color: var(--foreground); }
.ctx-public .tl-session h1 {
    font-family: var(--font);
    font-size: 1.5rem; margin: 0;
  }
.ctx-public .tl-session .tl-tagline {
    color: var(--foreground-muted); margin: 2px 0 var(--space-md); font-size: 0.9rem;
  }
.ctx-public .tl-canvas-wrap {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    touch-action: none;
  }
.ctx-public .tl-canvas-wrap canvas { width: 100%; display: block; cursor: crosshair; }
.ctx-public .tl-fs-btn {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    width: 36px; height: 36px; border-radius: 50%;
    border: none; cursor: pointer; padding: 0;
    background: var(--surface-1); color: var(--ink);
    font-size: 16px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
  }
.ctx-public .tl-fs-btn:hover { background: var(--surface-1); }
.ctx-public .tl-fs-btn[hidden] { display: none; }
/* Full screen: the script moves the wrap into a body-level .tl-fs-host, above the app's
   header and tab bar. The ✕ is big enough to hit from across the table. */
.ctx-public .tl-canvas-wrap.tl-fullscreen {
    position: fixed; inset: 0; z-index: 10000;
    width: 100vw; height: 100vh; height: 100dvh;
    margin: 0; border-radius: 0; border: none; background: var(--surface-0);
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    display: flex; align-items: center; justify-content: center;
    overscroll-behavior: none;
  }
.ctx-public .tl-canvas-wrap.tl-fullscreen .tl-fs-exit {
    top: calc(env(safe-area-inset-top) + 8px);
    right: max(12px, env(safe-area-inset-right));
    width: 64px; height: 64px;
    font-size: 30px; font-weight: 800;
    background: var(--surface-2); color: var(--ink);
    border: 2px solid var(--line);
  }
.ctx-public .tl-canvas-wrap.tl-fullscreen .tl-fs-exit:hover { background: var(--line); }
html.tl-noscroll,
html.tl-noscroll body { overflow: hidden; }
.ctx-public .tl-prompt {
    text-align: center;
    color: var(--foreground-muted);
    margin: var(--space-md) 0;
    min-height: 1.4em;
  }
.ctx-public .tl-legend {
    display: flex; gap: 16px; justify-content: center;
    font-size: 12px; color: var(--foreground-muted); margin-top: 10px;
  }
.ctx-public .tl-legend i {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    margin-right: 6px;
  }
.ctx-public .tl-chiprow {
    display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
    margin-top: 12px;
  }
.ctx-public .tl-chip {
    border: none; cursor: pointer;
    padding: 10px 16px; min-height: 40px; border-radius: 999px;
    background: var(--secondary); color: var(--foreground);
    font-family: var(--font);
    font-weight: 700; font-size: 13px;
  }
.ctx-public .tl-chip.is-active { background: var(--primary); color: var(--on-ink); }
/* A control row. One ⓘ sits above the rows and opens What the settings do. */
.ctx-public .tl-ctl {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    margin-top: 12px;
  }
.ctx-public .tl-ctl[hidden] { display: none; }
.ctx-public .tl-ctl .tl-chiprow { margin-top: 0; flex: 0 1 auto; }
.ctx-public .tl-info-row { display: flex; justify-content: center; margin-top: 8px; }
/* Watch & Shoot's settings: a labelled section each, a hairline between them. */
.ctx-public .tl-group { margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--line); text-align: center; }
.ctx-public .tl-info-row + .tl-group { border-top: 0; padding-top: 0; margin-top: 4px; }
.ctx-public .tl-group__label { margin: 0; color: var(--ink-2); }
.ctx-public .tl-group__hint { margin: 4px 0 0; color: var(--ink-2); font-size: var(--fs-meta); }
.ctx-public .tl-group__hint[hidden] { display: none; }
.ctx-public .tl-group .tl-chiprow { margin-top: 10px; }
.ctx-public .tl-info-btn {
    min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--radius-full);
    background: none; color: var(--ink-2); cursor: pointer;
    font: inherit; font-size: var(--fs-meta); font-weight: 600;
    display: inline-flex; align-items: center; gap: 6px;
  }
.ctx-public .tl-info-btn:hover { color: var(--ink); }
.ctx-public .tl-info-btn .icon { width: 20px; height: 20px; }
.tl-info { display: flex; flex-direction: column; gap: var(--space-lg); }
.tl-info h2 { margin: 0; }
.tl-info__sec { scroll-margin-top: var(--space-lg); }
.tl-info__sec h3 { margin: 0 0 6px; font-size: var(--fs-body); font-weight: 800; color: var(--ink); }
.tl-info__sec p { margin: 0; color: var(--ink-2); line-height: 1.5; text-wrap: pretty; }
.tl-info__sec.is-picked h3 { color: var(--win); }
.tl-info__list { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); line-height: 1.45; }
.tl-info__list b { color: var(--ink); font-weight: 700; margin-right: 6px; }
.tl-info__sec .tl-info__note { margin-top: 8px; font-size: var(--fs-meta); }
/* Call the look: one word, big enough to read from behind the rods. */
.ctx-public .tl-callout {
    text-align: center; margin: 12px 0 0;
    font-family: var(--font); font-weight: 800; color: var(--win);
    font-size: clamp(2.5rem, 10vw, 4rem); line-height: 1.1; letter-spacing: -0.01em;
    min-height: 1.1em;
  }
.ctx-public .tl-callout.is-cue { color: var(--ink); }
.ctx-public .tl-callout[hidden] { display: none; }
/* Sound: a big switch, off until the player turns it on. */
.ctx-public .tl-sound {
    display: inline-flex; align-items: center; gap: 10px;
    min-height: 56px; padding: 0 28px; border: none; border-radius: 999px; cursor: pointer;
    background: var(--secondary); color: var(--foreground);
    font-family: var(--font); font-weight: 800; font-size: 1.1rem;
  }
.ctx-public .tl-sound.is-on { background: var(--primary); color: var(--on-ink); }
.ctx-public .tl-sound[hidden] { display: none; }
.ctx-public .tl-sound .icon { width: 26px; height: 26px; }
.ctx-public [data-sound] .tl-sound__on,
.ctx-public [data-sound].is-on .tl-sound__off { display: none; }
.ctx-public [data-sound].is-on .tl-sound__on { display: inline-block; }
.ctx-public .tl-canvas-wrap:not(.tl-fullscreen) .tl-fs-sound { display: none; }
.ctx-public .tl-canvas-wrap.tl-fullscreen .tl-fs-sound {
    top: calc(env(safe-area-inset-top) + 8px);
    right: calc(max(12px, env(safe-area-inset-right)) + 76px);
    width: 64px; height: 64px;
    background: var(--surface-2); color: var(--ink);
    border: 2px solid var(--line);
  }
.ctx-public .tl-canvas-wrap.tl-fullscreen .tl-fs-sound.is-on { background: var(--primary); color: var(--on-ink); border-color: var(--primary); }
.ctx-public .tl-canvas-wrap.tl-fullscreen .tl-fs-sound .icon { width: 30px; height: 30px; }

/* The Tom Spear Drill: a cassette that plays. The reels turn while the tape runs, and the
   tape winds from the left reel to the right as the reps go by. */
.ctx-public .tl-tape { text-align: center; }
.ctx-public .tl-tape__art { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; }
.ctx-public .tl-tape__shell { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 2; }
.ctx-public .tl-tape__screw { fill: var(--line-strong); }
.ctx-public .tl-tape__label { fill: var(--surface-1); stroke: var(--line); stroke-width: 1.5; }
.ctx-public .tl-tape__title { fill: var(--ink); font-family: var(--font); font-weight: 800; font-size: 20px; letter-spacing: 0.06em; }
.ctx-public .tl-tape__side { fill: var(--ink); font-family: var(--font); font-weight: 800; font-size: 20px; }
.ctx-public .tl-tape__series { fill: var(--ink-2); font-family: var(--font); font-weight: 700; font-size: 11px; letter-spacing: 0.12em; }
.ctx-public .tl-tape__rule { stroke: var(--line-strong); stroke-width: 1; }
.ctx-public .tl-tape__window { fill: var(--surface-0); stroke: var(--line-strong); stroke-width: 1.5; }
.ctx-public .tl-tape__wound { fill: var(--ink-2); transition: r 0.6s ease; }
.ctx-public .tl-tape__foot { fill: var(--surface-1); stroke: var(--line-strong); stroke-width: 1.5; }
.ctx-public .tl-reel { transform-box: fill-box; transform-origin: center; }
.ctx-public .tl-reel circle { fill: var(--surface-1); stroke: var(--ink); stroke-width: 2; }
.ctx-public .tl-reel path { stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; }
.ctx-public .tl-tape.is-playing .tl-reel { animation: tl-reel-spin 2.4s linear infinite; }
@keyframes tl-reel-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ctx-public .tl-tape.is-playing .tl-reel { animation: none; }
}
.ctx-public .tl-tape__word {
    margin: var(--space-lg) 0 0; min-height: 1.2em;
    font-family: var(--font); font-weight: 800; line-height: 1.1;
    font-size: clamp(1.5rem, 6vw, 2rem); color: var(--ink-2);
  }
.ctx-public .tl-tape__word.is-call { font-size: clamp(2.5rem, 11vw, 4rem); color: var(--win); }
.ctx-public .tl-tape__meta { margin: 6px 0 var(--space-lg); color: var(--ink-2); font-size: var(--fs-meta); }
.ctx-public .tl-tape__clock { font-variant-numeric: tabular-nums; }
.ctx-public .tl-tape__play,
.ctx-public .tl-play {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 56px; min-width: 220px; padding: 0 28px; border: none; border-radius: 999px; cursor: pointer;
    background: var(--primary); color: var(--on-ink);
    font-family: var(--font); font-weight: 800; font-size: 1.1rem;
  }
.ctx-public .tl-tape__play .icon,
.ctx-public .tl-play .icon { width: 24px; height: 24px; }
/* One Look, Off the Move: the goal, the word, the rep count, Start. */
.ctx-public .tl-reps { text-align: center; }
.ctx-public .tl-reps .tl-tape__meta { margin: 6px 0 var(--space-md); }
.ctx-public .tl-reps .tl-style { min-height: 1.4em; }
.ctx-public .tl-play__icon-pause,
.ctx-public .tl-session.is-playing .tl-play__icon-play { display: none; }
.ctx-public .tl-session.is-playing .tl-play__icon-pause { display: inline-block; }
.ctx-public .tl-tape__icon-pause,
.ctx-public .tl-tape.is-playing .tl-tape__icon-play { display: none; }
.ctx-public .tl-tape.is-playing .tl-tape__icon-pause { display: inline-block; }
.ctx-public .tl-tape__calls { margin: 12px 0 0; color: var(--ink-2); font-size: var(--fs-meta); }
.ctx-public .tl-tape__note { margin: 8px 0 0; color: var(--ink-2); font-size: var(--fs-meta); }
.ctx-public .tl-tape__note[hidden] { display: none; }
.ctx-public .tl-tape__quote { margin: var(--space-xl) auto 0; max-width: 520px; }
.ctx-public .tl-tape__quote blockquote {
    margin: 0; font-family: var(--font); font-weight: 700; font-size: 1.15rem; line-height: 1.4; color: var(--ink);
  }
.ctx-public .tl-tape__quote figcaption { margin-top: 8px; color: var(--ink-2); font-size: var(--fs-meta); }

/* Watch & Shoot's setup card: the first five academy visits, then every fifth (academy_visit_controller). */
.ctx-public .tl-setup {
    margin: 0 0 var(--space-lg); padding: var(--space-md);
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card);
  }
.ctx-public .tl-setup[hidden] { display: none; }
.ctx-public .tl-setup h2 { margin: 0 0 8px; font-size: var(--fs-body); font-weight: 800; color: var(--ink); }
.ctx-public .tl-setup ol { margin: 0; padding-left: 1.25em; color: var(--ink); line-height: 1.5; display: flex; flex-direction: column; gap: 4px; }
.ctx-public .tl-setup p { margin: 8px 0 0; color: var(--ink-2); font-size: var(--fs-meta); line-height: 1.5; }

/* Safari on an iPhone: the quiet line that opens the Home Screen guide. */
.ctx-public .tl-home-tip {
    display: block; width: 100%; min-height: 44px; margin: 0; padding: 4px 0;
    background: none; border: 0; cursor: pointer;
    font: inherit; font-size: var(--fs-meta); color: var(--ink-2); text-align: center;
  }
.ctx-public .tl-home-tip[hidden] { display: none; }
/* The install card sits under the tagline, which already leaves --space-md above it. */
.ctx-public .tl-install { margin: 0 0 var(--space-lg); }
.ctx-public .tl-home-tip__how { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
/* Your Defense: record a defense on the rod strip, then play it in reps. */
.ctx-public .tl-yd-play.is-playing .tl-play__icon-play { display: none; }
.ctx-public .tl-yd-play.is-playing .tl-play__icon-pause { display: inline-block; }
/* Your Defense's home: Record a defense first and biggest, everyone's defenses right under it,
   then the player and your own. */
.ctx-public .tl-yd-home[hidden] { display: none; }
.ctx-public .tl-yd-hero {
    margin-top: var(--space-md); padding: var(--space-lg) var(--space-md);
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card);
    text-align: center;
  }
.ctx-public .tl-yd-hero h2 { margin: 0; }
.ctx-public .tl-yd-hero > p:first-of-type { margin: 8px auto var(--space-md); max-width: 440px; color: var(--ink-2); line-height: 1.5; }
.ctx-public .tl-yd-hero__btn { min-height: 56px; font-size: 1.1rem; gap: 10px; max-width: 440px; margin: 0 auto; }
.ctx-public .tl-yd-hero__btn[hidden] { display: none; }
.ctx-public .tl-yd-hero__dot { width: 12px; height: 12px; border-radius: 50%; background: currentColor; flex: none; }
.ctx-public .tl-yd-h { margin: 0 0 4px; font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.ctx-public .tl-yd-mine h2.tl-yd-h { font-size: 1.25rem; }
.ctx-public .tl-yd-play { margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 8px); }
.ctx-public .tl-yd-play .tl-yd-h { text-align: left; margin-bottom: var(--space-sm); }
.ctx-public .tl-yd-filter { justify-content: flex-start; margin: 4px 0 8px; }
.ctx-public .tl-yd-filter[hidden] { display: none; }
.ctx-public .tl-yd-filter__n { font-variant-numeric: tabular-nums; opacity: 0.7; }
.ctx-public [data-yd-more] { margin-top: 8px; }
.ctx-public [data-yd-more][hidden] { display: none; }
/* The shot it defends, picked before it saves. */
.ctx-public .tl-yd-shot { max-width: 440px; margin: var(--space-md) auto 0; padding: 0; border: 0; }
.ctx-public .tl-yd-shot[hidden] { display: none; }
.ctx-public .tl-yd-shot legend { margin: 0 auto; font-weight: 600; font-size: var(--fs-meta); color: var(--ink); }
.ctx-public .tl-yd-shot.is-missing legend { color: var(--alert); }
.ctx-public .tl-yd-shot .tl-chiprow { margin-top: 8px; }
.ctx-public .tl-yd-tag {
    min-height: 36px; padding: 0 8px; border: 0; border-radius: var(--radius-control);
    background: var(--secondary); color: var(--foreground); font: inherit; font-size: var(--fs-meta); font-weight: 600;
  }
.ctx-public .tl-yd-mine { margin-top: var(--space-xl); text-align: left; }
.ctx-public .tl-yd-mine h2 { margin: 0 0 8px; font-size: var(--fs-body); font-weight: 800; }
.ctx-public .tl-yd-list { margin: 0; padding: 0; list-style: none; }
.ctx-public .tl-yd-row {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px;
    min-height: 56px; padding: 6px 0; border-bottom: 1px solid var(--line);
  }
.ctx-public .tl-yd-row__tools { margin-left: auto; }
.ctx-public .tl-yd-row b { display: block; color: var(--ink); font-weight: 700; }
.ctx-public .tl-yd-row span { color: var(--ink-2); font-size: var(--fs-meta); }
.ctx-public .tl-yd-del {
    width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
    border: none; border-radius: 999px; background: none; color: var(--ink-2); cursor: pointer;
  }
.ctx-public .tl-yd-del:hover { color: var(--ink); }
.ctx-public .tl-yd-del .icon { width: 20px; height: 20px; }
.ctx-public .tl-yd-limit { margin: 12px 0 0; color: var(--ink-2); font-size: var(--fs-meta); }
.ctx-public .tl-yd-limit[hidden] { display: none; }
.ctx-public .tl-yd-rec { text-align: center; }
.ctx-public .tl-yd-goal canvas { cursor: ew-resize; }
.ctx-public .tl-yd-head { margin: 8px 0 0; font-size: 1.25rem; font-weight: 800; min-height: 1.4em; }
.ctx-public .tl-yd-line { margin: 4px auto 0; max-width: 440px; color: var(--ink-2); line-height: 1.5; min-height: 1.5em; }
.ctx-public .tl-yd-name { display: flex; flex-direction: column; gap: 6px; max-width: 320px; margin: var(--space-md) auto 0; text-align: left; }
.ctx-public .tl-yd-name[hidden] { display: none; }
.ctx-public .tl-yd-name span { font-weight: 600; font-size: var(--fs-meta); }
.ctx-public .tl-yd-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: var(--space-md); }
.ctx-public .tl-yd-btns .btn[hidden] { display: none; }
.tl-yd-confirm { display: flex; flex-direction: column; gap: var(--space-sm); }
.tl-yd-confirm h2, .tl-yd-confirm p { margin: 0; }
.tl-yd-confirm p { color: var(--ink-2); margin-bottom: var(--space-sm); }
/* Your Defense, shared: chips grouped Yours / Everyone's / Waiting, in play order. */
.ctx-public .tl-yd-chips { margin-top: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ctx-public .tl-yd-group { display: flex; align-items: center; justify-content: center; gap: 2px; margin-top: 8px; min-height: 44px; }
.ctx-public .tl-yd-group__label {
    font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
  }
.ctx-public .tl-yd-chiprow { margin-top: 0; justify-content: center; }
.ctx-public .tl-yd-chip { display: inline-flex; align-items: center; gap: 6px; }
.ctx-public .tl-yd-chip__n { font-variant-numeric: tabular-nums; font-weight: 800; }
.ctx-public .tl-yd-chip__maker { font-weight: 500; }
.ctx-public .tl-yd-row__tools { display: flex; align-items: center; gap: 4px; flex: none; }
.ctx-public .tl-yd-alert { margin: 8px 0 0; color: var(--alert); font-size: var(--fs-meta); }
.ctx-public .tl-yd-alert:empty { display: none; }
.ctx-public .tl-yd-sub { margin: 0 0 8px; color: var(--ink-2); font-size: var(--fs-meta); }
.ctx-public .tl-yd-mine h3 { margin: var(--space-md) 0 4px; font-size: var(--fs-meta); font-weight: 800; color: var(--ink); }
.ctx-public .tl-yd-mine[hidden], .ctx-public .tl-yd-limit[hidden] { display: none; }
/* Your Defense's recorder: the goal is the touch area, a lane per man. While recording it sits
   under the header and the tab bar steps aside, so the goal and the clock fit a phone with
   Safari's bar showing, and no thumb leaves the page mid-take. */
.ctx-public .tl-yd-goal,
.ctx-public .tl-yd-play .tl-canvas-wrap { scroll-margin-top: calc(var(--header-h) + 8px); }
html.tl-recording .tabbar { display: none; }
.ctx-public .tl-yd-slow { margin-top: 4px; text-align: center; }
.ctx-public .tl-yd-speed { gap: 6px; }
.ctx-public .tl-yd-speed .tl-chip { padding: 10px; min-width: 44px; }
.ctx-public .tl-yd-share { max-width: 440px; margin: var(--space-sm) auto 0; text-align: left; }
.ctx-public .tl-yd-share[hidden] { display: none; }
.ctx-public .tl-yd-goal canvas { -webkit-user-select: none; -webkit-touch-callout: none; }
