:root{color-scheme:light;--ink:#113d34;--mint:#a3ffda;--copper:#b56d3d;--crimson:#a52647;--paper:#e9fff1;font-family:ui-rounded,"Trebuchet MS",system-ui,sans-serif;background:#0e5146;color:var(--ink)}
*{box-sizing:border-box}body{margin:0;overflow-x:hidden}button,select{font:inherit}button,a,select{-webkit-tap-highlight-color:transparent}button{min-height:44px;border:1px solid #739c88;border-radius:12px;background:#eaffef;color:var(--ink);font-weight:800;cursor:pointer;padding:8px 12px;touch-action:manipulation}button:hover{filter:brightness(1.06)}button:active{transform:translateY(1px)}button:focus-visible,a:focus-visible,select:focus-visible,canvas:focus-visible{outline:3px solid #9d2342;outline-offset:2px}button:disabled,select:disabled{cursor:default;opacity:.62}a{color:inherit}img{pointer-events:none;user-select:none}[hidden]{display:none!important}
.game-shell{height:100vh;height:100dvh;max-width:920px;margin:auto;padding:env(safe-area-inset-top) max(6px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(6px,env(safe-area-inset-left));display:grid;grid-template-rows:44px 80px 50px minmax(0,1fr) 82px 34px 54px;background:linear-gradient(#064d3c88,#073f34b5),url('/assets/play/sourcemerge/water.webp') center/cover;overflow:hidden;position:relative;isolation:isolate}
.topbar{display:flex;justify-content:space-between;align-items:center;font-size:11px;font-weight:800;color:#e8fff0;padding:0 5px;gap:6px}.topbar a{min-height:44px;display:flex;align-items:center;text-decoration:none;font-size:13px}.topbar>span{font-size:10px;letter-spacing:1px}.topbar button{min-height:44px;font-size:12px;background:#083e32;color:#c4ffe1;border-color:#5eaa8f;padding:6px 9px}
.brand{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:0}.brand img{display:block;width:min(375px,96%);height:auto;max-height:64px;object-fit:contain;border-radius:13px;mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent)}.brand h1{margin:3px 0 0;font-size:12px;font-weight:500;color:#d2ffe6;letter-spacing:.35px}
.hud{display:flex;align-items:center;justify-content:center;gap:25px;max-width:480px;width:100%;margin:auto;color:#effff3}.seal-slots{display:flex;gap:8px}.seal{width:39px;height:39px;border-radius:50%;border:3px solid #d59c61;box-shadow:inset 0 2px 6px #042f29,0 2px 0 #583e28;background:#07513f url(/assets/play/sourcemerge/seal-slot.webp) center/cover;color:#d7ffe7;font-size:26px;display:grid;place-items:center;line-height:1}.seal.earned{background:linear-gradient(#e7ffe3,#77e6b4);color:#174f38;box-shadow:0 0 10px #9effc955}.mass,.clock{display:flex;flex-direction:column;align-items:center;line-height:1.05;min-width:45px}.hud small,.membrane small{font-size:9px;font-weight:800;letter-spacing:1px}.hud strong{font-size:25px}.clock{border-left:1px solid #6ca38c;padding-left:17px;min-width:70px}.clock.urgent{color:#ffd5d8}
.arena-row{display:flex;align-items:center;justify-content:center;min-height:0;padding:4px 0}.arena-frame{position:relative;width:min(100%,calc((100dvh - 356px)*400/490));aspect-ratio:400/490;max-height:100%;border-radius:22px;box-shadow:0 9px 24px #002d29a3;overflow:hidden;background:#48b796;isolation:isolate}canvas{display:block;width:100%;height:100%;touch-action:none;outline:none;cursor:crosshair}
.overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:10px;background:#123c3233;touch-action:none}.panel{width:min(100%,340px);padding:18px;background:#effff2f5;border:2px solid #c69669;border-radius:22px;box-shadow:0 8px 24px #003d3c77;text-align:center}.panel h2{font-size:23px;margin:0 0 10px;line-height:1.1}.panel p{font-size:13px;line-height:1.4;margin:8px 0}.panel>button{display:block;width:100%;margin-top:8px}.panel .primary{background:linear-gradient(#b8ffda,#6cdbb0);border-color:#43896a;box-shadow:0 3px 0 #598b66}.setup-panel{padding:12px}.setup-panel h2{font-size:20px;margin-bottom:8px}.options{display:grid;grid-template-columns:1fr 1fr;gap:6px 8px;text-align:left}.options label{font-size:10px;font-weight:800;min-width:0;letter-spacing:.15px}.options select{display:block;width:100%;min-width:0;height:44px;border-radius:9px;border:1px solid #91b7a1;background:#fcfff7;color:var(--ink);font-size:12px;font-weight:700;padding:0 5px;margin-top:2px}.setup-panel #mode-note{font-size:11px;line-height:1.3;margin:7px 0}.start-button{display:flex!important;align-items:center;justify-content:center;gap:8px;margin:0!important;padding:0 10px 0 0;background:#78e8b3;border:2px solid #c28d55;min-height:50px;box-shadow:0 3px 0 #768d55;font-size:18px}.start-button img{width:90px;height:46px;object-fit:cover;border-radius:20px}.setup-panel .control-primer{font-size:10px;line-height:1.35;margin-bottom:0}.result-panel #result-mark{font-size:48px;color:#1c8b68}.result-panel #record{font-size:12px;color:#51654f}#seal-guide p{font-size:12px}#seal-detail{font-weight:800}
.controls{display:flex;align-items:center;justify-content:center;gap:8px;padding:5px 0 4px}.controls button{flex:0 0 48px;width:48px;height:64px;min-height:48px;padding:0;background:none;border:0;border-radius:12px;color:#f1ffef}.image-control img{display:block;width:48px;height:48px;border-radius:50%;object-fit:cover;filter:drop-shadow(0 3px 2px #063c30)}.controls button span{display:block;font-size:10px;line-height:15px}.restart-control b{display:grid;place-items:center;width:48px;height:48px;background:radial-gradient(at 35% 25%,#c89661,#87522f);border:3px solid #e6b67c;border-radius:50%;box-shadow:0 3px 2px #063c30;font-size:34px;font-weight:400;line-height:1}.membrane{display:flex;flex-direction:column;color:#e6fff1;gap:3px;min-width:85px;max-width:120px}.membrane b{font-size:13px}.membrane span{font-size:9px;white-space:nowrap;color:#c9ebd6}#joystick{position:relative;width:64px;height:64px;flex:0 0 64px;border-radius:50%;touch-action:none;cursor:grab;overflow:hidden;box-shadow:0 2px 5px #053c30}#joystick img{width:64px;height:64px;object-fit:cover;border-radius:50%}#stick-knob{position:absolute;left:19px;top:19px;width:26px;height:26px;border-radius:50%;pointer-events:none;border:1px solid #a9ffdf;background:radial-gradient(at 30% 20%,#d9ffef,#4ed8a4);box-shadow:0 3px 4px #1e755c88}
.status{text-align:center;font-size:12px;font-weight:700;color:#f0ffe8;display:flex;align-items:center;justify-content:center;padding:0 7px;line-height:1.25}.bottom-bar{display:flex;align-items:center;justify-content:center;gap:6px;padding-bottom:4px}.bottom-bar button{font-size:11px;padding:4px 8px;min-height:44px;background:#143f32;color:#e3ffe9;border-color:#71ab84}.bottom-bar #help-toggle{margin-left:auto;max-width:82px}#practice-actions{display:flex;gap:5px}#practice-tips{font-size:9px;line-height:1.4;color:#d4f6df}.help{max-width:780px;margin:auto;padding:30px 22px 60px;background:#edfff2;font-size:16px;line-height:1.65}.help h2{font-size:27px}.help h3{font-size:20px;margin-top:28px}.help button{position:sticky;top:8px;box-shadow:0 3px 15px #1e4a3640}.help-open .game-shell{display:none}.playing{overflow:hidden}.playing .game-shell{touch-action:none}
@media(min-width:700px){.game-shell{grid-template-rows:44px 88px 54px minmax(0,1fr) 82px 32px 54px;border-left:1px solid #70b291;border-right:1px solid #70b291}.arena-frame{width:min(560px,calc((100dvh - 364px)*400/490))}.brand img{max-height:72px;width:420px}.controls{gap:16px}.membrane{min-width:120px}.topbar{padding:0 20px}.bottom-bar{gap:15px;padding:0 20px 4px}.bottom-bar #help-toggle{margin-left:0;max-width:none}.bottom-bar button{min-width:80px}#practice-tips{font-size:11px}}
@media(max-height:740px){.game-shell{grid-template-rows:44px 64px 44px minmax(0,1fr) 76px 28px 50px}.brand img{max-height:49px}.brand h1{font-size:10px}.arena-frame{width:min(100%,calc((100dvh - 314px)*400/490))}.panel{padding:12px}.panel h2{font-size:19px}.panel p{font-size:11px}.setup-panel{padding:8px}.setup-panel h2{font-size:17px;margin-bottom:6px}.options{gap:4px 7px}.setup-panel .control-primer{font-size:9px}.status{font-size:11px}.hud strong{font-size:22px}.seal{width:34px;height:34px;font-size:23px}.topbar>span{font-size:8px}}
@media(max-width:360px){.controls{gap:5px}.membrane{min-width:75px}.membrane small{font-size:8px}.membrane b{font-size:12px}.membrane span{font-size:8px}.topbar>span{letter-spacing:0}.hud{gap:18px}.bottom-bar{gap:4px}.bottom-bar button{padding:4px 6px}#practice-tips{font-size:8px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
