body{--ocean-ink:#07506b;background:radial-gradient(ellipse at 50% 0,#d8f6ef,transparent 70%),#e6f5f8;color:#0a4455}
#game-root{max-width:980px;margin:0 auto}
.ocean-game{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(240px,.85fr);gap:0;align-items:stretch;background:#f4f9eb;border:4px solid #fff;border-radius:32px;box-shadow:0 20px 40px #064c6924;overflow:hidden}
.ocean-world{--water-top:#84e3d7;--water-mid:#24babb;--water-deep:#057d9e;position:relative;min-width:0;overflow:hidden;background:radial-gradient(ellipse at 45% 3%,#d6fbd685,transparent 60%),linear-gradient(165deg,var(--water-top),var(--water-mid) 44%,var(--water-deep));isolation:isolate}
.ocean-world[data-cove="1"]{--water-top:#99e6e6;--water-mid:#43b9c7;--water-deep:#176c98}
.ocean-world[data-cove="2"]{--water-top:#96daef;--water-mid:#4aa5ca;--water-deep:#295c9b}
.ocean-sunbeam{position:absolute;inset:-50% -40%;transform:rotate(-19deg);background:linear-gradient(90deg,transparent 30%,#f2ffd62b 30%,#f2ffd61b 37%,transparent 37%,transparent 48%,#f2ffd617 48%,#f2ffd62b 52%,transparent 52%);z-index:-1;pointer-events:none}
.ocean-seabed{position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none}
.ocean-world::after{content:"";position:absolute;inset:0;box-shadow:inset 0 10px 25px #f6ffe82b,inset 0 -30px 35px #0d56881a;pointer-events:none;z-index:0}
.ocean-topline{position:relative;z-index:1;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:17px 21px 3px;color:#074759;font-weight:800}
.ocean-cove-name{font-size:21px;line-height:1.2;letter-spacing:-.3px}
.ocean-counter{font-size:13px;line-height:1.2;border-radius:100px;background:#e8ffffa6;padding:5px 10px;white-space:nowrap}
.ocean-board{position:relative;z-index:1;margin:0 18px 16px;height:410px}
.ocean-route{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}
.ocean-route path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.ocean-route .route-glow{stroke:#d5fff3;stroke-width:15;opacity:.17}
.ocean-route .route-line{stroke:#efffb2;stroke-width:4;stroke-dasharray:1 8;filter:drop-shadow(0 2px 0 #14778b4a)}
.ocean-grid{position:absolute;inset:0;display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(3,1fr)}
.ocean-cell{position:relative;display:flex;align-items:center;justify-content:center;min-width:0}
.ocean-object,.ocean-friend,.ocean-home{position:relative;display:flex;align-items:center;justify-content:center;width:80px;height:80px;border:0;padding:7px;touch-action:manipulation;border-radius:50%}
.ocean-object{background:radial-gradient(circle,#ecfff940,#caffff05 68%);cursor:pointer;transform:rotate(var(--tilt,0deg));transition:transform .15s,background .15s;box-shadow:none}
.ocean-object::after{content:"";position:absolute;left:20%;right:20%;bottom:4%;height:7px;background:#095c7b2b;filter:blur(3px);border-radius:50%;z-index:-1}
.ocean-object svg{filter:drop-shadow(2px 5px 2px #07597755);transition:transform .15s}
.ocean-object[aria-pressed="true"]{background:#fff4a44d;outline:3px dashed #fff4a8;outline-offset:1px;transform:translateY(-3px) rotate(0deg)}
.ocean-object:not(:disabled):hover svg{transform:translateY(-3px)}
.ocean-object:disabled{opacity:.8;cursor:default}
.ocean-object svg,.ocean-friend svg,.ocean-home svg,.ocean-reef svg{display:block;width:100%;height:100%;overflow:visible}
.ocean-friend{background:transparent;padding:0;cursor:pointer;filter:drop-shadow(0 5px 3px #0c5d7c40)}
.ocean-friend.start{width:88px;height:88px}
.ocean-friend:not(.start){width:56px;height:56px;transform:rotate(-15deg)}
.ocean-home{width:86px;height:86px;padding:6px;background:radial-gradient(circle,#a9e7d8af,#b4ffe900 72%)}
.ocean-home::before{content:"";position:absolute;inset:8%;border:2px dashed #d7ffd09c;border-radius:50%}
.ocean-home span{position:absolute;bottom:-2px;left:50%;transform:translateX(-50%);background:#d6ffdfed;color:#195b65;border-radius:16px;padding:1px 9px;font-size:12px;font-weight:800}
.ocean-ready .ocean-home{background:radial-gradient(circle,#fff2b7bf,#b4ffe900 72%)}
.ocean-ready .ocean-home::before{border-color:#fff4b6}
.ocean-reef{width:95px;height:95px;filter:drop-shadow(0 8px 3px #075a7940)}
.ocean-water-dot{width:7px;height:7px;border-radius:50%;background:#c6fff256;box-shadow:0 0 0 5px #dcfff007}
.ocean-cell.reachable .ocean-water-dot{background:#eaffb2a1;box-shadow:0 0 0 6px #d2fda413}
.ocean-cell.just-cleared::after{content:"";position:absolute;width:43px;height:43px;border:3px solid #e1ffed;border-radius:50%;pointer-events:none;opacity:.6}
.ocean-surface-bubbles{position:absolute;inset:0;pointer-events:none}
.ocean-surface-bubbles i{position:absolute;width:11px;height:11px;border:2px solid #cafff64d;border-radius:50%}
.ocean-surface-bubbles i:nth-child(1){top:34%;left:4%}.ocean-surface-bubbles i:nth-child(2){bottom:17%;right:2%;width:8px;height:8px}.ocean-surface-bubbles i:nth-child(3){bottom:5%;left:34%;width:15px;height:15px}
.ocean-swimmer{position:absolute;width:83px;height:83px;transform:translate(-50%,-50%);z-index:3;pointer-events:none;filter:drop-shadow(0 6px 3px #07556b40)}
.swimmer-sprite{position:relative;width:100%;height:100%;transform:rotate(var(--heading));transform-origin:center;transition:transform .16s ease-out}
.swimmer-sprite svg{width:100%;height:100%;overflow:visible}
.ocean-swimmer[data-friend="ray"] .swimmer-sprite svg{transform:rotate(90deg)}
.swim-bubbles{position:absolute;left:30%;top:45%;width:7px;height:7px;border:2px solid #e6ffef9e;border-radius:50%;z-index:-1;box-shadow:-11px 5px 0 -1px #d5ffff70,-23px -3px 0 -2px #d5ffff60}
.ocean-swimmer.arrived .swim-bubbles{display:none}
.ocean-dock{min-width:0;padding:22px 20px 20px;background:linear-gradient(145deg,#fbfff4,#edf4de);border-left:2px solid #ffffff91;display:flex;flex-direction:column;justify-content:center;gap:18px}
.ocean-status{display:flex;align-items:center;gap:11px;color:#0c5263;font-size:18px;font-weight:800;line-height:1.2;min-height:76px}
.ocean-status img{flex:none;width:67px;height:76px;object-fit:contain;filter:drop-shadow(0 3px 1px #415f4a1a)}
.ocean-status p{margin:0;min-width:0}
.ocean-bins{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.ocean-bin{--bin-bg:#bceafd;--bin-edge:#55adc9;--bin-light:#e6f8ff;position:relative;min-width:0;min-height:96px;border:0;border-radius:15px 15px 21px 21px;padding:8px 4px 11px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;background:linear-gradient(var(--bin-light) 0 11%,var(--bin-bg) 11%);box-shadow:0 5px 0 var(--bin-edge),inset 0 2px 0 #ffffffbf;cursor:pointer;font:inherit;font-size:15px;font-weight:800;color:#0b4759;transition:transform .15s;touch-action:manipulation}
.ocean-bin[data-material="metal"]{--bin-bg:#ffd7c7;--bin-edge:#df9f86;--bin-light:#fff1d9}.ocean-bin[data-material="paper"]{--bin-bg:#ffe8a0;--bin-edge:#d5b75a;--bin-light:#fff4c9}
.ocean-bin svg{width:40px;height:40px;filter:drop-shadow(0 2px 0 #094d5f20)}
.ocean-bin:not(:disabled):hover{transform:translateY(-2px)}
.ocean-bin:disabled{opacity:.63;cursor:default}
.ocean-action-row{display:flex;flex-direction:column;align-items:stretch;justify-content:space-between;gap:15px;margin-top:0}
.ocean-friends{display:flex;gap:9px;align-items:center;justify-content:center}
.ocean-friends>span{width:40px;height:40px;border:2px solid #a2cdbf6b;border-radius:50%;padding:4px;background:#ffffff69;opacity:.5}
.ocean-friends>span.home{opacity:1;border-color:#73b996;background:#ddf4bd;box-shadow:0 3px 0 #98c392}
.ocean-friends svg{width:100%;height:100%}
.ocean-action-row .primary{min-height:52px;border-radius:17px;font-size:18px;background:#0d5e6b;box-shadow:0 4px 0 #063f4e;padding:10px 13px;line-height:1.1}
.ocean-action-row .primary:disabled{background:#6c9d9f;box-shadow:0 4px 0 #4b7f86;color:#f3ffff}
.ocean-object:focus-visible,.ocean-friend:focus-visible,.ocean-bin:focus-visible{outline:3px solid #093f59;outline-offset:3px;box-shadow:0 0 0 6px #fff5cf}
@media(prefers-reduced-motion:no-preference){.ocean-cell.just-cleared::after{animation:ocean-clear .65s ease-out both}.ocean-status.happy img{animation:ocean-glee .5s ease-out both}.ocean-swimmer.arrived .swimmer-sprite{animation:ocean-arrived .55s ease-out both}@keyframes ocean-clear{from{transform:scale(.3);opacity:.95}to{transform:scale(1.5);opacity:0}}@keyframes ocean-glee{50%{transform:rotate(-8deg) translateY(-5px)}}@keyframes ocean-arrived{50%{scale:1.12}}}
@media(max-width:900px){.ocean-game{grid-template-columns:minmax(0,1.35fr) minmax(235px,.8fr)}.ocean-board{height:350px;margin:0 10px 14px}.ocean-object{width:69px;height:69px}.ocean-friend.start{width:74px;height:74px}.ocean-reef{width:82px;height:82px}.ocean-dock{padding:18px 14px;gap:17px}.ocean-status{font-size:17px;gap:8px}.ocean-status img{width:56px;height:65px}.ocean-bin{font-size:14px}}
@media(max-width:700px){
 .game-nav{padding:4px 11px;min-height:48px}.game-shell{padding:0 10px max(9px,env(safe-area-inset-bottom))}.game-heading{padding:3px 3px 8px;min-height:44px}.game-heading h1{font-size:26px;line-height:1}.game-subtitle{display:none}.game-progress{font-size:12px}.progress-dots{margin-bottom:3px}.progress-dots i{width:9px;height:9px}
 .ocean-game{display:block;max-width:510px;margin:auto;border-radius:25px;border-width:3px}.ocean-topline{padding:11px 14px 2px}.ocean-cove-name{font-size:18px;line-height:1.1}.ocean-counter{font-size:11px;padding:4px 8px}
 .ocean-board{height:clamp(198px,calc((100vw - 46px)*.68),300px);margin:0 9px 11px}.ocean-object{width:64px;height:64px;padding:7px}.ocean-friend.start{width:72px;height:72px}.ocean-friend:not(.start){width:48px;height:48px}.ocean-home{width:70px;height:70px}.ocean-home span{font-size:10px;padding:1px 7px}.ocean-reef{width:76px;height:76px}.ocean-swimmer{width:69px;height:69px}
 .ocean-dock{display:block;border-left:0;border-top:2px solid #ffffffb0;padding:5px 11px 12px}.ocean-status{min-height:43px;max-height:43px;font-size:16px;line-height:1.15;gap:8px;padding:0 1px}.ocean-status img{width:37px;height:42px}.ocean-bins{gap:9px;margin-top:4px}.ocean-bin{min-height:66px;max-height:66px;font-size:14px;padding:6px 3px 7px;border-radius:12px 12px 16px 16px;gap:1px;box-shadow:0 4px 0 var(--bin-edge)}.ocean-bin svg{width:30px;height:30px}
 .ocean-action-row{flex-direction:row;align-items:center;gap:11px;margin-top:15px}.ocean-friends{gap:4px}.ocean-friends>span{width:30px;height:30px;padding:3px}.ocean-action-row .primary{flex:1;min-height:46px;max-width:none;font-size:16px;padding:8px 10px;border-radius:14px;box-shadow:0 3px 0 #063f4e}.ocean-action-row .primary:disabled{box-shadow:0 3px 0 #4b7f86}
}
@media(max-width:360px){
 .game-nav{padding:3px 10px}.game-heading{padding:2px 2px 7px;min-height:42px}.game-heading h1{font-size:24px}.game-progress{font-size:11px}.ocean-topline{padding:9px 11px 1px}.ocean-cove-name{font-size:16px}.ocean-board{margin-bottom:8px}.ocean-object{width:56px;height:56px;padding:5px}.ocean-friend.start{width:61px;height:61px}.ocean-reef{width:64px;height:64px}.ocean-home{width:60px;height:60px}.ocean-home span{bottom:1px;font-size:9px}.ocean-swimmer{width:60px;height:60px}.ocean-dock{padding:3px 9px 10px}.ocean-status{font-size:14px;min-height:42px;max-height:42px;gap:6px}.ocean-status img{width:33px;height:39px}.ocean-bins{gap:8px}.ocean-bin{font-size:13px;min-height:62px;max-height:62px}.ocean-bin svg{width:29px;height:29px}.ocean-action-row{margin-top:13px;gap:9px}.ocean-action-row .primary{font-size:15px}.ocean-friends>span{width:27px;height:27px;padding:2px}.ocean-friends{gap:3px}
}
@media(prefers-reduced-motion:reduce){.swimmer-sprite{transition:none}.ocean-cell.just-cleared::after{opacity:0}}
