:root{color-scheme:light;--navy:#242646;--ink:#252944;--slate:#526376;--blue:#2580ba;--cyan:#25c5ef;--ice:#eaf5fa;--line:#c9d9e2;--white:#fff;--pale:#f5f9fb}*{box-sizing:border-box}[hidden]{display:none!important}html{background:var(--pale)}body{margin:0;font:400 17px/1.5 "DM Sans","Avenir Next",Arial,sans-serif;color:var(--ink);background:radial-gradient(ellipse at 78% 30%,#e1f2f9 0,transparent 58%),var(--pale);min-height:100svh}main{max-width:1390px;padding:0 clamp(18px,5.5vw,90px);margin:auto}header,footer,.header-tools,.brand,.caption,.cap-place,.kicker,.primary,.steer{display:flex;align-items:center}header{height:86px;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{gap:12px}.brand img{height:45px;width:34px;object-fit:contain;filter:brightness(.82) saturate(1.5)}.brand b,.brand small{display:block}.brand b{font:800 26px/1.06 "Arial",sans-serif;letter-spacing:.23em}.brand small{font-size:9px;font-weight:800;letter-spacing:.12em}.header-tools{gap:22px}.place,.cap-place{display:inline-flex;align-items:center;gap:10px}.place{font-size:14px;color:var(--slate);font-weight:600}.pin{display:inline-block;width:12px;height:12px;border:2px solid currentColor;border-radius:50% 50% 50% 0;transform:rotate(-45deg);color:var(--blue)}button,a{font:inherit;touch-action:manipulation}.sound{height:42px;width:42px;border-radius:50%;background:white;border:1px solid var(--line);display:grid;place-items:center;color:var(--ink);cursor:pointer}.sound svg{width:20px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8}.sound[aria-pressed=true]{background:var(--ice);color:var(--blue)}
.game{display:grid;grid-template-columns:minmax(290px,.78fr) minmax(0,1.22fr);align-items:center;gap:clamp(25px,4.6vw,82px);padding:clamp(28px,3.7vw,66px) 0}.copy{min-width:0}.kicker,.caption,.step,.stages small,.ticket small{font:700 12px/1.2 "Courier Prime","Courier New",monospace;letter-spacing:.095em}.kicker{gap:9px;color:#126b90;margin:0 0 23px}.kicker i{display:inline-block;height:3px;width:23px;background:#069dcd}.copy h1,.copy h2,dialog h3,.ticket h3{font:900 clamp(54px,6.4vw,100px)/.93 "Arial Black","Avenir Next",Arial,sans-serif;letter-spacing:-.075em;margin:0 0 19px}.copy h1 em,.copy h2 em{font:italic 1.13em/.9 Georgia,serif;letter-spacing:-.075em}.copy h1 em span,.copy h2 em span{color:var(--blue)}.copy h2{font-size:clamp(42px,4.7vw,75px)}.lede{max-width:370px;font-size:clamp(17px,1.38vw,21px);color:#405569;line-height:1.45;margin:0 0 25px}.primary{width:fit-content;display:inline-flex;align-items:center;justify-content:center;min-height:50px;padding:12px 24px;gap:12px;background:var(--navy);color:#fff;border:0;border-radius:7px;box-shadow:0 3px 0 #0aa7d4;font-size:17px;font-weight:750;cursor:pointer;text-decoration:none}.primary:hover{background:#253d5c}.play{width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:9px solid var(--cyan)}.textbutton{background:transparent;border:0;border-bottom:1px solid #8296a8;padding:4px 0;margin-left:20px;cursor:pointer;font-size:15px;color:#33495d}.machine{overflow:hidden;border-radius:15px;background:var(--navy);border:1px solid #22334b;box-shadow:0 9px 0 -3px #b7d1de,0 16px 40px #26435d20;min-width:0;width:100%;max-width:780px}.scene{position:relative}.scene canvas{display:block;width:100%;height:auto;aspect-ratio:720/610}.in-run canvas{touch-action:none}.caption{justify-content:space-between;gap:10px;padding:12px 18px;color:#c1def0;font-size:11px}.caption .pin{width:10px;height:10px;color:#68d7f4}.caption>span:last-child{color:#98b5c9}.stages{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:20px 0;gap:14px}.stages>div{display:flex;align-items:center;gap:14px;padding:0 12px}.stages>div+div{border-left:1px solid var(--line);padding-left:clamp(20px,4vw,65px)}.step{font-size:14px;letter-spacing:0;color:#087797;background:#dfeff6;border:1px solid #bad8e6;border-radius:50%;width:36px;height:36px;display:grid;place-items:center}.stages small,.stages strong,.statline small,.statline strong{display:block}.stages small{color:#4c697a;font-size:11px;letter-spacing:.09em}.stages strong{font-size:19px}.stages .current .step{background:var(--navy);color:white;border-color:var(--navy)}footer{justify-content:space-between;font-size:12px;color:var(--slate);padding:16px 0}.statline{display:flex;gap:35px}.statline small{font-size:13px;color:var(--slate)}.statline strong{font-size:clamp(23px,2.7vw,40px);letter-spacing:-.04em;line-height:1.25;font-variant-numeric:tabular-nums}.meter{height:6px;background:#d8e6ed;margin:13px 0 0;border-radius:4px;overflow:hidden;max-width:335px}.meter span{display:block;background:var(--blue);height:100%;width:0}#hint{color:#436278;font-size:15px;min-height:2.8em;margin:15px 0 7px}#pause{margin:0}.steer{justify-content:center;gap:10px;padding:0 10px 11px}.steer button{touch-action:none;width:40%;line-height:1;border:1px solid #69849b;border-radius:5px;color:#edfaff;background:#2b3c55;min-height:42px;font-weight:700;cursor:pointer}.steer button:active{background:#445e76}
#arrival{position:absolute;inset:0;display:grid;place-items:center;background:#16243c70;padding:15px}.ticket,dialog{border:1px solid var(--line);background:#f8fcfe;box-shadow:0 12px 36px #0b24424a;color:var(--ink);border-radius:11px;padding:clamp(16px,3vw,38px)}.ticket{text-align:center;max-width:360px}.ticket small{color:var(--blue)}.ticket h3,dialog h3{font-size:clamp(30px,3.7vw,49px);margin:12px 0}.ticket p{margin:10px 0 18px}.ticket .primary{font-size:16px}.score{font-size:clamp(32px,4vw,57px);line-height:1;letter-spacing:-.05em}.best,#roundDetail{font-size:15px;color:var(--slate)}.pitch{font-size:20px;max-width:330px;line-height:1.25;font-weight:750}.best{margin:5px 0 16px}#toast{pointer-events:none;position:absolute;bottom:5%;left:50%;transform:translate(-50%,4px);opacity:0;transition:opacity .12s,transform .12s;background:#17253de8;border:1px solid #abcce4;color:white;border-radius:99px;padding:7px 16px;font-size:14px;font-weight:750;white-space:nowrap}#toast.on{opacity:1;transform:translate(-50%,0)}dialog{max-width:min(435px,92vw)}dialog::backdrop{background:#132638b8}dialog p{margin:10px 0;font-size:16px}dialog .primary{margin-top:10px}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #0785b2;outline-offset:3px}canvas:focus:not(:focus-visible){outline:0}
@media (max-width:740px){main{padding:0 16px}header{height:59px}.brand{gap:8px}.brand img{height:36px;width:27px}.brand b{font-size:20px}.brand small{font-size:8px}.header-tools{gap:12px}.place{font-size:12px;gap:5px}.sound{width:37px;height:37px}.game{grid-template-columns:minmax(0,1fr);gap:17px;max-width:540px;margin:auto;padding:21px 0}.copy h1{font-size:clamp(41px,10.4vw,66px);margin-bottom:10px}.copy h1 br,.copy h2 br{display:none}.copy h1 em,.copy h2 em{margin-left:.17em}.kicker{font-size:10px;margin:0 0 10px}.kicker i{width:16px}.lede{font-size:16px;max-width:none;margin:0 0 14px}.primary{min-height:44px;font-size:16px;padding:11px 20px}.machine{border-radius:10px}.caption{padding:9px 12px;font-size:10px}.stages{padding:13px 0;gap:3px}.stages>div,.stages>div+div{gap:6px;padding:0 4px}.step{width:24px;height:24px;font-size:11px;flex-shrink:0}.stages strong{font-size:clamp(11px,3vw,15px)}.stages small{font-size:8px}.in-run .game{padding:12px 0;gap:9px}.in-run #active{display:grid;grid-template-columns:1fr auto;align-items:center;column-gap:8px}.in-run .kicker{grid-column:1;margin-bottom:4px}.copy h2{font-size:32px;margin:2px 0 5px}.in-run #stageTitle{grid-column:1}.in-run .statline{grid-column:2;grid-row:1/3;gap:12px}.statline small{font-size:10px}.statline strong{font-size:19px}.in-run .lede{grid-column:1/-1;font-size:14px;margin:0}.in-run .meter{grid-column:1/-1;max-width:none;margin:6px 0}.in-run #hint{font-size:12px;min-height:1.5em;margin:0}.in-run #pause{font-size:12px;justify-self:end}.in-run .stages{display:none}.steer{padding-bottom:8px}.steer button{min-height:39px}.ticket h3{font-size:28px}.ticket p{font-size:15px}.ticket{max-width:290px}.pitch{font-size:17px;margin:12px 0}.best,#roundDetail{margin:5px 0;font-size:13px}footer{font-size:10px;padding:12px 0}.score{font-size:33px}}
@media(max-width:365px){.place{display:none}.stages small{display:none}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
.arrow-l,.arrow-r{display:inline-block;width:9px;height:9px;border:solid #a0e6fa;border-width:0 2px 2px 0;margin:0 5px 1px}.arrow-l{transform:rotate(135deg)}.arrow-r{transform:rotate(-45deg)}

.game-title{overflow-wrap:normal;text-wrap:balance}
.game-title em,.copy h1.game-title em{display:block;white-space:nowrap;margin:.12em 0 0;font-size:.7em;letter-spacing:-.045em}
.intro-quote{margin:16px 0 0;font-size:15px}
.intro-quote a{display:inline-block;padding:4px 0;color:inherit;text-underline-offset:3px}

.copy h1.game-title{font-size:clamp(43px,5.3vw,80px)}
.game-title em,.intro-quote a{color:#086b91}
#result .pitch{margin:14px 0 4px}
.service-area{margin:0 0 14px;max-width:39ch;color:var(--slate);font-size:16px}
#result .textbutton{margin:8px 0 0;display:block}
@media(max-width:740px){.copy h1.game-title{font-size:clamp(37px,8.3vw,52px)}.intro-quote{margin-top:9px}}

header .brand{align-self:stretch}
header .brand img{display:block;width:96px;height:71px;object-fit:contain;filter:none;mix-blend-mode:multiply}
footer a{color:inherit;text-decoration:none}
footer a:hover,footer a:focus-visible{text-decoration:underline}
.result-actions{display:flex;flex-wrap:wrap;gap:0 18px}
.share-status{margin:6px 0;color:var(--slate);font-size:15px}
.share-status:empty{display:none}
#shareCopy{width:100%;font:inherit;color:var(--ink);border:1px solid var(--line);border-radius:5px}
@media(max-width:740px){header .brand img{width:68px;height:50px}}

/* Keep the glass fixed under the finger, including drags past the canvas edge. */
html { scrollbar-gutter: stable; }
.in-run.cleaning .machine {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.in-run.cleaning #hint {
  min-height: 4.5em;
  min-block-size: 3lh;
}

.board-space { display: contents; }

/* The whole cleaning round occupies one stable viewport, even between strokes. */
html.cleaning-stage,
html.cleaning-stage body {
  overflow: hidden;
  overscroll-behavior: none;
  height: 100%;
}
html.cleaning-stage body {
  position: fixed;
  inset: 0;
  height: 100svh;
  min-height: 0;
  touch-action: none;
}
.cleaning-stage #shell {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
}
.cleaning-stage .stages,
.cleaning-stage footer,
.cleaning-stage .caption { display: none; }
.cleaning-stage .game {
  margin-block: 0;
  height: 100%;
  width: 100%;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
}
.cleaning-stage .board-space {
  display: grid;
  place-items: center;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  container-type: size;
}
.cleaning-stage .machine {
  width: min(100%, 117cqh);
  max-width: 780px;
}
@media (max-width: 740px) {
  .cleaning-stage .game { grid-template-rows: auto minmax(0, 1fr); }
  .cleaning-stage .board-space { align-items: start; }
}
@media (orientation: landscape) and (max-height: 540px) {
  .cleaning-stage #shell { grid-template-rows: minmax(0, 1fr); }
  .cleaning-stage header { display: none; }
  .cleaning-stage #game {
    max-width: none;
    grid-template: minmax(0, 1fr) / minmax(0, .85fr) minmax(0, 1.25fr);
    gap: 16px;
    padding-block: 8px;
  }
  .cleaning-stage .in-run #active { display: block; }
  .cleaning-stage #stageTitle { font-size: 28px; margin: 4px 0; }
  .cleaning-stage #instruction, .cleaning-stage #hint { font-size: 13px; margin: 4px 0; }
  .cleaning-stage #active .kicker { margin-bottom: 4px; }
  .cleaning-stage .statline strong { font-size: 22px; }
  .cleaning-stage .board-space { align-items: center; }
}
