/* All nine games follow the approved immersive piano; sprites are local WebP. */
.game-immersive .games-shell{--tw:var(--game-wide,100vw);--th:var(--game-short,100vh);--pvw:calc(var(--tw)/100);--pvh:calc(var(--th)/100);--safe-top:env(safe-area-inset-top);--safe-right:env(safe-area-inset-right);--safe-bottom:env(safe-area-inset-bottom);--safe-left:env(safe-area-inset-left);position:fixed!important;inset:0 auto auto 0;width:var(--game-screen-width,100vw)!important;height:var(--game-screen-height,100vh)!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;z-index:100;overflow:hidden;background:radial-gradient(ellipse at 45% 35%,#fff,#eff6ff 85%);color:#244e7d;isolation:isolate;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.game-turned .games-shell{--safe-left:env(safe-area-inset-top);--safe-top:env(safe-area-inset-right);--safe-right:env(safe-area-inset-bottom);--safe-bottom:env(safe-area-inset-left);left:var(--game-screen-width,100vw)!important;width:var(--game-screen-height,100vh)!important;height:var(--game-screen-width,100vw)!important;transform:rotate(90deg);transform-origin:top left}
.game-immersive .games-shell button{touch-action:none;-webkit-tap-highlight-color:transparent}
.game-immersive .games-shell .game-toolbar,.game-immersive .games-shell .track-toolbar,.game-immersive .games-shell .learn-toolbar{position:absolute!important;inset:max(10px,var(--safe-top)) auto auto max(10px,var(--safe-left));margin:0!important;padding:0!important;width:54px!important;height:54px!important;z-index:35;display:block!important;background:none!important}
.game-immersive .games-shell .game-toolbar>*,.game-immersive .games-shell .track-toolbar>*,.game-immersive .games-shell .learn-toolbar>*{display:none!important}
.game-immersive .games-shell .game-toolbar>button:first-child,.game-immersive .games-shell .track-toolbar>button:first-child,.game-immersive .games-shell .learn-toolbar>button:first-child{display:grid!important;place-items:center;width:54px!important;height:54px!important;min-width:54px!important;min-height:54px!important;padding:12px!important;border:1px solid #c7dcf6!important;border-radius:18px!important;background:linear-gradient(145deg,#fff,#eff6ff)!important;color:#3566a8!important;box-shadow:0 4px 0 #cbdcf1,0 7px 18px #3566a81c!important;transform:none!important}
.game-immersive .games-shell .game-toolbar>button:first-child svg,.game-immersive .games-shell .track-toolbar>button:first-child svg,.game-immersive .games-shell .learn-toolbar>button:first-child svg{height:32px!important;width:32px!important}
.game-immersive .games-shell h2{font-family:FalaPiano,system-ui;font-weight:900}
.game-immersive .game-message,.game-immersive .track-message,.game-immersive .learn-message,.game-immersive .puzzle-message{position:absolute!important;left:20%;right:10%;bottom:3px;margin:0!important;padding:0!important;min-height:0!important;max-height:23px;font-size:12px!important;line-height:1.25!important;text-align:center;color:#42658c;z-index:2;overflow:hidden;pointer-events:none}
/* Body: a full-height assembly target and six large pieces visible at a time. */
.game-immersive .body-game .game-workspace{position:absolute;inset:12px 14px 36px 14px;display:grid!important;grid-template-columns:minmax(0,55%) minmax(0,45%);gap:14px;max-width:none;height:auto!important;--game-height:auto}
.game-immersive .body-game .game-stage{width:100%;height:100%!important;min-height:0;padding:0!important;display:flex;align-items:center;justify-content:center;border:0!important;border-radius:0;background:transparent!important;box-shadow:none!important;overflow:visible}
.game-immersive .body-game .game-body{flex:none;max-width:100%;max-height:100%;margin:0!important}
.game-immersive .body-game .game-parts-wrap{height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column;padding:0}
.game-immersive .body-game .game-parts-title{display:none}
.game-immersive .body-game .game-parts{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:none!important;grid-auto-rows:max(82px,calc((var(--th) - 64px)/3));gap:9px;padding:3px 6px 8px;overflow:auto;min-height:0;touch-action:pan-y;overscroll-behavior:contain;scrollbar-width:thin}
.game-immersive .body-game .game-piece{min-height:0!important;padding:4px!important;gap:3px;border:1px solid #cbdcf2;border-bottom:4px solid #c5d8f0;border-radius:18px;background:linear-gradient(145deg,#fff,#eff6ff);box-shadow:0 4px 10px #3566a80c;overflow:hidden}
.game-immersive .body-game .game-piece-art{height:calc(100% - 24px)!important;width:100%;min-height:35px;max-height:none!important}
.game-immersive .body-game .game-piece-label{font-size:14px!important;line-height:1.1}.game-immersive .body-game .game-piece-side{font-size:10px}
.game-immersive .body-game .game-gender{position:absolute;left:15px;bottom:3px;width:160px;max-width:25%;margin:0!important;z-index:5;display:flex}
.game-immersive .body-game .game-gender button{min-height:28px;padding:3px 7px;font-size:12px}
/* Road puzzle: landscape board and six actual road pieces. */
.game-immersive .track-description{position:absolute;width:1px;height:1px;clip:rect(0,0,0,0);overflow:hidden}
.game-immersive .track-workspace{position:absolute;inset:10px 12px 26px;display:grid!important;grid-template-columns:minmax(0,76%) minmax(0,24%);gap:10px;height:auto!important}
.game-immersive .track-stage{min-width:0;min-height:0;height:100%!important;width:100%;padding:0!important;display:flex;align-items:center;justify-content:center;background:none!important;border:0!important;box-shadow:none!important;overflow:visible}
.game-immersive .track-board{max-width:100%;max-height:100%;flex:none;overflow:visible!important;border:0!important;border-radius:22px;background:none!important;box-shadow:none!important;margin:0!important}
.game-immersive .track-scene{overflow:visible}
.game-immersive .track-parts-wrap{min-width:0;min-height:0;height:100%;padding:3px;overflow:hidden;display:flex;flex-direction:column}
.game-immersive .track-parts-title{display:none}
.game-immersive .track-parts{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(3,minmax(0,1fr));gap:8px;min-height:0;height:100%;padding:0;background:none!important}
.game-immersive .track-piece{min-width:0;min-height:0!important;max-height:none;padding:4px!important;display:flex;flex-direction:column;justify-content:center;gap:1px;border:1px solid #cfdef2;border-bottom:3px solid #bfcee1;border-radius:15px;background:#ffffff85;box-shadow:0 4px 10px #3d5c7e10}
.game-immersive .track-piece-art{height:calc(100% - 17px)!important;max-height:none!important;width:100%}
.game-immersive .track-piece-label{font-size:11px!important;line-height:1}
.game-immersive .track-slot{border:2px dashed #ac804e!important;border-radius:10px!important;background:#ebc99450!important;box-shadow:inset 0 3px 5px #96632e35;color:transparent!important;min-width:0;min-height:0;touch-action:none}
.game-immersive .track-slot.is-selected{border-color:#2d78cb!important;background:#b6daff80!important}.game-immersive .track-slot.is-placed{opacity:0;pointer-events:none}
/* Vowels: toy train below, chunky vowel blocks above. */
.game-immersive .vowel-game .learn-subtitle{display:none}
.game-immersive .vowel-pieces{position:absolute;left:22%;right:16px;top:10px;height:36%;display:flex!important;align-items:center;justify-content:space-around;gap:10px;max-width:none;margin:0!important;padding:0!important;background:none!important}
.game-immersive .vowel-piece{height:100%!important;min-height:0!important;width:18%;max-width:138px;min-width:45px;padding:0!important;border:0!important;border-radius:18px;background:none!important;box-shadow:none!important;overflow:visible}
.game-immersive .vowel-piece svg{height:100%!important;width:100%!important;max-height:none!important}
.game-immersive .vowel-piece:disabled{opacity:.16!important}.game-immersive .vowel-piece .learn-check{display:none}
.game-immersive .vowel-stage{position:absolute;left:12px;right:12px;bottom:28px;height:62%;max-width:none;margin:0!important;padding:0!important;display:flex;justify-content:center;align-items:center;overflow:visible;background:none!important;border:0!important;box-shadow:none!important}
.game-immersive .vowel-board{flex:none;max-width:100%;max-height:100%;margin:0!important;overflow:visible}
.game-immersive .vowel-slot{border:2px dashed #b58b55!important;border-radius:9px;background:#e5c39044;min-height:0;min-width:0;box-shadow:inset 0 2px 5px #7d532b33}
.game-immersive .vowel-slot.is-selected{border-color:#2878cd!important;background:#bddfff55}.game-immersive .vowel-slot:disabled{opacity:0}
/* Fruit memory: eight large cards, consistent glossy blue star backs. */
.game-immersive .memory-game .learn-subtitle{display:none}
.game-immersive .memory-stage{position:absolute;inset:14px 18px 40px 76px;max-width:none;margin:0!important;padding:0!important;background:none!important;border:0!important;box-shadow:none!important;overflow:visible}
.game-immersive .memory-grid{height:100%;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr));gap:12px}
.game-immersive .memory-card{position:relative;height:100%!important;min-height:0!important;padding:7px!important;gap:0;border:1px solid #b9cee8;border-bottom:5px solid #b6cce7;border-radius:21px;background:linear-gradient(145deg,#d5ecff 0%,#b8d9fa 55%,#92bfea 100%);box-shadow:inset 2px 3px 3px #ffffffed,inset -2px -3px 4px #6b9bcc70,0 6px 12px #2d4f7726;overflow:hidden}
.game-immersive .memory-card.is-open{background:linear-gradient(145deg,#fff,#f8fbff);box-shadow:inset 1px 2px 3px #fff,0 5px 12px #294f7a20}
.game-immersive .memory-card>svg.fruit-illustration{width:100%;height:100%;max-height:100%;filter:drop-shadow(0 4px 2px #29496c18)}
.game-immersive .memory-card>span:not(.memory-card-back){display:none}
.game-immersive .memory-card-back{width:100%!important;height:100%!important;display:grid;place-items:center;background:none!important;border:0!important;box-shadow:none!important;font-size:0!important}
.game-immersive .memory-card-back svg{width:46%;height:46%;filter:drop-shadow(0 2px 1px #ffffff8f)}
.game-immersive .memory-found{position:absolute;inset:17% 15%;z-index:15;display:flex;align-items:center;justify-content:center;gap:16px;background:#fffffff0;border:2px solid #b9d6fa;border-radius:25px;box-shadow:0 8px 24px #3566a826;padding:10px}.game-immersive .memory-found svg{height:80%;width:40%}
.game-immersive .memory-hint-control{position:absolute;left:12px;bottom:5px;z-index:4}.game-immersive .memory-hint-control button{width:48px;height:45px;min-height:45px;min-width:48px;padding:7px;border-radius:13px}
/* Animals: first four match the reference; more retain all ten animals. */
.game-immersive .animal-game .learn-subtitle{display:none}
.game-immersive .animal-grid{position:absolute;inset:14px 16px 58px 76px;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:calc((var(--th) - 84px)/2);gap:12px;max-width:none!important;margin:0!important;padding:3px 5px 8px;overflow-y:auto;overflow-x:hidden;scroll-snap-type:y mandatory;touch-action:pan-y;overscroll-behavior:contain;scrollbar-width:thin}
.game-immersive .animal-card{display:flex!important;flex-direction:row;justify-content:flex-start;align-items:center;height:100%!important;min-height:0!important;min-width:0;padding:2px 12px 2px 2px!important;gap:2px;background:linear-gradient(145deg,#fff,#eef5ff);border:1px solid #c9d9ed;border-bottom:4px solid #b8cde7;border-radius:22px;box-shadow:0 5px 12px #294f7a17;scroll-snap-align:start;overflow:hidden}
.game-immersive .animal-card>svg{flex:0 1 61%;height:100%!important;width:61%!important;max-height:none;max-width:none;filter:drop-shadow(0 3px 2px #32527118)}
.game-immersive .animal-card>span{font-family:FalaPiano,system-ui;font-weight:900;font-size:clamp(15px,calc(var(--pvw)*2.4),28px)!important;line-height:1.1;color:#245488;overflow-wrap:anywhere;min-width:0}
.game-immersive .animal-card>i{display:none}.game-immersive .animal-card.is-selected{background:linear-gradient(145deg,#e5f5ff,#c7e3ff)!important;border:3px solid #548fe0!important;box-shadow:0 0 0 3px #b8d7ff,inset 0 1px 0 #fff}
.game-immersive .animal-selected{position:absolute;left:78px;right:16px;bottom:5px;height:44px;max-width:none;margin:0!important;padding:0!important;display:flex;align-items:center;justify-content:space-between;gap:9px;background:none;border:0;box-shadow:none}
.game-immersive .animal-selected-copy{font-size:15px}.game-immersive .animal-selected-copy .animal-playful{display:none}
.game-immersive .animal-selected>div:last-child{display:flex;align-items:center;gap:7px}
.game-immersive .animal-selected button{min-height:42px!important;height:42px;width:auto;min-width:46px;padding:6px 10px!important;border:1px solid #b5cdeb;border-radius:13px;background:#fff;color:#3566a8;font-size:12px;font-weight:700}
.game-immersive .animal-selected button svg{height:26px;width:26px}
.game-immersive .animal-game .learn-message{position:absolute!important;width:1px;height:1px;clip:rect(0,0,0,0);overflow:hidden}
/* Rings: the existing rear/post/front occlusion stays intact. */
.game-immersive .colors-instruction{position:absolute;left:20%;right:15%;top:3px;font-size:13px;text-align:center;min-height:0;margin:0;z-index:3;pointer-events:none}
.game-immersive .colors-workspace{position:absolute;inset:28px 12px 30px;display:grid!important;grid-template-columns:minmax(0,70%) minmax(0,30%);gap:12px;height:auto!important;align-items:stretch}
.game-immersive .colors-pins{min-height:0;height:100%;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:7px;padding:0;background:none;border:0}
.game-immersive .colors-pin{min-width:0;min-height:0;height:100%;padding:0!important;background:none;border:0;box-shadow:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0}
.game-immersive .colors-pin>svg{width:100%;height:calc(100% - 20px);max-width:none;max-height:none}
.game-immersive .colors-name{font-size:13px;line-height:1.1;margin:0}
.game-immersive .colors-tray-wrap{height:100%;min-height:0;padding:4px;border:1px solid #d3dfed;border-radius:22px;background:linear-gradient(145deg,#fff,#e8f0fa)}
.game-immersive .colors-tray-title{display:none}.game-immersive .colors-tray{display:grid!important;height:100%;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:5px;padding:0}
.game-immersive .colors-ring{min-height:0!important;min-width:0;padding:0!important;gap:0;border:0;border-radius:15px;background:none;box-shadow:none;overflow:hidden;display:flex;flex-direction:column;justify-content:center}
.game-immersive .colors-ring svg{height:calc(100% - 14px);width:100%;max-height:none}.game-immersive .colors-ring span{font-size:10px}
/* Dress-up retains every original garment, material detail, and fit anchor. */
.game-immersive .dress-instruction{display:none}
.game-immersive .dress-workspace{position:absolute;inset:10px 12px 30px;display:grid!important;grid-template-columns:minmax(0,47%) minmax(0,53%);gap:12px;height:auto!important;min-height:0}
.game-immersive .dress-doll-panel{position:relative;height:100%;min-height:0;padding:0;border:0;background:none;box-shadow:none;display:flex;align-items:center;justify-content:center}
.game-immersive .dress-gender{position:absolute;left:68px;right:0;top:0;z-index:3;max-width:210px;margin:auto}.game-immersive .dress-gender button{min-height:30px;padding:4px 12px;font-size:12px}
.game-immersive .dress-stage{height:calc(100% - 35px);width:100%;margin-top:35px;min-height:0;padding:0;display:flex;align-items:center;justify-content:center}
.game-immersive .dress-figure{flex:none}.game-immersive .dress-person{filter:drop-shadow(0 5px 3px #31517014)}
.game-immersive .dress-wardrobe{height:100%;min-height:0;min-width:0;display:flex;flex-direction:column;padding:7px;border:1px solid #cbdcf1;border-radius:21px;background:linear-gradient(145deg,#fff,#eaf2fd);overflow:hidden}
.game-immersive .dress-groups{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;flex:none;padding:0;margin:0 0 7px}
.game-immersive .dress-groups button{min-height:36px;padding:4px!important;font-size:11px!important;gap:3px}.game-immersive .dress-groups svg{width:20px;height:20px}
.game-immersive .dress-items{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:max(88px,calc((var(--th) - 140px)/2));min-height:0;flex:1;gap:6px;overflow-y:auto;touch-action:pan-y;overscroll-behavior:contain;padding:2px 3px}
.game-immersive .dress-item{min-height:0!important;min-width:0;padding:3px!important;gap:0;background:linear-gradient(145deg,#fff,#f0f6ff);border-radius:14px;box-shadow:0 3px 6px #294f7a10;overflow:hidden}
.game-immersive .dress-item-art{height:calc(100% - 20px)!important;max-height:none!important;width:100%;filter:drop-shadow(0 3px 1px #36537615)}.game-immersive .dress-item-name{font-size:10px!important;line-height:1.1}
.game-immersive .dress-item svg{width:100%;height:100%}.game-immersive .dress-scroll-controls{flex:none;min-height:24px;height:24px;margin:3px 0 0}.game-immersive .dress-scroll-controls button{min-height:24px;height:24px;padding:2px 9px}
.game-immersive .dress-ready,.game-immersive .dress-worn{display:none}.game-immersive .dress-message{position:absolute;left:22%;right:15%;bottom:4px;font-size:11px;line-height:1.2;margin:0!important;min-height:0!important;max-height:23px;overflow:hidden;text-align:center;pointer-events:none}
/* Jigsaws: high quality images and full-height assembly, large pieces at right. */
.game-immersive .puzzle-mode-row{position:absolute;left:80px;bottom:3px;right:12px;margin:0;display:flex;align-items:center;justify-content:center;gap:8px;z-index:3}
.game-immersive .puzzle-mode-row button{min-height:30px;padding:4px 10px;font-size:12px}
.game-immersive .puzzle-workspace{position:absolute;inset:12px 12px 42px;display:grid!important;grid-template-columns:minmax(0,68%) minmax(0,32%);gap:12px;height:auto!important;min-height:0}
.game-immersive .puzzle-stage{height:100%;min-height:0;min-width:0;padding:0!important;display:flex;align-items:center;justify-content:center;background:none!important;border:0!important;box-shadow:none!important}
.game-immersive .puzzle-board{flex:none;max-width:100%;max-height:100%;margin:0!important;border:7px solid #dfb67d!important;border-bottom:10px solid #c79a61!important;border-radius:18px;background:#efdbc0;box-shadow:inset 0 1px 2px #fff,0 7px 12px #7d674128;overflow:hidden}
.game-immersive .puzzle-parts-wrap{min-width:0;min-height:0;height:100%;padding:4px;border:1px solid #d7b989;border-bottom:5px solid #c79e69;border-radius:19px;background:linear-gradient(145deg,#f4e4cc,#e6c99f);display:flex;flex-direction:column;overflow:hidden}
.game-immersive .puzzle-parts-title{display:none}.game-immersive .puzzle-parts{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:none!important;grid-auto-rows:calc((var(--th) - 80px)/3);min-height:0;flex:1;gap:6px;padding:4px;overflow-y:auto;touch-action:pan-y}
.game-immersive .puzzle-piece{min-height:0!important;height:100%!important;min-width:0;padding:0!important;border:0;background:none;box-shadow:none;overflow:visible}.game-immersive .puzzle-piece svg{height:100%;width:100%;filter:drop-shadow(0 3px 1px #66523f55)}
.game-immersive .puzzle-piece.is-used{opacity:.1}.game-immersive .puzzle-image-label{display:none}
/* Menus/results stay within the landscape viewport; gestures never scroll the app. */
.game-immersive .game-success,.game-immersive .track-success,.game-immersive .learn-success,.game-immersive .puzzle-success{position:absolute!important;inset:0!important;z-index:40;padding:12px 12px 12px 76px!important;background:#edf5fff0;backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center}
.game-immersive .game-success-card,.game-immersive .track-success-card,.game-immersive .learn-success-card,.game-immersive .puzzle-success-card{max-height:100%;overflow:auto;max-width:480px;width:auto;padding:14px 22px!important;border-radius:25px;background:#fff;box-shadow:0 10px 28px #3566a826}
.game-immersive .game-success .game-icon-large,.game-immersive .track-success .game-icon-large,.game-immersive .learn-success .game-icon-large,.game-immersive .puzzle-success .game-icon-large{width:120px;min-width:120px;min-height:95px;height:95px;padding:12px;font-size:16px}
/* Keep the picker above game controls and scroll only its figure list. */
.game-immersive .puzzle-picker {
  position:absolute!important;
  inset:0!important;
  z-index:90;
  padding:max(10px,var(--safe-top)) max(10px,var(--safe-right)) max(10px,var(--safe-bottom)) max(10px,var(--safe-left))!important;
  overflow:hidden;
}
.game-immersive .puzzle-picker-card {
  display:flex;
  flex-direction:column;
  max-height:100%;
  min-height:0;
  width:100%;
  max-width:none;
  padding:10px;
  overflow:hidden;
}
.game-immersive .puzzle-picker-heading { flex:none; }
.game-immersive .puzzle-figures {
  grid-auto-rows:max-content;
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:3px 3px 8px;
}
.game-immersive .puzzle-figures,
.game-immersive .puzzle-figures button {
  touch-action:manipulation;
}
.game-turned .game-drag-ghost,.game-turned .track-drag-ghost,.game-turned .learn-drag-ghost,.game-turned .colors-drag-ghost,.game-turned .dress-drag-ghost,.game-turned .puzzle-drag-ghost{transform:translate(-50%,-50%) rotate(90deg)!important}
.game-immersive .game-drag-ghost,.game-immersive .track-drag-ghost,.game-immersive .learn-drag-ghost,.game-immersive .colors-drag-ghost,.game-immersive .dress-drag-ghost,.game-immersive .puzzle-drag-ghost{z-index:9999}
@media(prefers-reduced-motion:reduce){.games-shell *, .games-shell *::before,.games-shell *::after{animation-duration:0s!important;transition-duration:0s!important}}
.high-contrast .games-shell button{border-color:#476d99!important}.high-contrast .games-shell{background:#fff!important;color:#163c6b}
/* Intrinsic controls and responsive gestures. */
.game-immersive .games-shell{touch-action:manipulation}
.game-immersive .animal-card{touch-action:pan-y!important}
.game-immersive .toy-scroll-controls{display:flex;height:35px;flex:none;gap:8px;justify-content:center;margin-top:4px}
.game-immersive .toy-scroll-controls button{height:34px;min-height:34px;min-width:60px;border-radius:12px;background:#fff;border:1px solid #b6cde8;color:#3566a8;font-size:25px;line-height:1}
.game-immersive .body-game .game-parts{grid-auto-rows:max(75px,calc((var(--th) - 106px)/3))}
.game-immersive .track-slot{width:var(--slot-width)!important;height:var(--slot-height)!important;border:0!important;background:transparent!important;box-shadow:none!important}.game-immersive .track-slot span{display:none}.game-immersive .track-slot.is-selected{background:#aed5ff60!important;outline:3px solid #68a6e9;outline-offset:-3px}
.game-immersive .puzzle-controls{position:absolute;left:76px;right:12px;bottom:3px;display:flex;justify-content:center;align-items:center;gap:8px;z-index:3;margin:0!important;padding:0!important}
.game-immersive .puzzle-controls button{min-height:31px;height:31px;padding:3px 10px;font-size:12px}.game-immersive .puzzle-controls button svg{width:25px;height:25px}
.game-immersive .puzzle-toolbar-restart{display:none!important}.game-immersive .puzzle-caption,.game-immersive .puzzle-message{position:absolute!important;width:1px;height:1px;clip:rect(0,0,0,0);overflow:hidden}
/* Six life-like instruments fill the stage; rhythm/clock choices precede play. */
.game-immersive .drums-mode-row,.game-immersive .drums-footnote{display:none!important}
.game-immersive .drums-stage{position:absolute;inset:22px 14px 36px;display:flex;align-items:center;justify-content:center;margin:0!important;padding:0!important;min-height:0;background:none;border:0}
.game-immersive .drums-instrument{flex:none;max-width:100%;max-height:100%;margin:0!important}
.game-immersive .drums-instruction{position:absolute;left:20%;right:20%;bottom:3px;margin:0!important;min-height:0;font-size:12px;line-height:1.2;z-index:3;text-align:center}
.game-immersive .drums-summary{position:absolute;left:25%;right:25%;top:4px;min-height:0!important;height:28px;padding:0!important;margin:0!important;display:flex;flex-direction:column;gap:3px;align-items:center;justify-content:center;border:0!important;background:none!important;box-shadow:none!important;z-index:3;pointer-events:none}
.game-immersive .drums-summary>strong{font-size:15px;line-height:1.1}.game-immersive .drums-summary progress{height:4px;width:55%;border:0;accent-color:#5189cb}
.game-immersive .drums-metronome{position:absolute;right:15px;bottom:2px;min-height:0;height:25px;display:flex;align-items:center;gap:7px;background:none;border:0;margin:0;padding:0;font-size:11px;z-index:3}
.game-immersive .drums-metronome-beats{display:flex;gap:3px}.game-immersive .drums-metronome-beats i{width:9px;height:9px;padding:0;border:0;border-radius:50%;background:#c6d9f0;box-shadow:none}.game-immersive .drums-metronome-beats i.is-current{background:#477db9}
.game-immersive .drums-modal{position:absolute!important;inset:0!important;z-index:20;padding:12px 15px 12px 78px!important;background:linear-gradient(145deg,#f7fbff,#e9f2ff);display:flex;align-items:stretch;justify-content:stretch;overflow:hidden}
.game-immersive .drums-modal-card{width:100%;max-width:none;height:100%;max-height:100%;padding:0!important;display:flex;flex-direction:column;gap:9px;background:transparent!important;border:0!important;box-shadow:none!important;overflow:hidden}
.game-immersive .drums-modal-card h2{font-size:clamp(21px,calc(var(--pvw)*3),33px);line-height:1.2}
.game-immersive .drums-rhythm-grid{flex:1;min-height:0;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:8px;overflow:auto;padding:2px 3px}
.game-immersive .drums-rhythm-choice{min-height:0!important;padding:5px!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:1px solid #c9d9ee;border-bottom:4px solid #bdd0e9;border-radius:17px;background:linear-gradient(145deg,#fff,#f3f8ff);overflow:hidden}
.game-immersive .drums-rhythm-cover{display:flex;width:100%;height:52%;min-height:30px;gap:0}.game-immersive .drums-rhythm-cover>span{display:block;width:25%;height:100%}
.game-immersive .drums-rhythm-choice svg{height:100%;width:100%;max-height:none}.game-immersive .drums-rhythm-choice>strong{font-size:clamp(11px,calc(var(--pvw)*1.5),17px);line-height:1.1}.game-immersive .drums-rhythm-choice>span:not(.drums-rhythm-cover){font-size:10px}
.game-immersive .drums-free-choice{background:linear-gradient(145deg,#5487bf,#3566a8);color:white}.game-immersive .drums-free-choice>svg{height:65%}
.game-immersive .drums-clock-option{height:36px;min-height:36px;align-self:center;display:flex;align-items:center;justify-content:center;gap:8px;min-width:230px;padding:5px 12px;border-radius:12px;background:#fff;border:1px solid #b6cce9;color:#3566a8;font-size:13px;font-weight:700}.game-immersive .drums-clock-option svg{height:27px;width:27px}.game-immersive .drums-clock-option[aria-pressed=true]{background:#c9e3ff;border-color:#518fd3}
.game-immersive .drums-success .drums-modal-card{align-items:center;justify-content:center;gap:15px;overflow:auto}.game-immersive .drums-complete-check{display:grid;place-items:center;width:70px;height:70px;border-radius:50%;background:#d7eaff;font-size:48px;color:#3566a8}.game-immersive .drums-success-actions{display:flex;gap:18px}.game-immersive .drums-success-actions button{width:100px;height:90px;min-width:100px;min-height:90px}
/* Reset the old compact grid before positioning the immersive workspace. */
.game-immersive .games-shell:not(.games-menu){display:block!important}
.game-immersive .vowel-pieces,.game-immersive .vowel-stage{grid-column:auto;grid-row:auto;width:auto!important}
.game-immersive .learn-game .vowel-board{border:0!important;background:none!important;box-shadow:none!important}
.game-immersive .memory-stage{width:auto!important;min-width:0}
.game-immersive .memory-grid{width:100%;min-width:0}
.game-immersive .learn-game.memory-game .memory-card{background:linear-gradient(145deg,#d5ecff,#b8d9fa 55%,#92bfea);border-color:#b1cce9;border-bottom-color:#97b8de;box-shadow:inset 2px 3px 3px #ffffffed,inset -2px -3px 4px #6b9bcc70,0 6px 12px #2d4f7726}
.game-immersive .learn-game.memory-game .memory-card.is-open{background:linear-gradient(145deg,#fff,#f8fbff);border-color:#c9d9ed;border-bottom-color:#b6cce7;box-shadow:inset 1px 2px 3px #fff,0 5px 12px #294f7a20}
.game-immersive .track-piece-art{flex:1 1 0;min-height:0;border-radius:0}
.game-immersive .dress-tray-controls{flex:none;min-height:29px;height:29px;margin:0;gap:7px}.game-immersive .dress-tray-controls button{min-height:29px;height:29px;padding:2px 9px}
.game-immersive .dress-item>span:not(.dress-item-art){font-size:11px;line-height:1.1}
.game-immersive .puzzle-figures{grid-template-columns:repeat(6,minmax(0,1fr))!important}
.game-immersive .colors-success{position:absolute;left:10%;right:10%;bottom:8px;z-index:20;display:flex;align-items:center;justify-content:center;gap:22px;border:1px solid #bfd3eb;border-radius:22px;background:#fffffff5;padding:8px 18px;box-shadow:0 5px 15px #3566a825}.game-immersive .colors-success h3{font-size:19px}.game-immersive .colors-success .action-row{margin:0;display:flex;gap:15px}.game-immersive .colors-success button{height:60px;width:65px;min-height:60px;padding:9px}
.game-immersive .colors-message{position:absolute;left:18%;right:12%;bottom:3px;margin:0!important;min-height:0!important;max-height:22px;font-size:12px;line-height:1.25;z-index:3;overflow:hidden;text-align:center;pointer-events:none}
.game-immersive .dress-gender{flex-direction:row!important;width:190px!important;left:65px;right:5px;max-width:calc(100% - 70px)}
.game-immersive .dress-doll-panel{flex-direction:column!important}
.game-immersive .puzzle-piece-art{display:block;width:100%;height:100%;min-height:0}
.game-immersive .puzzle-parts:has([data-puzzle-piece="3"]):not(:has([data-puzzle-piece="5"])){grid-template-rows:repeat(2,minmax(0,1fr));grid-auto-rows:auto}
.game-immersive .drums-stage{width:auto!important;height:calc(100% - 58px)!important;align-self:stretch;grid-column:auto;grid-row:auto}
.game-immersive .drums-summary{left:auto;right:16px;top:3px;width:140px;height:23px}.game-immersive .drums-summary>strong{font-size:12px}
.game-immersive .drums-footnote:has(.drums-retry){display:block!important;position:absolute;left:76px;bottom:7px;z-index:31;padding:0;margin:0}.game-immersive .drums-footnote .drums-retry{margin:0;min-height:44px;background:#fff}
/* Approved body refinement: sixteen independent pieces, all visible together. */
.game-immersive .body-game .game-workspace{inset:10px 12px 38px;grid-template-columns:minmax(0,.44fr) minmax(0,.56fr);gap:10px}
.game-immersive .body-game .game-parts-wrap{display:block;width:100%;height:100%;min-width:0;padding:0;overflow:visible}
.game-immersive .body-game .game-parts{width:100%;height:100%;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:repeat(4,minmax(0,1fr))!important;grid-auto-rows:auto;align-content:stretch;gap:6px;padding:6px;overflow:hidden!important;touch-action:none;scrollbar-width:none;border:1px solid #cbdff5;border-radius:22px;background:linear-gradient(155deg,#eaf3ff,#f8fbff);box-shadow:inset 0 1px 3px #3566a80a}
.game-immersive .body-game .game-piece{width:100%;height:100%;min-width:0!important;min-height:0!important;padding:4px 3px 5px!important;gap:2px;border:1px solid #c8ddf5;border-bottom:3px solid #bbd1ed;border-radius:16px;background:linear-gradient(145deg,#fff,#f1f7ff);box-shadow:0 3px 4px #2b507b0c;overflow:hidden}
.game-immersive .body-game .game-piece-art{height:0!important;flex:1 1 0;min-height:0!important;width:100%;max-height:none!important;filter:none}
.game-immersive .body-game .game-piece-art svg{width:100%;height:100%;max-width:none!important;max-height:none!important}
.game-immersive .body-game .game-piece-label{flex:none;color:#294d82;font-family:FalaPiano,system-ui;font-weight:900;font-size:clamp(11px,calc(var(--pvw)*1.6),19px)!important;line-height:1.1;max-width:100%;white-space:nowrap}
.game-immersive .body-game .game-piece.is-selected{background:linear-gradient(145deg,#e2f2ff,#bfddff);border:2px solid #5b9ee7;border-bottom:3px solid #477fc6;box-shadow:0 0 0 2px #c0dcff}
.game-immersive .body-game .game-piece.is-complete{opacity:.45;background:#eff5fd;border-color:#c7d9ef;box-shadow:none}
.game-immersive .body-game .game-piece-check{height:15px;width:15px;right:2px;top:2px;font-size:10px;background:#d9e9fc;color:#3566a8}
.game-immersive .body-game .game-gender{left:12px;bottom:4px;width:180px;max-width:34%;padding:2px;border-radius:12px}
.game-immersive .body-game .game-gender button{min-height:30px;padding:3px 8px;font-size:12px}
.game-immersive .body-game .game-message{left:200px;right:14px;bottom:6px;font-size:12px!important;white-space:nowrap;text-overflow:ellipsis}
.body-game .body-feature-guide,.body-game .body-hair-guide{fill:none!important;pointer-events:none}
.body-game .body-part.is-selected .body-empty-shape{stroke:#4c94dd;stroke-width:2.4;stroke-dasharray:4 3}
.body-game .body-part--placed image{pointer-events:none}
@media(max-height:350px),(max-width:350px){.game-immersive .body-game .game-parts{gap:4px;padding:4px;border-radius:16px}.game-immersive .body-game .game-piece{border-radius:11px;padding:3px 2px 4px!important}.game-immersive .body-game .game-workspace{gap:7px}.game-immersive .body-game .game-piece-label{font-size:11px!important}}
.body-game .body-feature-guide,.body-game .body-hair-guide{opacity:0}
.body-game .body-part.is-selected .body-feature-guide,.body-game .body-part.is-selected .body-hair-guide{opacity:1}
.game-immersive .body-game .game-workspace{bottom:52px}
.game-immersive .body-game .game-gender button{min-height:44px}
.game-immersive .body-game .game-gender{bottom:4px;padding:2px}
/* Persistent, shared controls: back at left, restart at right, in every game. */
.game-immersive .games-shell{--game-action-gutter:max(76px,calc(var(--safe-right) + 66px))}
.game-immersive .games-shell .game-toolbar,.game-immersive .games-shell .track-toolbar,.game-immersive .games-shell .learn-toolbar{right:max(10px,var(--safe-right))!important;width:auto!important;display:flex!important;justify-content:space-between;pointer-events:none;z-index:80}
.game-immersive .games-shell .game-toolbar>button:first-child,.game-immersive .games-shell .track-toolbar>button:first-child,.game-immersive .games-shell .learn-toolbar>button:first-child{pointer-events:auto}
.game-immersive .games-shell .game-toolbar>.game-restart-control,.game-immersive .games-shell .track-toolbar>.game-restart-control,.game-immersive .games-shell .learn-toolbar>.game-restart-control,.game-immersive .piano-game>.game-restart-control{position:absolute!important;top:0;right:0;display:grid!important;place-items:center;width:54px!important;height:54px!important;min-width:54px!important;min-height:54px!important;padding:10px!important;margin:0!important;border:1px solid #c7dcf6!important;border-radius:18px!important;background:linear-gradient(145deg,#fff,#eff6ff)!important;color:#3566a8!important;box-shadow:0 4px 0 #cbdcf1,0 7px 18px #3566a81c!important;transform:none!important;pointer-events:auto;z-index:80}
.game-immersive .game-restart-control svg{height:34px!important;width:34px!important;max-width:none;max-height:none;pointer-events:none}
.game-immersive .game-restart-control:focus-visible{outline:4px solid #286ab7!important;outline-offset:3px}
.game-immersive .game-restart-control:active{background:#dcecff!important;box-shadow:0 2px 0 #b6cde9!important}
.game-immersive .body-game .game-workspace,.game-immersive .track-workspace,.game-immersive .colors-workspace,.game-immersive .dress-workspace,.game-immersive .puzzle-workspace{right:var(--game-action-gutter)!important}
.game-immersive .track-workspace{grid-template-columns:minmax(0,3fr) minmax(0,1fr)}
.game-immersive .vowel-pieces,.game-immersive .vowel-stage,.game-immersive .memory-stage,.game-immersive .animal-grid,.game-immersive .animal-selected,.game-immersive .drums-stage,.game-immersive .puzzle-controls{right:var(--game-action-gutter)!important}
.game-immersive .drums-summary{right:var(--game-action-gutter)!important}
.game-immersive .drums-stage{width:auto!important}
.game-immersive .drums-modal{padding-right:var(--game-action-gutter)!important}
.game-immersive .piano-game>.piano-restart{top:max(10px,var(--safe-top,0px))!important;right:max(10px,var(--safe-right,0px))!important}
.game-immersive .piano-game>.piano-back{top:max(10px,var(--safe-top,0px));left:max(10px,var(--safe-left,0px));width:54px;height:54px;min-width:54px;min-height:54px;border-radius:18px;z-index:80}
.game-immersive .piano-picker,.game-immersive .piano-completion,.game-immersive .piano-error{padding-right:max(76px,calc(66px + var(--safe-right,0px)))}
/* All playfield layers share one projective plane at the bottom of the tray. */
.track-tray,.track-ground{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.track-ground{transform-origin:0 0;transform-style:flat;border-radius:5.5% / 8.3333%;overflow:hidden}
.track-ground .track-slots{pointer-events:none}
.track-ground .track-slot:not(.is-placed){pointer-events:auto}
.track-ground .track-scene{overflow:visible}

/* Three-quarter vehicles stand above the projected playfield. */
.track-vehicles{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
