.relay{--ink:#131b3d;--cobalt:#2445d9;--line:#c9d4e2;background:#eef3f8;color:var(--ink);padding:clamp(20px,4vw,52px) max(14px,env(safe-area-inset-left)) 56px;font-family:Inter,Arial,sans-serif}
.relay-shell{max-width:880px;margin:auto}.relay *{box-sizing:border-box}
.relay-title,.hud,.relay-controls,.rank-title{display:flex;align-items:center;justify-content:space-between;gap:12px}
.relay-title{margin-bottom:18px}.relay-title p{margin:0 0 4px;color:#465578;font-size:.82rem;font-weight:700;letter-spacing:.04em}
.relay-title h1{color:var(--ink);font-size:clamp(2.6rem,8vw,5.2rem);letter-spacing:-.075em;line-height:1.02;margin:0}.relay-title i{color:var(--cobalt);font-weight:550}
.relay a{color:var(--cobalt)}.relay-title a{font-size:.9rem;font-weight:650;text-underline-offset:4px;white-space:nowrap;padding:10px 0}
.relay-console{border:1px solid #b2c4d6;border-radius:24px;overflow:hidden;background:#101a35;box-shadow:0 12px 30px #1c386315}
.relay button{font:inherit;font-weight:680;cursor:pointer;border:0;border-radius:12px;min-height:46px;padding:10px 16px;line-height:1.15}
.relay button:focus-visible,.relay a:focus-visible{outline:3px solid #ffad51;outline-offset:2px}
.relay [hidden],.relay .hud,.relay .relay-controls{display:none!important}
.relay[data-state=playing] .hud,.relay[data-state=playing] .relay-controls{display:flex!important}
.hud{padding:12px 16px;background:#101a35;color:white}.hud span{font-size:.8rem;color:#bdd0eb}.hud b{display:block;color:white;font-size:1.35rem;font-variant-numeric:tabular-nums}
.relay #pause-run{background:#263655;color:white}
.track{position:relative;isolation:isolate}.track canvas{width:100%;display:block;height:clamp(310px,39vw,410px);touch-action:manipulation}
.relay-panel{position:absolute;inset:0;overflow:hidden;background:#dceef7;display:flex;align-items:stretch;isolation:isolate}
.relay-art{position:absolute;inset:0 0 0 34%;z-index:-1;background:url('/media/hero.webp') center / cover no-repeat;mask-image:linear-gradient(90deg,transparent,#000 22%);}
.relay-sheet{align-self:center;width:56%;padding:clamp(20px,4vw,46px);color:#102046}
.relay-panel h2{margin:0 0 12px;font-size:clamp(2.2rem,6vw,4rem);letter-spacing:-.068em;line-height:1.02;color:#102046}
.relay-panel p{font-size:1rem;line-height:1.45;margin:0 0 14px;color:#233953;max-width:36ch}.relay #target:empty,.relay #relay-status:empty{display:none}
.relay #target{font-weight:650}.relay-actions{display:flex;flex-wrap:wrap;gap:8px}.relay #launch,.relay #switch{background:var(--cobalt);color:white}.relay #share-run{background:#fff;color:#1a318a;border:1px solid #a4b9cd}
.relay-controls{padding:12px 16px;color:white;background:#101a35}.relay-controls p{font-size:.85rem;color:#cfdef3;margin:0}.relay .touch-hint{display:none}
.relay #relay-status{color:#384d69;font-size:.92rem;margin:12px 4px}.relay #share-url{width:100%;padding:12px}
.relay #rankings{margin:26px 0 0;padding:clamp(16px,3vw,28px);background:#fff;border:1px solid var(--line);border-radius:20px}
.rank-title h2{color:var(--ink);font-size:clamp(1.45rem,4vw,2.1rem);letter-spacing:-.055em;margin:0}.rank-title span{color:#55637a;font-size:.9rem}
.relay #ranks{list-style:none;counter-reset:rank;margin:16px 0 0;padding:0;color:#374660}.relay #ranks li{counter-increment:rank;display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px solid #dfe6ef}.relay #ranks li:before{content:counter(rank,decimal-leading-zero);font-size:.85rem;color:#50628a}.relay #ranks b{margin-left:auto;color:#13204a;font-variant-numeric:tabular-nums}
@media(max-width:640px){
.relay-title{margin-bottom:14px}.relay-console{border-radius:18px}.track canvas{height:clamp(350px,54svh,470px)}
.relay-panel{align-items:end;background:#e6f2f8}.relay-art{inset:0 0 auto;height:60%;background-size:cover;background-position:50% 44%;mask-image:linear-gradient(180deg,#000 65%,transparent)}
.relay-sheet{width:100%;align-self:end;padding:18px;background:linear-gradient(0deg,#e6f2f8 78%,#e6f2f800)}.relay-panel h2{font-size:2.7rem;margin-bottom:7px}.relay-panel p{margin-bottom:12px}
.relay-actions{display:grid;grid-template-columns:1fr}.relay-actions:has(#share-run:not([hidden])){grid-template-columns:1fr 1.35fr}
.relay-actions button{padding-inline:8px}.relay-controls .touch-hint{display:block}.relay .key-hint{display:none}.relay #switch{flex-shrink:0}.hud{gap:6px}.relay[data-state=playing] .track canvas{height:clamp(260px,43svh,420px)}
}
@media(max-width:360px){.relay-panel h2{font-size:2.2rem}.relay-sheet{padding:14px}.relay-actions button{font-size:.9rem}}
