:root{font-family:Nunito,ui-rounded,system-ui,sans-serif;color:#123c59;background:#dff8ff}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 15% 0,#fff 0 12%,transparent 38%),linear-gradient(145deg,#dff8ff,#fff3e5);min-height:100vh}.game-shell{max-width:1240px;margin:auto;padding:clamp(12px,3vw,34px);min-height:100dvh}.game-shell.reading-full{max-width:none;margin:0;min-height:100dvh;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}.game-shell:fullscreen{max-width:none;width:100%;min-height:100dvh}.game-top{display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center}.back,.eyebrow{font-weight:900;color:#096e8b}.back{white-space:nowrap}.eyebrow{text-transform:uppercase;font-size:.72rem;letter-spacing:.08em}.top-title h1{margin:2px 0 0;line-height:1.05;font-size:clamp(1.35rem,3.3vw,2.45rem);color:#104f6f}.pearl-meter{font-weight:900;color:#e27691;white-space:nowrap}.pearl-meter span:first-child{font-size:1.45rem}.game-controls{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 10px}.outline,button{border:0;border-radius:999px;padding:11px 15px;min-height:45px;background:#e7f5f8;color:#135673;font:inherit;font-weight:900;cursor:pointer}.outline{border:2px solid #0e7490;background:#fff}.primary{background:#f29ab2;color:#fff;box-shadow:0 4px 0 #d87993}button:focus-visible,.focusable:focus-visible{outline:4px solid #ffc95f;outline-offset:3px}button:hover{transform:translateY(-1px)}button:disabled{opacity:.5;cursor:not-allowed}.world-progress{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin:10px 0 16px}.world-chip{border-radius:999px;padding:8px;text-align:center;font-size:.76rem;font-weight:900;background:#c7e9ef;color:#2c6a77}.world-chip.done{background:#ffdb72;color:#78550a}.world-chip.active{background:#0e7490;color:#fff}.screen{min-height:calc(100dvh - 240px);display:grid;place-items:center}.hero,.game-card{width:min(100%,1000px);border-radius:30px;background:#ffffffdf;border:2px solid #fff;box-shadow:0 16px 44px #276f8326;overflow:hidden}.hero{display:grid;grid-template-columns:1.05fr .95fr}.hero-copy{padding:clamp(22px,5vw,58px)}.hero-copy h2{font-size:clamp(1.75rem,4vw,3.3rem);line-height:1.03;color:#0e5877;margin:.25rem 0 16px}.hero-copy p{font-size:1.15rem;line-height:1.55}.hero img{width:100%;height:100%;min-height:310px;object-fit:cover}.menu-worlds{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;margin:22px 0}.menu-world{padding:10px;border:2px solid #c8e8ee;border-radius:16px;text-align:center;font-weight:900;font-size:.75rem}.game-card{position:relative;min-height:min(650px,72dvh);padding:clamp(14px,3vw,34px);background-size:cover;background-position:center}.game-card::before{content:'';position:absolute;inset:0;background:linear-gradient(110deg,#effdffec,#fff9e7d7);pointer-events:none}.game-card>*{position:relative}.task-head{display:flex;gap:12px;justify-content:space-between;align-items:start}.task-head h2{margin:4px 0;font-size:clamp(1.4rem,3vw,2.2rem);color:#105775}.instruction{max-width:690px;font-size:clamp(1.1rem,2.1vw,1.45rem);font-weight:800;line-height:1.38}.task-count{font-weight:900;color:#dd7690;white-space:nowrap}.playfield{min-height:360px;display:grid;place-items:center;padding:16px}.choice-row,.object-row,.sort-row,.lantern-row{display:flex;gap:clamp(10px,3vw,22px);flex-wrap:wrap;justify-content:center;align-items:center}.answer-button,.game-object,.memory-card,.pearl,.slot{min-width:70px;min-height:64px;border:3px solid #c7e7ed;border-radius:20px;background:#fff;font-size:clamp(1.6rem,5vw,3rem);display:grid;place-items:center}.answer-button{font-size:clamp(1.4rem,5vw,2.4rem);padding:12px 26px}.fish{animation:swim 2s ease-in-out infinite alternate}.fish:nth-child(2n){animation-delay:-.8s}.fish.selected,.game-object.found,.pearl.placed{transform:scale(1.12);border-color:#f0c34f;box-shadow:0 0 0 6px #ffeaa155}.game-object{position:relative}.find-grid{display:grid;grid-template-columns:repeat(3,minmax(78px,1fr));gap:18px;max-width:510px;width:100%}.memory-card{font-size:2.2rem}.memory-card.closed{font-size:0;background:#3b9eb3}.memory-card.closed::after{content:'?';font-size:2rem;color:#fff}.turtle-layout{display:grid;grid-template-columns:auto 1fr;gap:22px;align-items:center}.grid{display:grid;grid-template-columns:repeat(5,58px);grid-template-rows:repeat(4,58px);gap:4px;background:#176f84;padding:5px;border-radius:16px}.grid-cell{background:#dff8ff;border-radius:8px;display:grid;place-items:center;font-size:1.8rem}.grid-cell.block{background:#e7858d}.grid-cell.goal{background:#ffe183}.dpad{display:grid;grid-template-columns:repeat(3,58px);gap:6px}.dpad button{padding:0;font-size:1.5rem}.dpad .up{grid-column:2}.dpad .left{grid-column:1}.dpad .right{grid-column:3}.dpad .down{grid-column:2}.chess-board{display:grid;grid-template-columns:repeat(8,minmax(31px,64px));width:min(92vw,520px);aspect-ratio:1;border:5px solid #8b5a35}.chess-cell{border:0;border-radius:0;padding:0;min-height:0;font-size:clamp(1.2rem,4vw,2.45rem);display:grid;place-items:center}.chess-cell.light{background:#f4d9a5}.chess-cell.dark{background:#9d6b49}.chess-cell.valid{box-shadow:inset 0 0 0 5px #59d6b0}.chess-cell.selected{box-shadow:inset 0 0 0 5px #ffcc54}.chess-explain{text-align:center;max-width:620px}.lantern{width:min(290px,60vw);height:330px;border:14px solid #d79c38;border-radius:45% 45% 20% 20%;background:#1a6680bb;display:grid;grid-template-columns:repeat(2,1fr);gap:10px;padding:30px}.slot{min-width:0;min-height:0;background:#ffffff70;border-color:#ffe198}.slot.placed{background:#fff7bf}.finish{padding:clamp(22px,5vw,60px);text-align:center}.finish h2{font-size:clamp(2rem,5vw,4rem);margin:0;color:#bd7a23}.finish .big-pearl{font-size:5rem;animation:pulse 1.5s infinite alternate}.paused{filter:grayscale(.4);pointer-events:none}.feedback{min-height:2em;text-align:center;font-weight:900;color:#157c50;font-size:1.1rem}.error{color:#be4a55}@keyframes swim{to{transform:translateY(-10px) rotate(4deg)}}@keyframes pulse{to{transform:scale(1.15);filter:drop-shadow(0 0 12px #ffe271)}}dialog{border:0;border-radius:24px;max-width:min(500px,90vw);box-shadow:0 20px 80px #002c43aa;padding:26px;color:#163d59}dialog::backdrop{background:#083f5288}.dialog-actions{display:flex;gap:10px;justify-content:end;margin-top:18px}@media(max-width:780px){.game-top{grid-template-columns:1fr}.pearl-meter{position:absolute;right:16px;top:16px}.hero{grid-template-columns:1fr}.hero img{min-height:210px;max-height:290px}.menu-worlds{grid-template-columns:repeat(3,1fr)}.turtle-layout{grid-template-columns:1fr}.dpad{justify-self:center}.grid{grid-template-columns:repeat(5,minmax(45px,1fr));grid-template-rows:repeat(4,minmax(45px,1fr));width:min(90vw,330px)}.game-card{min-height:620px}.task-head{display:block}.task-count{display:block;margin-top:6px}}@media(max-height:560px) and (min-width:760px){.game-shell{padding-bottom:76px}.game-controls{position:fixed;left:0;right:0;bottom:0;z-index:5;margin:0;padding:7px;justify-content:center;background:#ffffffed;box-shadow:0 -3px 14px #125a6f33}.game-controls .outline{min-height:38px;padding:7px 11px}.screen{min-height:auto}.game-card{min-height:420px}.playfield{min-height:240px}.hero{min-height:390px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;scroll-behavior:auto!important}}
