.car-wrapper{transform-origin:50%;will-change:transform;width:100%;height:100%;transition:transform .2s ease-out;display:block}.car-wrapper.flipped{transform:rotateY(180deg);outline:3px solid #0f0!important}.car-wrapper.moving svg{animation:.4s ease-in-out infinite alternate bounce}@keyframes bounce{0%{transform:scaleX(-1)translateY(0)}to{transform:scaleX(-1)translateY(-10px)}}.scene-board{place-items:center;width:100%;min-width:0;height:100%;min-height:0;display:grid}.scene-grid{aspect-ratio:1;grid-template-columns:8% repeat(var(--grid-size), minmax(0, 1fr));grid-template-rows:8% repeat(var(--grid-size), minmax(0, 1fr));background:#cbd5e1;border-radius:10px;gap:2px;width:min(100%,400px);max-height:100%;padding:2px;display:grid;overflow:hidden}.grid-cell{color:#334155;background:#fff;justify-content:center;align-items:center;min-width:0;min-height:0;font-size:clamp(.625rem,2.5vw,.875rem);font-weight:600;display:flex}.grid-heading{background:#f1f5f9;font-size:clamp(.625rem,2vw,.75rem)}.robot-cell{background:#fef3c7;border:2px solid #f59e0b}.robot-orientation{place-items:center;width:100%;height:100%;transition:transform .2s ease-out;display:grid;transform:rotate(270deg)}.robot-orientation.direction-right{transform:rotate(0)}.robot-orientation.direction-down{transform:rotate(90deg)}.robot-orientation.direction-left{transform:rotate(180deg)}.avatar-icon{place-items:center;width:min(80%,40px);height:min(80%,40px);display:grid}.avatar-icon svg{width:100%;height:100%}.star-icon{font-size:clamp(.75rem,3vw,1.25rem)}@media (width<=900px) and (pointer:coarse){.scene-grid{width:min(100%,400px)}}*{box-sizing:border-box}body{color:#212529;background:#f8f9fa;margin:0;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.app{flex-direction:column;height:100vh;display:flex}.app-header{background:#f8f9fa;border-bottom:2px solid #e9ecef;justify-content:space-between;align-items:center;padding:1rem 2rem;display:flex}.app-header h1{color:#212529;margin:0;font-size:1.5rem}.app-main{flex:1;display:flex}.blockly-area{border-right:2px solid #e9ecef;width:60%;display:flex;position:relative}.blockly-div{width:100%;height:100%}.screen-area{background:#f8f9fa;justify-content:center;align-items:center;width:40%;display:flex;overflow:auto}.custom-trashcan{cursor:pointer;z-index:10;color:#6c757d;background:#fff;border:2px solid #dee2e6;border-radius:12px;justify-content:center;align-items:center;width:56px;height:56px;transition:all .2s;display:flex;position:absolute;bottom:20px;right:20px;box-shadow:0 2px 8px #0000001a}.custom-trashcan:hover{color:#fff;background:#dc3545;border-color:#dc3545;transform:scale(1.1);box-shadow:0 4px 12px #dc35454d}.custom-trashcan:active{transform:scale(.95)}.custom-trashcan svg{width:28px;height:28px}.home-link{color:#495057;white-space:nowrap;border-radius:6px;align-items:center;min-height:44px;margin-right:1.5rem;padding:.4rem .8rem;font-size:.95rem;font-weight:600;text-decoration:none;transition:all .2s;display:inline-flex}.home-link:hover{color:#212529;background:#e9ecef}.avatar-selector{background:#fff;border:1px solid #e2e8f0;border-radius:16px;justify-content:flex-start;align-items:center;gap:6px;padding:8px;display:flex}.selector-label{color:#495057;margin-right:4px;font-size:.95rem;font-weight:600}.avatar-option{cursor:pointer;background:#f8f9fa;border:2px solid #0000;border-radius:10px;flex-direction:column;justify-content:center;align-items:center;gap:4px;min-width:68px;min-height:68px;padding:4px 6px;transition:all .2s;display:flex}.avatar-option:hover{background:#e9ecef}.avatar-option.selected{background:#e8f4fd;border-color:#4c97ff;box-shadow:0 4px 12px #4c97ff33}.avatar-option-icon{width:34px;height:34px;display:block}.avatar-option-icon svg{width:100%;height:100%}.avatar-option-name{color:#334155;white-space:nowrap;font-size:11px;font-weight:600}.screen{background:#f8f9fa;border-radius:12px;flex-direction:column;gap:1rem;padding:1rem;display:flex}.grid{grid-template-columns:40px repeat(var(--grid-size), 50px);grid-template-rows:40px repeat(var(--grid-size), 50px);background:#dee2e6;border-radius:8px;gap:2px;padding:2px;display:grid}.cell{color:#495057;background:#fff;justify-content:center;align-items:center;font-size:.85rem;font-weight:600;display:flex}.cell.header{color:#212529;background:#e9ecef;font-weight:700}.cell.robot{background:#fff3cd;border:2px solid #ffc107}.robot-emoji{filter:drop-shadow(0 2px 4px #0000001a);font-size:2.2rem;line-height:1;transition:transform .3s;display:inline-block}.robot-orientation{justify-content:center;align-items:center;width:40px;height:40px;transition:transform .3s;display:flex}.robot-svg{filter:drop-shadow(0 2px 4px #00000026);width:48px;height:48px;transition:transform .3s}.fuel-icon{font-size:1.5rem}.btn{cursor:pointer;border:none;border-radius:6px;padding:.5rem 1.5rem;font-size:1rem;transition:all .2s}.btn-primary{color:#fff;background:#4c97ff}.btn-primary:hover{background:#3d85e8}.btn-secondary{color:#495057;background:#e9ecef}.btn-secondary:hover{background:#dee2e6}.btn-fuel{color:#fff;background:#28a745}.btn-fuel:hover{background:#218838}.controls{justify-content:center;align-items:center;gap:.5rem;padding:.5rem;display:flex}.score{color:#856404;background:#fff3cd;border-radius:8px;padding:.5rem 1rem;font-size:1rem;font-weight:600}.mobile-game-actions{display:none}.game-layout{color:#0f172a;background:#f8fafc;flex-direction:column;width:100%;height:100dvh;min-height:0;font-family:system-ui,sans-serif;display:flex}.game-header{background:#fff;border-bottom:1px solid #e2e8f0;flex:0 0 60px;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:12px;min-height:60px;padding:0 16px;display:grid}.home-short{display:none}.game-header h1{text-align:center;white-space:nowrap;margin:0;font-size:clamp(16px,2vw,22px)}.short-title{display:none}.header-actions{justify-content:flex-end;align-items:center;gap:8px;display:flex}.header-actions button{min-height:44px;font:inherit;white-space:nowrap;cursor:pointer;border:0;border-radius:10px;padding:0 12px;font-size:14px}.header-actions button,.menu-button,.command-button,.sheet-action,.close-menu,.sheet-backdrop{cursor:pointer}.run-button{color:#fff;background:#3b82f6}.reset-button{color:#1f2937;background:#f3f4f6;display:none}.game-content{flex:1;grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;min-height:0;padding:12px;display:grid}.scene-section{flex-direction:column;gap:10px;min-width:0;min-height:0;display:flex}.scene-field{flex:1;place-items:center;min-width:0;min-height:0;display:grid}.scene-actions{background:#fff;border:1px solid #e2e8f0;border-radius:14px;justify-content:space-between;align-items:center;gap:10px;min-height:52px;padding:8px 12px;display:flex}.scene-action{color:#0f172a;min-height:38px;font:inherit;white-space:nowrap;cursor:pointer;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:8px 12px;font-size:14px;font-weight:600}.scene-action:hover{filter:brightness(.96)}.scene-score{color:#854d0e;white-space:nowrap;background:#fef3c7;border-radius:10px;margin:0;padding:8px 12px;font-size:14px;font-weight:700}.program-section{background:#fff;border:1px solid #e2e8f0;border-radius:16px;flex-direction:column;gap:8px;min-width:0;min-height:0;padding:12px;display:flex}.program-heading,.sheet-heading{justify-content:space-between;align-items:center;gap:8px;min-height:44px;display:flex}.program-heading h2,.sheet-heading h2{margin:0;font-size:16px}.menu-button,.close-menu{cursor:pointer;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;flex:0 0 44px;place-items:center;width:44px;height:44px;padding:0;font-size:20px;transition:background .2s ease-out,transform .2s ease-out;display:grid}.menu-button{display:none}.desktop-clear-program{color:#475569;min-height:36px;font:inherit;cursor:pointer;background:#f8fafc;border:1px solid #e2e8f0;border-radius:9px;margin-left:auto;padding:6px 10px;font-size:13px}.desktop-clear-program:disabled{opacity:.5;cursor:not-allowed}.program-list{flex-wrap:wrap;align-content:flex-start;gap:8px;min-height:0;max-height:100vh;padding:2px;display:flex;overflow:hidden auto}.program-empty{color:#64748b;margin:0;font-size:14px;line-height:1.4}.command-chip{background:#f8fafc;border:1px solid #cbd5e1;border-radius:10px;align-items:center;gap:6px;min-height:40px;padding:6px 10px;font-size:14px;transition:background .2s ease-out,border-color .2s ease-out;display:inline-flex}.command-chip.active{background:#dbeafe;border-color:#3b82f6}.command-number{color:#64748b;font-size:12px;font-weight:700}.command-icon{font-size:16px}.command-palette{background:#f8fafc;border-top:1px solid #e2e8f0;flex:none;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;min-height:104px;padding:12px;display:grid}.command-button{color:#fff;min-width:0;min-height:80px;font:inherit;touch-action:manipulation;background:#3b82f6;border:0;border-radius:12px;flex-direction:column;flex:1;justify-content:center;align-items:center;gap:6px;padding:8px;font-size:14px;font-weight:600;transition:transform .2s ease-out,background .2s ease-out;display:flex;box-shadow:0 4px 6px #3b82f64d}.palette-icon{font-size:22px;line-height:1}.blockly-host{visibility:hidden;pointer-events:none;width:320px;height:240px;position:fixed;top:0;left:-10000px;overflow:hidden}.sheet-backdrop{z-index:99;opacity:0;pointer-events:none;background:#0f172a73;border:0;transition:opacity .3s ease-out;position:fixed;inset:0}.sheet-backdrop.visible{opacity:1;pointer-events:auto}.bottom-sheet{z-index:100;max-height:min(80vh,520px);padding:10px 20px calc(20px + env(safe-area-inset-bottom));background:#fff;border-radius:20px 20px 0 0;flex-direction:column;gap:10px;transition:transform .3s ease-out;display:flex;position:fixed;bottom:0;left:0;right:0;transform:translateY(100%);box-shadow:0 -8px 30px #0f172a26}.bottom-sheet.open{transform:translateY(0)}.sheet-handle{background:#cbd5e1;border-radius:99px;align-self:center;width:40px;height:4px}.close-menu{font-size:18px}.sheet-action{color:#0f172a;min-height:48px;font:inherit;text-align:left;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:10px 14px;font-size:15px}.sheet-score{color:#854d0e;background:#fef3c7;border-radius:12px;max-width:100%;margin:0;padding:10px 14px;font-size:15px;font-weight:700}.secondary-action{color:#475569}@media (width<=900px) and (pointer:coarse){html,body{touch-action:auto;margin:0;padding:0}.game-layout{height:100dvh;min-height:0;overflow:hidden}.game-header{flex-basis:52px;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:6px;min-height:52px;padding:0 8px}.home-link{font-size:13px}.game-header h1{font-size:16px}.full-title,.avatar-selector,.scene-actions{display:none}.short-title{display:inline}.header-actions{gap:5px}.header-actions button{min-height:44px;padding:0 8px;font-size:13px}.reset-button{justify-content:center;align-items:center;display:inline-flex}.game-content{gap:4px;padding:4px 8px;display:flex;overflow:hidden}.scene-section{flex:1 1 0;min-height:0;padding:4px}.scene-field{flex:1 1 0}.program-section{background:0 0;border:0;border-radius:10px;gap:4px;padding:4px 8px;overflow:hidden}.program-heading{flex:0 0 40px;min-height:40px}.program-heading h2{font-size:14px}.menu-button{flex-basis:40px;width:40px;height:40px;display:grid}.desktop-clear-program{display:none}.program-list{flex:auto;gap:4px;min-height:0;max-height:none}.command-chip{gap:4px;min-height:30px;padding:3px 7px;font-size:13px}.command-palette{flex:0 0 100px;height:100px;min-height:100px;padding:8px 4px 4px}.command-button{flex-direction:row;min-height:20px;padding:5px;font-size:14px}.bottom-sheet{padding-left:16px;padding-right:16px}.app-header .controls,.blockly-area{display:none}.grid{width:min(90%,90vh - 200px);max-width:350px;height:min(90%,90vh - 200px);max-height:350px}.cell{font-size:12px}}@media (width<=499px) and (pointer:coarse){.game-header{grid-template-columns:auto minmax(0,1fr) auto}.game-header h1{font-size:14px}.home-full{display:none}.home-short{display:inline}.command-palette{grid-template-columns:repeat(2,minmax(0,1fr));padding:8px}}@media (height<=600px) and (pointer:coarse){.program-section{flex-basis:40%}.program-heading{flex-basis:28px;min-height:28px}.menu-button{flex-basis:28px;width:28px;height:28px}.command-palette{flex-basis:45px;height:30px;min-height:28px;padding:6px 8px}.command-button{min-height:0}}@media (width>=768px) and (width<=900px) and (pointer:coarse){.scene-section{padding:8px}.program-section{padding:10px 16px}}@media (hover:hover){.header-actions button:hover,.menu-button:hover,.close-menu:hover,.sheet-action:hover,.desktop-clear-program:not(:disabled):hover{filter:brightness(.96)}.command-button:hover{background:#2563eb}.home-link:hover{background:#e9ecef}}.command-button:active{transform:scale(.95)}@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition-duration:.01ms!important}}.cat-body{transform-origin:50%;width:100%;height:100%;transform:scaleX(-1)}.avatar-wrapper.moving .cat-body{animation:.4s ease-in-out infinite alternate bounce}.avatar-wrapper{transform-origin:50%;will-change:transform;width:100%;height:100%;transition:transform .2s ease-out;display:block}.avatar-wrapper.flipped{transform:scaleX(-1)}.dino-body{transform-origin:50%;width:100%;height:100%;transform:scaleX(-1)}.avatar-wrapper.moving .dino-body{animation:.4s ease-in-out infinite alternate bounce}.dino-dark{fill:#494434}.dino-mid{fill:#776f4f}.dino-green{fill:#80995f}.dino-light-green{fill:#8cae65}.dino-brown{fill:#4c443b}
