:root{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans",sans-serif;color:#f5f5fb;background:#080e1b;color-scheme:dark}*{box-sizing:border-box}body{margin:0}button{font:inherit;color:inherit;border:1px solid #77879b;background:#1c293d;border-radius:8px;min-height:44px;touch-action:manipulation}button:disabled{opacity:.45}button:focus-visible,a:focus-visible{outline:3px solid #ffdb91}[hidden]{display:none!important}main{max-width:450px;margin:auto;display:flex;flex-direction:column;height:calc(100dvh - var(--nav-height,90px));min-height:440px;padding:3px 5px max(4px,env(safe-area-inset-bottom));gap:4px}.stage{position:relative;flex:1;min-height:180px;overflow:hidden;border:1px solid #b6a079;border-radius:16px;background:#152637}canvas{width:100%;height:100%;display:block}.hud{position:absolute;inset:0 0 auto;display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:7px 10px;background:#101b2cec;font-size:14px;font-weight:700;pointer-events:none}.hud #health{color:#ffb9c5;margin-left:auto}.hud button{pointer-events:auto;width:44px}.energy{display:flex;align-items:center;gap:8px;width:100%;font-size:11px}.energy meter{flex:1;height:12px;accent-color:#f0d08c}.overlay{position:absolute;inset:0;display:grid;place-items:center;background:#050912b8;padding:8px}.panel{background:radial-gradient(ellipse at top,#302c24,#111927 80%);border:1px solid #e0c68c85;border-radius:22px;width:min(100%,340px);max-height:100%;overflow:auto;text-align:center;padding:12px;box-shadow:inset 0 1px #fff4}.panel p{margin:6px 0;font-size:12px}#status{font-size:16px;font-weight:800;color:#ffe2a5}.hero{width:110px;height:110px;object-fit:contain;filter:drop-shadow(0 4px 9px #0006)}.cast{color:#e4d1ae}.panel .primary{background:linear-gradient(145deg,#ffedbc,#d8ad64);color:#302720;width:100%;font-weight:800;border-color:#fff0be;margin-top:6px}#beasts{display:flex;gap:4px;margin-top:8px}#beasts button{flex:1;min-width:0;font-size:11px;padding:6px 2px}#beasts b{display:block;font-size:24px}#beasts button[aria-pressed=true]{border:2px solid #ffe3a0;background:#493d2b}#beasts button[aria-pressed=true]::after{content:' ✓'}#feed{padding:3px 14px}#best{color:#c3cbd8}.buddy{height:62px;display:flex;align-items:center;gap:8px;padding:0 8px;background:#152637;border:1px solid #b6a079;border-radius:12px}.buddy img{object-fit:contain;flex-shrink:0}.buddy small{color:#e4d1ae;font-size:10px}.buddy p{font-size:12px;margin:3px 0;line-height:1.4}.controls{display:flex;gap:6px}.controls button{flex:1;min-height:52px;touch-action:none;font-size:14px}.controls #jump{flex:1.6}.controls #dash{background:#493c2e;border-color:#d8bb81}.controls small{font-size:10px}.hint{text-align:center;font-size:11px;margin:2px 0;color:#c0cadc}@media(max-height:720px){.hero{height:72px;width:72px}.panel{padding:8px}.panel p{margin:4px 0}.buddy{height:52px}.buddy img{height:52px;width:52px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}.hero{filter:none}}

/* Keep each attribute on its own line and the selected mark apart from stars. */
#beasts button{position:relative}#beasts small{display:block;font-size:10px;line-height:1.5;white-space:nowrap}#beasts button[aria-pressed=true]::after{position:absolute;right:5px;top:3px;color:#ffe3a0;font-weight:800}
/* Direct riding controls keep the course large on portrait phones. */
canvas{touch-action:none}.controls button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:54px}.controls svg{width:54px;height:30px;fill:none;stroke:#f1d49c;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.controls #jump{flex:1}.controls span{font-size:12px}.controls .charging{background:#a76b29!important;box-shadow:inset 0 0 18px #ffdf8560}.hint{font-size:10px}.buddy{height:54px}.buddy img{width:54px;height:54px}.hud{background:linear-gradient(#102b2ded,#102b2d88);border-bottom:1px solid #d5c28b33}.hud .energy{gap:8px}.energy meter{height:15px}.stage{border-color:#a78b50}#beasts button[aria-pressed=true]::after{content:none}#beasts button[aria-pressed=true]{border:1px solid #e9dfbd;background:#f5eddb;color:#2a362f}#beasts b canvas{width:72px;height:72px;margin:auto}#beasts b{height:72px}.hero{width:80px;height:80px}.panel{padding:12px}.controls button:active{transform:translateY(1px);background:#48524a}@media(max-height:720px){.hero{width:58px;height:58px}#beasts b{height:52px}#beasts b canvas{height:52px;width:52px}.panel{padding:8px}.hint{font-size:9px}.buddy{height:46px}.buddy img{width:46px;height:46px}}
