/* Ink Motion · Geschafft! (update 4 §1.2; direction 06-finish, m7-finish-stamp). One pass ≈ 2.2 s, then still:
   splash 0 ms → seal press 300 ms → title rises 800 ms → stats rise 950 ms and roll like an odometer from 1000 ms
   (90 ms stagger per digit) → »Mario-geprüft« presses at 1000 ms → »Bestzeiten« seal 1150 ms, Mikro-Bilanz 1250 ms
   (update 5) → »Wie war's?« 1400 ms → rating row 1500–1660 ms →
   action 1800 ms. Every one-shot rests on its final state (visible, digits at --to), so .still and reduced motion
   (global kill in style.css) show the finished screen at once. The hero is decoration (aria-hidden). */
/* Update 8b (F66): the collapsed »Kombis bewerten (n)« list under the rating (rules at the end). */

.fin{display:grid;grid-template-columns:100%;grid-template-rows:minmax(min(210px,27vh),1fr);justify-items:center;align-content:stretch;
  padding-top:max(14px,env(safe-area-inset-top));text-align:center;overflow-x:clip} /* a pressing seal (scale 1.8) never widens the page */
.fin-hero{--fs:min(176px,21vh);container:fin-hero/size;grid-row:1;grid-column:1;position:relative;width:100%;min-height:min(210px,27vh);max-height:360px;display:grid;place-items:center}
.fin-hero .splash{width:min(310px,37vh);left:50%;top:50%;translate:-50% -50%;animation:splat 650ms var(--e-ink) both}
.fin-seal{--s:var(--fs);animation:seal-press 520ms var(--e-stamp) 300ms both}
.fin-fig{width:calc(var(--s) * .76);height:calc(var(--s) * .76);overflow:visible}
.fin .t-display{margin-top:min(10px,1.2vh);font-size:min(56px,15vw);animation:rise 500ms var(--e-ink) 800ms both}
/* update 6 (F52): the »Null Kraft« wordmark signs the painting small at its lower left, tilted like a stamp, on the side
   away from »Mario-geprüft«; absolute inside the hero (a size container), so it costs no height. A −6° square of side
   --fs reaches .445 × --fs left of and .55 × --fs below its centre. By default the wordmark stands beside that corner,
   its foot on the corner's line, as wide as the paper left of the seal allows; when the hero has room under the seal,
   it sits there at full size (22 px; 20 px beside the update-5 lines, whose seal is smaller). Its paper reserve keeps
   the splash's flecks off the word, so none reads as »NULL´KRAFT« or »KRAF·T«: the letters' cap band (the symbol's
   ink box, x 15–305 and y 6–50 of 320 × 56) as background, and around it .fin-knock, the same letters in the paper
   colour stroked 22 units wide (ui/finish.js draws it under them, so it never cuts into a neighbouring letter) */
.fin-word{--wh:clamp(0px,(50cqw - var(--fs) * .445 - 6px) * 56 / 320,20px);position:absolute;left:0;
  top:calc(50cqh + var(--fs) * .55 - var(--wh));width:calc(var(--wh) * 320 / 56);height:var(--wh);color:var(--ink);rotate:-3deg;
  overflow:visible;background:linear-gradient(var(--knock),var(--knock)) 50% 50%/90.5% 78.6% no-repeat;
  animation:rise 500ms var(--e-ink) 900ms both}
.fin-word .fin-knock{--strike:var(--knock);color:var(--knock);stroke:var(--knock);stroke-width:22;stroke-linejoin:round}
@container fin-hero (min-height:242px){.fin-word{--wh:22px;top:calc(50cqh + var(--fs) * .55 + 6px)}}
@container fin-hero (min-height:201px){.fin:has(.bests,.ear) .fin-word{--wh:20px;top:calc(50cqh + var(--fs) * .55 + 6px)}}
/* »Mario-geprüft« (F47): a round vermilion stamp pressed onto the lower right corner of the big seal */
.fin .mario-seal{grid-row:1;grid-column:1;align-self:center;justify-self:center;z-index:1;width:min(88px,11vh);height:min(88px,11vh);
  translate:min(96px,11.5vh) min(66px,8vh);rotate:10deg;border-radius:50%;background:var(--verm);color:var(--on-verm);
  box-shadow:0 0 0 3px var(--paper);animation:seal-press 520ms var(--e-stamp) 1000ms both}
.fin .mario-seal svg{display:block;width:100%;height:100%;overflow:visible}
.fin .mario-seal .ms-1{font:800 22px/1 var(--num);letter-spacing:.06em;fill:currentColor}
.fin .mario-seal .ms-2{font:800 12.5px/1 var(--sans);letter-spacing:.14em;fill:currentColor}
/* the stats: big condensed numbers, caps labels under them, brush separators centred in the gaps (columns take their
   content's width, so a three-digit count never runs into a separator) */
.fin .stats{--sg:clamp(18px,7vw,34px);width:100%;margin:min(24px,3vh) 0 0;display:flex;justify-content:center;align-items:flex-start;
  column-gap:var(--sg);animation:rise 400ms var(--e-ink) 950ms both}
.fin .stats>div{position:relative;flex:0 1 auto;min-width:0;display:flex;flex-direction:column-reverse;align-items:center;justify-content:flex-end;gap:7px}
.fin .stats>div+div::before{content:"";position:absolute;left:calc(var(--sg) * -.5 - 1.5px);top:4%;height:44px;width:3px;background:var(--paper-3);clip-path:var(--taper);rotate:4deg}
.fin .stats dd{margin:0}
.fin .stats dt{font:700 12px/1.15 var(--sans);letter-spacing:.1em;text-transform:uppercase;color:var(--fg-2);text-wrap:balance}
.fin .num{display:flex;justify-content:center;font:800 44px/1 var(--num);font-variant-numeric:tabular-nums}
.odo-row{display:flex;height:1em;overflow:hidden}
.odo{display:block;height:1em;overflow:hidden}
.odo-col{display:flex;flex-direction:column;transform:translateY(calc(var(--to,0) * -1em));
  animation:roll 1100ms cubic-bezier(.2,.9,.25,1) both;animation-delay:calc(1000ms + var(--k,0) * 90ms)}
.odo-col>b{display:block;height:1em;line-height:1em;font-weight:800}
.odo-sep{display:block;height:1em;line-height:1em}
.fin .stats-sub{margin-top:min(14px,1.8vh);font-variant-numeric:tabular-nums;animation:rise 400ms var(--e-ink) 1100ms both}
.fin .tempo{margin-top:min(12px,1.5vh);animation:rise 400ms var(--e-ink) 1200ms both}
.fin .stats-sub+.tempo{margin-top:4px}
/* update 5: »N Bestzeiten heute« as a small vermilion seal under the stats line (presses in after the odometers); the
   Mikro-Bilanz »erkannt · verpasst · zu früh · automatisch« one quiet tabular line under the tempo */
.fin .bests{position:relative;isolation:isolate;margin-top:min(14px,1.8vh);padding:7px 12px 6px;font:800 14px/1 var(--sans);
  letter-spacing:.12em;text-transform:uppercase;color:var(--on-verm);rotate:-2deg;animation:seal-press 520ms var(--e-stamp) 1150ms both}
.fin .bests::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--verm);clip-path:var(--seal)}
.fin .ear{margin-top:6px;font-variant-numeric:tabular-nums;color:var(--fg-2);animation:rise 400ms var(--e-ink) 1250ms both}
/* »Wie war's?«: one row of three (radiogroup), ≥ 86 px tall, 12 px apart */
.fin .rate-sec{width:100%;margin-top:min(26px,3vh)}
.fin .rate-sec .t-q{margin-bottom:12px;font:800 18px/1.2 var(--sans);color:var(--fg-2);animation:rise 400ms var(--e-ink) 1400ms both}
.fin .rate{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--gap)}
.fin .rate>.btn{--btn-bg:var(--paper-2);--btn-fill:transparent;min-height:86px;min-width:0;flex-direction:column;gap:8px;padding:8px 4px;
  font-size:16px;line-height:1.05;animation:rise 400ms var(--e-ink) both}
.fin .rate>.btn[aria-checked=true]{--btn-bg:var(--fg);color:var(--bg)}
.fin .rate>.btn:nth-child(1){animation-delay:1500ms}
.fin .rate>.btn:nth-child(2){animation-delay:1580ms}
.fin .rate>.btn:nth-child(3){animation-delay:1660ms}
/* not sticky here: on a short phone a long stats/tempo text scrolls the page, and a sticky foot would cover the rating
   row (it grows from 64 to 80 px once rated); the 1fr hero row keeps it at the bottom whenever everything fits */
.fin .foot{position:relative;width:100%;animation:rise 400ms var(--e-ink) 1800ms both}
@keyframes roll{from{transform:translateY(0)}}
/* short phones (320×568): the hero and the title give way first, so the rating row shows without scrolling */
@media (max-height:640px){
  .fin{grid-template-rows:minmax(18vh,1fr)}
  .fin-hero{min-height:18vh;--fs:14vh}
  .fin-hero .splash{width:25vh}
  .fin .mario-seal{translate:11.5vh 2.5vh} /* on the smaller seal's corner, clear of the title */
  .fin .t-display{margin-top:0;font-size:44px}
  .fin .stats{margin-top:10px}
  .fin .num{font-size:38px}
  .fin .rate-sec{margin-top:12px}
  .fin .rate-sec .t-q{margin-bottom:8px}
}
/* update 5: the Bestzeiten seal and the Mikro-Bilanz take 26–90 px; the hero gives that room back (seal, splash and
   »Mario-geprüft« drawn smaller), so the action still fits 360×800 and the rating row 320×568 without scrolling */
.fin:has(.bests,.ear){grid-template-rows:minmax(min(166px,20vh),1fr)}
.fin:has(.bests,.ear) .fin-hero{min-height:min(166px,20vh);--fs:min(142px,17vh)}
.fin:has(.bests,.ear) .fin-hero .splash{width:min(256px,31vh)}
.fin:has(.bests,.ear) .mario-seal{width:min(76px,9.5vh);height:min(76px,9.5vh);translate:min(80px,10vh) min(52px,6.5vh)}
@media (max-height:640px){
  .fin:has(.bests,.ear){grid-template-rows:minmax(13.5vh,1fr)}
  .fin:has(.bests,.ear) .fin-hero{min-height:13.5vh;--fs:11vh}
  .fin:has(.bests,.ear) .fin-hero .splash{width:20vh}
  .fin:has(.bests,.ear) .mario-seal{width:8.5vh;height:8.5vh;translate:9vh 1.5vh}
  .fin:has(.bests,.ear) .t-display{font-size:40px}
  .fin .bests{margin-top:8px}
}
/* still: everything at its final state at once (reduced motion; set by ui/finish.js). Scoped to Geschafft: the demo
   player (css/demo.css) uses a .still mode of its own whose pulse keeps running */
:is(.fin,.fin-hero,.mario-seal).still,:is(.fin,.fin-hero,.mario-seal).still *,:is(.fin,.fin-hero,.mario-seal).still *::before,
:is(.fin,.fin-hero,.mario-seal).still *::after{animation:none!important}
/* update 8b (F66): »Kombis bewerten (n)« — one quiet row under the rating, closed by default (the seal, hero and stats
   stay dominant); open: the session's block combos, each with a 64-px thumbs-down toggle (pressed = ink disc), a
   flagged row's »Notiz (optional)«, then »Sonst noch was?«. The text wraps, so a 70-character combo fits 320 px. No
   expand animation under reduced motion (global kill) or .still */
.fin .fb-sec{width:100%;margin-top:14px;text-align:left;animation:rise 400ms var(--e-ink) 1700ms both}
.fin .fb-open{--btn-bg:var(--paper-3);min-height:var(--tap);justify-content:flex-start;gap:10px;padding:0 18px;font-size:17px;font-weight:700}
.fin .fb-open svg{width:24px;height:24px}
.fin .fb-open .chev{margin-left:auto;transition:rotate 200ms var(--e-ink)}
.fin .fb-open .chev.up{rotate:180deg}
.fin .fb{margin-top:10px;display:grid;gap:10px;animation:rise 260ms var(--e-ink) both}
.fin .fb[hidden]{display:none}
.fin .fb-hint{margin:0 2px;color:var(--fg-2)}
.fin .fb-rows{margin:0;padding:0;list-style:none;display:grid;gap:8px}
.fin .fb-row{display:grid;grid-template-columns:minmax(0,1fr) var(--tap);align-items:center;gap:12px 10px;padding:8px 8px 8px 14px;
  background:var(--paper-2);border-radius:10px}
.fin .fb-text{font:700 16px/1.25 var(--sans);overflow-wrap:anywhere}
.fin .fb-down{width:var(--tap);height:var(--tap);display:grid;place-items:center;border:2px solid var(--line);border-radius:50%;color:var(--fg-2)}
.fin .fb-down svg{width:26px;height:26px}
.fin .fb-down[aria-pressed=true]{background:var(--fg);border-color:var(--fg);color:var(--bg)}
.fin .fb-down:focus-visible{outline:3px solid var(--fg);outline-offset:3px}
.fin .fb-row.on{box-shadow:inset 5px 0 0 var(--verm)} /* flagged: a vermilion edge; the text stays readable */
.fin .fb-note{grid-column:1/-1;display:grid;gap:4px}
.fin .fb-note[hidden]{display:none}
.fin .fb-note label,.fin .fb-more label{font:700 13px/1.2 var(--sans);letter-spacing:.02em;color:var(--fg-2)}
.fin .fb-in{display:block;width:100%;min-height:var(--tap);margin:0;padding:8px 12px;font:600 17px/1.3 var(--sans);color:var(--fg);
  background:var(--paper-hi);border:2px solid var(--ink-3);border-radius:8px}
.fin .fb-in:focus-visible{outline:3px solid var(--fg);outline-offset:2px}
.fin textarea.fb-in{resize:vertical;min-height:88px}
.fin .fb-more{display:grid;gap:4px}
/* Update 13 (D3): the one question about the Trainingsdaten, under the first Geschafft's numbers: two equal buttons */
.fin .tel-ask{margin-top:18px;padding:14px 14px 12px;border:2px solid var(--ink);border-radius:14px;background:var(--paper-2);box-shadow:4px 4px 0 var(--ink)}
.fin .tel-ask h2{font:800 22px/1.12 var(--serif)}
.fin .tel-ask p{margin-top:6px;font:600 16px/1.35 var(--sans);color:var(--ink-2)}
.fin .tel-two{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
.fin .tel-two .btn{min-width:0;min-height:var(--tap);padding:0 6px;--btn-bg:var(--ink);--btn-fill:var(--paper-2);font:800 17px/1.1 var(--sans)}
.fin .tel-ds{margin-top:10px;padding:8px 0;border:0;background:none;cursor:pointer;font:700 15px/1 var(--sans);color:var(--verm)}
.fin .tel-ds:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
