@font-face{font-family:Barlow;src:url("fonts/BarlowCondensed-Black.ttf") format("truetype");font-weight:900;font-display:swap}
@font-face{font-family:Barlow;src:url("fonts/BarlowCondensed-BlackItalic.ttf") format("truetype");font-weight:900;font-style:italic;font-display:swap}
@font-face{font-family:Inter;src:url("fonts/Inter.ttf") format("truetype");font-weight:100 900;font-display:swap}
:root{color-scheme:dark;--ink:#102d31;--panel:#14363a;--line:#496164;--cream:#fff9e9;--muted:#dad8c6;--yellow:#ffce63;--mint:#8de5b6;font-family:Inter,"Helvetica Neue",Arial,sans-serif;color:var(--cream);background:#0b2023}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 76% 12%,#204246 0%,#0b2023 60%);min-height:100svh}button,a,summary{-webkit-tap-highlight-color:transparent}button,a{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,summary:focus-visible,canvas:focus-visible{outline:3px solid var(--yellow);outline-offset:3px}button:disabled{opacity:.58;cursor:default}button[hidden],.overlay[hidden],img[hidden]{display:none}
.nav,main{width:min(1110px,calc(100% - 56px));margin:auto}.nav{display:flex;justify-content:space-between;align-items:center;height:73px;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center}.brand img{height:47px;width:auto}.home-link{color:var(--cream);font-size:.93rem;text-underline-offset:4px}.heading{display:flex;align-items:end;justify-content:space-between;gap:12px;margin:26px 0 15px}.eyebrow,.rack h2{font-size:.77rem;letter-spacing:.14em;text-transform:uppercase;font-weight:800}.eyebrow{color:var(--yellow);margin:0 0 6px}.heading h1,.sheet h2{margin:0;font-family:Barlow,Impact,"Arial Narrow",sans-serif;font-weight:900;text-transform:uppercase;letter-spacing:-.015em;line-height:.98}.heading h1{font-size:clamp(1.85rem,4.2vw,3rem)}.actions{display:flex;gap:7px;flex-shrink:0}.actions button{white-space:nowrap}.actions button,.sheet button:not(.primary){border:1px solid #927d5c;background:var(--panel);color:var(--cream);border-radius:9px;padding:8px 12px;font-size:.9rem;font-weight:650;min-height:38px}.actions button:hover:not(:disabled),.sheet button:not(.primary):hover{background:#255056}
.console{border:1px solid #9a8059;border-radius:17px;overflow:hidden;box-shadow:0 10px 36px #0003;background:var(--panel)}.hud{display:flex;justify-content:space-between;align-items:center;min-height:40px;padding:8px 17px;background:#102d31;color:var(--cream);font:650 .9rem ui-monospace,Menlo,monospace;font-variant-numeric:tabular-nums}.hud>div{display:flex;align-items:center;gap:11px}.divider{color:#bb9f73}#health{color:#ff8e83;letter-spacing:1px}.view{height:clamp(290px,49vh,530px);position:relative;background:#1b3c47;overflow:hidden}canvas{width:100%;height:100%;touch-action:none;display:block}.overlay{position:absolute;inset:0;isolation:isolate;display:flex;align-items:center;padding:clamp(20px,4.4vw,64px);background:linear-gradient(90deg,#09252bf2,#102d31bd 46%,#16383d12 91%);overflow:auto}.sheet{width:min(52%,470px);position:relative;z-index:1}.sheet h2{font-size:clamp(2rem,4.2vw,4rem);text-wrap:balance}.sheet>p:not(.eyebrow){font-size:clamp(.97rem,1.5vw,1.13rem);line-height:1.5;margin:12px 0 16px;color:#f5ebdb}.sheet .eyebrow{margin-bottom:9px}.primary{padding:12px 20px;border-radius:8px;background:var(--yellow);border:1px solid #e5b14e;color:#28202a;font-weight:800;box-shadow:0 3px 0 #a66f2d;margin-right:8px;min-height:44px}.primary:hover:not(:disabled){background:#ffda82}#cover-hero{height:min(83%,350px);position:absolute;right:12%;bottom:6%;filter:drop-shadow(0 9px 10px #39222055);pointer-events:none}
.hint{min-height:66px;display:flex;align-items:center;gap:13px;padding:11px 17px;border-top:1px solid #776747}.hintmark{display:grid;place-items:center;flex:0 0 36px;height:36px;border-radius:9px;background:#29484a;color:var(--yellow);font-size:1.5rem}.hint strong{font-size:.98rem}.hint p{color:var(--muted);font-size:.95rem;line-height:1.3;margin:2px 0 0}.touch{display:none;justify-content:space-between;padding:6px 10px;gap:5px;background:#0e2b2f}.touch div{display:flex;gap:7px}.touch button{font:800 1.05rem/1 ui-monospace,monospace;display:grid;place-items:center;width:47px;height:42px;color:var(--cream);background:#254449;border:1px solid #897853;border-radius:8px;touch-action:none;user-select:none;-webkit-user-select:none}.touch button.active{color:var(--ink);background:var(--yellow)}.rack{margin:21px 0 15px}.rack-head{display:flex;justify-content:space-between;align-items:center;margin:0 0 9px}.rack h2{margin:0;letter-spacing:.1em}.rack-head>span{color:var(--muted);font-size:.85rem}#sounds{padding:0;margin:0;list-style:none;display:grid;grid-template-columns:repeat(10,1fr);gap:5px}#sounds li{padding:6px 1px 5px;border:1px solid #486060;background:#193538;border-radius:7px;text-align:center;color:#cecdbd;min-width:0}#sounds li.active{border-color:#bc984e;color:var(--yellow);background:#39433b}#sounds img{display:block;margin:auto;width:26px;height:27px;object-fit:contain;filter:grayscale(1);opacity:.55}#sounds .active img{filter:none;opacity:1}#sounds span{display:block;margin-top:4px;font-size:.77rem;line-height:1.1}.instructions{border-top:1px solid var(--line);margin:0 0 30px;color:var(--muted);font-size:.95rem}.instructions summary{cursor:pointer;min-height:44px;padding:12px 2px;font-weight:650;color:var(--cream)}.instructions p{max-width:760px;line-height:1.5}.sr-only{clip-path:inset(50%);position:absolute;width:1px;height:1px;overflow:hidden}
@media(pointer:coarse),(max-width:760px){.touch{display:flex}}
@media(max-width:650px){.nav,main{width:calc(100% - 20px)}.nav{height:51px}.brand img{height:33px}.heading{margin:12px 2px}.heading h1{font-size:1.55rem}.eyebrow{font-size:.7rem}.actions{gap:4px}.actions button{padding:6px 8px;font-size:.79rem;min-height:36px}.view{height:clamp(265px,42svh,410px)}.console{border-radius:12px}.hud{font-size:.78rem;padding:7px 10px;min-height:34px}.hud>div{gap:6px}.overlay{padding:18px;background:linear-gradient(90deg,#09252bf4,#102d31da 53%,#16383d5a 90%)}.sheet{width:73%;max-width:340px}.sheet h2{font-size:clamp(1.7rem,7.5vw,2.6rem)}.sheet>p:not(.eyebrow){font-size:.94rem;line-height:1.35;margin:9px 0 13px}.sheet .eyebrow{font-size:.72rem}.primary{padding:10px 13px;font-size:.94rem}.sheet button:not(.primary){font-size:.82rem;padding:8px 7px}.hint{min-height:65px;padding:8px 10px;gap:9px}.hint p{font-size:.88rem}.hint strong{font-size:.91rem}.hintmark{flex-basis:28px;height:30px}#cover-hero{height:53%;right:-3%;bottom:7%;opacity:.97}#sounds{grid-template-columns:repeat(5,1fr);gap:4px}.rack{margin:14px 0}.rack-head{margin-bottom:7px}#sounds li{padding:5px 2px 6px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:3px}#sounds img{width:22px;height:23px;margin:0}#sounds span{max-width:100%;overflow-wrap:anywhere;margin:0;font-size:.69rem;line-height:1.15}}
@media(max-height:530px) and (orientation:landscape){.nav{height:31px}.brand img{height:24px}.heading{margin:7px 0}.heading h1{font-size:1.35rem}.heading .eyebrow{display:none}.view{height:55svh;min-height:150px}.hint{min-height:38px;padding:4px 10px}.touch{position:absolute;left:0;right:0;bottom:0;z-index:2;background:transparent;pointer-events:none}.touch button{pointer-events:auto;opacity:.85}.console{position:relative}.console:has(.touch) .hint{padding-left:125px;padding-right:175px}.overlay{padding:8px 20px}.sheet{width:70%}.sheet h2{font-size:1.7rem}.sheet>p:not(.eyebrow){font-size:.9rem;margin:5px 0}.primary{min-height:34px;padding:7px 11px}.rack{margin-top:10px}}

body:target .overlay.loading { visibility: hidden; }
#world:focus-visible { outline-offset: -3px; }


/* The record sleeve and set list replace the playfield when the round ends. */
main:has(.round-report:not([hidden])) > :is(.console, .rack, .instructions, .heading) { display: none; }
.round-report[hidden], .round-report [hidden] { display: none; }
.round-report {
  margin: clamp(12px, 2vw, 24px) auto 2rem;
  overflow: hidden;
  border: 1px solid #a58a5f;
  border-radius: 14px;
  background: #123236;
  box-shadow: 0 14px 36px #07161988;
}
.report-head {
  display: grid;
  grid-template-columns: minmax(160px, 29%) minmax(0, 1fr);
  grid-template-areas: "cover headline" "cover stats" "cover replay";
  align-items: center;
  gap: 13px clamp(20px, 4vw, 46px);
  padding: clamp(20px, 3.2vw, 36px);
  background: linear-gradient(112deg, #354f48, #214547 38%, #133337 80%);
  border-bottom: 3px double #b99a63;
}
.report-art {
  position: relative;
  grid-area: cover;
  width: 100%;
  max-width: 274px;
  justify-self: center;
  aspect-ratio: 1.32;
  isolation: isolate;
}
.report-disc {
  position: absolute;
  height: 90%;
  aspect-ratio: 1;
  right: 1%;
  top: 5%;
  border-radius: 50%;
  background: radial-gradient(circle, #d5ab72 0 3%, #406d65 3.5% 22%, transparent 23%), repeating-radial-gradient(circle,#1f3030 0 2px,#334647 2.7px,#243333 3.4px);
  box-shadow: 3px 5px 9px #07191c99;
}
.report-disc img { width: 100%; height: 100%; object-fit: contain; }
.report-sleeve {
  position: absolute;
  inset: 0 auto 0 0;
  aspect-ratio: 1;
  overflow: hidden;
  transform: rotate(-3deg);
  border: 1px solid #d7c397;
  box-shadow: 4px 7px 9px #07191c99;
  background: linear-gradient(0deg, #122b2c 0%, #122b2cd4 13%, transparent 53%), url("art/menu-portrait.webp") center 51% / cover;
}
.sleeve-logo { display: block; width: 66%; margin: 6% auto 0; }
.report-sleeve span {
  position: absolute;
  left: 8%; bottom: 7%;
  color: #ffdc86;
  font: italic 900 clamp(1.55rem, 3.3vw, 2.65rem)/.9 Barlow, Impact, sans-serif;
  text-transform: uppercase;
  text-shadow: 1px 2px #312d25;
}
.report-headline { grid-area: headline; align-self: end; }
.report-headline .eyebrow { color: #f1d398; margin: 0 0 5px; letter-spacing: .12em; }
.report-head h1 {
  margin: 0;
  font: italic 900 clamp(2.2rem, 5.4vw, 4.5rem)/.96 Barlow, Impact, sans-serif;
  color: #fff4d6;
  text-wrap: balance;
  scroll-margin-top: 1rem;
}
.report-head h1:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.report-stats {
  grid-area: stats;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 9px clamp(16px, 4vw, 40px);
  margin: 0;
}
.report-stats dt { color: #e0e0cc; font-size: .85rem; font-weight: 600; }
.report-stats dd { margin: 2px 0 0; color: #f4eedb; font: 900 1.65rem/1 Barlow, sans-serif; font-variant-numeric: tabular-nums; }
.report-stats div:first-child dd { color: #ffd477; font-size: clamp(2.2rem, 3.6vw, 3.2rem); }
.report-actions { grid-area: replay; align-self: start; }
.report-actions .primary { margin: 0; min-height: 44px; }
.report-next { display: flex; align-items: baseline; gap: .85rem; padding: 13px clamp(16px, 3.2vw, 36px); background: #193f40; border-bottom: 1px solid #526861; }
.report-next strong { flex: none; color: #ffe1a1; font-size: .91rem; }
.report-next p { margin: 0; font-size: .95rem; line-height: 1.45; color: #fff9e7; }
.report-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.report-collection, .report-sounds { padding: clamp(16px, 2.7vw, 30px); }
.report-sounds { border-left: 1px solid #465e5a; background: #102b30; }
.report-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: .65rem; margin-bottom: 11px; }
.report-section-head h3 { margin: 0; font: 900 1.65rem/1.1 Barlow, sans-serif; color: #fff2d2; }
.report-section-head > span { color: #cfd7c9; text-align: right; font-size: .85rem; font-weight: 650; }
.report-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 0; padding: 0; list-style: none; }
.report-items li { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 0; border-top: 1px solid #466460; }
.report-items img { flex: none; width: clamp(27px, 2.8vw, 36px); height: 38px; object-fit: contain; filter: grayscale(1); opacity: .65; }
.report-items :is(.found, .partial) img { filter: none; opacity: 1; }
#report-secret:not(.found) img { filter: grayscale(1) brightness(.15) drop-shadow(0 0 1px #d9d3b1); opacity: .95; }
.report-items strong, .report-items small { display: block; }
.report-items strong { font-size: .96rem; line-height: 1.25; }
.report-items small { margin-top: 2px; font-size: .86rem; line-height: 1.36; color: #e1c6a0; }
.report-items .found small { color: #b3e8cc; }
.report-items .partial small { color: #f8d58c; }
.report-track-list { padding: 9px 0 0; border-top: 1px solid #43615d; }
.report-track-list + .report-track-list { margin-top: 11px; }
.report-track-list h4, #report-track-label { color: #b3e8cc; margin: 0; font-size: .88rem; font-weight: 750; }
#report-missing-row h4 { color: #f0cfa1; }
.report-track-list p { margin: 4px 0 0; color: #efeedf; font-size: .93rem; line-height: 1.5; }
.report-audio { margin-bottom: 12px; }
#report-track-label { display: block; margin-bottom: 6px; color: #fff0c8; }
.report-audio audio { display: block; width: 100%; min-width: 0; height: 42px; }
@media (max-width: 760px) {
  .report-body { grid-template-columns: 1fr; }
  .report-sounds { border-left: 0; border-top: 1px solid #465e5a; }
}
@media (max-width: 560px) {
  .report-head {
    grid-template-columns: minmax(84px, 29%) minmax(0, 1fr);
    grid-template-areas: "cover headline" "stats stats" "replay replay";
    gap: 13px 14px; padding: 18px 15px;
  }
  .report-headline { align-self: center; }
  .report-headline .eyebrow { font-size: .7rem; letter-spacing: .08em; }
  .report-head h1 { font-size: clamp(1.85rem, 8vw, 2.7rem); }
  .report-sleeve span { font-size: clamp(.9rem, 4.5vw, 1.4rem); }
  .report-stats { justify-content: space-between; padding: 9px 0 0; border-top: 1px solid #58716a; }
  .report-stats dd { font-size: 1.45rem; }
  .report-actions .primary { width: 100%; }
  .report-next { display: block; padding: 11px 15px; }
  .report-next p { margin-top: 3px; }
  .report-items { column-gap: 12px; }
  .report-items li { gap: 6px; }
  .report-items img { width: 25px; height: 33px; }
}
@media (max-width: 350px) {
  .report-collection, .report-sounds { padding: 14px; }
  .report-items { grid-template-columns: 1fr; gap: 0; }
}

.mic-rhythm[hidden] { display: none; }
#stage-mic-target {display:none;position:absolute;z-index:1;transform:translate(-50%,-50%);min-width:44px;min-height:44px;background:none;border:0;border-radius:16px;cursor:pointer;touch-action:manipulation}
#stage-mic-target:not([hidden]) {display:block}
#stage-mic-target:focus-visible {outline:3px solid #ffd781;outline-offset:2px}
.mic-rhythm {
  position: absolute;
  z-index:2;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: min(285px, calc(100% - 16px));
  padding: 7px 10px;
  border: 2px solid #c7a168;
  border-radius: 9px;
  background: #102b31f7;
  box-shadow: 0 3px 0 #372e25;
  text-align: center;
}
.mic-row {display:grid;grid-template-columns:2.5rem minmax(0,1fr) auto;align-items:center;gap:4px 8px}
.mic-cue {display:contents}
.mic-name {grid-column:2;grid-row:1;text-align:left;font:700 .94rem/1.15 Inter,sans-serif;color:#fff0c9}
#mic-beat {
  grid-row:1;grid-column:1;display:grid;place-items:center;height:1.1em;border-inline-end:1px solid #d0ab6e55;
  font:900 clamp(2.1rem,5.4vw,2.8rem)/1 Barlow,system-ui,sans-serif;
  color:#e2ddc8;letter-spacing:-.04em;font-variant-numeric:tabular-nums;
}
.mic-rhythm[data-phase=listen] #mic-beat {color:#ffdf8d}
.mic-rhythm #mic-tap:disabled {background:#263e40;border-color:#637371;color:#a3b4ac;cursor:default}
.mic-rhythm:is([data-phase=listen],[data-phase=perform]) #mic-tap {visibility:hidden}
.mic-rhythm:is([data-phase=listen],[data-phase=perform]) .mic-name {grid-column:2 / 4}
.mic-rhythm[data-phase=pass],.mic-rhythm[data-phase=play] {border-color:#8ddfca}
.mic-rhythm[data-phase=pass] #mic-beat,.mic-rhythm[data-phase=play] .mic-name {color:#9af2d6}
.harbour-tempo .touch :is([data-press="left"],[data-press="right"],[data-press="down"],[data-press="jump"]) { visibility:hidden; }
.mic-rhythm.on-beat #mic-beat { color:#ffe29a;text-shadow:0 1px 9px #fabb5c45; }
.mic-lamps {grid-row:2;grid-column:1/-1;position:relative;display:grid;grid-template-columns:repeat(8,1fr);gap:0;padding:3px 0 6px;align-items:center;justify-items:center}
.mic-lamps::before {content:"";position:absolute;width:1px;top:7px;bottom:8px;left:50%;background:#d8c8a266}
.mic-lamps i {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  color: #c7cec2; background: #193639; border: 2px solid #61706a;
  font: 900 1rem Barlow, sans-serif;
}
.mic-lamps .hit { background: #9aebcc; border-color: #c5ffe6; color: #123d34; }
@media(prefers-reduced-motion:no-preference){
  .mic-lamps .hit {animation:harbour-tap-landing .18s ease-out}
  @keyframes harbour-tap-landing {
    0% {transform:scale(.90)}
    42% {transform:scale(1.14)}
    100% {transform:scale(1)}
  }
}
.mic-rhythm[data-phase=perform] .mic-lamps .hit {background:#314b41;border-color:#7ca390;color:#c3dbcd}
.mic-rhythm[data-phase=perform].on-beat .mic-lamps .next {background:#ffe091;border-color:#fff0bb;color:#30251c}
.mic-rhythm[data-phase=listen].on-beat .next {background:#ffd88c;color:#33281d}
.mic-rhythm[data-phase=play].on-beat #mic-beat {color:#aeffdf}
.mic-rhythm.on-beat .next { border-color: #ffdd90; box-shadow: 0 0 0 2px #836438; }
#mic-tap {grid-column:3;grid-row:1;min-height:44px;min-width:66px;touch-action:manipulation;background:#b6f0d7;border:1px solid #91cdad;border-radius:6px;color:#1a302b;font:750 .89rem Inter,sans-serif}
#mic-tap kbd { font: 750 .78rem Inter, sans-serif; border: 1px solid #9a7639; border-radius: 3px; padding: 0 3px; }
#mic-status { display: block; margin-top: 3px; color: #fff2ce; font-size: .83rem; line-height: 1.3; }

#personal-best{margin:5px 0 0;color:#ffe0a0;font:650 .87rem/1.3 Inter,sans-serif}

.touch .action-pads button{display:flex;align-items:center;justify-content:center;gap:5px;width:auto;min-width:63px;padding:4px 8px}
.touch .action-pads b{font:800 .92rem/1 ui-monospace,monospace;color:#ffda82}
.touch .action-pads span{font:650 .75rem/1 Inter,system-ui,sans-serif}
.touch .action-pads button.active b{color:inherit}
#cover-hero{width:auto}
#cover-hero[hidden]{display:none}
@media(max-height:530px) and (orientation:landscape){.touch .action-pads button{min-width:58px;padding:3px 5px}.touch .action-pads{gap:4px}}

.harbour-end-actions {display:flex;align-items:center;flex-wrap:wrap;gap:8px 16px}
.harbour-end-actions a,.harbour-end-actions button {display:inline-flex;align-items:center;justify-content:center;min-height:44px;font:inherit;font-weight:700}
.harbour-end-actions :is(a,button):not(.primary) {background:none;border:0;color:#f6e3b7;text-decoration:underline;text-underline-offset:.25em}
.harbour-end-actions .primary {text-decoration:none}
#mic-cursor {position:absolute;bottom:0;width:7px;height:3px;border-radius:2px;background:#ffe9ab;transform:translateX(-50%)}
.mic-rhythm[data-phase=pass] #mic-cursor {visibility:hidden}
@media(prefers-reduced-motion:reduce){#mic-cursor{display:none}}
.harbour-end-actions kbd {font:750 .85rem/1 ui-monospace,monospace;border:1px solid currentColor;border-radius:3px;padding:3px 5px;margin-right:7px}
.harbour-end-actions :is(a,button):not(.primary) kbd {display:none}
.report-head.has-new-routes {grid-template-areas:"cover headline" "cover routes" "cover replay" "cover stats"}
.harbour-unlocks {grid-area:routes;display:grid;grid-template-columns:1fr 1fr;gap:8px;max-width:640px}
.island-reward {overflow:hidden;border:1px solid #ab9166;border-radius:8px;background:#14383c;color:#fff4d8}
#harbour-report-head .report-sleeve {container-type:inline-size;width:75.76%}
#harbour-report-head .report-sleeve span {font-size:13.5cqw;right:4%}
.reward-picture {height:clamp(50px,7vw,82px);background-image:url("art/island-harbour-open.webp");background-size:300% auto;background-repeat:no-repeat;border-bottom:1px solid #a58c65}
.reward-shop {background-position:28% 77%}
.reward-ferry {background-position:26% 27%}
.island-reward>div:last-child {padding:7px 10px 9px}
.island-reward strong,.island-reward small {display:block}
.island-reward strong {font:900 1.25rem/1.05 Barlow,sans-serif;color:#ffe19b}
.island-reward small {margin-top:3px;font:550 .84rem/1.3 Inter,sans-serif;color:#e2e9dd}
@media(max-width:560px){
  .report-head.has-new-routes {grid-template-areas:"cover headline" "routes routes" "replay replay" "stats stats"}
  .reward-picture {height:58px}
}
.run-purse{display:inline-flex;align-items:center;gap:.35em;white-space:nowrap;color:#ffdf90;font-variant-numeric:tabular-nums}
@media(prefers-reduced-motion:no-preference){
  .round-report:not([hidden]):has(#report-record:not([hidden])) .report-disc{animation:harbour-record-sleeve .62s cubic-bezier(.2,.75,.25,1) both}
  @keyframes harbour-record-sleeve{from{transform:translateX(-19%) rotate(-17deg)}to{transform:none}}
}
.run-purse b{display:grid;place-items:center;width:1.4em;height:1.4em;border:1.5px solid #cf9e56;border-radius:50%;background:#775e34;line-height:1;color:#ffe3a0}
.exit-course:not([hidden]){display:inline-block;color:#ffdfa0;font-weight:700;text-decoration:underline;text-underline-offset:.2em;margin:8px 12px 8px 0}
#course-intro:not([hidden]){
  position:absolute;inset:0;display:grid;align-content:center;justify-items:center;gap:2px;
  pointer-events:none;text-align:center;isolation:isolate;
  background:radial-gradient(ellipse at center,#1031399c 0%,#10313952 30%,transparent 64%);
  animation:quay-sound-intro 2.15s both;
}
#course-intro img{width:clamp(100px,min(29vw,32vh),228px);height:auto;filter:drop-shadow(0 2px 2px #183639)}
#course-intro strong{
  color:#ffdd90;text-transform:uppercase;font:italic 900 clamp(3.4rem,min(14vw,17vh),6.5rem)/.98 Barlow,Impact,sans-serif;
  letter-spacing:.018em;-webkit-text-stroke:3px #173936;paint-order:stroke fill;
  text-shadow:0 3px #944c2b,0 5px #20594e,0 7px #163e38,0 9px 9px #142c35;
}
@keyframes quay-sound-intro{0%{opacity:0}12%,78%{opacity:1}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){#course-intro:not([hidden]){animation:quay-title-hold 2.15s step-end both}}
@keyframes quay-title-hold{from{opacity:1}to{opacity:0}}
@media(max-width:390px){.hud{gap:3px}.hud .divider{display:none}.hud>div{gap:4px}.run-purse{gap:3px}}

/* The first harbour frame already fills a phone or a phone-sized browser window. */
/* Every screen plays on the full-window stage. Phones and tablets add thumb
   pads; a desktop with a keyboard hides them further down. */
@media all{
  .harbour-course:has(#round-report[hidden]){
    --top:max(8px,env(safe-area-inset-top));
    --bottom:max(9px,env(safe-area-inset-bottom));
    --left:max(10px,env(safe-area-inset-left));
    --right:max(10px,env(safe-area-inset-right));
    height:100svh;height:100dvh;min-height:0;overflow:hidden;overscroll-behavior:none;
  }
  .harbour-course:has(#round-report[hidden]) main{
    position:relative;width:100%;height:100%;padding:0;margin:0;
  }
  .harbour-course #round-report[hidden]~.instructions,
  .harbour-course #round-report[hidden]~.rack{display:none}
  .harbour-course .console{position:absolute;inset:0;border:0;border-radius:0;box-shadow:none}
  .harbour-course .view{position:absolute;inset:0;height:100%;width:100%;min-height:0}
  .harbour-course .view:has(#overlay.loading){background:#286475 url("game-assets/city.webp") 14% center / cover no-repeat}
  .harbour-course .console:has(#overlay.loading) :is(.touch,.hud,.hint){visibility:hidden}
  .harbour-course:has(#overlay.loading) .heading{visibility:hidden}
  .harbour-course .view #overlay.loading{visibility:hidden}
  .harbour-course .view:has(#overlay.loading) #harbour-arriving{
    display:block;position:absolute;z-index:2;bottom:max(17%,var(--bottom));left:50%;transform:translateX(-50%);
    max-width:calc(100% - 24px);margin:0;padding:9px 16px;white-space:nowrap;border:1px solid #d7bb88;
    border-radius:8px;background:#15353cf0;color:#fff1c9;font:750 .94rem/1.2 Inter,sans-serif;
  }
  .harbour-course #world{width:100%;height:100%;outline:none}
  .harbour-course .hud,.harbour-course .touch,.harbour-course .hint,
  .harbour-course #round-report[hidden]~.instructions{user-select:none;-webkit-user-select:none}
  .harbour-course .hud{
    position:absolute;z-index:2;top:var(--top);left:var(--left);max-width:calc(100% - var(--left) - var(--right) - 100px);
    padding:6px 9px;min-height:34px;justify-content:flex-start;flex-wrap:wrap;gap:3px 9px;
    border:1px solid #e5ca924f;border-radius:7px;background:#102e32ea;line-height:1.18;font-size:clamp(.73rem,2.7vw,.86rem);
    pointer-events:none;
  }
  .harbour-course .hud>div{gap:7px;white-space:nowrap}
  .harbour-course .hud .divider{display:none}
  .harbour-course .hud .run-purse{order:3}
  .harbour-course:has(#round-report[hidden]) .heading{
    position:absolute;z-index:5;top:var(--top);right:var(--right);margin:0;padding:0;
  }
  .harbour-course:has(#round-report[hidden]) .heading>div:first-child{display:none}
  .harbour-course .actions{gap:4px}
  .harbour-course .actions button{
    display:grid;place-items:center;position:relative;width:44px;height:44px;padding:0;min-height:44px;
    border-radius:8px;background:#102e32ee;border-color:#d6b97b99;font-size:0;
  }
  .harbour-course .actions button::before{
    content:"";display:block;width:21px;height:21px;background:#ffe4a3;
    mask:var(--icon) center / contain no-repeat;-webkit-mask:var(--icon) center / contain no-repeat;
  }
  .harbour-course #pause{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h5v18H5zm9 0h5v18h-5z'/%3E%3C/svg%3E")}
  .harbour-course:has(#overlay:not([hidden])) #pause,.harbour-course #pause[data-encore-paused]{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3l15 9-15 9z'/%3E%3C/svg%3E")}
  .harbour-course #mute{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 9h4l6-5v16l-6-5H2z'/%3E%3Cpath d='M15 8q5 4 0 8m3-11q8 7 0 14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")}
  .harbour-course #mute[aria-pressed=true]{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 9h4l6-5v16l-6-5H2z'/%3E%3Cpath d='m16 9 6 6m0-6-6 6' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")}
  .harbour-course:has(#round-report[hidden]) .nav{display:none}
  .harbour-course:has(#round-report[hidden]):has(#overlay:not([hidden]),#overlay.loading) .nav{
    position:absolute;z-index:5;display:flex;left:var(--left);top:var(--top);
    width:auto;height:auto;margin:0;padding:0;border:0;
  }
  .harbour-course:has(#round-report[hidden]) .nav .brand{display:none}
  .harbour-course .language-switch button,.harbour-course .home-link{min-width:44px;min-height:44px}
  .harbour-course .home-link{display:grid;place-items:center;padding:0 8px;border-radius:6px;background:#123236de}
  .harbour-course .console .touch{
    display:flex;position:absolute;z-index:3;inset:auto var(--right) var(--bottom) var(--left);padding:0;
    background:transparent;pointer-events:none;align-items:flex-end;touch-action:none;
  }
  .harbour-course .touch div{gap:clamp(3px,1vw,8px);align-items:flex-end}
  .harbour-course .touch button{
    pointer-events:auto;opacity:1;min-width:44px;width:clamp(44px,12vw,57px);height:clamp(48px,7.8dvh,64px);
    border:1px solid #eacb83b5;border-bottom:3px solid #a27c45;border-radius:11px;
    background:#15353bea;color:#ffe7ae;box-shadow:0 2px 7px #112b2e66;
  }
  .harbour-course .touch .action-pads button{
    flex-direction:column;min-width:48px;width:clamp(50px,14vw,71px);
    gap:3px;padding:3px 1px;line-height:1;
  }
  .harbour-course .touch .action-pads b{font-size:1.05rem}
  .harbour-course .touch .action-pads span{max-width:100%;font-size:.65rem;line-height:1;overflow-wrap:anywhere}
  .harbour-course .touch button.active{background:#ffd477;color:#183437}
  .harbour-course .console .hint{
    position:absolute;z-index:2;top:calc(var(--top) + 59px);left:var(--left);right:var(--right);
    width:fit-content;max-width:min(430px,calc(100% - var(--left) - var(--right)));min-height:0;
    padding:7px 10px;color:#fff8df;gap:9px;align-items:center;
    background:#112d32de;border:1px solid #cfb37b70;border-radius:8px;pointer-events:none;
  }
  .harbour-course .hint .hintmark{display:none}
  .harbour-course .hint strong{font-size:.86rem}
  .harbour-course .hint p{font-size:.79rem;line-height:1.3}
  .harbour-course:has(#overlay:not([hidden])) .console :is(.touch,.hud,.hint){display:none}
  .harbour-course .mic-rhythm{z-index:3;top:calc(var(--top) + 60px);max-width:calc(100% - 2rem)}
  .harbour-course #mic-tap{min-height:44px}
  .harbour-course .console:has(#mic-rhythm:not([hidden])) .hint{display:none}
  .harbour-course .overlay{
    display:flex;align-items:flex-start;padding:calc(var(--top) + 61px) max(18px,var(--right)) var(--bottom) max(18px,var(--left));
    background:linear-gradient(0deg,#092a31fa 5%,#112d34ed 35%,#17373da3 66%,#102b3466);
    overscroll-behavior:contain;
  }
  .harbour-course .overlay[hidden]{display:none}
  .harbour-course .sheet{width:100%;max-width:460px;margin:auto 0 12px}
  .harbour-course .sheet h2{font-size:clamp(2rem,7vw,3.1rem)}
  .harbour-course .sheet>p:not(.eyebrow){font-size:.96rem;line-height:1.35;max-width:38ch}
  .harbour-course .sheet .series-controls{display:none}
  .harbour-course .sheet button,.harbour-course .exit-course:not([hidden]){min-height:44px}
  .harbour-course #cover-hero{top:12%;bottom:auto;right:5%;height:clamp(110px,32%,340px)}
  .harbour-course .overlay:has(#harbour-log[open]) #cover-hero{visibility:hidden}
  .harbour-course #harbour-log{margin:12px 0 0;padding:0;border-top:1px solid #91aba86b}
  .harbour-course #harbour-log[hidden]{display:none}
  .harbour-course #harbour-log>summary{min-height:44px;padding:12px 0;cursor:pointer;color:#f8e7bc;font-weight:650;font-size:.9rem}
  .harbour-course #harbour-log .rack,.harbour-course #harbour-log .instructions{margin:8px 0}
  .harbour-course #harbour-log #sounds{grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media (orientation:landscape){
  .harbour-course .console .hint{
    top:auto;bottom:var(--bottom);left:calc(var(--left) + 185px);right:calc(var(--right) + 151px);
    margin:0 auto;max-width:450px;min-width:0;max-height:100px;padding:5px 8px;
  }
  .harbour-course .hint strong{font-size:.81rem}
  .harbour-course .hint p{font-size:.75rem;line-height:1.2}
  .harbour-course .overlay{background:linear-gradient(90deg,#09272ff6,#123137d9 52%,#17373d4d 84%)}
  .harbour-course .sheet{width:64%;margin:auto 0}
  .harbour-course #cover-hero{top:auto;bottom:8%;right:max(8%,var(--right));height:69%}
}

/* Keyboard desktop: the same stage without thumb pads. The objective sits
   centred along the bottom edge and the cover keeps its key legend. */
@media (pointer:fine) and (min-width:721px) and (min-height:541px), (pointer:fine) and (min-width:961px){
  .harbour-course:has(#round-report[hidden]){--top:14px;--bottom:16px;--left:16px;--right:16px}
  .harbour-course .console .touch{display:none}
  .harbour-course .sheet .series-controls{display:flex}
  .harbour-course .console .hint{
    top:auto;bottom:var(--bottom);left:var(--left);right:var(--right);
    margin:0 auto;max-width:min(560px,calc(100% - 32px));max-height:none;padding:9px 14px;
  }
  .harbour-course .hint strong{font-size:.98rem}
  .harbour-course .hint p{font-size:.92rem;line-height:1.3}
}

#harbour-arriving{display:none}

.harbour-performing .console :is(.hud,.hint,.touch){visibility:hidden;pointer-events:none}
body.harbour-performing>#sv-menu-toggle{visibility:hidden;pointer-events:none}
body.harbour-performing .heading .actions #mute{display:inline-grid;place-items:center}

@media (orientation:landscape) and (max-height:520px){
  .harbour-course .mic-rhythm{
    top:calc(var(--top,8px) + 46px);left:var(--left,8px);transform:none;
    width:min(230px,38vw);padding:5px 7px;
  }
  .harbour-course .mic-row{gap:4px}
  .harbour-course .mic-cue{min-width:0}
  .harbour-course #mic-beat{font-size:clamp(1.8rem,5vw,2.15rem)}
  .harbour-course .mic-lamps{gap:2px}
  .harbour-course .mic-lamps i{width:20px;height:20px;font-size:.88rem}
  .harbour-course #mic-tap{min-width:44px;padding-inline:5px}
}

/* This pressing and its three stars belong to the run just finished. */
#harbour-report-head.graded .report-art{aspect-ratio:1.27}
#harbour-report-head.graded .report-disc{top:0;right:1%;height:98%}
#harbour-report-head.graded .report-sleeve{inset:auto auto 1% 0;width:51%;transform:rotate(-7deg)}
#harbour-report-head:not(.graded) .report-disc{display:none}
#harbour-report-head .harbour-stars:not([hidden]){display:flex;align-items:center;gap:5px;margin:8px 0 2px}
.harbour-stars i{display:block;width:clamp(22px,2.5vw,32px);aspect-ratio:1;background:#637b75;
 clip-path:polygon(50% 2%,62% 34%,97% 36%,69% 58%,79% 93%,50% 73%,21% 93%,31% 58%,3% 36%,38% 34%)}
.harbour-stars i[data-fill=full]{background:linear-gradient(#fff0a8,#ffbf50 78%,#e09e46)}
.harbour-stars i[data-fill=half]{background:linear-gradient(90deg,#ffd16c 50%,#637b75 50%)}
.harbour-stars b{margin-left:5px;color:#f8e9c6;font:750 .88rem/1 Inter,system-ui,sans-serif;white-space:nowrap}
.harbour-breakdown:not([hidden]){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0;
 padding:0 clamp(15px,3vw,34px);border-bottom:1px solid #627a6d;background:#1a3838}
.harbour-breakdown>div{min-width:0;margin:13px 0;padding:0 clamp(12px,2vw,25px);border-left:1px solid #4b6960}
.harbour-breakdown>div:first-child{padding-left:0;border:0}.harbour-breakdown>div:last-child{padding-right:0}
.harbour-breakdown dt{display:flex;align-items:center;justify-content:space-between;gap:5px;color:#edf2dd;font-weight:720}
.harbour-breakdown dt b{flex:none;border-radius:4px;padding:2px 5px;background:#254944;color:#ffe1a2;font-size:.81rem;font-variant-numeric:tabular-nums}
.harbour-breakdown dd{display:grid;gap:2px;margin:5px 0 0}
.harbour-breakdown dd strong{color:#fff1d5;font:800 1.13rem/1.18 Barlow,system-ui,sans-serif}
#harbour-scoring{margin:0;padding:0 clamp(15px,3vw,34px);border-bottom:1px solid #48635c;background:#163235}
#harbour-scoring summary{width:fit-content;max-width:100%;padding:12px 0;color:#e0debd;cursor:pointer;font-size:.9rem;font-weight:650}
#harbour-scoring ul{display:grid;gap:4px;padding:0 0 15px 1.2rem;margin:0;color:#dae5d9;font-size:.9rem;line-height:1.4}
.harbour-objectives{margin:16px 0 6px;color:#d8e4d6;font:750 .95rem/1.25 Inter,system-ui,sans-serif}
@media(max-width:560px){
 #harbour-report-head .harbour-stars:not([hidden]){gap:2px;margin-top:5px}
 .harbour-stars b{margin-left:3px;font-size:.78rem}
 .harbour-breakdown:not([hidden]){grid-template-columns:1fr}
 .harbour-breakdown>div,.harbour-breakdown>div:first-child,.harbour-breakdown>div:last-child{
  display:grid;grid-template-columns:minmax(84px,.72fr) minmax(0,1fr);align-items:baseline;gap:14px;
  margin:0;padding:9px 0;border:0;border-top:1px solid #47625c}
 .harbour-breakdown>div:first-child{border-top:none}
 .harbour-breakdown dt{flex-wrap:wrap;font-size:.86rem}
 .harbour-breakdown dd{margin:0}.harbour-breakdown dd strong{font-size:1rem}
 #harbour-next strong{white-space:normal}
}

.harbour-course .console .hint:not([data-audio-help]){display:none}
