@font-face{font-family:'Barlow Condensed';src:url('./barlow.woff2') format('woff2');font-style:normal;font-weight:600 800;font-display:swap}
@font-face{font-family:'Barlow Condensed';src:url('./barlow-italic.woff2') format('woff2');font-style:italic;font-weight:600 800;font-display:swap}
@font-face{font-family:'DM Sans';src:url('./dm-sans.woff2') format('woff2');font-style:normal;font-weight:400 500;font-display:swap}
@font-face{font-family:'DM Sans';src:url('./dm-sans-bold.woff2') format('woff2');font-style:normal;font-weight:600 700;font-display:swap}

:root{
  --sky:#0d5aa8;--sky-mid:#1c8fe2;--navy:#0b2c56;--paper:#fff9ea;--red:#ec2f1d;--red-deep:#b81c10;
  --ball:#e6f53a;--sun:#ffc94d;--ease:cubic-bezier(.22,1,.36,1);
  --gutter:clamp(14px,4vw,56px);
  font-family:'DM Sans',sans-serif;color:var(--paper);font-synthesis:none;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--sky);overflow:hidden;overscroll-behavior:none}
button,a,input{-webkit-tap-highlight-color:transparent}
button,a{touch-action:manipulation;transition:transform .25s var(--ease),background-color .2s,color .2s}
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none;padding:0}
a{color:inherit;text-decoration:none}
button:active,a:active{transform:scale(.97)}
:focus-visible{outline:3px solid var(--ball);outline-offset:3px;border-radius:4px}
[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

.world{--board-w:clamp(140px,38vw,214px);position:relative;height:100svh;min-height:320px;overflow:hidden;isolation:isolate}
#court{position:absolute;inset:0;width:100%;height:100%;z-index:-1}

/* Top of the page lives in the sky. */
.masthead{position:absolute;top:calc(env(safe-area-inset-top) + 10px);left:var(--gutter);right:var(--gutter);display:flex;justify-content:space-between;align-items:center;z-index:5}
.artist{display:flex;align-items:center;min-height:44px}
.artist img{display:block;width:auto;height:clamp(22px,2.1vw,30px);filter:drop-shadow(0 1px 2px rgba(11,44,86,.55))}
.masthead nav{display:flex;gap:clamp(14px,2vw,28px);font-size:clamp(12px,1vw,14px);font-weight:600}
.masthead nav a{line-height:44px;display:inline-block;min-width:44px;text-align:center;text-shadow:0 1px 2px rgba(11,44,86,.55)}
.masthead nav a:hover{color:var(--ball)}

.intro{position:absolute;left:var(--gutter);top:calc(env(safe-area-inset-top) + 64px);z-index:2;pointer-events:none}
.intro h1{font-family:'Barlow Condensed',sans-serif;font-style:italic;font-weight:800;letter-spacing:-.02em;line-height:.8;margin:0;color:var(--paper);text-shadow:.035em .04em 0 var(--red);transform:rotate(-3.5deg);transform-origin:left top;transition:transform .55s var(--ease)}
.intro h1 i{color:var(--ball);font-style:inherit}
.intro-under{position:relative;margin-top:.9em;font-size:16px;font-weight:600}
.intro-under p{margin:0;transition:opacity .4s}
.live-message{position:absolute;left:0;top:0;opacity:0}

/* Split-flap scoreboard. It flips on every return and only ever lands on love. */
.scoreboard{position:absolute;z-index:3;display:grid;grid-template-columns:1fr 1fr;gap:6px}
.score-name,.score-note{text-shadow:0 1px 2px rgba(11,44,86,.55)}
.score-name{display:block;text-align:center;font-size:12px;font-weight:700;margin-bottom:4px}
.tile{position:relative;height:var(--tile-h);perspective:240px;font-family:'Barlow Condensed',sans-serif;font-weight:800;font-size:calc(var(--tile-h)*.74);color:var(--paper);filter:drop-shadow(0 3px 0 rgba(11,44,86,.35))}
.tile i{position:absolute;left:0;right:0;height:50%;overflow:hidden;background:var(--red);font-style:normal;display:block;backface-visibility:hidden}
.tile i b{display:block;height:var(--tile-h);line-height:calc(var(--tile-h) - 2px);text-align:center;font-weight:800}
.tile .top,.tile .flap-top{top:0;border-radius:6px 6px 0 0;transform-origin:50% 100%;background:#f03320}
.tile .bot,.tile .flap-bot{bottom:0;border-radius:0 0 6px 6px;transform-origin:50% 0}
.tile .bot b,.tile .flap-bot b{margin-top:calc(var(--tile-h)*-.5)}
.tile .flap-top{visibility:hidden;will-change:transform}
.tile .flap-bot{visibility:hidden;will-change:transform}
.tile:before,.tile:after{content:'';position:absolute;top:50%;width:4px;height:5px;margin-top:-2.5px;background:var(--red-deep);z-index:3}
.tile:before{left:0;border-radius:0 3px 3px 0}.tile:after{right:0;border-radius:3px 0 0 3px}
.score-note{grid-column:1/-1;margin:2px 0 0;text-align:center;font-size:12px;font-weight:600}

/* The court. */
.play-zone{position:absolute;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:grab;z-index:1;outline-offset:-8px}
.play-zone:active{cursor:grabbing}
.court-help{position:absolute;z-index:2;margin:0;font-size:13px;font-weight:600;white-space:nowrap;pointer-events:none;transform:translateX(-50%);transition:opacity .5s;opacity:0;text-shadow:0 1px 0 rgba(11,44,86,.5)}
.world.playing .court-help{opacity:1}
.world.playing.settled .court-help{opacity:0}
.quiet-button{position:absolute;z-index:3;font-size:14px;font-weight:600;min-height:44px;padding:0 14px;text-decoration:underline;text-underline-offset:4px;text-shadow:0 1px 0 rgba(11,44,86,.5)}
.world.playing .quiet-button{display:none}

/* One dock: the song, then the three ways on. */
.dock{position:absolute;z-index:4;display:grid;gap:8px;bottom:calc(env(safe-area-inset-bottom) + 12px)}
.deck{min-height:60px;display:grid}
.serve-button{display:flex;align-items:center;justify-content:center;gap:10px;background:var(--ball);color:var(--navy);border-radius:14px;font-family:'Barlow Condensed',sans-serif;font-style:italic;font-weight:800;font-size:27px;letter-spacing:.005em;box-shadow:0 4px 0 #a6b400}
.serve-button svg{width:24px;height:24px;fill:currentColor}
.serve-button:hover{background:#f1ff5c}
.serve-button:active{transform:translateY(3px);box-shadow:0 1px 0 #a6b400}
.player{display:flex;align-items:center;gap:8px;background:var(--paper);color:var(--navy);padding:6px 8px 6px 6px;border-radius:14px;box-shadow:0 4px 0 rgba(11,44,86,.28);min-width:0;container-type:inline-size}
.player :focus-visible{outline-color:var(--navy)}
.player>img{width:48px;height:48px;object-fit:cover;border-radius:9px;flex:none}
.audio-toggle{width:44px;height:44px;flex:none;border-radius:50%;background:var(--red);display:grid;place-items:center}
.audio-toggle svg{width:22px;height:22px;fill:var(--paper)}
.track{flex:1;min-width:0;container-type:inline-size}
.track-line strong{white-space:nowrap}
.track-line{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px}
.track-title{display:flex;flex-wrap:wrap;align-items:center;column-gap:6px;row-gap:2px;min-width:0;flex-shrink:1}
.preview-tag{font-size:10.5px;font-weight:700;line-height:1;padding:3px 6px 3px;border-radius:999px;background:var(--navy);color:var(--paper);white-space:nowrap}
#track-status{font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap;color:#2c4a70;min-width:0;overflow:hidden;text-overflow:ellipsis}
#track-status.alert{color:var(--red-deep);font-weight:700}
@container (max-width:180px){#track-status:not(.alert){display:none}.track-line:has(.alert) .preview-tag{display:none}}
@container (max-width:439px){.player>img{display:none}}
.full-song{flex:none;display:flex;flex-direction:column;justify-content:center;min-height:44px;padding:0 9px;border-radius:10px;border:1.5px solid #0b2c5638;font-size:11px;font-weight:700;line-height:1.2;white-space:nowrap;color:var(--navy)}
.full-song span{display:flex;align-items:center;gap:2px}
.full-song svg{width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.full-song:hover{background:#0b2c5612}
.player[data-finished] .full-song{background:var(--red-deep);border-color:var(--red-deep);color:var(--paper)}
/* The match is over: Rest has nothing left to pause, and the finished preview says so in words. */
.world[data-phase=end] .rest-button{display:none}
.player[data-finished] .preview-tag{display:none}
.player[data-finished] #track-status{display:inline;font-size:11.5px;font-weight:700;color:var(--navy);overflow:visible}
.player[data-finished] .track-line{flex-wrap:wrap;row-gap:0}
.audio-toggle[data-icon=again] svg{fill:none;stroke:var(--paper);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
#seek{-webkit-appearance:none;appearance:none;display:block;width:100%;height:44px;margin:-8px 0;background:none;cursor:pointer}
#seek::-webkit-slider-runnable-track{height:4px;border-radius:2px;background:#0b2c5630}
#seek::-moz-range-track{height:4px;border-radius:2px;background:#0b2c5630}
#seek::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;margin-top:-5px;border-radius:50%;background:var(--red);border:0}
#seek::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:var(--red);border:0}
.mute-toggle{width:44px;height:44px;flex:none;display:grid;place-items:center}
.mute-toggle svg{width:20px;height:20px;fill:none;stroke:var(--navy);stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round}
.mute-toggle[aria-pressed=true] svg{opacity:.35}
.rest-button{flex:none;min-width:48px;height:44px;padding:0 8px;font-size:13px;font-weight:700;color:var(--navy);text-decoration:underline;text-underline-offset:3px}
.rest-button[aria-pressed=true]{color:var(--red-deep)}
.routes{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.routes button{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:46px;padding:4px 6px;border-radius:12px;background:var(--navy);line-height:1.1}
.routes button:hover{background:#123d73}
.routes strong{font-family:'Barlow Condensed',sans-serif;font-size:18px;font-weight:700;letter-spacing:.01em}
.routes span{font-size:11px;font-weight:500;margin-top:1px}

/* Portrait: phones and tablets. Sky on top, court below, dock under the thumb. */
@media (max-aspect-ratio:1/1){
  .masthead nav a span{display:none}
  .intro h1{font-size:min(22vw,11.8svh,128px)}
  .intro-under{font-size:min(15px,2.1svh);margin-top:calc(min(22vw,11.8svh,128px)*.3)}
  .world.playing .intro h1{transform:rotate(-3.5deg) scale(.62)}
  .world.playing .intro-copy{opacity:0}
  .world.playing .live-message{opacity:1;top:calc(min(22vw,11.8svh,128px)*-.78)}
  .scoreboard{--tile-h:clamp(34px,min(12vw,5.8svh),58px);right:var(--gutter);top:calc(env(safe-area-inset-top) + 58px);width:var(--board-w)}
  .score-note{display:none}
  .play-zone{left:0;right:0;top:34%;bottom:0}
  .court-help{left:50%}
  .quiet-button{left:12px}
  .dock{left:12px;right:12px}
  .mute-toggle{display:none}
}
@media (max-aspect-ratio:1/1) and (min-width:600px){
  .dock{left:50%;right:auto;width:520px;transform:translateX(-50%)}
  .intro-under{font-size:18px}
}

/* Landscape: title stands in the left of frame, court to the right. */
@media (min-aspect-ratio:1001/1000){
  .intro{top:clamp(50px,9.5vh,110px)}
  .intro h1{font-size:clamp(60px,min(9.8vw,17.4vh),190px)}
  .intro-under{font-family:'Barlow Condensed',sans-serif;font-style:italic;font-weight:700;font-size:clamp(22px,min(3vw,5vh),52px);margin-top:calc(clamp(60px,min(9.8vw,17.4vh),190px)*.84)}
  .intro-under{max-width:32vw}
  .live-message{font-size:inherit;width:100%}
  .world.playing .intro-copy{opacity:0}
  .world.playing .live-message{opacity:1}
  .scoreboard{--tile-h:clamp(40px,8.2vh,78px);right:var(--gutter);top:clamp(58px,10vh,104px);width:var(--board-w)}
  .score-name{font-size:14px}
  .score-note{font-size:14px}
  .play-zone{left:30%;right:0;top:34%;bottom:0}
  .court-help{left:62.5%}
  .quiet-button{left:var(--gutter);bottom:calc(env(safe-area-inset-bottom) + 136px);padding:0}
  .dock{left:var(--gutter);width:clamp(300px,29vw,430px);bottom:calc(env(safe-area-inset-bottom) + 20px)}
}
@media (min-aspect-ratio:1001/1000) and (max-height:520px){
  .score-note,.intro-under{display:none}
  .deck{min-height:48px}.serve-button{font-size:22px}
  .routes button{min-height:40px}
  .dock{gap:5px;bottom:8px}
  .quiet-button{bottom:112px}
}
@media (min-aspect-ratio:1001/1000) and (max-width:1240px),(min-aspect-ratio:1001/1000) and (max-height:520px){.mute-toggle{display:none}}
/* Short phones. */
@media (max-aspect-ratio:1/1) and (max-height:700px){
  .deck{min-height:54px}
  .serve-button{font-size:24px}
  .routes button{min-height:44px}
  .routes strong{font-size:17px}
}

.cover-card{display:none}
@media (min-aspect-ratio:1001/1000) and (min-height:700px){
  .cover-card{display:block;position:absolute;z-index:3;left:calc(var(--gutter) + 6px);bottom:calc(env(safe-area-inset-bottom) + 182px);width:clamp(120px,min(14vw,20vh),220px);transform:rotate(-4deg);box-shadow:0 6px 0 rgba(90,8,2,.5);border-radius:6px}
  .cover-card img{display:block;width:100%;height:auto;border-radius:6px}
  .cover-card:hover{transform:rotate(-1deg) translateY(-3px)}
}

/* Dialogs: a sunlit card off the side of the court. */
dialog{width:min(920px,calc(100vw - 32px));max-height:min(88svh,720px);padding:0;border:0;border-radius:22px;background:var(--paper);color:var(--navy);overflow:auto;overscroll-behavior:contain;box-shadow:0 10px 0 var(--red),0 26px 60px rgba(11,44,86,.45)}
dialog[open]{animation:sheet .38s var(--ease)}
@keyframes sheet{from{transform:translateY(26px);opacity:0}}
dialog::backdrop{background:rgba(9,60,120,.62)}
dialog :focus-visible{outline-color:var(--red)}
.sheet-top{position:sticky;top:0;z-index:3;display:flex;justify-content:space-between;align-items:center;padding:10px 10px 10px 14px;background:var(--paper)}
.sheet-tabs{display:flex;gap:4px}
.sheet-tabs button{min-height:44px;padding:0 16px;border-radius:12px;font-family:'Barlow Condensed',sans-serif;font-size:21px;font-weight:700}
.sheet-tabs button[aria-current=true]{background:var(--navy);color:var(--paper)}
.sheet-close{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#0b2c5612}
.sheet-close svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round}
.panel{display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1fr);gap:clamp(20px,4vw,44px);align-items:center;padding:6px clamp(18px,4vw,40px) clamp(22px,4vw,38px)}
.panel-text{min-width:0}
.panel-text p{font-size:15px;line-height:1.55;margin:0 0 12px}
.panel-text .panel-lead{font-weight:700;color:var(--red-deep);margin-bottom:4px}
.panel h2{font-family:'Barlow Condensed',sans-serif;font-style:italic;font-weight:800;font-size:clamp(50px,7vw,76px);letter-spacing:-.015em;line-height:.92;margin:0 0 14px;color:var(--navy)}
.album-cover{width:100%;height:auto;display:block;border-radius:12px;transform:rotate(-1.5deg);box-shadow:0 8px 0 rgba(11,44,86,.14)}
.date-chip{display:inline-flex;gap:3px;margin-bottom:14px;font-family:'Barlow Condensed',sans-serif;font-weight:800;font-size:24px;color:var(--paper)}
.date-chip span{background:var(--red);padding:2px 10px;border-radius:6px}
.panel-text .motto{font-family:'Barlow Condensed',sans-serif;font-style:italic;font-weight:700;font-size:32px;line-height:1.05}
.panel-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.action{display:inline-flex;align-items:center;gap:8px;min-height:46px;padding:0 18px;border-radius:12px;background:var(--red-deep);color:var(--paper);font-weight:700;font-size:14px}
.action:hover{background:#97170d}
.action-quiet{background:#0b2c5612;color:var(--navy)}
.action-quiet:hover{background:#0b2c5622}
.credits{margin-top:16px;font-size:14px}
.credits summary{cursor:pointer;font-weight:700;min-height:44px;display:flex;align-items:center}
.credits p{font-size:14px;margin:6px 0 0}
.sleeve{position:relative;width:82%;aspect-ratio:1;margin-right:18%}
.sleeve-art{position:absolute;inset:0;width:100%;height:100%;border-radius:6px;box-shadow:0 8px 0 rgba(11,44,86,.14)}
.record{position:absolute;top:3%;bottom:3%;left:24%;aspect-ratio:1;border-radius:50%;background:repeating-radial-gradient(circle,#121a2c 0 2px,#1d2740 2px 4px);display:grid;place-items:center}
.record img{width:36%;height:36%;border-radius:50%;object-fit:cover}
@media (max-width:680px){
  dialog{width:100vw;max-width:100vw;max-height:90svh;margin:auto 0 0;border-radius:22px 22px 0 0;box-shadow:0 -6px 0 var(--red)}
  .panel{grid-template-columns:1fr;gap:16px;padding-bottom:calc(env(safe-area-inset-bottom) + 22px)}
  .album-cover{width:62%;margin:0 auto}
  .sleeve{width:52%;margin:0 auto;transform:translateX(-14%)}
  .sheet-tabs button{padding:0 13px}
}
@media (prefers-reduced-motion:reduce){
  *,*:before,*:after{transition:none!important;animation:none!important;scroll-behavior:auto!important}
}

/* A short match. Keep the court and the thumb lane clear. */
.skip-button{position:absolute;z-index:5;right:var(--gutter);top:145px;min-height:44px;font-size:12px;text-decoration:underline;text-underline-offset:4px}
.match-caption{position:absolute;z-index:2;left:var(--gutter);right:var(--gutter);top:255px;text-align:center;pointer-events:none}
.match-caption strong{font-family:'Barlow Condensed',sans-serif;font-weight:800;font-size:30px;line-height:1}
.match-caption p{font-size:13px;line-height:1.35;margin:6px 0 0;font-weight:500}
.world[data-phase=play] .match-caption{top:180px}
.world[data-phase=play] .intro-under{display:none}
.world[data-phase=play] .court-help{opacity:1}
.world[data-phase=play] .intro h1{font-size:74px}
.world.playing .quiet-button{display:none}
.world.playing .live-message{display:none}
.world[data-phase=tension] .intro,.world[data-phase=throw] .intro,.world[data-phase=end] .intro{visibility:hidden}
.world[data-phase=tension] .court-help,.world[data-phase=throw] .court-help,.world[data-phase=end] .court-help{display:none}
.world[data-phase=tension] .play-zone,.world[data-phase=throw] .play-zone,.world[data-phase=end] .play-zone{pointer-events:none}
.world[data-phase=tension] .match-caption,.world[data-phase=throw] .match-caption{display:none}
.world[data-phase=end] .scoreboard{opacity:0;visibility:hidden;pointer-events:none}
.score-note{display:block!important;font-size:11px!important;line-height:1.2}
.world[data-phase=end] .cover-card{display:none}
.play-zone{bottom:205px!important}
.world[data-phase=intro] .play-zone{bottom:205px!important}
.quiet-button{background:var(--paper);color:var(--navy);border-radius:10px;box-shadow:0 3px 0 var(--navy);text-shadow:none;text-decoration:none;font-weight:700;min-height:48px;left:50%;transform:translateX(-50%);padding:0 25px;white-space:nowrap}
.quiet-button:active{transform:translateX(-50%) translateY(2px)}
.court-help{font-size:12px;white-space:normal;width:95%;text-align:center;color:var(--paper);font-weight:600}
.world:not(.playing) .court-help{opacity:1}
.world[data-phase=end] .match-caption{display:none}
.world[data-phase=end] .play-zone{display:none}
@media (max-aspect-ratio:1/1) and (max-height:700px){
  .match-caption{top:200px}.match-caption strong{font-size:26px}
  .match-caption p{font-size:12px}
  .world[data-phase=play] .match-caption{top:158px}
  .skip-button{top:130px}
}
@media (max-width:350px){
  .intro h1{font-size:65px}.intro-under{margin-top:20px}
  .world[data-phase=play] .intro h1{font-size:62px}
  .match-caption strong{font-size:24px}.match-caption p{font-size:11px}
  .masthead nav{gap:10px}
  .track-line{font-size:12px}
}
@media (min-aspect-ratio:1001/1000){
  .match-caption,.world[data-phase=play] .match-caption{top:23%;left:42%;right:12%}
  .match-caption strong{font-size:clamp(30px,3.4vw,52px)}
  .match-caption p{font-size:15px}
  .world[data-phase=play] .intro h1{font-size:clamp(60px,min(9.8vw,17.4vh),190px)}
  .world[data-phase=play] .intro-under{display:block}
  .skip-button{top:calc(10vh + 130px)}
  .quiet-button{left:var(--gutter);transform:none;bottom:150px;top:auto!important}
  .quiet-button:active{transform:translateY(2px)}
  .play-zone{bottom:0!important}
  .court-help{left:62.5%;width:55%;top:auto!important;bottom:22px}
  .world.playing .cover-card{display:none}
}
.world:not(.playing) .match-caption{display:none}
@media (max-aspect-ratio:1/1){
  .skip-button{top:132px;font-size:11px}
  .world[data-phase=play] .match-caption p{max-width:265px;margin:6px auto 0}
}
@media (max-aspect-ratio:1/1) and (max-height:700px){
  .world[data-phase=play] .match-caption{top:146px}
  .world[data-phase=play] .match-caption strong{font-size:26px}
  .score-note{font-size:10px!important}.skip-button{top:119px}
}
@media (max-aspect-ratio:1/1){.play-zone,.world[data-phase=intro] .play-zone{bottom:126px!important}}
.tile.won{font-size:calc(var(--tile-h)*.55)}
.world[data-phase=play] .match-caption strong{font-size:27px}
@media (min-aspect-ratio:1001/1000){.world[data-phase=play] .match-caption strong{font-size:42px}}
@media (max-width:350px){.world[data-phase=play] .match-caption strong{font-size:23px}}
.world:not(.playing) .court-help{display:none}
/* The cover must never sit over the game button. */
@media (min-aspect-ratio:1001/1000) and (min-height:850px){.cover-card{bottom:calc(env(safe-area-inset-bottom) + 242px)}}
@media (min-aspect-ratio:1001/1000) and (max-height:849px){.cover-card{display:none}}
@media (min-aspect-ratio:1001/1000){
  .world[data-phase=play] .match-caption{top:15%}
}
@media (max-aspect-ratio:1/1) and (max-height:700px){.world:not(.playing) .intro h1{font-size:65px}}
.world[data-phase=play] .intro h1{transition:none}
.match-caption{text-shadow:0 1px 2px #0b2c5670}
@media (max-aspect-ratio:1/1) and (min-width:600px){
  .skip-button{top:158px}
}
@media (max-aspect-ratio:1/1) and (max-height:700px){
  .world[data-phase=play] .intro{visibility:hidden}
  .world[data-phase=play] .match-caption{top:64px;left:var(--gutter);right:auto;width:calc(100% - 2 * var(--gutter) - var(--board-w) - 10px);text-align:left}
  .world[data-phase=play] .match-caption strong{font-size:26px}
  .world[data-phase=play] .match-caption p{max-width:none;margin:6px 0 0}
}
@media (max-width:350px){.world[data-phase=play] .match-caption strong{font-size:23px}}
@media (min-aspect-ratio:1001/1000) and (max-width:1100px){
  .world[data-phase=play] .match-caption{left:35%;right:calc(var(--gutter) + var(--board-w) + 16px)}
  .world[data-phase] .match-caption strong{font-size:36px}
}

/* Cold-read fixes: the prompt must be readable at arm's length, and captions must survive the clouds. */
.court-help{font-size:15px;font-weight:700;text-shadow:0 1px 3px rgba(11,44,86,.8)}
.match-caption strong{text-shadow:0 2px 10px rgba(11,44,86,.55)}
.match-caption p{text-shadow:0 1px 6px rgba(11,44,86,.6)}

/* Release pass. Small text in the sky keeps a tight navy halo, so it reads on the pale sun side too. */
.masthead nav a,.score-name,.score-note,.skip-button,.court-help,.match-caption p{text-shadow:0 0 2px rgba(11,44,86,.95),0 1px 3px rgba(11,44,86,.8)}
@media (min-aspect-ratio:1001/1000){
  /* The caption never runs under the scoreboard. */
  .world[data-phase] .match-caption{right:calc(var(--gutter) + var(--board-w) + 24px)}
}

/* UP SAMASKOM easter egg. Only ever drawn while it is triggered. */
.scoreboard{touch-action:manipulation;user-select:none;-webkit-user-select:none}
.tile i{transition:background-color .5s}
.tile:before,.tile:after{transition:background-color .5s}
html[data-egg=up] .tile i{background:#7b1113}
html[data-egg=up] .tile .top,html[data-egg=up] .tile .flap-top{background:#8e1a1c}
html[data-egg=up] .tile:before,html[data-egg=up] .tile:after{background:#014421}
html[data-egg=up] .tile{filter:drop-shadow(0 3px 0 #014421)}
html[data-egg=up] .score-name{visibility:hidden}
.tile{container-type:inline-size}
.tile.egg-word i b{font-size:min(calc(var(--tile-h)*.42),19cqw);letter-spacing:.01em}
.egg-note{position:absolute;z-index:6;top:calc(env(safe-area-inset-top) + 8px);left:var(--gutter);right:var(--gutter);display:flex;align-items:center;gap:2px;min-height:48px;padding:2px 2px 2px 14px;border-radius:14px;background:#7b1113;color:var(--paper);box-shadow:0 4px 0 #014421;animation:egg-in .5s var(--ease)}
.egg-note p{margin:0;flex:1;min-width:0;font-size:14px;font-weight:500;line-height:1.2}
.egg-note a{display:inline-flex;align-items:center;gap:4px;min-height:44px}
.egg-note strong{font-weight:700;white-space:nowrap;text-decoration:underline;text-decoration-color:#ffffff70;text-underline-offset:3px}
.egg-note a:hover strong{text-decoration-color:currentColor}
.egg-note svg{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.egg-more{display:none}
.egg-close{flex:none;width:44px;height:44px;border-radius:11px;display:grid;place-items:center}
.egg-close:hover{background:#ffffff18}
.egg-close svg{width:18px;height:18px}
.egg-note :focus-visible{outline-color:var(--ball);outline-offset:-3px}
@keyframes egg-in{from{transform:translateY(-14px);opacity:0}}
@media (min-width:720px){
  .egg-note{left:50%;right:auto;translate:-50% 0;width:max-content;max-width:calc(100vw - 2 * var(--gutter) - 360px)}
}
@media (min-width:1100px){.egg-more{display:inline}}

/* Small cream text over the sky: a firmer navy halo, and a size up on wide screens. */
.score-note,.skip-button{text-shadow:0 0 3px rgba(11,44,86,.9),0 1px 2px rgba(11,44,86,.75)}
@media (min-width:1024px){.score-note{font-size:13px!important}.skip-button{font-size:14px}}
/* Narrowest phones: the note steps down a size so it stays on one line. */
@media (max-width:359px){.egg-note{padding-left:11px}.egg-note p{font-size:12.5px;white-space:nowrap}.egg-note a{gap:3px}}

/* The end screen. The court stays in view with Raffy at the net; the words stand in the sky like the title did. */
.ending{position:absolute;z-index:3;left:var(--gutter);right:var(--gutter);top:calc(env(safe-area-inset-top) + 60px);bottom:calc(var(--dock-space,150px) + 14px);display:flex;flex-direction:column;justify-content:space-between;gap:14px;color:var(--paper);pointer-events:none}
.ending>*{pointer-events:auto}
.end-head{transform:rotate(-3.5deg);transform-origin:left top}
.end-title{margin:0;font:italic 800 min(27vw,13.6svh,150px)/.8 'Barlow Condensed',sans-serif;letter-spacing:-.02em;color:var(--paper);text-shadow:.035em .04em 0 var(--red)}
.end-title span{color:var(--ball)}
.end-line{margin:.5em 0 0;max-width:12em;font:italic 700 clamp(22px,7.2vw,34px)/1.02 'Barlow Condensed',sans-serif;letter-spacing:.005em;color:var(--paper);text-shadow:0 2px 0 rgba(11,44,86,.45),0 0 12px rgba(11,44,86,.35)}
.end-foot{display:grid;justify-items:center;text-align:center;gap:10px}
.end-credit{margin:0;font-size:12px;line-height:1.45;text-shadow:0 0 3px rgba(11,44,86,.95),0 1px 3px rgba(11,44,86,.8)}
.end-credit strong{font-weight:700}
.end-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px 8px;width:min(360px,100%)}
.end-actions button,.end-actions a{display:flex;align-items:center;justify-content:center;gap:7px;min-height:50px;padding:4px 10px;border-radius:13px;font:italic 800 21px/1 'Barlow Condensed',sans-serif;letter-spacing:.005em;white-space:nowrap}
.end-actions svg{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
#replay{background:var(--ball);color:var(--navy);box-shadow:0 4px 0 #a6b400}
#replay:hover{background:#f1ff5c}
#share{background:var(--paper);color:var(--navy);box-shadow:0 4px 0 rgba(11,44,86,.38)}
#share:hover{background:#fff}
.end-actions a{grid-column:1/-1;background:var(--red-deep);color:var(--paper);box-shadow:0 4px 0 #6f0e06}
.end-actions a:hover{background:#c92315}
.end-actions button:active,.end-actions a:active{transform:translateY(3px);box-shadow:0 1px 0 rgba(11,44,86,.38)}
.end-actions :focus-visible{outline-color:var(--paper)}
#share-status{margin:0;min-height:16px;font-size:12px;font-weight:700;text-shadow:0 0 3px rgba(11,44,86,.95),0 1px 3px rgba(11,44,86,.8)}
#share-status:empty{min-height:0;margin-top:-10px}
.world[data-phase=end] .end-head{animation:end-in .7s var(--ease) both}
.world[data-phase=end] .end-line{animation:end-up .6s .22s var(--ease) both}
.world[data-phase=end] .end-foot{animation:end-up .5s .38s var(--ease) both}
@keyframes end-in{from{opacity:0;transform:rotate(-9deg) translateY(22px) scale(.92)}}
@keyframes end-up{from{opacity:0;transform:translateY(14px)}}
@media (max-aspect-ratio:1/1) and (max-height:600px){
  .ending{top:calc(env(safe-area-inset-top) + 54px);bottom:calc(var(--dock-space,120px) + 8px);gap:8px}
  .end-line{font-size:21px;margin-top:.4em}
  .end-foot{gap:7px}
  .end-credit{font-size:11px}
  .end-actions{gap:8px 6px}
  .end-actions button,.end-actions a{min-height:44px;font-size:19px}
}
@media (max-aspect-ratio:1/1) and (min-width:600px){
  .ending{left:max(var(--gutter),calc(50% - 300px));right:max(var(--gutter),calc(50% - 300px))}
}
@media (min-aspect-ratio:1001/1000){
  .ending{right:auto;width:min(46vw,660px);top:clamp(56px,9.5vh,110px);justify-content:flex-start;gap:clamp(18px,5vh,56px)}
  .end-title{font-size:clamp(84px,min(11vw,19vh),220px)}
  .end-line{font-size:clamp(26px,min(2.9vw,5.2vh),50px);margin-top:.45em}
  .end-foot{justify-items:start;text-align:left}
  .end-credit{font-size:14px}
  .end-actions{width:min(420px,100%)}
  .end-actions button,.end-actions a{min-height:54px;font-size:23px}
}
@media (min-aspect-ratio:1001/1000) and (max-height:520px){
  .ending{top:52px;gap:10px}
  .end-title{font-size:clamp(52px,15vh,78px)}
  .end-line{font-size:20px}
  .end-actions{grid-template-columns:repeat(3,auto);width:auto}
  .end-actions a{grid-column:auto}
  .end-actions button,.end-actions a{min-height:44px;font-size:18px}
}

/* ---------- Polish pass. One yellow action per screen, objects with weight, and an end screen composed to be kept. ---------- */
@media (min-aspect-ratio:1001/1000){.world{--board-w:clamp(176px,17vw,264px)}}
.intro h1,.end-title{text-shadow:.035em .04em 0 var(--red),.078em .088em 0 rgba(8,30,84,.2)}

/* The scoreboard is an object on the fence, not text floating in the sky. */
.scoreboard{gap:0 5px;padding:4px 6px 6px;border-radius:13px;background:var(--navy);box-shadow:0 4px 0 rgba(6,26,54,.42);transition:background-color .5s}
.scoreboard .score-name,.scoreboard .score-note{text-shadow:none}
.scoreboard .score-name{margin-bottom:2px;line-height:17px}
.scoreboard .score-note{margin:5px 0 0;color:#fff9eadb;line-height:14px}
.tile{filter:none}
.tile .top{box-shadow:inset 0 -1px 0 rgba(90,8,2,.55)}
html[data-egg=up] .scoreboard{background:#014421}
html[data-egg=up] .tile{filter:none}
html[data-egg=up] .tile .top{box-shadow:inset 0 -1px 0 rgba(40,4,6,.6)}
.skip-button{display:inline-flex;align-items:center;gap:5px;padding:0 2px;font-weight:600;text-decoration:none}
.skip-button span{text-decoration:underline;text-underline-offset:4px}
.skip-button svg{width:13px;height:13px;flex:none;fill:currentColor;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 1px 1px rgba(11,44,86,.8))}
.skip-button:hover{color:var(--ball)}

/* Intro. The line under the title leans with it. */
@media (max-aspect-ratio:1/1){
  .intro-under{font:italic 700 clamp(20px,6vw,28px)/1 'Barlow Condensed',sans-serif;margin-top:calc(min(22vw,11.8svh,128px)*.16);transform:rotate(-3.5deg);transform-origin:left top;text-shadow:0 2px 0 rgba(8,30,84,.45)}
}
@media (max-aspect-ratio:1/1) and (max-height:700px),(max-width:350px){.intro-under{margin-top:8px;font-size:20px}}
@media (min-aspect-ratio:1001/1000){.intro-under{transform:rotate(-3.5deg);transform-origin:left top;text-shadow:0 2px 0 rgba(90,8,2,.45)}}

/* The game is the invitation, so it gets the yellow. The song sits right under it as the player it turns into. */
.quiet-button{display:flex;align-items:center;min-height:52px;padding:0 28px 1px;border-radius:15px;background:var(--ball);color:var(--navy);box-shadow:0 4px 0 #a6b400,0 10px 18px rgba(8,30,84,.22);font:italic 800 26px/1 'Barlow Condensed',sans-serif;letter-spacing:.005em}
.quiet-button:hover{background:#eefc4c}
.quiet-button:active{box-shadow:0 1px 0 #a6b400}
@media (max-aspect-ratio:1/1){.quiet-button:active{transform:translateX(-50%) translateY(3px)}}
@media (min-aspect-ratio:1001/1000){.quiet-button:active{transform:translateY(3px)}}
.serve-button{justify-content:flex-start;gap:12px;padding:0 12px 0 8px;background:var(--paper);box-shadow:0 4px 0 rgba(8,30,84,.3);font-size:25px}
.serve-button:hover{background:#fff}
.serve-button:active{box-shadow:0 1px 0 rgba(8,30,84,.3)}
.serve-button svg{box-sizing:border-box;width:44px;height:44px;padding:11px 10px 11px 13px;border-radius:50%;background:var(--red);fill:var(--paper);flex:none}
.serve-note{margin-left:auto;padding:4px 8px;border-radius:999px;background:var(--navy);color:var(--paper);font:700 11px/1 'DM Sans',sans-serif;letter-spacing:0}
.serve-button:focus-visible{outline-color:var(--ball)}
.player{box-shadow:0 4px 0 rgba(8,30,84,.3)}
@media (max-aspect-ratio:1/1) and (max-height:700px){.serve-button{font-size:23px}}
@media (min-aspect-ratio:1001/1000) and (max-height:520px){.serve-button svg{width:36px;height:36px;padding:9px 8px 9px 11px}.quiet-button{min-height:44px;font-size:22px}}

/* Album and vinyl are one rail. */
.routes{gap:0;border-radius:14px;background:var(--navy);box-shadow:0 4px 0 rgba(6,26,54,.42);overflow:hidden}
.routes button{background:none;border-radius:0}
.routes button+button{box-shadow:inset 1px 0 0 rgba(255,249,234,.17)}
.routes button:hover{background:#123d73}
.routes button:focus-visible{outline-offset:-4px;border-radius:12px}
.routes span{color:#fff9eacc}

/* The coaching line is a label on the court, readable over paint, lines and the racket. */
.court-help{text-shadow:none}
.court-help span{display:inline-block;padding:7px 14px 8px;border-radius:999px;background:rgba(11,44,86,.88);font-size:13.5px;line-height:1.2}

/* End screen. The words stand in the sky above the fence, Raffy at the net, the record and the ways on below. */
/* The line under the title keeps a thin navy outline, so it reads on cloud and sunset as well as on blue. */
.end-line{text-shadow:1px 0 0 #0b2c56,-1px 0 0 #0b2c56,0 1px 0 #0b2c56,0 -1px 0 #0b2c56,1px 1px 0 #0b2c56,-1px -1px 0 #0b2c56,1px -1px 0 #0b2c56,-1px 1px 0 #0b2c56,0 3px 0 rgba(8,30,84,.6),0 0 12px rgba(8,30,84,.5)}
.end-foot{position:relative;gap:9px}
.end-credit{display:inline-flex;align-items:center;gap:10px;padding:5px 15px 5px 5px;border-radius:13px;background:rgba(11,44,86,.92);box-shadow:0 4px 0 rgba(6,26,54,.42);font-size:12px;line-height:1.38;text-align:left;text-shadow:none}
.end-credit img{display:block;width:40px;height:40px;border-radius:8px;flex:none}
.end-actions button,.end-actions a{min-height:48px}
.end-actions a{box-shadow:0 4px 0 #6f0e06}
#share-status,#share-status:empty{position:absolute;left:50%;bottom:calc(100% + 10px);width:max-content;max-width:100%;min-height:0;margin:0;padding:8px 15px;border-radius:999px;background:var(--paper);color:var(--navy);box-shadow:0 4px 0 rgba(8,30,84,.3);font-size:13px;font-weight:700;line-height:1.25;text-align:center;text-shadow:none;transform:translateX(-50%);transition:opacity .25s,transform .4s var(--ease)}
#share-status:empty{opacity:0;transform:translateX(-50%) translateY(8px);pointer-events:none}
@media (max-aspect-ratio:1/1) and (max-height:600px){
  .end-credit{padding:5px 12px;font-size:11px}
  .end-credit img{display:none}
  .end-actions button,.end-actions a{min-height:44px}
}
@media (min-aspect-ratio:1001/1000){
  .ending{width:min(62vw,940px);top:clamp(50px,9.5vh,110px);bottom:calc(var(--dock-space,150px) + 18px);justify-content:space-between;gap:12px}
  .end-title{white-space:nowrap;font-size:clamp(64px,min(11.4vw,calc((var(--sky-h,360px) - clamp(50px,9.5vh,110px))*.62)),236px)}
  .end-title br{display:none}
  .end-line{max-width:none;margin-top:.4em}
  .end-foot{width:clamp(300px,29vw,430px);justify-items:start}
  .end-actions{width:100%}
  #share-status,#share-status:empty{left:0;transform:none}
  #share-status:empty{transform:translateY(8px)}
}
@media (min-aspect-ratio:1001/1000) and (max-height:520px){
  .ending{top:48px;bottom:calc(var(--dock-space,110px) + 8px);gap:6px}
  .end-title{font-size:clamp(44px,13vh,64px)}
  .end-line{font-size:19px}
  .end-foot{width:auto;gap:6px}
  .end-credit{padding:4px 11px;font-size:11px;box-shadow:none}
  .end-credit img{display:none}
  .end-actions button,.end-actions a{min-height:44px}
}

/* Phones: the title steps down so "Pleasure." clears the scoreboard, and the caption clears the skip link. */
.scoreboard{padding:3px 5px 5px}
.scoreboard .score-name{line-height:16px}
.scoreboard .score-note{margin:4px 0 0;line-height:13px}
@media (max-aspect-ratio:1/1) and (min-height:701px) and (min-width:351px){
  .world:not(.playing) .intro{top:calc(env(safe-area-inset-top) + 92px)}
  .world:not(.playing) .intro h1{font-size:min(20.5vw,11.8svh,128px)}
  .world[data-phase=play] .match-caption{top:186px}
}
@media (max-aspect-ratio:1/1) and (max-height:700px){.intro-copy{display:none}}
@media (max-width:350px){
  .world:not(.playing) .intro{top:calc(env(safe-area-inset-top) + 88px)}
  .world:not(.playing) .intro h1{font-size:62px}
  .intro-copy,.skip-button svg{display:none}
}
@media (max-aspect-ratio:1/1) and (max-height:700px){
  .end-title{font-size:min(27vw,12svh,150px)}
  .end-line{max-width:7.2em}
}
@media (max-aspect-ratio:1/1) and (max-height:600px){
  .end-title{font-size:min(27vw,11svh,150px)}
  .end-line{font-size:19px}
}

/* Release fixes. One Spotify action on the end screen: the big one. The player keeps its own everywhere else. */
.world[data-phase=end] .full-song{display:none}
/* On phones the UP SAMASKOM note lies exactly over the album and vinyl rail for its few seconds,
   so it never covers the listen links, the scoreboard, the Play buttons or the player. */
@media (max-width:719px){
  .egg-note{top:auto;bottom:calc(env(safe-area-inset-bottom) + 12px);left:12px;right:12px;min-height:46px;padding:0 1px 0 14px;animation-name:egg-up}
  .egg-note a{min-height:40px}
}
@media (max-width:359px){.egg-note{padding-left:11px}}
@media (max-width:719px) and (max-aspect-ratio:1/1) and (max-height:700px){.egg-note{min-height:44px}}
@media (max-width:719px) and (max-aspect-ratio:1/1) and (min-width:600px){.egg-note{left:50%;right:auto;width:520px;translate:-50% 0}}
@media (max-width:719px) and (min-aspect-ratio:1001/1000){
  .egg-note{left:var(--gutter);right:auto;width:clamp(300px,29vw,430px);bottom:calc(env(safe-area-inset-bottom) + 20px)}
}
@media (max-width:719px) and (min-aspect-ratio:1001/1000) and (max-height:520px){
  .egg-note{bottom:8px;min-height:40px}
  .egg-note a,.egg-close{min-height:0;height:40px}
}
@keyframes egg-up{from{transform:translateY(12px);opacity:0}}
