:root { --sea: #5fb2df; --ink: #1a1a1a; --pill: #1d2433; --yellow: #ffd23f; --red: #e5263b; --card: #fff; --muted: #6b7280; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--sea); font-family: "Rubik", system-ui, sans-serif; color: var(--ink); -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; }
button, input { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 4px solid var(--yellow); outline-offset: 2px; }

#loading { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: #bfe3f2; font-weight: 900; font-size: 28px; color: #fff; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; }
#loading.done { display: none; }

#hud { position: fixed; top: max(12px, env(safe-area-inset-top)); left: 0; right: 0; z-index: 10; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; pointer-events: none; }
.pill { background: var(--pill); color: #fff; border-radius: 30px; padding: 6px 16px 8px; font-weight: 800; font-size: 20px; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
#km { color: var(--yellow); font-size: 26px; direction: rtl; }
.pill.alert { background: var(--red); position: fixed; top: calc(max(12px, env(safe-area-inset-top)) + 54px); left: 50%; transform: translateX(-50%); white-space: nowrap; }

#jump-unused { position: fixed; z-index: 12; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: 108px; height: 108px; border-radius: 50%; border: 6px solid var(--ink); background: var(--yellow); font-size: 40px; line-height: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(0,0,0,.35); cursor: pointer; touch-action: manipulation; }
#jump span { font-size: 15px; font-weight: 900; }
#jump.cool { background: #d9dde3; }
#steerhint { position: fixed; z-index: 11; bottom: calc(max(24px, env(safe-area-inset-bottom)) + 124px); left: 0; right: 0; text-align: center; font-weight: 800; font-size: 17px; color: #fff; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; pointer-events: none; }

.sheet { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); width: min(440px, calc(100% - 20px)); max-height: calc(100% - 24px); overflow: auto; background: var(--card); border: 4px solid var(--ink); border-radius: 24px; box-shadow: 0 14px 34px rgba(0,0,0,.3); padding: 16px 16px 14px; text-align: center; user-select: text; -webkit-user-select: text; }
.brand { font-weight: 900; font-size: 16px; color: var(--muted); }
h1 { font-weight: 900; font-size: 34px; line-height: 1.08; margin: 4px 0 6px; color: var(--yellow); -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; }
.sub { font-weight: 700; font-size: 16px; color: #333; }
.how { list-style: none; text-align: right; margin: 10px 0; font-weight: 700; font-size: 14.5px; display: grid; gap: 4px; }
.btn { border: 4px solid var(--ink); border-radius: 18px; background: #f3f4f6; padding: 10px 14px; font-weight: 900; font-size: 18px; cursor: pointer; }
.btn.primary { background: var(--yellow); width: 100%; font-size: 22px; padding: 12px; }
.row { display: flex; gap: 8px; margin-top: 8px; }
.row .btn { flex: 1; }
.board { margin-top: 12px; text-align: right; }
.board h2 { font-size: 18px; font-weight: 900; margin-bottom: 4px; }
.board ol { list-style: none; counter-reset: n; }
.board li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 6px; border-bottom: 2px dashed #e5e7eb; font-weight: 700; font-size: 15px; }
.board li .h { direction: ltr; font-weight: 800; }
.board li .s { color: var(--muted); white-space: nowrap; }
.board li.me { background: #fff6d1; border-radius: 10px; }
.muted { color: var(--muted); }
.prize { margin-top: 10px; font-weight: 700; font-size: 14px; background: #fff6d1; border-radius: 12px; padding: 8px 10px; }
.link { display: block; margin-top: 10px; font-weight: 800; font-size: 14px; color: var(--pill); }
.legal { margin-top: 8px; font-size: 12px; color: var(--muted); font-weight: 700; }
.why { font-weight: 900; font-size: 30px; color: var(--red); }
.big { font-weight: 900; font-size: 26px; } .big b { font-size: 54px; color: var(--ink); }
.score { font-weight: 800; margin: 4px 0 10px; }
#sub label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 4px; text-align: right; }
.search { display: flex; align-items: center; border: 3px solid var(--ink); border-radius: 14px; padding: 0 10px; direction: ltr; margin-bottom: 8px; }
.search span { font-weight: 900; font-size: 20px; color: var(--muted); }
.search input { flex: 1; border: 0; outline: 0; padding: 10px 6px; font-size: 18px; font-weight: 700; min-width: 0; background: transparent; }
.rank { margin-top: 8px; font-weight: 900; font-size: 18px; background: #b8f0a0; border-radius: 12px; padding: 8px; }
#swipehint { position: fixed; z-index: 11; bottom: calc(max(24px, env(safe-area-inset-bottom)) + 30px); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; font-weight: 900; font-size: 20px; color: #fff; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.obs { font-size: 26px; letter-spacing: 4px; margin-bottom: 10px; }
.lockbig { font-size: 72px; line-height: 1; margin: 6px 0; }
.goal { margin-top: 8px; font-weight: 900; font-size: 22px; background: #fff6d1; border: 3px solid var(--ink); border-radius: 14px; padding: 6px 10px 8px; }
#locked .btn.primary { display: block; margin-top: 12px; text-decoration: none; color: var(--ink); }
#bubble { position: fixed; z-index: 12; transform: translate(-50%, -100%); background: #fff; border: 4px solid var(--ink); border-radius: 18px; padding: 6px 14px 9px; font-weight: 900; font-size: 22px; white-space: nowrap; pointer-events: none; box-shadow: 0 6px 16px rgba(0,0,0,.3); }
#bubble::after { content: ""; position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); border: 8px solid transparent; border-top-color: var(--ink); }
#skip { position: fixed; z-index: 13; bottom: max(18px, env(safe-area-inset-bottom)); left: 16px; background: rgba(29,36,51,.85); color: #fff; border: 0; border-radius: 20px; padding: 8px 16px 10px; font-weight: 800; font-size: 16px; }
#mute { position: fixed; z-index: 14; top: max(12px, env(safe-area-inset-top)); left: 12px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(29,36,51,.85); color: #fff; font-size: 22px; line-height: 46px; padding: 0; cursor: pointer; touch-action: manipulation; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
