/* Hexswell: small static details, readable phone controls and inset-safe surfaces. */
:root{--safe-top:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-right,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px)}
.hexswell-mark{display:block;flex:none;width:34px;height:38px;color:#f4e894;filter:drop-shadow(0 2px 5px #061c2a55)}
.hexswell-mark.small{width:27px;height:30px}
.wordmark{gap:11px}.wordmark>span:last-child{color:#c7e4e8}
.menu-content{padding-top:max(22px,var(--safe-top));padding-bottom:max(22px,var(--safe-bottom));padding-left:max(44px,var(--safe-left))}
.menu-content h1 em{color:#f7e78c;text-shadow:0 2px 24px #eac75a12}
.trial-label{color:#d8ecec}.trial-label>span{opacity:.8;color:#b3d1da}
.rider-card{transition:border-color .16s,background .16s,box-shadow .16s}
.rider-card[aria-pressed=true]{border-color:#f0d989;box-shadow:inset 0 -3px 0 #f0d989,inset 0 0 20px #f0d9890b}
.start-button{background:linear-gradient(110deg,#fff0a8,#f2df7e);border-color:#fff2bc;box-shadow:0 3px 0 #af97503d,0 8px 20px #031c2b30}
.start-button:hover{background:linear-gradient(110deg,#fff6c9,#f6e594)}
.harbor-link{background:linear-gradient(110deg,#17495a9c,#0c354b91);border-color:#a2d0d34a}
.coin-balance{font-variant-numeric:tabular-nums}.coin-balance i{clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%);border-radius:0}
.shop-dialog{overscroll-behavior:contain;scrollbar-gutter:stable}
.shop-dialog>*{flex-shrink:0}
.shop-head{position:sticky;top:0;z-index:3;background:#0b2b40;border-bottom:1px solid #a5dbe133}
.shop-item{transition:border-color .16s,box-shadow .16s}
.shop-item.is-equipped{box-shadow:inset 0 0 0 1px #f1dea024}
.shop-item button{min-height:44px}.shop-item p{font-size:11px;line-height:1.55}
.shop-item .shop-item-status{font-size:10px;letter-spacing:.025em}
.shop-preview .meteor-stone,.shop-preview .boat-body{transition:transform .18s ease-out}
@media(hover:hover) and (pointer:fine){.shop-item:hover{border-color:#b8e6e273}.shop-item:hover .meteor-stone{transform:translateY(-3px) rotate(var(--tilt,-13deg))}.shop-item:hover .boat-body{transform:translateY(-3px) rotate(28deg)}}
dialog[open]{animation:hexswell-reveal .16s ease-out}
@keyframes hexswell-reveal{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
dialog{max-width:calc(100vw - max(12px,var(--safe-left)) - max(12px,var(--safe-right)));max-height:calc(100dvh - max(12px,var(--safe-top)) - max(12px,var(--safe-bottom)))}
.center-screen{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding:max(18px,var(--safe-top)) max(18px,var(--safe-right)) max(18px,var(--safe-bottom)) max(18px,var(--safe-left))}
.center-screen>div{flex:none;margin-block:auto;max-width:100%}
.icon-button{min-width:44px;min-height:44px;flex:none}
.clock-block button:focus-visible,#touch-controls button:focus-visible{outline:3px solid #fff0ae;outline-offset:4px}
@media(max-width:899px),(pointer:coarse){
 .menu-content{padding:20px max(22px,var(--safe-right)) max(22px,var(--safe-bottom)) max(22px,var(--safe-left));padding-top:max(20px,var(--safe-top))}
 .settings-body input,.settings-body select{font-size:16px}
 .button-text,.result-community .button-text{min-height:44px}
 .shop-head{padding-block:17px 14px}.shop-head h2{font-size:28px}
 .shop-storage,.shop-status-row p{font-size:12px}.shop-item h3{font-size:14px}.shop-item p{font-size:12px;min-height:38px}
 .shop-item button{font-size:12px}.shop-action-note,.shop-fine{font-size:11px}.shop-account{font-size:11px}.shop-account a{min-height:44px}
 .shop-tabs button{min-height:48px}.shop-tabs button span{font-size:10px}
 .rider-heading>span{font-size:8px;letter-spacing:.015em}.rider-stats small{font-size:8px;letter-spacing:0}.rider-gender{font-size:8px}.rider-trait{font-size:10px}
 #touch-controls{left:max(16px,var(--safe-left));right:max(16px,var(--safe-right));bottom:max(18px,var(--safe-bottom))}
 .steer-pad{background:radial-gradient(#c3e9db0d 39%,#10394bc9 40%,#12394b8c);border-color:#d4efdc91}
 .touch-actions button{box-shadow:0 3px 0 #041a2b55;background-color:#0a2c40e8}.touch-actions #jump-button{background:linear-gradient(145deg,#fff0a8,#f1de87)}
 .touch-actions button span{font-size:11px;letter-spacing:.025em}.touch-actions button small{font-size:9px}
 .touch-actions button.pressed{border-color:#fff6bf;box-shadow:inset 0 0 0 2px #fff1a785;background:#446c65}
 .touch-actions #jump-button.pressed{background:#fff6c5;color:#143543}
}
@media(max-width:380px){
 .menu-content{padding-inline:max(16px,var(--safe-left)) max(16px,var(--safe-right))}.menu-content h1{font-size:46px}
 .rider-heading>span{font-size:7px}.rider-stats small{font-size:7px}.rider-trait{font-size:9px}.selected-rider>p{font-size:11px;line-height:1.45}
 .harbor-link small{display:block;margin:3px 0 0;font-size:10px}.harbor-link{min-height:52px}
 .shop-wallet{gap:8px}.shop-wallet>span{font-size:9px}.shop-tabs button{padding-inline:9px;gap:5px}
 .shop-head h2{font-size:25px}.shop-item-copy{padding:10px}.shop-grid{padding-inline:13px;gap:9px}
 .score-block{left:max(14px,var(--safe-left))}.clock-block{right:max(12px,var(--safe-right))}
}
@media(max-height:500px) and (min-width:600px){
 .menu-content{padding:16px max(26px,var(--safe-right)) max(18px,var(--safe-bottom)) max(26px,var(--safe-left))}
 .score-block{top:max(15px,var(--safe-top));left:max(20px,var(--safe-left))}
 .clock-block{top:max(13px,var(--safe-top));right:max(18px,var(--safe-right))}
 .weather-block{top:max(17px,var(--safe-top))}
 #touch-controls{left:max(20px,var(--safe-left));right:max(20px,var(--safe-right));bottom:max(14px,var(--safe-bottom))}
 .telemetry{left:max(22px,var(--safe-left));bottom:calc(146px + var(--safe-bottom))}
 .shop-head{padding-block:12px}.shop-head h2{font-size:24px}.shop-head>div>p:last-child{display:none}
 .pause-card{width:min(350px,100%)}.result-card{padding:16px 22px}
}
@media(max-width:380px) and (max-height:700px){
 .air-banner,.landing-stack{top:max(205px,34%)}
 .status-line{top:149px;bottom:auto;font-size:10px;line-height:1.4;max-width:calc(100vw - 32px)}
}
@media(max-height:500px) and (min-width:480px){
 .pause-card{width:min(680px,100%);display:grid;grid-template-columns:1fr 1fr;column-gap:28px;row-gap:4px}
 .pause-card .eyebrow{grid-column:1;grid-row:1;margin:0}.pause-card h2{grid-column:1;grid-row:2;font-size:32px;line-height:1.08;margin:0}
 .pause-card #pause-message{grid-column:1;grid-row:3;margin:0;font-size:12px;line-height:1.45;align-self:center}
 .pause-card #resume-run{grid-column:2;grid-row:1/3;align-self:center;min-height:50px;margin:0}
 .pause-card #restart-run{grid-column:2;grid-row:3;margin:0;min-height:44px}
 .pause-card #pause-guide{grid-column:2;grid-row:4}.pause-card #quit-run{grid-column:2;grid-row:5}
 .pause-card [data-action=sound]{grid-column:1;grid-row:4;justify-self:start;margin:0}
 .pause-card .button-text{min-height:44px;margin:0;font-size:12px}
}
@media(max-height:360px) and (min-width:480px){
 .center-screen{padding:12px max(16px,var(--safe-right)) max(12px,var(--safe-bottom)) max(16px,var(--safe-left))}
 .score-block{top:max(12px,var(--safe-top));left:max(16px,var(--safe-left))}.score-block>strong{font-size:26px;margin:3px 0}.hud-label{font-size:7px}.streak-pill{font-size:8px;padding:3px 6px}
 .clock-block{top:max(10px,var(--safe-top));right:max(16px,var(--safe-right));gap:3px 8px}.clock-block>strong{font-size:25px}
 .weather-block{top:max(14px,var(--safe-top));min-width:200px;max-width:210px}.weather-block strong{font-size:9px}.weather-block>div:first-child{padding:8px 10px}
 .status-line{top:68px;bottom:auto;max-width:calc(100vw - 110px);padding:6px 10px;font-size:10px;line-height:1.35}
 .air-banner,.landing-stack{top:112px;width:calc(100vw - 260px)}.air-banner .air-label,.trick-sequence{display:none}
 .air-banner .air-numbers>b{font-size:28px}.air-banner .air-breakdown{font-size:9px;margin-top:4px}.air-banner>#trick-name{font-size:12px;margin-top:4px}
 .landing-stack .landing-feedback{font-size:25px}.landing-stack .landing-breakdown{font-size:10px;margin-top:4px}
 #touch-controls{height:102px;bottom:max(12px,var(--safe-bottom));left:max(16px,var(--safe-left));right:max(16px,var(--safe-right))}
 .steer-pad{width:96px;height:96px}#steer-knob{left:27px;top:27px}.steer-pad .steer-left,.steer-pad .steer-right{top:33px}
 .telemetry{left:max(18px,var(--safe-left));bottom:calc(128px + var(--safe-bottom));gap:8px}.speed>strong{font-size:21px}.boost-meter{width:78px}
 .touch-actions button{min-width:62px;height:58px}.touch-actions #jump-button{width:70px;height:68px}.trick-pad{bottom:78px;width:146px;max-height:58px;padding:6px}
 .pause-card{column-gap:20px}.pause-card h2{font-size:28px}.pause-card .eyebrow{font-size:8px}
 .menu-content{padding-top:max(14px,var(--safe-top));padding-bottom:max(14px,var(--safe-bottom))}
}
@media(prefers-reduced-motion:reduce){dialog[open]{animation:none}.shop-preview .meteor-stone,.shop-preview .boat-body{transition:none}}

/* One finger owns the water; the only play button is Pause. */
.gesture-start-note{display:none;margin:10px 0 0;color:#c5dcd8;font:11px/1.4 var(--font);text-align:center;max-width:470px}
body.touch .gesture-start-note{display:block}
#touch-controls{position:fixed;inset:0;width:auto;height:auto;pointer-events:none;z-index:3}
#gesture-indicator{position:absolute;width:76px;height:76px;margin:-38px 0 0 -38px;border:1px solid #d8f3ed65;border-radius:50%;background:#103c4933;pointer-events:none}
#gesture-dot{display:block;position:absolute;left:28px;top:28px;width:18px;height:18px;border-radius:50%;background:#f4e894b3;box-shadow:0 0 0 4px #f4e89418;pointer-events:none}
#gesture-indicator[data-mode="boost"]{border-color:#f4e894bd;background:#f4e89412}
#gesture-indicator[data-mode="brake"]{border-color:#a0d7e7bd}
#touch-hint{position:absolute;left:max(18px,var(--safe-left));right:max(18px,var(--safe-right));bottom:max(17px,var(--safe-bottom));margin:0;color:#e3f1ed;text-align:center;font:500 12px/1.5 var(--font);text-shadow:0 2px 6px #001a2e;pointer-events:none}
.course-guide{position:absolute;right:max(24px,var(--safe-right));top:112px;display:flex;align-items:center;gap:9px;max-width:172px;padding:9px 11px;background:#092a38d9;border:1px solid #d4eddb48;border-radius:10px;text-shadow:none;pointer-events:none}
.course-compass{display:grid;place-items:center;flex:none;width:34px;height:34px;border:1px solid #cfe7dc57;border-radius:50%;background:#143d48}
#course-arrow{display:block;width:23px;height:23px;fill:#f4e894;transform-origin:50% 50%}
.course-guide strong{display:block;color:#eaf3e6;font:650 11px/1.3 var(--font)}
.course-guide small{display:block;margin-top:3px;color:#bfd9d6;font:10px/1.3 var(--mono)}
body.touch .telemetry{left:max(20px,var(--safe-left));bottom:calc(66px + var(--safe-bottom));gap:12px}
body.touch .status-line{top:auto;bottom:calc(128px + var(--safe-bottom))}
@media(max-width:899px),(pointer:coarse){
 .gesture-start-note{display:block}
 .telemetry{left:max(20px,var(--safe-left));bottom:calc(66px + var(--safe-bottom));gap:12px}
 .status-line{top:auto;bottom:calc(128px + var(--safe-bottom))}
 .course-guide{right:max(15px,var(--safe-right));top:auto;bottom:calc(68px + var(--safe-bottom));gap:7px;padding:7px 9px;max-width:151px}
 .course-compass{width:29px;height:29px}#course-arrow{width:21px;height:21px}
 .course-guide strong{font-size:10px}.course-guide small{font-size:9px}
}
@media(max-width:380px){
 #touch-hint{font-size:11px;left:max(12px,var(--safe-left));right:max(12px,var(--safe-right))}
 .telemetry{left:max(14px,var(--safe-left));gap:7px}.boost-meter{width:72px}.speed>strong{font-size:25px}
 body.touch .telemetry{left:max(14px,var(--safe-left));gap:7px}.course-guide{right:max(12px,var(--safe-right));padding:6px 8px;max-width:139px}
 body.touch .boost-meter{width:72px}body.touch .speed>strong{font-size:25px}
}
@media(max-height:500px) and (min-width:480px){
 #touch-hint{left:190px;right:190px;bottom:max(12px,var(--safe-bottom));font-size:11px}
 .telemetry{bottom:max(15px,var(--safe-bottom))}.status-line{top:70px;bottom:auto;max-width:calc(100vw - 130px)}
 body.touch .telemetry{bottom:max(15px,var(--safe-bottom))}
 .course-guide{bottom:max(13px,var(--safe-bottom));right:max(16px,var(--safe-right))}
 body.touch .status-line{top:70px;bottom:auto;max-width:calc(100vw - 130px)}
}
@media(max-height:360px) and (min-width:480px){
 #touch-hint{left:174px;right:174px;font-size:10px}
 .telemetry{gap:7px}.speed>strong{font-size:22px}.boost-meter{width:72px}
 body.touch .telemetry{gap:7px}body.touch .speed>strong{font-size:22px}body.touch .boost-meter{width:72px}
 .course-guide{max-width:145px}
}
