/* Whiteboard, the free tactics board (/whiteboard/). It stands on its own: it does not load site.css. Tokens follow
   site.css; the pool colours are those of
   the Playbook app (core/js/field.js), light and dark.

   Layout: the page is exactly as high as the window and the pool takes all the room that is left.
   - Upright window (phone, iPad upright): everything above and below the pool, which is as wide as the window.
   - Lying window (laptop, iPad and phone on their side): all controls in a column on the left, the pool beside it
     over the full height. */
@font-face { font-family: "Open Sans"; src: url("../fonts/OpenSans_400Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("../fonts/OpenSans_800ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
:root { --logo-main: #484d6d; --logo-l: #6e9dc5; --gutter: clamp(.75rem, 2.5vw, 1.5rem); --ease: cubic-bezier(.2, .8, .2, 1);
  --display: -apple-system, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif; --body: -apple-system, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --r-btn: 12px; --r-card: 18px;
  --bg: #f4f4f8; --surface: #fff; --line: #dadae3; --line-strong: #b9b9c6; --text: #262626; --muted: #5f5f6b;
  --btn: #484d6d; --on-btn: #fff; --seg-bg: #e6e6ee; --seg-on: #fff; --seg-on-text: #262626; --hl: #6e9dc5;
  --cta: #f2552c; --on-cta: #14151f; --card-shadow: 0 1px 2px rgba(38, 38, 60, .06), 0 20px 40px -28px rgba(38, 38, 60, .35);
  /* Pool (Playbook, light) */
  --p-bg: #fff; --p-water: #e6f1f8; --p-line: #484d6d; --p-border: #262626; --p-goal: #fff;
  --accent: #f2552c; --opp: #1f4f96; --keeper: #d62828; --pass: #3d6f99; --shot: #262626; --cover: #484d6d; --ball: #f5c518;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #17171c; --surface: #222229; --line: #36363f; --line-strong: #55555f; --text: #f1f1f4; --muted: #a6a6b2;
  --logo-main: #fff;
  --btn: #9498b8; --on-btn: #17171c; --seg-bg: #2c2c34; --seg-on: #55555f; --seg-on-text: #fff; --card-shadow: none;
  /* Pool (Playbook, dark) */
  --p-bg: #222229; --p-water: #1f2b38; --p-line: #8b93b3; --p-border: #c9ccd8; --p-goal: #3a3f4d;
  --opp: #4f86d6; --pass: #7fb0dc; --shot: #e6e6ee; --cover: #a3a8d6;
} }

*, *::before, *::after { box-sizing: border-box; }
/* touch-action: a double tap does not zoom the page (quick taps on the buttons would); pinching and scrolling still work */
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body { margin: 0; min-height: 100dvh; height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; } button { font: inherit; color: inherit; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* No focus ring after a click or tap; a thin line for keyboard users */
:focus { outline: none; }
:focus-visible { outline: 1.5px solid var(--btn); outline-offset: 3px; }

/* Header: the header of apps.talentdev.nl and talentdev.nl (element `header` of DEV/web-elementen): logo, "Apps › Whiteboard"
   (the first part leads back to the overview), the main button (not on a phone) and the language link. No menu: the
   page has no parts to jump to. Same sizes and the same
   column as there; the board under it uses the whole window. */
.skip { position: absolute; left: -999px; } .skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--btn); color: var(--on-btn); padding: .5rem 1rem; }
.top { flex: none; border-bottom: 1px solid var(--line); background: var(--bg); color: var(--text); }
/* The same column as on the rest of the site (--wrap and --gutter of site.css), so the logo stands where it stands there */
.top .wrap { display: flex; align-items: center; gap: 1rem; min-height: 4.25rem; width: min(100% - 2 * clamp(1rem, 4vw, 2.5rem), 72rem); margin-inline: auto; }
.logo { display: inline-flex; align-items: center; gap: .45em; flex: none; font: 400 1.35rem/1 "Open Sans", system-ui, sans-serif; text-decoration: none; letter-spacing: -.01em; color: var(--logo-main); }
.logo .mark { width: 1.75em; height: auto; flex: none; } .logo .mark .l { fill: var(--logo-l); } .logo .mark .d { fill: var(--logo-main); }
.logo .word { display: inline-flex; align-items: baseline; } .logo .gt { font-weight: 800; margin-right: .08em; }
.logo .t, .logo .cur { color: var(--logo-l); } .logo b, .logo .cur { font-weight: 800; }
.logo .cur { margin-left: .04em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.product { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 1rem; border-left: 1px solid var(--line-strong); font-weight: 600; text-decoration: none; color: var(--text); }
/* "Apps › Product": the first part leads back to the overview of all apps. On a phone only the product name is left;
   there the way back is the link "Alle apps" at the foot of the page. */
.product a { color: inherit; text-decoration: none; }
.product .crumb { color: var(--muted); font-weight: 500; transition: color .2s; } .product .crumb:hover { color: var(--text); }
.crumb-sep { margin: 0 .45em; color: var(--muted); font-weight: 400; }
@media (max-width: 36em) { .product .crumb, .crumb-sep { display: none; } }
.top .top-btn { margin-left: auto; min-height: 42px; }
.lang { margin-left: 0; font-size: .85rem; border: 1px solid var(--line); border-radius: 4px; padding: .1rem .45rem; text-decoration: none; color: var(--muted); }
/* On a phone there is deliberately no button in the header: there it stands under the pool */
@media (max-width: 36em) { .top .top-btn { display: none; } .lang { margin-left: auto; } .logo { font-size: 1.15rem; } }

/* ---------- The page, upright: one column. The panel dissolves, so its parts can stand above and below the pool ---------- */
.page { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: .5rem; padding: .6rem var(--gutter) .75rem; }
.panel { display: contents; }
.head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.row-top { order: 2; } .tools { order: 3; } .stage { order: 4; } .phases-row { order: 5; } .selbar { order: 6; } .cta { order: 7; }

/* The title */
h1 { font: 700 clamp(1.5rem, 4.5vw, 2.2rem)/1.05 var(--display); letter-spacing: -.025em; margin: 0; }

.row { display: flex; align-items: center; gap: .5rem; min-width: 0; }
/* Three long phase names on a narrow row: the phases scroll inside their own control, the buttons beside them stay */
.phases-row .seg { flex: 0 1 auto; min-width: 0; }
.ph-long { display: none; }
.row-top .undo { margin-left: auto; }
.step svg { stroke-width: 2.4; stroke-linecap: round; }

/* The pool: as wide as the window; when the window is too low for that, it gives way and the pool shrinks inside it */
.stage { flex: 0 1 auto; aspect-ratio: 432 / 305; min-height: 9rem; display: flex; background: var(--p-bg); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--card-shadow); }
/* The copyright line: small, halfway between the goal and the foot of the stage (board.js sets `top`) */
.stage { position: relative; }
.copyline { position: absolute; left: 0; right: 0; bottom: 2px; margin: 0; transform: translateY(-50%); font-size: .6rem; line-height: 1; letter-spacing: .02em; color: var(--muted); text-align: center; white-space: nowrap; }
.copyline[style] { bottom: auto; }
.copyline a { color: inherit; text-underline-offset: 2px; }
.board { display: block; flex: 1 1 0; min-width: 0; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* Segmented control (as on the apps-site) */
.seg { position: relative; display: inline-flex; max-width: 100%; padding: 3px; border-radius: 99px; background: var(--seg-bg); overflow-x: auto; scrollbar-width: none; flex: none; }
.seg::-webkit-scrollbar { display: none; }
.seg-thumb { position: absolute; top: 3px; bottom: 3px; left: 0; width: 0; border-radius: 99px; background: var(--seg-on); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.seg.ready .seg-thumb { transition: transform .4s var(--ease), width .4s var(--ease), opacity .2s; }
.seg button { position: relative; z-index: 1; border: 0; background: none; min-height: 36px; padding: 0 .8rem; border-radius: 99px; font-size: .92rem; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .3s; font-variant-numeric: tabular-nums; }
.seg button[aria-pressed="true"] { color: var(--seg-on-text); }

/* Small square buttons */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: none; color: var(--text); transition: background-color .2s, border-color .2s, opacity .2s; }
.icon-btn:hover:not(:disabled) { border-color: var(--hl); background: color-mix(in srgb, var(--hl) 12%, transparent); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn svg, .tool svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.icon-btn[aria-pressed="true"] { border-color: var(--hl); background: color-mix(in srgb, var(--hl) 20%, transparent); }

/* Play button: an outlined button, not orange (orange is only for the button to Playbook) */
.play-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 40px; padding: 0 .9rem; border-radius: 10px; border: 1.5px solid var(--line-strong); background: none; font-weight: 600; font-size: .92rem; white-space: nowrap; transition: border-color .2s, opacity .2s; }
.play-btn:hover:not(:disabled) { border-color: var(--text); }
.play-btn:disabled { opacity: .4; cursor: default; }
.play-ic { flex: none; width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.play-btn.on .play-ic { width: 10px; height: 10px; border: 0; background: currentColor; border-radius: 1px; }

/* Tools: one row with the names under the icons */
.tools { position: relative; display: flex; min-width: 0; }
/* The highlight behind the chosen tool; board.js moves it like a drop */
.tool-sel { position: absolute; z-index: 0; left: 0; top: 0; pointer-events: none; border-radius: 10px; background: color-mix(in srgb, var(--hl) 20%, transparent); border: 1px solid var(--hl); transform-origin: center; }
.tool { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .35rem .1rem .3rem; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--text); font-size: .7rem; font-weight: 600; line-height: 1.1; position: relative; z-index: 1; transition: background-color .2s; }
.tool span { color: var(--muted); white-space: nowrap; }
.tool:hover { background: color-mix(in srgb, var(--hl) 10%, transparent); }
.tool[aria-pressed="true"]:hover { background: none; }
.tool[aria-pressed="true"] span { color: var(--text); }
/* Tool icons in the colours of their lines */
.ic-swim { color: var(--accent); stroke-width: 2.6 !important; } .ic-pass { color: var(--pass); stroke-width: 2.4 !important; }
.ic-shot { color: var(--shot); stroke-width: 2.6 !important; } .ic-cover { color: var(--cover); stroke-width: 2.6 !important; }
.ic-zone { color: var(--accent); }

/* Under the phases: what the selected line or zone can do (nothing selected: not there) */
.selbar { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.selbar[hidden] { display: none; }
.tip { margin: 0; padding: 0 .4rem .15rem; font-size: .78rem; line-height: 1.3; color: var(--muted); text-align: center; }
.sel-row { display: flex; align-items: center; gap: .4rem; flex: none; }
.chooser { display: inline-flex; gap: .2rem; padding: 3px; border-radius: 12px; background: var(--seg-bg); }
.chooser .icon-btn { border-color: transparent; width: 38px; height: 34px; }
.chooser .icon-btn[aria-pressed="true"] { background: var(--seg-on); border-color: transparent; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }

/* To Playbook: the only orange button. Under the pool on an upright screen, in the header on a lying one. */
.cta { display: flex; }
@media (min-width: 36.01em) { .cta { display: none; } }
.cta .btn { flex: 1 1 auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 44px; padding: 0 1.2rem; border-radius: var(--r-btn); font: 600 1rem/1 var(--body); text-decoration: none; white-space: nowrap; border: 0; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .25s; }
.btn-primary { background: var(--cta); color: var(--on-cta); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .5); }
.btn-primary:focus-visible { outline-color: var(--cta); }
.btn .arrow { transition: transform .3s var(--ease); } .btn:hover .arrow { transform: translateX(4px); }
.btn-line { background: none; border: 1.5px solid var(--line-strong); color: var(--text); }
.btn-line:hover { border-color: var(--text); }
.btn-dark { background: var(--btn); color: var(--on-btn); }

/* Phone: the play button shows its icon only */
@media (max-width: 30em) {
  .row { gap: .35rem; }
  .play-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .play-btn { width: 44px; padding: 0; }
}

/* ---------- Two layouts of the controls (body class, set by board.js):
   va  the side bar is open: calm rows, every tool with its name (lying window only)
   vc  the side bar is closed: the controls float as pills on the card of the pool (always on an upright screen) ---------- */

/* The phases are a slider, in both layouts. A dark thumb slides to the chosen number; the last place holds the plus
   until there are three phases: ((1) (+)) > ((1)(2)(+)) > ((1)(2)(3)) */
.phase-track { position: relative; display: grid; grid-template-columns: repeat(3, 36px); justify-content: space-between; gap: 0 .35rem; flex: none; padding: 3px; border-radius: 99px; background: var(--seg-bg); }
.phases { display: contents; }
.phases .seg-thumb { top: 3px; bottom: 3px; border-radius: 50%; background: var(--btn); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.phases button { width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 50%; font-size: .95rem; line-height: 1; text-align: center; color: var(--muted); }
.phases button[aria-pressed="true"] { color: var(--on-btn); }
.add-phase { grid-column: 3; width: 36px; height: 36px; border: 0; border-radius: 50%; color: var(--muted); }
.add-phase:hover:not(:disabled) { background: var(--seg-on); color: var(--seg-on-text); }
.add-phase:disabled { display: none; }

/* Full screen: one button, two icons */
.full .full-off, .full[aria-pressed="true"] .full-on { display: none; } .full[aria-pressed="true"] .full-off { display: block; }
.is-full .top, .is-full .cta, .is-full .fold { display: none; }

/* The tab that opens and closes the side bar: only in a lying window */
.fold { display: none; }

/* ----- Upright screen (and any window too narrow for a side bar): the pool's card takes all the height, and the
   controls float on it as pills: formation and play, then the phases, above the pool; the tools under it ----- */
@media (orientation: portrait), (max-width: 33.98rem) {
  /* --st: where the card of the pool starts; --below: what stands under it (the button, on a phone only) */
  .page { position: relative; --st: .6rem; --pill: 50px; --below: calc(44px + .5rem); }
  .stage { flex: 1 1 0; aspect-ratio: auto; min-height: 17rem; padding: calc(2 * var(--pill) + 1.7rem) 0 calc(var(--pill) + 1.9rem); }
  .row-top, .phases-row, .tools { position: absolute; z-index: 1; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2 * var(--gutter) - 1rem); height: var(--pill); padding: 4px; gap: .25rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .35); }
  /* The two pills above the pool are equally wide; what stands in them is spread to both ends */
  .row-top, .phases-row { width: 17.5rem; justify-content: space-between; }
  .row-top { top: calc(var(--st) + .6rem); }
  .phases-row { top: calc(var(--st) + .6rem + var(--pill) + .4rem); }
  .tools { bottom: calc(.75rem + var(--below) + .6rem); align-items: center; }
  .tool { flex: none; width: 40px; height: 40px; padding: 0; justify-content: center; } .tool span { display: none; }
  .row-top .undo, .phases-row .del-phase { margin-left: auto; } .step { width: 32px; }
  .is-full .page { --below: 0px; }
  .icon-btn, .play-btn { border-color: transparent; }
  .play-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } .play-btn { width: 40px; padding: 0; }
  .selbar { position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); top: calc(var(--st) + 2 * var(--pill) + 2rem); padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .35); }
}

/* Upright and wide enough (a tablet): the two pills stand side by side, as one centred row */
@media (orientation: portrait) and (min-width: 36rem) {
  .page { --below: 0px; }
  .stage { padding-top: calc(var(--pill) + 1.5rem); }
  .row-top, .phases-row { transform: none; }
  .row-top { left: calc(50% - 16rem); }
  .phases-row { top: calc(var(--st) + .6rem); left: calc(50% - 16rem + 18rem); width: 14rem; }
  .selbar { top: calc(var(--st) + var(--pill) + 1.8rem); }
}

/* ----- Lying window: the pool over the full height; the button to Playbook in the header ----- */
@media (orientation: landscape) and (min-width: 34rem) {
  .page { position: relative; flex-direction: row; gap: clamp(.5rem, 1.2vw, .9rem); padding-block: .6rem; --panel-w: 8.75rem; }
  /* The tab: on the edge between bar and pool when open, on the left edge of the pool when closed, at the same height */
  .fold { display: inline-flex; align-items: center; justify-content: center; position: absolute; z-index: 3; top: 1.35rem; left: calc(var(--gutter) - 9px); width: 20px; height: 44px; padding: 0; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .35); transition: color .2s, border-color .2s; }
  .fold:hover { color: var(--text); border-color: var(--hl); }
  .fold svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transform: rotate(180deg); }
  .va .fold { left: calc(var(--gutter) + var(--panel-w) + clamp(.5rem, 1.2vw, .9rem) - 10px); } .va .fold svg { transform: none; }
  .stage { flex: 1 1 0; min-width: 0; min-height: 0; aspect-ratio: auto; }
  /* The header carries the title and the button; what a selected line can do floats over the stage */
  .selbar { position: absolute; z-index: 2; top: 1.3rem; left: 50%; transform: translateX(-50%); min-height: 0; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .35); }

  /* A: a bar on the left: one tool per line with its name; the phase slider; play between its arrows; undo and delete */
  .va .panel { display: grid; grid-template-columns: repeat(6, 1fr); align-content: start; gap: .3rem; flex: none; width: var(--panel-w); min-height: 0; overflow-y: auto; scrollbar-width: none; }
  .va .panel::-webkit-scrollbar { display: none; }
  .va .row-top, .va .phases-row { display: contents; }
  .va .formation { order: 1; grid-column: 1 / -1; } .va .formation button { flex: 1 1 0; }
  .va .tools { order: 2; grid-column: 1 / -1; flex-direction: column; gap: .1rem; margin-block: .45rem; padding-block: .55rem; border-block: 1px solid var(--line); }
  .va .tool { flex: none; flex-direction: row; justify-content: flex-start; gap: .6rem; height: 38px; padding: 0 .55rem; font-size: .86rem; }
  .va .phase-track { order: 3; grid-column: 1 / -1; }
  .va .step-prev { order: 4; } .va .play-btn { order: 5; } .va .step-next { order: 6; } .va .undo { order: 7; } .va .del-phase { order: 8; } .va .full { order: 9; }
  .va .step, .va .play-btn { grid-column: span 2; width: 100%; margin-top: .35rem; }
  .va .play-btn { padding: 0; }
  .va .play-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .va .undo, .va .del-phase, .va .full { grid-column: span 2; width: 100%; margin: 0; }
  .va .step-prev, .va .undo { grid-column: 1 / span 2; } /* each of these rows starts at the left */

  /* C: no bar, the pills float on the stage: the tools upright on the left, the rest side by side at the top */
  .vc .panel { display: contents; }
  .vc .tools, .vc .row-top, .vc .phases-row { position: absolute; z-index: 1; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .35); }
  .vc .tools { left: calc(var(--gutter) + .7rem); top: 50%; transform: translateY(-50%); flex-direction: column; gap: .1rem; width: 3rem; }
  .vc .tool span { display: none; }
  .vc .tool { flex: none; width: 100%; height: 40px; padding: 0; justify-content: center; }
  .vc .row-top { top: 1.3rem; right: calc(50% + .3rem); gap: .3rem; }
  .vc .phases-row { top: 1.3rem; left: calc(50% + .3rem); gap: .3rem; }
  .vc .row-top .undo { margin-left: 0; } .vc .step { width: 32px; }
  .vc .icon-btn { border-color: transparent; } .vc .play-btn { border-color: transparent; padding: 0 .6rem; }
  .vc .selbar { top: 4.6rem; }
  .vc .play-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } .vc .play-btn { width: 40px; padding: 0; }
}
/* A phone on its side: a lower header and smaller buttons; in A the names go, so everything fits without scrolling */
@media (orientation: landscape) and (min-width: 34rem) and (max-height: 34rem) {
  /* The one place where the header is lower than on the sites: here every pixel of height goes to the pool */
  .top .wrap { min-height: 2.4rem; gap: .7rem; } .logo { font-size: 1rem; } .top .top-btn { min-height: 30px; font-size: .85rem; padding: 0 .75rem; }
  .page { padding-block: .4rem; }
  .seg button { min-height: 32px; } .icon-btn, .play-btn { height: 36px; min-height: 36px; }
  .chooser .icon-btn { width: 34px; height: 30px; }
  .page { --panel-w: 7.75rem; }
  .va .panel { gap: .25rem; }
  .va .tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem; margin-block: .2rem; padding-block: .3rem; } .va .tool { height: 34px; padding: 0; justify-content: center; } .va .tool span { display: none; }
  .phase-track { grid-template-columns: repeat(3, 32px); } .phases button, .add-phase { width: 32px; height: 32px; min-height: 0; }
  .va .phase-track { margin-top: .2rem; }
  .fold { top: .9rem; height: 38px; }
  .va .step, .va .play-btn { margin-top: .15rem; }
  .vc .tools { width: 2.75rem; } .vc .tool { height: 36px; } .vc .row-top, .vc .phases-row { top: .8rem; } .vc .selbar { top: 3.7rem; }
}

/* ---------- Opening and closing the side bar, in three beats (board.js): the controls fade away, the card of the pool
   glides to its new place, the controls appear where they now stand. The fading is plain CSS on the controls
   themselves, so it is the same every time and in every browser; the glide is a view transition of the card and
   the tab only (a browser without it just switches). ---------- */
.fading .row-top, .fading .phases-row, .fading .tools, .fading .formation, .fading .undo, .fading .step, .fading .play-btn, .fading .phase-track, .fading .del-phase, .fading .full, .fading .selbar { opacity: 0; transition: opacity .28s ease-out; }
.fade-in .row-top, .fade-in .phases-row, .fade-in .tools, .fade-in .formation, .fade-in .undo, .fade-in .step, .fade-in .play-btn, .fade-in .phase-track, .fade-in .del-phase, .fade-in .full, .fade-in .selbar { transition: opacity .45s ease-out; }
.stage { view-transition-name: stage; } .fold { view-transition-name: fold; } .top { view-transition-name: top; }
::view-transition-group(stage), ::view-transition-group(fold) { animation-duration: .42s; animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
::view-transition-group(top) { animation: none; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
/* The pool keeps its size while its card grows or shrinks around it */
::view-transition-group(stage) { overflow: clip; border-radius: 14px; }
::view-transition-old(stage), ::view-transition-new(stage) { height: 100%; width: 100%; object-fit: none; object-position: center; }

/* ---------- The pool ---------- */
.p-bg { fill: var(--p-bg); } .p-water { fill: var(--p-water); }
.p-line { fill: none; stroke: var(--p-line); stroke-opacity: .6; stroke-width: 1.6; stroke-dasharray: 7 6; }
.p-half { stroke: var(--p-border); stroke-opacity: .35; stroke-width: 1.5; }
.p-border { fill: none; stroke: var(--p-border); stroke-width: 2.5; }
.p-goal { fill: var(--p-goal); stroke: var(--p-border); stroke-width: 2.5; }
[data-tool="swim"] .board, [data-tool="pass"] .board, [data-tool="shot"] .board, [data-tool="cover"] .board, [data-tool="zone"] .board { cursor: crosshair; }

/* Players: white circles, blue diamonds, the keeper red, the ball yellow */
/* Swimming to the next phase: calm, with a soft start and stop (STEP_MS in board.js leaves a pause after it) */
.pl { transition: transform 1.9s cubic-bezier(.45, .05, .3, 1); }
.pl.drag, .board.still .pl { transition: none; }
[data-tool="select"] .pl { cursor: grab; } [data-tool="select"] .pl.drag { cursor: grabbing; }
.b-own { fill: #fff; stroke: #262626; stroke-width: 2; }
.b-opp { fill: var(--opp); stroke: var(--opp); stroke-width: 1.8; }
.b-gk { fill: var(--keeper); }
.b-ball { fill: var(--ball); stroke: #262626; stroke-width: 1.2; }
.pl text { font: 700 12.5px var(--body); text-anchor: middle; pointer-events: none; }
.t-own { fill: #262626; } .t-opp { fill: #fff; font-size: 11.5px; } .t-gk { font-size: 12px; }
.hit { fill: transparent; }

/* Lines (Playbook: swim, pass, shot, cover) and zones */
.ln { fill: none; }
.ln-swim { stroke: var(--accent); stroke-width: 3; }
.ln-pass { stroke: var(--pass); stroke-width: 2.6; stroke-dasharray: 7 5; }
.ln-shot { stroke: var(--shot); stroke-width: 3; stroke-dasharray: 1.5 6; stroke-linecap: round; }
.ln-cover { stroke: var(--cover); stroke-width: 2.4; stroke-linecap: round; }
.mk-swim { fill: var(--accent); } .mk-pass { fill: var(--pass); } .mk-shot { fill: var(--shot); }
.ln-glow { fill: none; stroke: var(--hl); stroke-opacity: .45; stroke-width: 10; stroke-linecap: round; }
.ln-hit { fill: none; stroke: transparent; stroke-width: 18; stroke-linecap: round; }
@media (pointer: coarse) { .ln-hit { stroke-width: 26; } }
.zone { fill: url(#hatch); stroke: var(--accent); stroke-opacity: .8; stroke-width: 2; stroke-dasharray: 6 4; }
.hatch-bg { fill: var(--accent); fill-opacity: .1; } .hatch-ln { stroke: var(--accent); stroke-opacity: .45; stroke-width: 2.5; }
.zone-hit { fill: transparent; stroke: transparent; stroke-width: 12; }
.zone-sel { fill: none; stroke: var(--hl); stroke-width: 3; pointer-events: none; }
.draft { pointer-events: none; opacity: .85; }
.hd { fill: #fff; stroke: var(--hl); stroke-width: 3; cursor: grab; }
.hd-mid { fill: var(--hl); stroke: #fff; stroke-width: 2.5; }
[data-tool="select"] .ln-hit, [data-tool="select"] .zone-hit { cursor: move; }
.appear { animation: appear .5s var(--ease) both; }
@keyframes appear { from { opacity: 0; } }

/* Confirmation */
.confirm { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); color: var(--text); padding: 1.5rem; width: min(26rem, calc(100% - 2rem)); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45); }
.confirm::backdrop { background: rgba(20, 21, 31, .45); }
.confirm h2 { margin: 0 0 .5rem; font: 700 1.25rem/1.25 var(--display); }
.confirm p { margin: 0 0 1.25rem; color: var(--muted); }
.confirm-btns { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
