/* Generated by app/build.py, do not edit: every theme's motion, from themes/<name>.motion.css. */
/* paper: how this theme moves. The screen change, a score landing, the theme being picked and its charts;
   STYLEGUIDE.md and DESIGN-RULES.md (Motion) say what each may do. */
/* Paper: the printed scorecard from the pro shop. Stiff card and pen ink. */

@property --pp-sweep { syntax: "<angle>"; inherits: false; initial-value: 360deg; }

/* 1. Screen change: a stiff folded scorecard, the panel swinging on its fold to edge-on without bending */
[data-theme="paper"][data-nav] .vt-old { z-index: 2; transform-origin: 0 50%; animation: pp-fold-away 230ms cubic-bezier(0.4, 0, 1, 1) both; }
[data-theme="paper"][data-nav][data-nav="back"] .vt-old { z-index: 0; animation: none; }
[data-theme="paper"][data-nav][data-nav="back"] #app.vt-new { z-index: 2; transform-origin: 0 50%; animation: pp-fold-back 240ms cubic-bezier(0.25, 0.6, 0.3, 1) both; }
@keyframes pp-fold-away {
  0% { transform: perspective(2000px) rotateY(0); filter: brightness(1); }
  85% { opacity: 1; }
  100% { transform: perspective(2000px) rotateY(-90deg); filter: brightness(0.9); opacity: 0; }
}
@keyframes pp-fold-back {
  0% { transform: perspective(2000px) rotateY(-90deg); filter: brightness(0.9); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: perspective(2000px) rotateY(0); filter: brightness(1); opacity: 1; }
}

/* 2. A score lands: the marker's ballpoint rings it in one clean clockwise stroke from eleven o'clock */
[data-theme="paper"] .mk.run:is(.c1, .c2, .s1, .s2) {
  mask: radial-gradient(circle 13.5px, #000 100%, transparent 0) center / calc(100% + 12px) calc(100% + 12px) no-repeat no-clip,
        conic-gradient(from -20deg, #000 var(--pp-sweep), transparent 0) center / calc(100% + 12px) calc(100% + 12px) no-repeat no-clip;
  animation: pp-ring 100ms cubic-bezier(0.3, 0.6, 0.3, 1) both;
}
@keyframes pp-ring { from { --pp-sweep: 0deg; } to { --pp-sweep: 360deg; } }

/* 3. This theme is picked: a fresh card from the box, set down flat on the counter */
[data-theme="paper"].arrive #app { transform-origin: 50% 100%; animation: pp-set-down 340ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes pp-set-down {
  0% { transform: perspective(900px) rotateX(16deg) translateY(-3%); opacity: 0.5; }
  30% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}

/* 4. Charts, the first time they are seen: ink laid along each bar from its baseline, a steady pen, left to right */
[data-theme="paper"] { --chart-dur: 400ms; --chart-ease: cubic-bezier(0.2, 0.8, 0.2, 1); --chart-sweep: 220ms; }

@media (prefers-reduced-motion: reduce) {
  [data-theme="paper"][data-nav] .vt-old, [data-theme="paper"][data-nav][data-nav="back"] .vt-old { animation: none; z-index: 0; }
  [data-theme="paper"][data-nav] #app.vt-new, [data-theme="paper"][data-nav][data-nav="back"] #app.vt-new { animation: pp-fade 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  [data-theme="paper"] .mk.run:is(.c1, .c2, .s1, .s2) { mask: none; animation: none; }
  [data-theme="paper"].arrive #app { animation: none; }
  @keyframes pp-fade { from { opacity: 0; } to { opacity: 1; } }
}
/* masters: how this theme moves. The screen change, a score landing, the theme being picked and its charts;
   STYLEGUIDE.md and DESIGN-RULES.md (Motion) say what each may do. */
/* Masters: the hand-operated leaderboard. Everything that moves is a plate dropped into its groove. */

/* Screen change: a new plate slid down into the board's channel, covering the old one; back lifts it out. */
[data-theme="masters"][data-nav] #app.vt-new { animation: ms-plate-in 240ms cubic-bezier(0.3, 0.7, 0.2, 1) both; }
[data-theme="masters"][data-nav][data-nav="back"] .vt-old { z-index: 1; animation: ms-plate-out 190ms cubic-bezier(0.4, 0, 1, 1) both; }
[data-theme="masters"][data-nav][data-nav="back"] #app.vt-new { animation: none; }
@keyframes ms-plate-in {
  from { transform: translateY(-2.5%); clip-path: inset(0 0 100% 0); }
  to { transform: none; clip-path: inset(0); }
}
@keyframes ms-plate-out {
  from { transform: none; clip-path: inset(0); }
  to { transform: translateY(-2.5%); clip-path: inset(0 0 100% 0); }
}

/* A score lands: the figure plate dropped into its cell from above, stopping hard on the groove. */
[data-theme="masters"] .mk.run { overflow: hidden; }
[data-theme="masters"] .mk.run .num { animation: ms-figure 110ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes ms-figure { from { transform: translateY(-80%); } }

/* This theme is picked: the board filled row by row, each row of plates dropped in by hand. */
[data-theme="masters"].arrive #app { animation: ms-rows 380ms both; }
@keyframes ms-rows {
  0% { clip-path: inset(0 0 100% 0); animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  24% { clip-path: inset(0 0 86% 0); animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  50% { clip-path: inset(0 0 58% 0); animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  74% { clip-path: inset(0 0 30% 0); animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  100% { clip-path: inset(0); }
}

/* 4. Charts, the first time they are seen: each bar slid home to a hard stop, as a plate meets its groove */
[data-theme="masters"] { --chart-dur: 340ms; --chart-ease: cubic-bezier(0.3, 0.7, 0.2, 1); --chart-sweep: 180ms; }

@media (prefers-reduced-motion: reduce) {
  [data-theme="masters"][data-nav] #app.vt-new, [data-theme="masters"][data-nav][data-nav="back"] #app.vt-new { animation: ms-fade 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  [data-theme="masters"][data-nav][data-nav="back"] .vt-old { animation: none; z-index: auto; }
  [data-theme="masters"] .mk.run .num, [data-theme="masters"].arrive #app { animation: none; }
}
@keyframes ms-fade { from { opacity: 0; } }
/* links: how this theme moves. The screen change, a score landing, the theme being picked and its charts;
   STYLEGUIDE.md and DESIGN-RULES.md (Motion) say what each may do. */
/* Links: a Scottish links in the wind. Things lean with the gust and snap taut, like the pennant on the pin. */

/* Screen change: a gust running across the course, the next page laid over on a slanted front, leaning downwind. */
[data-theme="links"][data-nav] #app.vt-new { transform-origin: 50% 100%; animation: lk-gust-in 250ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
[data-theme="links"][data-nav] .vt-old { animation: lk-gust-out 250ms cubic-bezier(0.4, 0, 1, 1) both; }
[data-theme="links"][data-nav][data-nav="back"] #app.vt-new { animation-name: lk-gust-in-back; }
[data-theme="links"][data-nav][data-nav="back"] .vt-old { animation-name: lk-gust-out-back; }
@keyframes lk-gust-in {
  from { transform: translateX(3%) skewX(-2deg); clip-path: polygon(100% 0, 100% 0, 100% 100%, 125% 100%); }
  to { transform: none; clip-path: polygon(-25% 0, 100% 0, 100% 100%, 0 100%); }
}
@keyframes lk-gust-in-back {
  from { transform: translateX(-3%) skewX(2deg); clip-path: polygon(0 0, 0 0, -25% 100%, 0 100%); }
  to { transform: none; clip-path: polygon(0 0, 125% 0, 100% 100%, 0 100%); }
}
@keyframes lk-gust-out { to { transform: translateX(-1.5%); } }
@keyframes lk-gust-out-back { to { transform: translateX(1.5%); } }

/* A score lands: the ring snaps taut from its left edge like a pennant catching the wind; par is a still day. */
[data-theme="links"] .mk.run:is(.c1, .c2, .s1, .s2) { transform-origin: 0 50%; animation: lk-snap 110ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes lk-snap { from { transform: scaleX(0.7) skewY(-7deg); opacity: 0.4; } }

/* This theme is picked: the first gust off the sea, the whole course uncovered on the same slanted front. */
[data-theme="links"].arrive #app { animation: lk-gust-in-back 380ms cubic-bezier(0.16, 1, 0.3, 1) both; }

/* 4. Charts, the first time they are seen: the bars lean out with the gust, crossing the chart left to right */
[data-theme="links"] { --chart-dur: 420ms; --chart-ease: cubic-bezier(0.16, 1, 0.3, 1); --chart-sweep: 260ms; }

@media (prefers-reduced-motion: reduce) {
  [data-theme="links"][data-nav] #app.vt-new, [data-theme="links"][data-nav][data-nav="back"] #app.vt-new { animation: lk-fade 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  [data-theme="links"][data-nav] .vt-old, [data-theme="links"][data-nav][data-nav="back"] .vt-old,
  [data-theme="links"] .mk.run:is(.c1, .c2, .s1, .s2), [data-theme="links"].arrive #app { animation: none; }
}
@keyframes lk-fade { from { opacity: 0; } }
/* newsprint: how this theme moves. The screen change, a score landing, the theme being picked and its charts;
   STYLEGUIDE.md and DESIGN-RULES.md (Motion) say what each may do. */
/* Newsprint: Monday's sports pages. Nothing turns: the press rolls the next sheet on, and colour lands in register. */

/* 1. Screen change: the web runs on through the press, the roller laying the next page over the last */
[data-theme="newsprint"][data-nav] .vt-old { animation: np-run-on 220ms cubic-bezier(0.4, 0, 1, 1) both; }
[data-theme="newsprint"][data-nav] #app.vt-new { animation: np-roll-fwd 220ms cubic-bezier(0.3, 0.3, 0.2, 1) both; }
[data-theme="newsprint"][data-nav][data-nav="back"] .vt-old { animation-name: np-run-back; }
[data-theme="newsprint"][data-nav][data-nav="back"] #app.vt-new { animation-name: np-roll-back; }
@keyframes np-run-on { to { transform: translateX(-4%); opacity: 0.35; } }
@keyframes np-run-back { to { transform: translateX(4%); opacity: 0.35; } }
@keyframes np-roll-fwd {
  from { clip-path: inset(0 0 0 100%); transform: translateX(4%); filter: contrast(0.8); }
  to { clip-path: inset(0); transform: none; filter: none; }
}
@keyframes np-roll-back {
  from { clip-path: inset(0 100% 0 0); transform: translateX(-4%); filter: contrast(0.8); }
  to { clip-path: inset(0); transform: none; filter: none; }
}

/* 2. A score lands: the colour plate prints a hair out of register and lands true */
[data-theme="newsprint"] .mk.run:is(.c1, .c2, .s1, .s2) { animation: np-register 90ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes np-register { from { transform: translate(3px, 2px); opacity: 0.35; } to { transform: none; opacity: 1; } }

/* 3. This theme is picked: the first sheet of the run comes off the roller top to bottom */
[data-theme="newsprint"].arrive #app { animation: np-first-sheet 340ms cubic-bezier(0.3, 0.3, 0.2, 1) both; }
@keyframes np-first-sheet {
  from { clip-path: inset(0 0 100% 0); transform: translateY(-3%); filter: contrast(0.8); }
  to { clip-path: inset(0); transform: none; filter: none; }
}

/* 4. Charts, the first time they are seen: rolled on by the press: each mark printed along its length, not stretched */
[data-theme="newsprint"] { --chart-dur: 300ms; --chart-ease: cubic-bezier(0.4, 0, 0.2, 1); --chart-sweep: 120ms; --chart-x: chart-shade-x; --chart-xr: chart-shade-xr; --chart-y: chart-shade-y; }

@media (prefers-reduced-motion: reduce) {
  [data-theme="newsprint"][data-nav] .vt-old, [data-theme="newsprint"][data-nav][data-nav="back"] .vt-old { animation: none; }
  [data-theme="newsprint"][data-nav] #app.vt-new, [data-theme="newsprint"][data-nav][data-nav="back"] #app.vt-new { animation: np-fade 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  [data-theme="newsprint"] .mk.run:is(.c1, .c2, .s1, .s2), [data-theme="newsprint"].arrive #app { animation: none; }
  @keyframes np-fade { from { opacity: 0; } to { opacity: 1; } }
}
/* seventies: how this theme moves. The screen change, a score landing, the theme being picked and its charts;
   STYLEGUIDE.md and DESIGN-RULES.md (Motion) say what each may do. */
/* Seventies: the clubhouse in 1974. A slide projector and round vinyl stickers. */

/* Screen change: a Carousel projector advancing, the old slide lifts out as the lamp shows through, the next drops into the gate and pulls into focus. */
[data-theme="seventies"][data-nav] .vt-old { animation: s70-lift 110ms cubic-bezier(0.4, 0, 1, 1) both; }
[data-theme="seventies"][data-nav] #app.vt-new { animation: s70-drop 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
[data-theme="seventies"][data-nav][data-nav="back"] #app.vt-new { animation-name: s70-drop-back; }
@keyframes s70-lift { to { opacity: 0; filter: brightness(1.12); } }
@keyframes s70-drop {
  0% { opacity: 0; transform: translateY(2.5%); filter: blur(2px); }
  30% { opacity: 1; }
  100% { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes s70-drop-back {
  0% { opacity: 0; transform: translateY(-2.5%); filter: blur(2px); }
  30% { opacity: 1; }
  100% { opacity: 1; transform: none; filter: blur(0); }
}

/* A score lands: a round vinyl sticker thumbed flat onto the card. Par has no sticker, so no motion. */
[data-theme="seventies"] .mk.run.c1, [data-theme="seventies"] .mk.run.c2 { animation: s70-press 100ms cubic-bezier(0.16, 1, 0.3, 1); }
[data-theme="seventies"] .mk.run.s1, [data-theme="seventies"] .mk.run.s2 { animation: s70-press-sq 90ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes s70-press { from { transform: scale(1.16); } }
@keyframes s70-press-sq { from { transform: scale(1.08); } }

/* This theme is picked: the projector lamp warming up and the lens finding focus. */
[data-theme="seventies"].arrive #app { animation: s70-lamp 380ms cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes s70-lamp {
  from { filter: brightness(0.7) blur(2px); transform: scale(1.018); }
}

/* 4. Charts, the first time they are seen: slow and warm, the way a slide comes into focus */
[data-theme="seventies"] { --chart-dur: 440ms; --chart-ease: cubic-bezier(0.2, 0.7, 0.1, 1); --chart-sweep: 220ms; }

@media (prefers-reduced-motion: reduce) {
  [data-theme="seventies"][data-nav] .vt-old { animation: s70-fade-out 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  [data-theme="seventies"][data-nav] #app.vt-new, [data-theme="seventies"][data-nav][data-nav="back"] #app.vt-new { animation: s70-fade-in 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  [data-theme="seventies"] .mk.run.c1, [data-theme="seventies"] .mk.run.c2, [data-theme="seventies"] .mk.run.s1, [data-theme="seventies"] .mk.run.s2, [data-theme="seventies"].arrive #app { animation: none; }
  @keyframes s70-fade-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes s70-fade-out { to { opacity: 0; } }
}
/* broadcast: how this theme moves. The screen change, a score landing, the theme being picked and its charts;
   STYLEGUIDE.md and DESIGN-RULES.md (Motion) say what each may do. */
/* Broadcast: every moment is a graphic wiping on or off behind a slanted edge, fast in and easing to rest */

/* 1. Screen change: the next graphic wipes on over the last behind a slanted edge, keyed a touch bright until it lands */
[data-theme="broadcast"][data-nav] #app.vt-new { animation: broadcast-wipe-on 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes broadcast-wipe-on {
  from { clip-path: polygon(-30% 0, 0 0, -30% 100%, -30% 100%); transform: translateX(10px); filter: brightness(1.12); }
  to { clip-path: polygon(-30% 0, 130% 0, 100% 100%, -30% 100%); transform: none; filter: none; }
}
/* back: the graphic on air wipes off the way it came, uncovering the one beneath */
[data-theme="broadcast"][data-nav][data-nav="back"] .vt-old { z-index: 2; animation: broadcast-wipe-off 180ms cubic-bezier(0.4, 0, 1, 1) both; }
[data-theme="broadcast"][data-nav][data-nav="back"] #app.vt-new { animation: none; }
@keyframes broadcast-wipe-off {
  from { clip-path: polygon(-30% 0, 130% 0, 100% 100%, -30% 100%); }
  to { clip-path: polygon(-30% 0, 0 0, -30% 100%, -30% 100%); }
}

/* 2. A score lands: the score tile wipes on from the left behind the package's slant */
[data-theme="broadcast"] .mk.run:is(.c1, .c2, .s1, .s2) { animation: broadcast-tile 110ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes broadcast-tile {
  from { clip-path: polygon(-20px -6px, -6px -6px, -20px calc(100% + 6px), -20px calc(100% + 6px)); }
  to { clip-path: polygon(-20px -6px, calc(100% + 20px) -6px, calc(100% + 6px) calc(100% + 6px), -20px calc(100% + 6px)); }
}

/* 3. This theme is picked: the show opens and the package's bars wipe on in turn, the header bar first */
[data-theme="broadcast"].arrive #app { animation: broadcast-open 360ms cubic-bezier(0.33, 1, 0.68, 1) both; }
@keyframes broadcast-open {
  from { clip-path: polygon(-60px 0, 0 0, -20px 14%, -35% 14%, calc(-35% - 40px) 45%, -60% 45%, calc(-60% - 40px) 75%, -80% 75%, calc(-80% - 36px) 100%, -60px 100%); }
  to { clip-path: polygon(-60px 0, calc(180% + 60px) 0, calc(180% + 40px) 14%, calc(145% + 60px) 14%, calc(145% + 20px) 45%, calc(120% + 60px) 45%, calc(120% + 20px) 75%, calc(100% + 60px) 75%, calc(100% + 24px) 100%, -60px 100%); }
}

/* 4. Charts, the first time they are seen: wiped on like a lower third, fast, the graphic laid down along its length */
[data-theme="broadcast"] { --chart-dur: 280ms; --chart-ease: cubic-bezier(0.16, 1, 0.3, 1); --chart-sweep: 160ms; --chart-x: chart-shade-x; --chart-xr: chart-shade-xr; --chart-y: chart-shade-y; }

@media (prefers-reduced-motion: reduce) {
  [data-theme="broadcast"][data-nav] #app.vt-new, [data-theme="broadcast"][data-nav][data-nav="back"] #app.vt-new { animation: broadcast-fade 120ms both; }
  [data-theme="broadcast"][data-nav][data-nav="back"] .vt-old { z-index: auto; animation: none; }
  [data-theme="broadcast"] .mk.run:is(.c1, .c2, .s1, .s2), [data-theme="broadcast"].arrive #app { animation: none; }
  
  @keyframes broadcast-fade { from { opacity: 0; } to { opacity: 1; } }
}
/* blueprint: how this theme moves. The screen change, a score landing, the theme being picked and its charts;
   STYLEGUIDE.md and DESIGN-RULES.md (Motion) say what each may do. */
/* Blueprint: the architect's sheet. Lines are drafted with compass and straightedge; sheets slide on the table. */

@property --bp-sweep { syntax: "<angle>"; inherits: false; initial-value: 360deg; }
@property --bp-rule { syntax: "<percentage>"; inherits: false; initial-value: 100%; }

/* 1. Screen change: a fresh sheet is slid across the table over the last one; its edge travels, the drawing barely moves. */
[data-theme="blueprint"][data-nav] #app.vt-new { animation: bp-sheet-in 260ms cubic-bezier(0.16, 1, 0.3, 1) both; }
[data-theme="blueprint"][data-nav] .vt-old { animation: bp-shade 260ms cubic-bezier(0.16, 1, 0.3, 1) both; }
[data-theme="blueprint"][data-nav][data-nav="back"] .vt-old { z-index: 2; animation: bp-sheet-off 220ms cubic-bezier(0.4, 0, 1, 1) both; }
[data-theme="blueprint"][data-nav][data-nav="back"] #app.vt-new { z-index: 1; animation: bp-unshade 220ms cubic-bezier(0.4, 0, 1, 1) both; }
@keyframes bp-sheet-in {
  from { transform: translateX(6%); clip-path: inset(0 0 0 100%); }
  to { transform: none; clip-path: inset(0); }
}
/* the sheet underneath sits in the new one's shade, so the travelling edge reads as paper */
@keyframes bp-shade { from { filter: none; } to { filter: brightness(0.9); } }
@keyframes bp-unshade { from { filter: brightness(0.9); } to { filter: none; } }
@keyframes bp-sheet-off {
  from { transform: none; clip-path: inset(0); }
  to { transform: translateX(6%); clip-path: inset(0 0 0 100%); }
}

/* 2. A score lands: a ring is swung with the compass from twelve o'clock; a box is ruled in from its top-left corner. */
[data-theme="blueprint"] .mk.run:is(.c1, .c2, .s1, .s2) {
  -webkit-mask: var(--bp-mask), linear-gradient(#000 0 0) center / 60% 70% no-repeat;
  mask: var(--bp-mask), linear-gradient(#000 0 0) center / 60% 70% no-repeat;
  -webkit-mask-clip: no-clip; mask-clip: no-clip;
}
[data-theme="blueprint"] .mk.run:is(.c1, .c2) {
  --bp-mask: conic-gradient(#000 var(--bp-sweep), transparent 0) -7px -7px / calc(100% + 14px) calc(100% + 14px) no-repeat;
  animation: bp-compass 110ms cubic-bezier(0.35, 0.3, 0.2, 1) both;
}
[data-theme="blueprint"] .mk.run:is(.s1, .s2) {
  --bp-mask: linear-gradient(135deg, #000 var(--bp-rule), transparent 0) -7px -7px / calc(100% + 14px) calc(100% + 14px) no-repeat;
  animation: bp-rule 100ms cubic-bezier(0.35, 0.3, 0.2, 1) both;
}
@keyframes bp-compass { from { --bp-sweep: 0deg; } to { --bp-sweep: 360deg; } }
@keyframes bp-rule { from { --bp-rule: 0%; } to { --bp-rule: 100%; } }

/* 3. This theme is picked: the sheet is squared up against the T-square before it is taped down. */
[data-theme="blueprint"].arrive #app { transform-origin: 0 0; animation: bp-square 340ms cubic-bezier(0.3, 0.7, 0.1, 1) both; }
@keyframes bp-square { from { transform: translate(-4px, 10px) rotate(-1.6deg); } to { transform: none; } }

/* 4. Charts, the first time they are seen: drawn at the steady speed of a draughtsman's pen */
[data-theme="blueprint"] { --chart-dur: 440ms; --chart-ease: cubic-bezier(0.45, 0.05, 0.35, 1); --chart-sweep: 240ms; }

@media (prefers-reduced-motion: reduce) {
  [data-theme="blueprint"][data-nav] #app.vt-new, [data-theme="blueprint"][data-nav][data-nav="back"] #app.vt-new { animation: bp-fade 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  [data-theme="blueprint"][data-nav] .vt-old, [data-theme="blueprint"][data-nav][data-nav="back"] .vt-old { z-index: auto; animation: none; }
  [data-theme="blueprint"] .mk.run:is(.c1, .c2, .s1, .s2) { animation: none; -webkit-mask: none; mask: none; }
  [data-theme="blueprint"].arrive #app { animation: none; }
  @keyframes bp-fade { from { opacity: 0; } to { opacity: 1; } }
}
/* honours: how this theme moves. The screen change, a score landing, the theme being picked and its charts;
   STYLEGUIDE.md and DESIGN-RULES.md (Motion) say what each may do. */
/* Honours: the gilt board in the members' bar. Nothing on it travels; the gilt is laid on where it stands. */

/* Screen change: one panel of the board goes quiet and the next comes up where it stands; nothing travels. */
[data-theme="honours"][data-nav] .vt-old { animation: ho-lift 80ms cubic-bezier(0.4, 0, 1, 1) both; }
[data-theme="honours"][data-nav] #app.vt-new { animation: ho-settle 170ms 70ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes ho-lift { to { opacity: 0; } }
@keyframes ho-settle { from { opacity: 0; } }

/* A score lands: the gilder lays leaf on the ring or box; par is plain ink and does not move. */
[data-theme="honours"] .mk.run:is(.c1, .c2, .s1, .s2) { animation: ho-leaf 100ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes ho-leaf { from { opacity: 0.3; } }

/* This theme is picked: no motion. The board is simply there, as it is on the wall. */

/* 4. Charts, the first time they are seen: nothing travels: every mark gilded where it stands, all at once */
[data-theme="honours"] { --chart-dur: 320ms; --chart-ease: cubic-bezier(0.2, 0.8, 0.2, 1); --chart-sweep: 0ms; --chart-x: chart-gild; --chart-xr: chart-gild; --chart-y: chart-gild; --chart-wipe: chart-gild; --chart-fan: chart-gild; --chart-ring: chart-gild; }

@media (prefers-reduced-motion: reduce) {
  [data-theme="honours"][data-nav] #app.vt-new { animation: ho-settle 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  [data-theme="honours"][data-nav] .vt-old { animation: none; }
  [data-theme="honours"] .mk.run:is(.c1, .c2, .s1, .s2) { animation: none; }
}
/* swiss: how this theme moves. The screen change, a score landing, the theme being picked and its charts;
   STYLEGUIDE.md and DESIGN-RULES.md (Motion) say what each may do. */
/* Swiss: the International Typographic Style. Hard cuts, flush left, everything comes to rest on the grid. */

/* 1. Screen change: a hard cut, and the new page is set one gutter off its column and locked onto it. */
[data-theme="swiss"][data-nav] .vt-old { animation: sw-cut 180ms steps(1, jump-start) both; }
[data-theme="swiss"][data-nav] #app.vt-new { animation: sw-set-fwd 180ms cubic-bezier(0.16, 1, 0.3, 1) both; }
[data-theme="swiss"][data-nav][data-nav="back"] #app.vt-new { animation-name: sw-set-back; }
@keyframes sw-cut { from { opacity: 1; } to { opacity: 0; } }
@keyframes sw-set-fwd { from { transform: translateX(12px); } to { transform: none; } }
@keyframes sw-set-back { from { transform: translateX(-12px); } to { transform: none; } }

/* 2. A score lands: the mark is set flush left, its rule cut in from the left edge; par is just the figure. */
[data-theme="swiss"] .mk.run:is(.c1, .c2, .s1, .s2) { animation: sw-mark 90ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes sw-mark { from { clip-path: inset(-6px calc(100% + 6px) -6px -6px); } to { clip-path: inset(-6px); } }

@keyframes sw-cut-in { from { opacity: 0; } to { opacity: 1; } }

/* 3. This theme is picked: the page is laid out column by column across a four-column grid. */
[data-theme="swiss"].arrive #app { animation: sw-columns 200ms steps(4, jump-start) both; }
@keyframes sw-columns { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }

/* 4. Charts, the first time they are seen: all at once, precise, with no sweep */
[data-theme="swiss"] { --chart-dur: 220ms; --chart-ease: cubic-bezier(0.16, 1, 0.3, 1); --chart-sweep: 0ms; }

@media (prefers-reduced-motion: reduce) {
  [data-theme="swiss"][data-nav] .vt-old, [data-theme="swiss"] .mk.run:is(.c1, .c2, .s1, .s2), [data-theme="swiss"].arrive #app { animation: none; }
  [data-theme="swiss"][data-nav] #app.vt-new, [data-theme="swiss"][data-nav][data-nav="back"] #app.vt-new { animation: sw-cut-in 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
}
/* arcade: how this theme moves. The screen change, a score landing, the theme being picked and its charts;
   STYLEGUIDE.md and DESIGN-RULES.md (Motion) say what each may do. */
/* Arcade: every moment is a neon tube or the cabinet's tube striking on, with one stutter; only dark glows */

/* 1. Screen change: the cabinet clears the screen for a frame, then the next one strikes on with one dim frame */
[data-theme="arcade"][data-nav] .vt-old { animation: arcade-clear 120ms steps(1, start) both; }
[data-theme="arcade"][data-nav] #app.vt-new { animation: arcade-cut 120ms both; }
/* a cabinet has no direction, so back is the same cut */
[data-theme="arcade"][data-nav][data-nav="back"] #app.vt-new { animation: arcade-cut 120ms both; }
[data-theme="arcade"][data-mode="dark"][data-nav] #app.vt-new { animation-name: arcade-cut-glow; }
@keyframes arcade-clear { to { opacity: 0; } }
@keyframes arcade-cut {
  0% { opacity: 0; animation-timing-function: steps(1, end); }
  15% { opacity: 0.9; animation-timing-function: steps(1, end); }
  40% { opacity: 0.35; animation-timing-function: steps(1, end); }
  58%, 100% { opacity: 1; }
}
@keyframes arcade-cut-glow {
  0% { opacity: 0; animation-timing-function: steps(1, end); }
  15% { opacity: 0.9; filter: brightness(1.3); animation-timing-function: steps(1, end); }
  40% { opacity: 0.35; filter: none; animation-timing-function: steps(1, end); }
  58%, 100% { opacity: 1; filter: none; }
}

/* 2. A score lands: the figure is there at once and its neon ring strikes; under par it buzzes once first */
[data-theme="arcade"] .mk.run { --ring: transparent; --sh: 0 0 0 0 transparent; --glow: 0 0 0 0 transparent; }
[data-theme="arcade"] .mk.run.c1 { --ring: var(--under); }
[data-theme="arcade"] .mk.run.c2 { --ring: var(--under); --sh: 0 0 0 2px var(--card), 0 0 0 3.5px var(--under); }
[data-theme="arcade"] .mk.run.s1 { --ring: var(--bogey); }
[data-theme="arcade"] .mk.run.s2 { --ring: var(--double); --sh: 0 0 0 2px var(--card), 0 0 0 3.5px var(--double); }
[data-theme="arcade"][data-mode="dark"] .mk.run { --glow: 0 0 10px var(--ring); }
[data-theme="arcade"] .mk.run:is(.c1, .c2) { animation: arcade-buzz 100ms both; }
[data-theme="arcade"] .mk.run:is(.s1, .s2) { animation: arcade-strike 50ms both; }
@keyframes arcade-buzz {
  0% { border-color: transparent; box-shadow: none; animation-timing-function: steps(1, end); }
  20% { border-color: var(--ring); box-shadow: var(--sh), var(--glow); animation-timing-function: steps(1, end); }
  50% { border-color: color-mix(in srgb, var(--ring) 30%, transparent); box-shadow: none; animation-timing-function: steps(1, end); }
  70% { border-color: var(--ring); box-shadow: var(--sh), var(--glow); animation-timing-function: steps(1, end); }
}
@keyframes arcade-strike {
  0% { border-color: transparent; box-shadow: none; animation-timing-function: steps(1, end); }
  40% { border-color: var(--ring); box-shadow: var(--sh), var(--glow); animation-timing-function: steps(1, end); }
}

/* 3. This theme is picked: the cabinet's tube comes on, stutters once and blooms a touch large before settling */
[data-theme="arcade"].arrive #app { animation: arcade-power 300ms both, arcade-bloom 300ms cubic-bezier(0.16, 1, 0.3, 1) both; }
[data-theme="arcade"][data-mode="dark"].arrive #app { animation-name: arcade-power-glow, arcade-bloom; }
@keyframes arcade-power {
  0% { opacity: 0; animation-timing-function: steps(1, end); }
  12% { opacity: 0.75; animation-timing-function: steps(1, end); }
  24% { opacity: 0.25; animation-timing-function: steps(1, end); }
  36%, 100% { opacity: 1; }
}
@keyframes arcade-power-glow {
  0% { opacity: 0; animation-timing-function: steps(1, end); }
  12% { opacity: 0.75; filter: brightness(1.35); animation-timing-function: steps(1, end); }
  24% { opacity: 0.25; filter: none; animation-timing-function: steps(1, end); }
  36% { opacity: 1; filter: brightness(1.15); animation-timing-function: steps(1, end); }
  52%, 100% { opacity: 1; filter: none; }
}
@keyframes arcade-bloom {
  from { transform: scale(1.025); }
  to { transform: none; }
}

/* 4. Charts, the first time they are seen: a power meter filling in hard blocks */
[data-theme="arcade"] { --chart-dur: 360ms; --chart-ease: steps(6, jump-end); --chart-sweep: 180ms; }

@media (prefers-reduced-motion: reduce) {
  [data-theme="arcade"][data-nav] .vt-old { animation: none; }
  [data-theme="arcade"][data-nav] #app.vt-new, [data-theme="arcade"][data-nav][data-nav="back"] #app.vt-new,
  [data-theme="arcade"][data-mode="dark"][data-nav] #app.vt-new { animation: arcade-fade 120ms both; }
  [data-theme="arcade"] .mk.run:is(.c1, .c2, .s1, .s2) { animation: none; }
  [data-theme="arcade"].arrive #app, [data-theme="arcade"][data-mode="dark"].arrive #app { animation: none; }
  @keyframes arcade-fade { from { opacity: 0; } to { opacity: 1; } }
}
/* yardage: how this theme moves. The screen change, a score landing, the theme being picked and its charts;
   STYLEGUIDE.md and DESIGN-RULES.md (Motion) say what each may do. */
/* Yardage: the caddie's pocket book. Thin ruled pages on a spiral at the top, pencil rings, a red pen tick. */

@property --yd-sweep { syntax: "<angle>"; inherits: false; initial-value: 400deg; }

/* 1. Screen change: a thin page lifted by its bottom corner and flipped up over the top spiral */
[data-theme="yardage"][data-nav] .vt-old { z-index: 2; transform-origin: 50% 0; animation: yd-flip-up 230ms cubic-bezier(0.4, 0, 1, 1) both; }
[data-theme="yardage"][data-nav][data-nav="back"] .vt-old { z-index: 0; animation: none; }
[data-theme="yardage"][data-nav][data-nav="back"] #app.vt-new { z-index: 2; transform-origin: 50% 0; animation: yd-flip-down 250ms cubic-bezier(0.3, 0.55, 0.3, 1) both; }
@keyframes yd-flip-up {
  0% { transform: perspective(1400px) rotate3d(1, 0.2, 0, 0deg); }
  72% { opacity: 1; }
  100% { transform: perspective(1400px) rotate3d(1, 0.2, 0, 80deg) skewX(-3deg); opacity: 0; }
}
@keyframes yd-flip-down {
  0% { transform: perspective(1400px) rotate3d(1, 0.2, 0, 80deg) skewX(-3deg); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: perspective(1400px) rotate3d(1, 0.2, 0, 0deg); opacity: 1; }
}

/* 2. A score lands: a soft pencil loop drawn round it by hand, anticlockwise from about one o'clock */
[data-theme="yardage"] .mk.run:is(.c1, .c2, .s1, .s2) {
  mask: radial-gradient(circle 13.5px, #000 100%, transparent 0) center / calc(100% + 12px) calc(100% + 12px) no-repeat no-clip,
        conic-gradient(from 30deg, transparent calc(360deg - var(--yd-sweep)), #000 calc(400deg - var(--yd-sweep))) center / calc(100% + 12px) calc(100% + 12px) no-repeat no-clip;
  animation: yd-loop 120ms cubic-bezier(0.25, 0.5, 0.35, 1) both;
}
@keyframes yd-loop { from { --yd-sweep: 0deg; } to { --yd-sweep: 400deg; } }

/* 3. This theme is picked: the book flipped open, its page dropping flat over the spiral */
[data-theme="yardage"].arrive #app { transform-origin: 50% 0; animation: yd-open 360ms cubic-bezier(0.3, 0.55, 0.3, 1) both; }
@keyframes yd-open {
  0% { transform: perspective(1400px) rotate3d(1, 0.2, 0, 80deg) skewX(-3deg); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}

/* 4. Charts, the first time they are seen: shaded in with a pencil along each bar, at a hand's pace */
[data-theme="yardage"] { --chart-dur: 480ms; --chart-ease: cubic-bezier(0.35, 0.1, 0.3, 1); --chart-sweep: 240ms; --chart-x: chart-shade-x; --chart-xr: chart-shade-xr; --chart-y: chart-shade-y; }

@media (prefers-reduced-motion: reduce) {
  [data-theme="yardage"][data-nav] .vt-old, [data-theme="yardage"][data-nav][data-nav="back"] .vt-old { animation: none; z-index: 0; }
  [data-theme="yardage"][data-nav] #app.vt-new, [data-theme="yardage"][data-nav][data-nav="back"] #app.vt-new { animation: yd-fade 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  [data-theme="yardage"] .mk.run:is(.c1, .c2, .s1, .s2) { mask: none; animation: none; }
  [data-theme="yardage"].arrive #app { animation: none; }
  @keyframes yd-fade { from { opacity: 0; } to { opacity: 1; } }
}
/* teletext: how this theme moves. The screen change, a score landing, the theme being picked and its charts;
   STYLEGUIDE.md and DESIGN-RULES.md (Motion) say what each may do. */
/* Teletext: every moment is the set painting rows of character cells, in hard steps, never eased */

/* 1. Screen change: row 0, the header, takes the new page at once; the set then paints the rest over the old page a row at a time */
[data-theme="teletext"][data-nav] #app.vt-new { animation: teletext-rows 240ms steps(11, end) both; }
/* a set has no "back": it fetches another page and still paints from the top, a little quicker */
[data-theme="teletext"][data-nav][data-nav="back"] #app.vt-new { animation: teletext-rows 200ms steps(9, end) both; }
@keyframes teletext-rows {
  from { clip-path: inset(0 0 calc(100% - 58px - var(--sat, 0px)) 0); }
  to { clip-path: inset(0); }
}

/* 2. A score lands: a mosaic block is three rows of sixels, drawn down the cell */
[data-theme="teletext"] .mk.run:is(.c1, .c2, .s1, .s2) { animation: teletext-sixels 90ms both; }
@keyframes teletext-sixels {
  0% { clip-path: inset(-6px -6px 67% -6px); animation-timing-function: steps(1, end); }
  33% { clip-path: inset(-6px -6px 33% -6px); animation-timing-function: steps(1, end); }
  67%, 100% { clip-path: inset(-6px); }
}

/* 3. This theme is picked: pressing TEXT on the remote; the header row comes first while the page is found, then the rows */
[data-theme="teletext"].arrive #app { animation: teletext-tune 380ms both; }
@keyframes teletext-tune {
  0% { clip-path: inset(0 0 100% 0); animation-timing-function: steps(1, end); }
  6% { clip-path: inset(0 0 calc(100% - 58px - var(--sat, 0px)) 0); animation-timing-function: steps(1, end); }
  40% { clip-path: inset(0 0 calc(100% - 58px - var(--sat, 0px)) 0); animation-timing-function: steps(10, jump-start); }
  100% { clip-path: inset(0); }
}

/* 4. Charts, the first time they are seen: built from character blocks, a row of cells at a time */
[data-theme="teletext"] { --chart-dur: 320ms; --chart-ease: steps(4, jump-end); --chart-sweep: 160ms; }

@media (prefers-reduced-motion: reduce) {
  [data-theme="teletext"][data-nav] #app.vt-new, [data-theme="teletext"][data-nav][data-nav="back"] #app.vt-new,
  [data-theme="teletext"] .mk.run:is(.c1, .c2, .s1, .s2), [data-theme="teletext"].arrive #app { animation: none; }
}
/* embroidery: how this theme moves. The screen change, a score landing, the theme being picked and its charts;
   STYLEGUIDE.md and DESIGN-RULES.md (Motion) say what each may do. */
/* Embroidery: the club crest on a towel and a cap. A sewing machine's feed and running stitch. */

/* Screen change: the feed dogs drawing the cloth under the needle a stitch at a time; back is the reverse lever. */
[data-theme="embroidery"][data-nav] .vt-old { animation: emb-feed-out 210ms steps(3, jump-none) both, emb-hide 120ms cubic-bezier(0.4, 0, 1, 1) both; }
[data-theme="embroidery"][data-nav] #app.vt-new { animation: emb-feed-in 210ms steps(3, jump-none) both, emb-show 150ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
[data-theme="embroidery"][data-nav][data-nav="back"] .vt-old { animation-name: emb-feed-out-back, emb-hide; }
[data-theme="embroidery"][data-nav][data-nav="back"] #app.vt-new { animation-name: emb-feed-in-back, emb-show; }
@keyframes emb-feed-in { from { transform: translateX(2.4%); } to { transform: none; } }
@keyframes emb-feed-out { to { transform: translateX(-2.4%); } }
@keyframes emb-feed-in-back { from { transform: translateX(-2.4%); } to { transform: none; } }
@keyframes emb-feed-out-back { to { transform: translateX(2.4%); } }
@keyframes emb-show { from { opacity: 0; } }
@keyframes emb-hide { to { opacity: 0; } }

/* A score lands: the ring goes round once as a running stitch, then the return pass fills the gaps. Par is plain ink, nothing to sew. */
[data-theme="embroidery"] .mk.run.c1, [data-theme="embroidery"] .mk.run.c2, [data-theme="embroidery"] .mk.run.s1, [data-theme="embroidery"] .mk.run.s2 { position: relative; }
[data-theme="embroidery"] .mk.run.c1::after, [data-theme="embroidery"] .mk.run.c2::after, [data-theme="embroidery"] .mk.run.s1::after, [data-theme="embroidery"] .mk.run.s2::after {
  content: ""; position: absolute; inset: -1.5px; border: 3px dashed var(--card2); border-radius: inherit;
  opacity: 0; pointer-events: none; animation: emb-backstitch 110ms cubic-bezier(0.4, 0, 1, 1);
}
[data-theme="embroidery"] .mk.run.c2::after, [data-theme="embroidery"] .mk.run.s2::after { outline: 3px dashed var(--card2); outline-offset: 0.5px; }
[data-theme="embroidery"] .mk.run.s1::after, [data-theme="embroidery"] .mk.run.s2::after { border-radius: calc(var(--r-xs) + 1.5px); }
@keyframes emb-backstitch { 0%, 45% { opacity: 1; } 100% { opacity: 0; } }

/* This theme is picked: left out on purpose; cloth has nothing to light up or settle, and the stitch is already the score's. */

/* 4. Charts, the first time they are seen: stitched along, a few stitches at a time */
[data-theme="embroidery"] { --chart-dur: 420ms; --chart-ease: steps(5, jump-end); --chart-sweep: 220ms; }

@media (prefers-reduced-motion: reduce) {
  [data-theme="embroidery"][data-nav] .vt-old, [data-theme="embroidery"][data-nav][data-nav="back"] .vt-old { animation: emb-hide 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  [data-theme="embroidery"][data-nav] #app.vt-new, [data-theme="embroidery"][data-nav][data-nav="back"] #app.vt-new { animation: emb-show 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  [data-theme="embroidery"] .mk.run.c1::after, [data-theme="embroidery"] .mk.run.c2::after, [data-theme="embroidery"] .mk.run.s1::after, [data-theme="embroidery"] .mk.run.s2::after { animation: none; }
  }
/* palmsprings: how this theme moves. The screen change, a score landing, the theme being picked and its charts;
   STYLEGUIDE.md and DESIGN-RULES.md (Motion) say what each may do. */
/* Palm Springs: desert golf in 1962. Sliding glass, the sun over the pool, sunscreen louvres. */

@property --ps-louvre { syntax: "<percentage>"; inherits: false; initial-value: 100%; }

/* Screen change: a floor-to-ceiling glass wall sliding across on its track, hard-edged and unhurried. */
[data-theme="palmsprings"][data-nav] .vt-old { animation: ps-stay 250ms cubic-bezier(0.22, 0.8, 0.24, 1) both; }
[data-theme="palmsprings"][data-nav] #app.vt-new { animation: ps-glide 250ms cubic-bezier(0.22, 0.8, 0.24, 1) both; }
[data-theme="palmsprings"][data-nav][data-nav="back"] .vt-old { animation-name: ps-stay-back; }
[data-theme="palmsprings"][data-nav][data-nav="back"] #app.vt-new { animation-name: ps-glide-back; }
@keyframes ps-glide { from { clip-path: inset(0 0 0 100%); transform: translateX(4%); } to { clip-path: inset(0); transform: none; } }
@keyframes ps-glide-back { from { clip-path: inset(0 100% 0 0); transform: translateX(-4%); } to { clip-path: inset(0); transform: none; } }
@keyframes ps-stay { 25% { filter: brightness(0.92); } to { transform: translateX(-1.5%); filter: brightness(0.86); opacity: 0.5; } }
@keyframes ps-stay-back { 25% { filter: brightness(0.92); } to { transform: translateX(1.5%); filter: brightness(0.86); opacity: 0.5; } }

/* A score lands: under par clears the horizon like the sun coming up over the pool edge; over par is a breeze block set down into the wall. The eagle's atomic star flashes once. */
[data-theme="palmsprings"] .mk.run.c1, [data-theme="palmsprings"] .mk.run.c2 { animation: ps-rise 110ms cubic-bezier(0.16, 1, 0.3, 1); }
[data-theme="palmsprings"] .mk.run.s1, [data-theme="palmsprings"] .mk.run.s2 { animation: ps-set 100ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes ps-rise { from { clip-path: inset(100% -16px -16px -16px); transform: translateY(4px); } to { clip-path: inset(-16px); transform: none; } }
@keyframes ps-set { from { clip-path: inset(-16px -16px 100% -16px); transform: translateY(-4px); } to { clip-path: inset(-16px); transform: none; } }
[data-theme="palmsprings"] .mk.run.c2 { position: relative; }
[data-theme="palmsprings"] .mk.run.c2::after {
  content: ""; position: absolute; inset: -12px; background: var(--under); opacity: 0; pointer-events: none;
  -webkit-mask: repeating-conic-gradient(from -3deg, #000 0 6deg, transparent 6deg 45deg),
    radial-gradient(closest-side, transparent 76%, #000 78% 97%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask: repeating-conic-gradient(from -3deg, #000 0 6deg, transparent 6deg 45deg),
    radial-gradient(closest-side, transparent 76%, #000 78% 97%, transparent 100%);
  mask-composite: intersect;
  animation: ps-star 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes ps-star { from { opacity: 1; transform: scale(0.78); } to { opacity: 0; transform: scale(1.1); } }

/* This theme is picked: the sunscreen louvres over the window tilting open and letting the afternoon in. */
[data-theme="palmsprings"].arrive #app {
  -webkit-mask: linear-gradient(#000 var(--ps-louvre), transparent var(--ps-louvre)) 0 0 / 100% 16px;
  mask: linear-gradient(#000 var(--ps-louvre), transparent var(--ps-louvre)) 0 0 / 100% 16px;
  animation: ps-louvre 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes ps-louvre { from { --ps-louvre: 8%; } to { --ps-louvre: 100%; } }

/* 4. Charts, the first time they are seen: rising slowly, the way the sun comes up over the pool */
[data-theme="palmsprings"] { --chart-dur: 460ms; --chart-ease: cubic-bezier(0.2, 0.8, 0.2, 1); --chart-sweep: 240ms; }

@media (prefers-reduced-motion: reduce) {
  [data-theme="palmsprings"][data-nav] .vt-old, [data-theme="palmsprings"][data-nav][data-nav="back"] .vt-old { animation: ps-fade-out 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  [data-theme="palmsprings"][data-nav] #app.vt-new, [data-theme="palmsprings"][data-nav][data-nav="back"] #app.vt-new { animation: ps-fade-in 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  [data-theme="palmsprings"] .mk.run.c1, [data-theme="palmsprings"] .mk.run.c2, [data-theme="palmsprings"] .mk.run.s1, [data-theme="palmsprings"] .mk.run.s2, [data-theme="palmsprings"] .mk.run.c2::after, [data-theme="palmsprings"].arrive #app { animation: none; }
  @keyframes ps-fade-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes ps-fade-out { to { opacity: 0; } }
}
/* starter: how this theme moves. The screen change, a score landing, the theme being picked and its charts;
   STYLEGUIDE.md and DESIGN-RULES.md (Motion) say what each may do. */
/* Starter: the starter's board by the first tee. Chalk on slate, marker on whiteboard: written, wiped, rewritten. */

@property --st-ring { syntax: "<angle>"; inherits: false; initial-value: 360deg; }

/* 1. Screen change: one swipe of the eraser across the board, its slanted, streaky edge leaving the new board behind it. */
[data-theme="starter"][data-nav] #app.vt-new { animation: st-wipe-fwd 250ms cubic-bezier(0.3, 0.55, 0.15, 1) both; }
[data-theme="starter"][data-nav][data-nav="back"] #app.vt-new { animation-name: st-wipe-back; }
[data-theme="starter"][data-nav] .vt-old { animation: st-ghost 250ms cubic-bezier(0.3, 0.55, 0.15, 1) both; }
/* the writing still ahead of the eraser goes to a smeared ghost, as chalk and marker do under a dry wipe */
@keyframes st-ghost { from { opacity: 1; filter: none; } to { opacity: 0.3; filter: blur(1.2px); } }
@keyframes st-wipe-fwd {
  from { clip-path: polygon(119% 0%, 200% 0%, 200% 100%, 102% 100%, 107% 91%, 105% 82%, 110% 74%, 108% 63%, 113% 55%, 111% 46%, 116% 35%, 114% 27%, 119% 16%, 116% 10%, 119% 0%); }
  to { clip-path: polygon(-1% 0%, 200% 0%, 200% 100%, -18% 100%, -13% 91%, -15% 82%, -10% 74%, -12% 63%, -7% 55%, -9% 46%, -4% 35%, -6% 27%, -1% 16%, -4% 10%, -1% 0%); }
}
@keyframes st-wipe-back {
  from { clip-path: polygon(-100% 0%, -19% 0%, -16% 10%, -19% 16%, -14% 27%, -16% 35%, -11% 46%, -13% 55%, -8% 63%, -10% 74%, -5% 82%, -7% 91%, -2% 100%, -100% 100%); }
  to { clip-path: polygon(-100% 0%, 101% 0%, 104% 10%, 101% 16%, 106% 27%, 104% 35%, 109% 46%, 107% 55%, 112% 63%, 110% 74%, 115% 82%, 113% 91%, 118% 100%, -100% 100%); }
}

/* 2. A score lands: the figure is written, and the ring or box goes round it in one quick anticlockwise stroke. */
[data-theme="starter"] .mk.run .num { display: block; animation: st-write 70ms cubic-bezier(0.4, 0.2, 0.2, 1) both; }
[data-theme="starter"] .mk.run:is(.c1, .c2, .s1, .s2) {
  --st-mask: conic-gradient(from 40deg, transparent calc(360deg - var(--st-ring)), #000 0) -7px -7px / calc(100% + 14px) calc(100% + 14px) no-repeat;
  -webkit-mask: var(--st-mask), linear-gradient(#000 0 0) center / 60% 70% no-repeat;
  mask: var(--st-mask), linear-gradient(#000 0 0) center / 60% 70% no-repeat;
  -webkit-mask-clip: no-clip; mask-clip: no-clip;
  animation: st-ring 115ms cubic-bezier(0.5, 0.1, 0.25, 1) both;
}
@keyframes st-write { from { clip-path: inset(-4px 100% -4px -4px); } to { clip-path: inset(-4px); } }
@keyframes st-ring { from { --st-ring: 0deg; } to { --st-ring: 360deg; } }

/* 3. This theme is picked: the old board is wiped clean in one long swipe and the new one is up behind it. */
[data-theme="starter"].arrive #app { animation: st-wipe-fwd 380ms cubic-bezier(0.3, 0.55, 0.15, 1) both; }

/* 4. Charts, the first time they are seen: chalked in along each bar with the side of the stick */
[data-theme="starter"] { --chart-dur: 440ms; --chart-ease: cubic-bezier(0.4, 0.1, 0.3, 1); --chart-sweep: 240ms; --chart-x: chart-shade-x; --chart-xr: chart-shade-xr; --chart-y: chart-shade-y; }

@media (prefers-reduced-motion: reduce) {
  [data-theme="starter"][data-nav] #app.vt-new, [data-theme="starter"][data-nav][data-nav="back"] #app.vt-new { animation: st-fade 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  [data-theme="starter"][data-nav] .vt-old, [data-theme="starter"] .mk.run .num, [data-theme="starter"] .mk.run:is(.c1, .c2, .s1, .s2), [data-theme="starter"].arrive #app { animation: none; }
  @keyframes st-fade { from { opacity: 0; } to { opacity: 1; } }
}
/* sweetheart: how this theme moves. The screen change, a score landing, the theme being picked and its charts;
   STYLEGUIDE.md and DESIGN-RULES.md (Motion) say what each may do. */
/* Sweetheart: a round for two. Everything opens through a heart, the way an old film irises in on the couple. */

[data-theme="sweetheart"] { --sh-heart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='24 12 72 60'%3E%3Cpath d='M60 72C33 55 24 41 24 29c0-10 7.5-17 17-17 8 0 14 4.5 19 12 5-7.5 11-12 19-12 9.5 0 17 7 17 17 0 12-9 26-36 43z'/%3E%3C/svg%3E"); }

/* 1. Screen change: the next screen opens out of a heart in the middle; going back, the one you leave closes into it */
[data-theme="sweetheart"][data-nav] #app.vt-new { -webkit-mask: var(--sh-heart) center / 0 0 no-repeat; mask: var(--sh-heart) center / 0 0 no-repeat;
  animation: sh-open 300ms cubic-bezier(0.3, 0.7, 0.2, 1) both; }
[data-theme="sweetheart"][data-nav][data-nav="back"] #app.vt-new { -webkit-mask: none; mask: none; animation: none; }
[data-theme="sweetheart"][data-nav][data-nav="back"] .vt-old { z-index: 3; -webkit-mask: var(--sh-heart) center / 400% 400% no-repeat; mask: var(--sh-heart) center / 400% 400% no-repeat;
  animation: sh-close 260ms cubic-bezier(0.4, 0, 1, 1) both; }
@keyframes sh-open { from { -webkit-mask-size: 0 0; mask-size: 0 0; } to { -webkit-mask-size: 400% 400%; mask-size: 400% 400%; } }
@keyframes sh-close { from { -webkit-mask-size: 400% 400%; mask-size: 400% 400%; } to { -webkit-mask-size: 0 0; mask-size: 0 0; } }

/* 2. A score lands: a birdie or an eagle gives one heartbeat; anything else just lands */
[data-theme="sweetheart"] .mk.run:is(.c1, .c2) { animation: sh-beat 120ms cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes sh-beat { 40% { transform: scale(1.14); } }

/* 3. This theme is picked: the whole app opens out of a heart */
[data-theme="sweetheart"].arrive #app { -webkit-mask: var(--sh-heart) center / 0 0 no-repeat; mask: var(--sh-heart) center / 0 0 no-repeat;
  animation: sh-open 420ms cubic-bezier(0.3, 0.7, 0.2, 1) both; }

/* 4. Charts, the first time they are seen: grown softly from their baseline, left to right */
[data-theme="sweetheart"] { --chart-dur: 420ms; --chart-ease: cubic-bezier(0.2, 0.8, 0.2, 1); --chart-sweep: 240ms; }

@media (prefers-reduced-motion: reduce) {
  [data-theme="sweetheart"][data-nav] #app.vt-new, [data-theme="sweetheart"][data-nav][data-nav="back"] .vt-old,
  [data-theme="sweetheart"].arrive #app { -webkit-mask: none; mask: none; animation: none; }
  [data-theme="sweetheart"] .mk.run:is(.c1, .c2) { animation: none; }
}
