@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800;900&display=swap');
:root{--ink:#073f45;--cream:#fff0cd;--orange:#d96a36;--jade:#20c5a3;--font:'DM Sans',system-ui,sans-serif;color-scheme:dark;font-family:var(--font)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none;background:#043e44}body{display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 30%,#16747a 0%,#073e45 55%,#052b32 100%)}button{font:inherit;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none;border:0}button:focus-visible{outline:3px solid #fff3c9;outline-offset:4px}button:disabled{cursor:wait;opacity:.65}button svg,svg{width:24px;height:24px;display:inline-block;flex-shrink:0}button{color:var(--ink)}[hidden]{display:none!important}.symbol-defs{position:absolute;width:0;height:0;overflow:hidden}
#game{position:relative;width:100%;height:100dvh;max-width:520px;overflow:hidden;isolation:isolate;background:#0b777d;touch-action:none;box-shadow:0 10px 100px #001e29a6}#ocean{position:absolute;width:100%;height:100%;inset:0}.vignette{position:absolute;inset:0;pointer-events:none;background:linear-gradient(#003e4825,transparent 25%,transparent 72%,#003f4860);z-index:1}.hud{position:absolute;z-index:3;left:0;right:0;top:0;padding:calc(15px + env(safe-area-inset-top)) 16px 0;pointer-events:none}.hud-row{display:flex;gap:8px;align-items:center;justify-content:space-between}.pill{background:var(--cream);box-shadow:0 3px 0 #153b4220,0 6px 18px #003d4330;display:flex;align-items:center;border-radius:32px;min-height:45px;color:var(--ink)}.timer{gap:8px;padding:9px 15px 9px 12px;font:800 27px 'Outfit',system-ui;letter-spacing:1px;font-variant-numeric:tabular-nums}.timer svg{width:26px;height:26px}.timer.urgent{color:#b44227;animation:pulse .9s infinite}.cargo{padding:7px 13px 7px 9px;gap:7px}.basket-icons{display:flex;gap:1px}.basket-icons svg{width:23px;height:27px;transition:opacity .3s,transform .3s}.basket-icons svg.lost{opacity:.18;transform:translateY(2px)}.cargo strong{font:800 23px 'Outfit',system-ui;white-space:nowrap}.round{border-radius:50%;background:#f3b64f;width:45px;height:45px;box-shadow:0 3px 0 #bd7d23;display:grid;place-items:center;pointer-events:auto}.round:active{transform:translateY(2px);box-shadow:none}.location{width:max-content;margin:11px auto 0;padding:5px 13px;border-radius:8px;background:#064c55bf;backdrop-filter:blur(6px);color:var(--cream);font-size:10px;font-weight:800;letter-spacing:2px;box-shadow:0 1px 0 #ffffff18}.location span{color:#e8b36a;margin:0 3px}.route-line{display:flex;justify-content:space-between;color:#ffedca;font-size:9px;letter-spacing:1.6px;font-weight:800;margin:14px 3px 5px;text-shadow:0 1px 4px #003c42}.progress-track{height:3px;border-radius:4px;background:#d6eed941;overflow:hidden}.progress-track i{display:block;background:#ffe2a1;height:100%;width:0;transition:width .15s}
.controls{position:absolute;z-index:4;bottom:calc(18px + env(safe-area-inset-bottom));left:14px;right:14px;display:flex;align-items:flex-end;justify-content:space-between;gap:9px;pointer-events:none}.helm-area{pointer-events:auto;position:relative;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;width:116px;height:116px;border:2px solid #ffedcb87;border-radius:50%;background:#bde8db2e;backdrop-filter:blur(3px);touch-action:none;box-shadow:inset 0 0 25px #ffedca13,0 4px 16px #00495422}.helm-knob{position:absolute;left:50%;top:50%;width:40px;height:40px;border-radius:50%;background:linear-gradient(145deg,#ffeec0,#f1ce88);transform:translate(-50%,-50%);box-shadow:0 3px 7px #003e4133;pointer-events:none}.steer{height:100%;width:43%;background:none;color:var(--cream);display:flex;align-items:center;padding:0 7px;z-index:1}.steer.left svg{transform:rotate(180deg)}.steer.right{justify-content:flex-end}.steer:active{color:white}.steer svg{width:23px;height:27px}.sail{pointer-events:auto;flex-shrink:0;display:flex;flex-direction:column;align-items:center;justify-content:center;width:116px;height:116px;border-radius:50%;background:linear-gradient(145deg,#ec8a50,#c8542a);box-shadow:inset 0 0 0 3px #f9b9789c,inset 0 -5px 0 #9c3c2a75,0 6px 17px #003f424a;color:#fff0c9;transition:transform .1s,filter .12s;touch-action:none}.sail svg{width:49px;height:49px;margin-top:1px}.sail strong{font:800 18px 'Outfit',system-ui;letter-spacing:2px;line-height:1.1}.sail>span{font-size:7px;letter-spacing:1.6px;font-weight:800;margin-top:4px;opacity:.8}.sail.pressed{transform:scale(.94);filter:brightness(1.13);box-shadow:inset 0 0 0 4px #ffe4a6,inset 0 -2px 0 #9c3c2a75,0 0 28px #ffc07355}.balance{flex:1;min-width:0;text-align:center;padding-bottom:7px;color:var(--cream)}.balance>span{font:800 10px 'Outfit',system-ui;letter-spacing:1.4px;text-shadow:0 1px 4px #00424b}.balance-track{margin:7px 0 6px;height:12px;border:2px solid var(--cream);border-radius:20px;background:#004d59aa;overflow:hidden;box-shadow:0 2px 6px #003f4833}.balance-track i{display:block;height:100%;width:100%;border-radius:10px;background:linear-gradient(90deg,#0fc7ac,#39d7a7);transition:width .15s,background .2s}.balance small{font-size:7px;font-weight:700;letter-spacing:.9px;white-space:nowrap;opacity:.9}.toast{position:absolute;top:26%;left:50%;transform:translate(-50%,-8px);opacity:0;z-index:6;color:var(--cream);background:#074953e8;backdrop-filter:blur(8px);border:1px solid #ffe4ae42;padding:10px 17px;border-radius:14px;text-align:center;font-size:12px;font-weight:700;pointer-events:none;max-width:85%;width:max-content;transition:opacity .25s,transform .25s;box-shadow:0 5px 25px #002a4433}.toast.show{opacity:1;transform:translate(-50%,0)}.toast.warn{background:#9b4629ee}
.screen{position:absolute;inset:0;z-index:10}.welcome{display:flex;flex-direction:column;justify-content:space-between;padding:calc(25px + env(safe-area-inset-top)) 27px calc(25px + env(safe-area-inset-bottom));background:linear-gradient(180deg,#033c4ccc 0%,#0347555c 28%,transparent 49%,#033b4aa8 67%,#033c48f5 92%)}.brand-top{display:flex;align-items:center;gap:10px;color:var(--cream);font-size:9px;line-height:1.6;letter-spacing:1.6px}.brand-top b{font-size:10px}.brand-mark{width:35px;height:35px;border:1px solid #fff0cd66;border-radius:50%;display:grid;place-items:center}.brand-mark svg{width:21px;height:21px}.edition{margin-left:auto;text-align:right;font-size:7px;letter-spacing:1.5px;opacity:.68}.welcome-title{position:absolute;top:15%;left:28px;right:20px}.welcome-title>p{color:#ffe6b0;font-size:9px;font-weight:700;letter-spacing:2.1px;margin:0 0 12px}.welcome h1{font:800 clamp(43px,13vw,64px)/.99 'Outfit',system-ui;color:#fff2cf;letter-spacing:-2.4px;margin:0;text-shadow:0 3px 12px #00495435}.welcome h1 em{font-style:normal;color:#ffc489;font-weight:600;white-space:nowrap}.title-line{display:block;width:43px;height:3px;background:#edb46d;margin-top:20px;border-radius:3px}.welcome-bottom{margin-top:auto}.intro{font-size:17px;line-height:1.5;font-weight:500;color:var(--cream);margin:0 0 20px;text-shadow:0 2px 8px #00343c}.primary{width:100%;min-height:57px;background:linear-gradient(135deg,#f3b96c,#e99850);border:1px solid #ffdc9b99;border-radius:15px;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 21px;color:#15484b;font-size:16px;font-weight:800;box-shadow:0 4px 0 #97613588,0 5px 25px #002e3f26;transition:transform .15s,filter .15s}.primary:hover{filter:brightness(1.05)}.primary:active{transform:translateY(3px);box-shadow:0 1px 0 #97613588}.welcome-meta{display:flex;justify-content:center;align-items:center;gap:9px;color:#f6ddb6a8;font-size:6.5px;letter-spacing:1.15px;font-weight:700;margin-top:18px;white-space:nowrap}.welcome-meta i{width:2px;height:2px;border-radius:50%;background:#ffe6af}.record{min-height:12px;text-align:center;color:#fee7bc;font-size:10px;margin:14px 0 0;font-weight:600;letter-spacing:.5px}.modal-screen{display:grid;place-items:center;padding:22px;background:#023d4a99;backdrop-filter:blur(7px);overflow:auto}.panel{width:100%;max-width:390px;background:linear-gradient(150deg,#fff5da,#f4e1bc);color:var(--ink);padding:30px 25px 25px;border-radius:25px;box-shadow:0 20px 70px #001f3b55;border:1px solid #fff8df}.eyebrow{display:block;color:#8e6740;font-size:8px;font-weight:800;letter-spacing:2.3px;margin:0 0 12px}.panel h2{font:800 34px/1.07 'Outfit',system-ui;letter-spacing:-1.2px;margin:0 0 24px}.panel h2 em{font-style:normal;font-weight:600;color:#b95e35}.lesson{display:flex;align-items:flex-start;gap:13px;margin:18px 0}.lesson-icon{background:#e6cc9c6b;border:1px solid #d4ac6b6b;flex-shrink:0;display:grid;place-items:center;width:40px;height:40px;border-radius:12px;color:#a65c32;font:700 24px 'Outfit',system-ui}.lesson-icon svg{width:28px;height:28px}.lesson h3{font-size:13px;margin:0 0 4px;font-weight:800}.lesson p{font-size:11px;line-height:1.55;color:#4f6b67;margin:0}.keyboard-note{font-size:9px;text-align:center;color:#738079;line-height:1.5;margin:22px 0 16px}.panel .primary{min-height:53px;font-size:14px}.panel>p{color:#5b736a;font-size:12px;line-height:1.7}.compact-panel{text-align:center}.compact-panel .eyebrow{margin-top:8px}.compact-panel h2{font-size:38px}.compact-panel .primary{margin-top:25px}.secondary{width:100%;padding:16px 0;background:none;color:#40635e;font-weight:700;font-size:12px}.text-button{display:block;background:none;padding:12px 0 0;margin:auto;color:#6d8177;font-size:10px}.result-panel{text-align:center;padding-top:22px}.result-icon{margin:0 auto 14px;width:52px;height:52px;display:grid;place-items:center;border-radius:50%;color:#c06b36;background:#edc89366}.result-icon svg{width:32px;height:32px}.result-panel h2{margin-bottom:12px}.result-panel>p{margin:0 0 14px}.score strong{display:block;font:800 58px/.95 'Outfit',system-ui;letter-spacing:-2px}.score>span{font-size:8px;letter-spacing:3px;color:#7c8d7a}.result-stats{display:flex;justify-content:space-around;border-top:1px solid #b69e7b42;border-bottom:1px solid #b69e7b42;margin:20px 0 10px;padding:14px 0}.result-stats>div{display:flex;flex-direction:column;gap:5px}.result-stats b{font:700 19px 'Outfit',system-ui}.result-stats span{font-size:7px;letter-spacing:1.4px;color:#6c8275}.best-result{font-size:9px!important;min-height:16px;color:#b16a32!important;font-weight:800}.load-error{position:absolute;inset:auto 20px 15px;z-index:20;padding:16px;background:#fff2cf;color:#713a27;border-radius:12px;font-size:12px}.load-error button{background:none;color:#9c412b;text-decoration:underline}.desktop-caption{display:none;color:#b0d8ce78;font-size:9px;letter-spacing:1.1px;position:absolute;bottom:15px;left:25px;right:25px;justify-content:space-between;pointer-events:none}
@keyframes pulse{50%{opacity:.65}}@media(min-width:700px){#game{width:min(440px,calc(100dvh * .54));height:calc(100dvh - 44px);border-radius:24px;border:1px solid #6fa6a248}.desktop-caption{display:flex}.welcome h1{font-size:58px}}@media(max-width:365px){.hud{padding-left:11px;padding-right:11px}.timer{font-size:24px;padding-left:10px;padding-right:11px}.cargo{padding-left:7px;padding-right:9px;gap:4px}.basket-icons svg{width:20px}.cargo strong{font-size:21px}.controls{left:10px;right:10px;gap:7px}.helm-area,.sail{width:102px;height:102px}.balance>span{font-size:9px;letter-spacing:.8px}.balance small{font-size:6px}.welcome-title{left:24px}.welcome{padding-left:23px;padding-right:23px}}@media(max-height:680px){.welcome-title{top:14%}.welcome h1{font-size:47px}.intro{font-size:14px;margin-bottom:15px}.welcome-meta{margin-top:13px}.panel{padding:23px 22px 18px}.panel h2{font-size:29px;margin-bottom:18px}.lesson{margin:13px 0}.keyboard-note{margin:16px 0 12px}.hud .route-line{margin-top:9px}.controls{bottom:calc(12px + env(safe-area-inset-bottom))}.helm-area,.sail{width:99px;height:99px}.sail svg{height:41px;width:41px}.result-panel h2{font-size:29px}.score strong{font-size:49px}.result-stats{margin-top:14px;padding:11px 0}.result-icon{width:40px;height:40px;margin-bottom:10px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
