:root{--paper:#f7f2e7;--paper-dark:#ece6d7;--ink:#2d433c;--muted:#7e8575;--green:#435e4c;--green-light:#e3e8d4;--red:#d65e51;--blue:#517db1;--line:#dedecd;--shadow:0 15px 45px #3c493c0b;font-family:ui-rounded,'Avenir Next','Trebuchet MS',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none;color-scheme:light;line-height:1.5}*{box-sizing:border-box}html,body{margin:0;min-width:320px;min-height:100%;overscroll-behavior:none}body{background-image:radial-gradient(#6e644110 .5px,transparent .5px);background-size:5px 5px}body.playing,body.editing{overflow:hidden;height:100dvh}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer;border:0;background:transparent;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:disabled{opacity:.4;cursor:not-allowed}button,a,input,select,textarea{outline:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #7f9dce;outline-offset:3px}a{color:var(--green)}button svg,span svg{vertical-align:middle;flex-shrink:0}h1,h2,h3,p{margin:0}h1{font-size:clamp(32px,3.5vw,52px);line-height:1.1;letter-spacing:-1.7px;font-weight:750}h2{font-size:27px;line-height:1.2;letter-spacing:-.7px}h3{font-size:19px;letter-spacing:-.3px}p{line-height:1.7}em{font-style:normal;color:#678363}.muted{color:var(--muted)}.tiny{font-size:12px}.wide{width:100%}.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.ka-text{color:var(--red)}.ku-text{color:var(--blue)}[hidden]{display:none!important}.page{max-width:1320px;margin:0 auto;padding:0 52px 60px}.nav{height:104px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #deded08a;gap:20px}.brand{font-size:36px;letter-spacing:-3px;font-weight:950;color:var(--red);display:flex;align-items:center;padding:0;line-height:1}.brand span{color:var(--blue)}.brand i{margin-left:9px;color:#a6b081;font-style:normal;font-size:18px;align-self:flex-end}.brand.mini{font-size:27px;letter-spacing:-2px}.brand small{font-size:10px;letter-spacing:1.8px;margin-left:16px;color:var(--muted);align-self:center;font-weight:700}.nav nav{display:flex;align-items:center;gap:23px}.nav-link{font-size:13px;min-height:44px;padding:0 2px;color:#727c6d;position:relative}.nav-link:hover,.nav-link.active{color:var(--ink)}.nav-link.active:after{content:'';position:absolute;bottom:3px;left:0;right:0;height:2px;background:var(--green)}.lang-button{border:1px solid var(--line);border-radius:11px;font-size:11px;font-weight:800;min-width:42px;min-height:42px}.icon-button,.round-button,.hud-button{width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:12px}.icon-button:hover,.icon-button.active{background:var(--green-light)}.icon-button.subdued{color:var(--muted)}.round-button{border:1px solid var(--line);border-radius:50%;width:39px;height:39px}.round-button:hover{background:var(--green);color:white}.btn{display:inline-flex;align-items:center;justify-content:center;gap:11px;min-height:49px;padding:12px 21px;border-radius:13px;font-size:13px;font-weight:700;border:1px solid transparent;white-space:normal;transition:background .15s,transform .15s;line-height:1.5}.btn.primary{background:var(--green);color:#fcfbef;box-shadow:0 5px 0 #304b3814}.btn.primary:hover{background:#36553f;transform:translateY(-1px)}.btn.secondary{border-color:#cfd3bf;background:#fbf8efb8}.btn.secondary:hover{background:#edf0df}.btn.danger{background:#bf584b;color:white}.btn.large{min-height:57px;padding:17px 25px;font-size:14px}.btn.compact{min-height:38px;padding:8px 13px;font-size:12px;border-radius:10px}.text-button{font-size:13px;color:#768371;text-decoration:underline;text-underline-offset:4px;min-height:43px}.text-button:hover{color:var(--ink)}.eyebrow,.panel-kicker{font-size:10px;letter-spacing:2.2px;font-weight:750;text-transform:uppercase;color:#7c876e}.eyebrow{margin-bottom:20px}.tiny-star{font-size:15px;color:#be9563;margin-right:6px}.lead{font-size:17px;color:#7a8273;max-width:435px;line-height:1.9}.hero{min-height:580px;display:grid;grid-template-columns:1.1fr 1fr;gap:24px;align-items:center;padding:50px 0 45px}.hero-copy{position:relative;z-index:1}.hero h1{font-size:clamp(39px,4.2vw,61px);font-weight:750;letter-spacing:-2.6px;line-height:1.14;margin-bottom:26px}.hero h1 em{display:inline-block;margin-top:1px}.hero .lead{font-size:15px;max-width:370px}.hero-actions{display:flex;align-items:center;gap:12px;margin-top:32px;flex-wrap:wrap}.small-promises{margin-top:44px;display:flex;gap:26px;font-size:10px;color:#92977d}.small-promises span{display:flex;gap:7px;align-items:center}.hero-picture{height:470px;position:relative;min-width:0;margin-left:-20px}.hero-picture canvas{height:100%;width:100%;border-radius:45% 43% 38% 42%;display:block}.paper-label{position:absolute;bottom:18px;left:28%;background:#fffdf2;padding:12px 20px;box-shadow:0 5px 15px #44431a0c;transform:rotate(-5deg);font-size:11px;font-weight:800;display:flex;align-items:center;gap:5px}.paper-label i{font-weight:400;font-style:normal;color:#838870;margin-left:16px;font-size:10px}.paper-label b{font-weight:400;color:#a9aa8f;padding:0 3px}.ka-dot,.ku-dot{width:5px;height:5px;border-radius:50%;background:var(--red);display:inline-block}.ku-dot{background:var(--blue)}.home-footer{border-top:1px solid var(--line);padding-top:25px;display:flex;justify-content:space-between;gap:15px;font-size:10px;color:#989c8a}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:42px 0 32px}.page-heading h1{font-size:37px;margin-bottom:11px}.page-heading .eyebrow{margin-bottom:12px}.page-heading p{font-size:13px;color:var(--muted)}.mission-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:23px}.mission-card,.draft-card{border:1px solid #dedfce;border-radius:19px;background:#fffcf47d;overflow:hidden;box-shadow:var(--shadow);transition:transform .2s}.mission-card:hover{transform:translateY(-3px)}.mission-thumb{width:100%;height:174px;position:relative;padding:0;display:block;overflow:hidden}.mission-thumb img{width:100%;height:100%;object-fit:cover;display:block}.mission-number{position:absolute;top:13px;left:14px;font-size:10px;letter-spacing:1px;color:#6d795e;background:#fbf9e9a6;padding:4px 8px;border-radius:6px}.players-pill{position:absolute;top:12px;right:12px;display:flex;gap:5px;align-items:center;font-size:10px;background:#fbf9e9d9;padding:5px 9px;border-radius:20px;color:var(--green)}.mission-body{padding:19px 21px 16px}.card-kicker{font-size:9px;letter-spacing:1.4px;text-transform:uppercase;color:var(--muted);margin-bottom:7px}.mission-body h3{min-height:27px}.mission-bottom{display:flex;align-items:center;gap:8px;margin-top:19px}.rating{letter-spacing:4px;color:#b99851;font-size:17px;flex:1}.rating span{color:#c6cbb3}.draft-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.draft-card{padding:0 19px 17px}.draft-preview{display:block;height:160px;margin:0 -19px 16px;width:calc(100% + 38px);padding:0}.draft-preview img{width:100%;height:100%;object-fit:cover}.draft-card p{margin:9px 0}.draft-card .row{gap:4px}.empty-state{border:1px solid #c9cfb5;border-radius:25px;padding:60px;grid-column:1/-1;text-align:center}.empty-state svg{color:#849a74}.empty-state h2{margin:20px 0 27px;font-size:24px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.settings-card{background:#fffdf5b3;border:1px solid var(--line);padding:25px 28px;border-radius:18px}.settings-card h2{font-size:18px;margin-bottom:23px}.settings-card h2:not(:first-child){margin-top:30px}.settings-card p{margin:15px 0}.range-label{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;font-size:13px;margin:20px 0}.range-label output{font-variant-numeric:tabular-nums;font-size:11px;color:#7a856c}.range-label input{flex-basis:100%;width:100%;margin:13px 0 0;accent-color:var(--green);height:20px}.check{display:flex;align-items:center;gap:9px;font-size:12px;margin:16px 0}.check input{accent-color:var(--green);width:17px;height:17px;flex-shrink:0}.field-label{display:flex;flex-direction:column;gap:7px;font-size:12px;margin:16px 0}input:not([type=checkbox]):not([type=range]),select,textarea{border:1px solid #d4d8c5;background:#fffef8;min-height:43px;border-radius:9px;padding:10px 12px;width:100%;font-size:13px}textarea{resize:vertical;min-height:72px}select{padding-right:23px}input[readonly]{background:#f1f0e3}.controls-table{width:100%;border-collapse:collapse;margin:20px 0;font-size:12px;text-align:left}.controls-table th{color:#7a8371;font-size:10px;letter-spacing:1px;text-transform:uppercase;padding-bottom:9px}.controls-table td{padding:6px 0;border-top:1px solid #e4e5d6}.controls-table td:not(:first-child){width:25%}kbd{display:inline-block;background:#e9edde;border:1px solid #d8ddc8;border-radius:5px;padding:1px 7px;min-width:28px;text-align:center;font-family:inherit;font-size:11px}.device-line{display:flex;justify-content:space-between;gap:14px;border-bottom:1px solid var(--line);padding:11px 0;font-size:12px}.device-line span{color:var(--muted);font-size:11px;text-align:right}.online-layout{display:grid;grid-template-columns:1fr 430px;gap:70px;align-items:center;max-width:1020px;margin:70px auto}.online-copy h1{margin-bottom:25px}.online-copy>p{margin:14px 0}.online-card{padding:35px;background:#fffdf6a6;border:1px solid var(--line);border-radius:23px;box-shadow:var(--shadow)}.online-card .field-label:first-child{margin-top:0}.privacy-note{display:flex;gap:13px;font-size:11px;color:#929882;max-width:350px;margin-top:28px}.privacy-note svg{flex-shrink:0}.or-line{position:relative;text-align:center;font-size:10px;color:var(--muted);margin:20px 0}.or-line:before{content:'';position:absolute;top:50%;left:0;right:0;height:1px;background:var(--line)}.or-line span{position:relative;background:var(--paper);padding:0 15px}.code-input{text-transform:uppercase;letter-spacing:7px;text-align:center!important;font-size:23px!important;font-weight:800}.lobby-card{max-width:740px;margin:65px auto;text-align:center}.lobby-card h1{font-size:40px;margin-bottom:19px}.lobby-card>p{color:var(--muted);font-size:14px}.invite-body{display:flex;align-items:center;justify-content:center;gap:36px;background:#fffdf4;border:1px solid var(--line);padding:27px;border-radius:25px;margin:30px 0}.qr-code{width:196px;height:196px;border-radius:14px;image-rendering:pixelated}.room-code{font-size:41px;font-weight:850;letter-spacing:7px}.invite-body p{word-break:break-all;margin:12px 0 22px;max-width:310px}.notice{border-left:3px solid #c1a478;background:#eee8d7;padding:14px;text-align:left;font-size:12px!important}.waiting-dots{display:flex;justify-content:center;gap:7px;margin:24px 0}.waiting-dots i{width:5px;height:5px;background:#7b9570;border-radius:50%;animation:pulse 1.5s infinite}.waiting-dots i:nth-child(2){animation-delay:.2s}.waiting-dots i:nth-child(3){animation-delay:.4s}@keyframes pulse{50%{opacity:.25;transform:translateY(-4px)}}
/* Game UI sits above a single Canvas; the DOM is updated at most six times a second. */
#game-canvas{position:fixed;inset:0;width:100%;height:100%;touch-action:none}#game-ui{position:fixed;inset:0;pointer-events:none;user-select:none;-webkit-user-select:none;overflow:hidden}#game-ui button,#game-ui select{pointer-events:auto}.game-top{position:absolute;left:max(20px,env(safe-area-inset-left));right:max(20px,env(safe-area-inset-right));top:max(15px,env(safe-area-inset-top));height:58px;display:flex;align-items:center;gap:15px}.hud-button{background:#fffbefcf;border:1px solid #f9faebbf;color:#50654e;box-shadow:0 3px 12px #253b3610;width:43px;height:43px;backdrop-filter:blur(8px);pointer-events:auto}.hud-button.active{background:#557958;color:#fff}.mission-hud{display:flex;flex-direction:column;gap:2px}.mission-hud strong{font-size:13px;font-weight:650}.hud-kicker{font-size:8px;font-weight:800;letter-spacing:1.8px;color:#869078}.hud-kicker b{padding:0 8px;color:#a1ad8a}.hud-center{position:absolute;left:50%;transform:translateX(-50%);display:flex;gap:15px;align-items:center;font-size:13px;background:#fff9e9a1;padding:8px 15px;border-radius:20px}#star-counter{letter-spacing:1px;color:#ad9150;white-space:nowrap;font-variant-numeric:tabular-nums}#timer{font-variant-numeric:tabular-nums;font-size:10px;color:#859477;border-left:1px solid #ccd4b9;padding-left:14px}.hud-right{display:flex;gap:7px;margin-left:auto}.game-hint{position:absolute;top:96px;left:50%;transform:translateX(-50%);font-size:12px;color:#657753;background:#fffaeacf;padding:10px 19px;border-radius:25px;text-align:center;max-width:620px;width:max-content;max-width:min(680px,80vw);transition:opacity 2s}.game-hint.faded{opacity:0}.game-bottom{position:absolute;bottom:max(18px,env(safe-area-inset-bottom));left:30px;right:30px;display:flex;justify-content:space-between;gap:16px;align-items:center}.player-chip{font-size:11px;font-weight:800;letter-spacing:1px}.player-chip small{font-size:9px;font-weight:500;letter-spacing:.5px;margin-left:11px;color:#7e8c6e}.performance{font-size:9px;color:#8e9b7e;font-variant-numeric:tabular-nums;background:#f8f8e598;padding:2px 8px;border-radius:9px}.network-banner{position:absolute;top:80px;left:50%;transform:translateX(-50%);background:#425b4eef;color:#fffbe8;max-width:80%;padding:12px 20px;font-size:12px;text-align:center;border-radius:12px;z-index:4}.restart-progress{position:absolute;top:0;left:0;height:6px;background:#ec9a64;box-shadow:0 2px 10px #e59655;transition:width .1s}.voice-note{position:absolute;top:76px;right:20px;max-width:240px;font-size:10px;color:#577957;text-align:right;background:#f7f7e5a9;border-radius:6px}.voice-note:empty{display:none}.touch-controls{position:absolute;inset:0;pointer-events:none;touch-action:none}.joystick{position:absolute;bottom:max(46px,env(safe-area-inset-bottom));left:max(27px,env(safe-area-inset-left));width:118px;height:118px;border:2px solid #ffffff70;border-radius:50%;background:#fdfae836;backdrop-filter:blur(3px);pointer-events:auto;touch-action:none;box-shadow:inset 0 0 0 21px #eff3d818}.joy-thumb{position:absolute;width:48px;height:48px;left:33px;top:33px;border:1px solid #fffbeba6;border-radius:50%;background:#ffffff82;box-shadow:0 2px 8px #324a3826;pointer-events:none}.joy-direction{position:absolute;color:#6577538a;font-size:17px;pointer-events:none}.joy-direction.north{top:0;left:50%;transform:translateX(-50%)}.joy-direction.south{bottom:0;left:50%;transform:translateX(-50%)}.joy-direction.west{top:40%;left:9px}.joy-direction.east{top:40%;right:9px}.touch-target{position:absolute;left:max(54px,env(safe-area-inset-left));bottom:175px;pointer-events:auto}.touch-target select{min-height:29px;font-size:10px;background:#fff8e6c7;border:0;padding:5px 24px 5px 12px;border-radius:20px;max-width:84px}.touch-target>span{font-size:12px;color:#66775c;background:#fff8e6c7;border-radius:20px;padding:5px 15px}.touch-actions{position:absolute;bottom:max(34px,env(safe-area-inset-bottom));right:max(25px,env(safe-area-inset-right));width:224px;height:143px;pointer-events:none}.touch-actions>button{border-radius:50%;position:absolute;background:#fffcedb8;border:2px solid #fffff2a3;box-shadow:0 2px 10px #34492d17;touch-action:none;pointer-events:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:25px;line-height:1.15;color:#53714f;min-height:62px;min-width:62px}.touch-actions>button small{font-size:8px;margin-top:3px;font-weight:700}.touch-jump{right:0;bottom:7px;width:78px;height:78px}.touch-kick{right:92px;bottom:0;width:65px;height:65px}.touch-grab{right:61px;top:0;width:62px;height:62px}.touch-emotions{position:absolute;left:-18px;top:15px;display:flex;gap:5px;flex-direction:column}.touch-emotions button{border-radius:50%;width:44px;height:44px;background:#fffde76e;pointer-events:auto;touch-action:none;color:#607b51}.touch-controls .held,.touch-controls button:active{background:#b6cf8ac9!important}.touch-controls.reversed .joystick{left:auto;right:max(27px,env(safe-area-inset-right))}.touch-controls.reversed .touch-target{left:auto;right:max(54px,env(safe-area-inset-right))}.touch-controls.reversed .touch-actions{right:auto;left:max(25px,env(safe-area-inset-left))}.rotate-prompt{display:none;position:absolute;inset:0;background:var(--paper);z-index:30;pointer-events:auto;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:40px;gap:25px}.rotate-prompt svg{color:#7d936c;transform:rotate(-90deg)}.rotate-prompt p{font-size:14px;color:var(--muted)}
/* Workshop */
.workshop{position:fixed;inset:0;display:grid;grid-template-columns:168px 1fr 250px;grid-template-rows:68px 1fr 29px;background:var(--paper);overflow:hidden}.workshop-top{grid-column:1/-1;display:flex;align-items:center;gap:18px;padding:0 20px;border-bottom:1px solid var(--line);background:#fbf8ed}.toolbar-actions{display:flex;align-items:center;gap:3px;margin-left:auto}.save-status{font-size:10px;color:#8c927c;white-space:nowrap}.palette-panel{border-right:1px solid var(--line);overflow:auto;padding:18px 10px;background:#f9f6ed}.palette-panel .panel-kicker{padding-left:10px;margin-bottom:16px}.palette-list{display:flex;flex-direction:column;gap:3px}.palette-item{display:flex;align-items:center;gap:12px;min-height:43px;text-align:left;padding:8px 10px;border-radius:9px;font-size:11px;touch-action:none}.palette-item:hover,.palette-item.active{background:#e5ead8}.palette-item b{width:20px;font-size:13px}.palette-item>svg{width:22px;flex-shrink:0}.object-icon{display:inline-block;position:relative;width:21px;height:19px;flex-shrink:0;background:#8b9d6d;border-radius:4px;box-shadow:inset 0 -4px #6d835e}.object-icon.ladder{background:repeating-linear-gradient(to bottom,transparent,transparent 5px,#c7a576 5px,#c7a576 7px);border-left:2px solid #b5976c;border-right:2px solid #b5976c;border-radius:0;box-shadow:none;width:16px;margin-left:2px;margin-right:3px}.object-icon.spikes{clip-path:polygon(0 100%,25% 5%,50% 100%,75% 5%,100% 100%);background:#bd7056;box-shadow:none}.object-icon.star{background:#cbb475;clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 59%,79% 98%,50% 73%,21% 98%,32% 59%,2% 35%,39% 35%);box-shadow:none}.object-icon.door{background:#a1b990;width:15px;border:2px solid #627b56;box-shadow:none}.object-icon.ball,.object-icon.hook{border-radius:50%;background:#a4ad8b;box-shadow:inset -4px -4px #829275}.object-icon.hook{background:transparent;border:3px solid #b39667;box-shadow:none}.object-icon.crate{background:#d2ad78;box-shadow:inset 0 0 0 3px #b38f5c}.object-icon.button{height:8px;margin-top:11px;background:#cf7461}.object-icon.lever{background:none;box-shadow:none;border-left:3px solid #6d775f;transform:rotate(30deg);width:8px;margin-left:6px;margin-right:7px}.object-icon.lever:before{content:'';position:absolute;width:7px;height:7px;background:#cf8064;border-radius:50%;top:0;left:-5px}.object-icon.swing{background:transparent;border-left:1px solid #aa8c6b;border-right:1px solid #aa8c6b;border-bottom:4px solid #7f936b;box-shadow:none;border-radius:0;width:19px}.object-icon.seesaw{transform:rotate(-18deg);height:6px;margin-top:5px}.object-icon.spring{background:repeating-linear-gradient(0deg,transparent 0,transparent 3px,#bd9e71 3px,#bd9e71 5px);box-shadow:none}.object-icon.lift{border-top:4px solid #789568;background:#cab886;box-shadow:none}.object-icon.decor{border-radius:50% 50% 35% 35%;background:#b5c092;box-shadow:none}.editor-stage{position:relative;overflow:hidden;min-width:0;min-height:0;background:#eee8d9}.editor-stage canvas{width:100%;height:100%;display:block;touch-action:none}.editor-viewbar{display:flex;align-items:center;gap:1px;position:absolute;left:50%;bottom:15px;transform:translateX(-50%);background:#fffdf0e8;padding:3px 8px;border:1px solid #e0e4cc;border-radius:13px;box-shadow:0 3px 14px #304b3510;white-space:nowrap}.editor-viewbar output{font-size:10px;min-width:45px;text-align:center;font-variant-numeric:tabular-nums}.editor-viewbar .icon-button{height:34px;width:34px;border-radius:7px}.editor-viewbar>span{height:18px;width:1px;background:var(--line);margin:0 6px}.editor-guidance{position:absolute;left:17px;right:17px;top:15px;background:#fffaebcf;border:1px solid #ebeddbd9;border-radius:9px;max-width:480px;font-size:10px;padding:8px 11px;color:#889177;pointer-events:none}.properties-panel{overflow:auto;border-left:1px solid var(--line);background:#fbf8ef;min-width:0}.properties-tabs{display:flex;border-bottom:1px solid var(--line);height:46px}.properties-tabs button{flex:1;font-size:11px;border-bottom:2px solid transparent}.properties-tabs button.active{border-color:#7b986a;background:#f0f2e6}.properties-panel #property-fields{padding:18px}.properties-panel h3{font-size:15px;margin-bottom:16px}.properties-panel label{font-size:10px}.properties-panel .field-label{margin:13px 0}.properties-panel input:not([type=checkbox]),.properties-panel select,.properties-panel textarea{min-height:33px;padding:7px 8px;font-size:11px;border-radius:7px}.properties-panel .number-grid,.properties-panel .pair,.properties-panel .xy-grid,.properties-panel .field-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.properties-panel input[type=checkbox]{accent-color:#638055}.properties-panel .check{margin:9px 0;align-items:flex-start}.properties-panel .btn{font-size:10px;min-height:34px;padding:7px 9px}.properties-panel p{font-size:11px;color:var(--muted)}.property-title{display:flex;justify-content:space-between;gap:6px;align-items:center}.link-options{display:flex;flex-direction:column;gap:5px;max-height:170px;overflow:auto;padding:6px;background:#f0f2e5;border-radius:8px}.link-options label{display:flex;align-items:center;gap:7px;word-break:break-all}.editor-footer{grid-column:1/-1;border-top:1px solid var(--line);display:flex;align-items:center;padding:0 16px;font-size:9px;color:#8c947c;white-space:nowrap;overflow:hidden}.validation-card{position:absolute;right:15px;top:58px;max-width:420px;max-height:65%;overflow:auto;background:#fffdf5f2;border:1px solid var(--line);box-shadow:var(--shadow);border-radius:13px;padding:17px;font-size:12px}.validation-card h3{font-size:14px}.validation-card p{font-size:11px;margin:9px 0}.validation-card button[data-issue]{display:block;text-align:left;padding:9px;width:100%;border-bottom:1px solid #e4e5d7;font-size:11px}.validation-card .error{color:#b95747}.validation-card .warning{color:#9a8552}.validation-card .validation-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.empty-properties{text-align:center;margin-top:35px;color:#98a08a}
/* Dialogs & feedback */
.modal-scrim{position:fixed;inset:0;background:#243b355e;backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;padding:22px;z-index:100}.modal{position:relative;background:#faf7ec;max-width:540px;max-height:calc(100dvh - 44px);overflow:auto;padding:37px;border:1px solid #fcfbed;border-radius:25px;box-shadow:0 25px 110px #1b382d3b;width:100%}.modal h2{font-size:32px;margin:10px 0 18px}.modal .eyebrow{margin-top:5px;margin-right:15px}.modal>p{font-size:13px;color:#7b8970;margin:15px 0}.modal-close{position:absolute;right:12px;top:12px;color:#98a184}.modal-stack{display:flex;flex-direction:column;gap:10px;margin-top:22px}.modal input{margin:8px 0}.shared-preview{width:100%;border-radius:12px}.win-orbit{position:relative;text-align:center;height:89px;display:flex;align-items:center;justify-content:center;color:#c08755}.win-orbit svg{transform:rotate(-18deg)}.win-orbit>span{position:absolute;left:20%;top:15px;color:#b3b988}.win-orbit>span+span{left:auto;right:20%;top:30px}.win-rating{font-size:32px;letter-spacing:8px;color:#b99b5e;margin:21px 0}.modal:has(.win-orbit){text-align:center}#toast{position:fixed;bottom:max(26px,env(safe-area-inset-bottom));left:50%;transform:translate(-50%,15px);opacity:0;pointer-events:none;z-index:200;background:#334f42;color:#faf9e9;border-radius:13px;padding:13px 20px;max-width:min(620px,90vw);font-size:12px;box-shadow:0 5px 25px #1e34282a;transition:opacity .2s,transform .2s;text-align:center}#toast.visible{opacity:1;transform:translate(-50%,0)}.reduced-motion *{animation:none!important;transition:none!important}
@media(min-width:1500px){.hero{min-height:690px}.hero-picture{height:520px}.home-footer{margin-top:20px}}
@media(max-width:1100px){.page{padding:0 32px 45px}.hero{gap:10px;min-height:540px}.hero-picture{height:390px}.hero h1{font-size:43px;letter-spacing:-2px}.hero .lead{font-size:14px}.hero .large{font-size:12px;padding:13px 18px}.small-promises{gap:13px;font-size:9px}.nav{height:86px}.mission-grid,.draft-grid{gap:16px}.mission-body{padding:16px}.mission-body h3{font-size:16px}.mission-thumb{height:150px}.online-layout{gap:40px;grid-template-columns:1fr 390px}.workshop{grid-template-columns:141px 1fr 218px}.workshop-top{padding:0 14px;gap:10px}.workshop-top .brand small{display:none}.toolbar-actions .icon-button{width:35px}.save-status{font-size:9px}.properties-panel #property-fields{padding:13px}.palette-item{font-size:10px;gap:9px}}
@media(max-width:760px){.page{padding:0 22px 35px}.nav{height:74px;gap:10px}.brand{font-size:30px}.nav nav{gap:13px}.nav-link{font-size:11px}.lang-button{min-width:34px;min-height:36px}.nav .icon-button{width:34px;height:36px}.hero{grid-template-columns:1fr;padding-top:36px;gap:16px}.hero h1{font-size:45px;letter-spacing:-2px}.hero .lead{font-size:14px;max-width:400px}.hero-picture{height:340px;margin:0;grid-row:2}.hero-copy{padding-top:0}.hero-actions{margin-top:22px}.small-promises{margin-top:23px;gap:22px}.hero .eyebrow{font-size:8px;letter-spacing:1.6px}.home-footer{flex-wrap:wrap;justify-content:center;font-size:9px;gap:9px}.home-footer>span:nth-child(2){display:none}.mission-grid,.draft-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.page-heading{margin:30px 0 23px;align-items:flex-start;flex-direction:column;gap:15px}.page-heading h1{font-size:31px}.page-heading .eyebrow{font-size:9px}.mission-thumb{height:130px}.mission-body{padding:14px}.mission-body h3{font-size:15px;min-height:42px}.mission-bottom{margin-top:10px;gap:3px}.mission-bottom .round-button{width:32px;height:32px}.mission-bottom .icon-button{width:28px;height:30px}.rating{font-size:14px;letter-spacing:2px}.card-kicker{font-size:8px;letter-spacing:.8px}.settings-grid{grid-template-columns:1fr}.settings-card{padding:24px}.online-layout{grid-template-columns:1fr;gap:26px;margin:33px auto}.online-card{padding:25px}.online-copy h1{font-size:35px}.online-copy .lead{font-size:15px}.online-copy .privacy-note{margin-top:18px}.lobby-card{margin:40px auto}.lobby-card h1{font-size:34px}.invite-body{gap:20px;flex-direction:column;padding:20px}.room-code{font-size:35px}.qr-code{width:168px;height:168px}.modal{padding:30px 25px;border-radius:20px}.modal h2{font-size:28px}.modal .eyebrow{font-size:9px;letter-spacing:1.5px}.workshop{grid-template-columns:70px 1fr 180px;grid-template-rows:55px 1fr 0}.workshop-top{padding:0 8px;gap:7px}.workshop-top .brand{font-size:24px;letter-spacing:-1.6px}.toolbar-actions{gap:0}.toolbar-actions .icon-button{width:31px;height:39px}.toolbar-actions .btn{font-size:10px;min-height:36px;padding:8px}.toolbar-actions .btn svg{width:15px}.save-status{display:none}.palette-panel{padding:10px 4px}.palette-panel .panel-kicker{display:none}.palette-item{flex-direction:column;justify-content:center;text-align:center;gap:4px;min-height:57px;font-size:8px;padding:7px 2px}.palette-item.rocket span{font-size:7px}.properties-panel #property-fields{padding:10px}.properties-panel label{font-size:9px}.properties-panel input:not([type=checkbox]),.properties-panel select,.properties-panel textarea{font-size:10px;min-height:32px;padding:5px 7px}.properties-tabs{height:38px}.properties-tabs button{font-size:10px}.editor-viewbar{bottom:7px;padding:2px 4px}.editor-viewbar .icon-button{width:28px;height:33px}.editor-viewbar output{min-width:35px;font-size:9px}.editor-viewbar>span{margin:0 3px}.editor-guidance{top:8px;left:8px;right:8px;font-size:9px;padding:6px}.editor-footer{display:none}.validation-card{left:8px;right:8px;top:58px;font-size:10px;max-width:none}.game-top{left:13px;right:13px;top:8px;height:46px;gap:10px}.mission-hud strong{font-size:11px}.hud-kicker{font-size:7px;letter-spacing:1px}.hud-center{top:52px;padding:4px 10px;font-size:11px;gap:8px}.hud-right{gap:4px}.hud-button{width:40px;height:40px}.game-hint{top:85px;font-size:10px;padding:7px 13px}.game-bottom{left:19px;right:19px;bottom:9px}.player-chip small{display:none}.voice-note{top:55px;font-size:9px;max-width:200px}.network-banner{top:61px;padding:8px 15px}.desktop-only{display:none}}
@media(max-height:520px) and (orientation:landscape){.page{padding-bottom:30px}.nav{height:65px}.hero{grid-template-columns:1fr 1fr;padding-top:25px;min-height:0}.hero h1{font-size:34px;margin-bottom:16px}.hero .lead{font-size:11px;line-height:1.7;max-width:320px}.hero-picture{height:275px;grid-row:auto;margin:0}.hero-actions{margin-top:18px;gap:7px}.hero .large{min-height:43px;font-size:11px;padding:9px 15px}.hero .eyebrow{font-size:7px;margin-bottom:15px;letter-spacing:1.4px}.small-promises{margin-top:19px;font-size:8px;gap:15px}.hero .home-footer{margin-top:5px;padding-top:18px}.paper-label{padding:8px 12px;left:24%;bottom:7px;font-size:8px}.paper-label i{font-size:8px;margin-left:8px}.game-top{height:38px;top:7px;left:max(13px,env(safe-area-inset-left));right:max(13px,env(safe-area-inset-right));gap:10px}.hud-button{width:37px;height:37px;border-radius:11px}.hud-center{top:4px;padding:5px 13px}.mission-hud strong{font-size:11px}.hud-kicker{font-size:7px}.game-hint{top:58px;font-size:10px;padding:6px 14px;max-width:65vw}.game-bottom{bottom:9px;left:22px;right:22px}.player-chip small{display:none}.joystick{width:99px;height:99px;bottom:32px;left:max(28px,env(safe-area-inset-left))}.joy-thumb{width:42px;height:42px;left:26.5px;top:26.5px}.touch-target{bottom:140px;left:max(44px,env(safe-area-inset-left))}.touch-actions{width:208px;height:124px;bottom:28px}.touch-jump{width:67px;height:67px!important;min-height:67px!important}.touch-kick{width:59px;height:59px;right:83px;min-height:59px!important;min-width:59px!important}.touch-grab{width:57px;height:57px;right:55px;min-height:57px!important;min-width:57px!important}.touch-emotions{top:6px;left:-10px}.touch-emotions button{height:40px;width:44px}.voice-note{top:50px;max-width:220px}.network-banner{top:55px}.game-hint:has(+*){transition:opacity 1s}.modal-scrim{padding:13px}.modal{max-height:calc(100dvh - 26px);padding:25px 30px;border-radius:18px}.modal h2{font-size:26px;margin:7px 0 14px}.modal .eyebrow{margin-bottom:10px}.modal-stack{gap:7px;margin-top:14px}.modal-stack .btn{min-height:41px;padding:9px}.workshop{grid-template-columns:76px 1fr 190px;grid-template-rows:51px 1fr 0}.workshop-top{padding:0 10px}.workshop-top .brand small{display:none}.save-status{display:none}.toolbar-actions .icon-button{width:36px}.toolbar-actions .btn{min-height:36px}.palette-panel{padding:8px 4px}.palette-panel .panel-kicker{display:none}.palette-item{flex-direction:column;justify-content:center;gap:5px;text-align:center;font-size:8px;min-height:57px;padding:6px 2px}.properties-panel #property-fields{padding:11px}.properties-tabs{height:38px}.properties-panel .field-label{margin:10px 0}.editor-footer{display:none}.editor-guidance{font-size:9px;padding:6px 9px;top:8px;left:8px;right:8px}.editor-viewbar{bottom:8px}.editor-viewbar .icon-button{min-height:32px;height:32px;width:32px}.properties-panel .number-grid{gap:7px}.workshop-top .brand{font-size:27px}.page-heading h1{font-size:30px}.page-heading{margin-top:25px}}
@media(orientation:portrait) and (pointer:coarse){.playing .rotate-prompt{display:flex}}
@media(pointer:coarse){.game-bottom .player-chip small{display:none}.properties-panel .check{min-height:32px}.palette-panel{overscroll-behavior:contain}.properties-panel input[type=checkbox]{width:20px;height:20px}.toolbar-actions .icon-button{min-height:43px}.workshop input,.workshop select,.workshop textarea{font-size:16px!important}.workshop .field-label{font-size:10px}.icon-button:active{background:var(--green-light)}}
@media(max-width:380px){.page{padding:0 16px 30px}.nav nav{gap:9px}.brand{font-size:28px}.hero h1{font-size:40px}.hero-actions .large{font-size:11px;padding:12px 17px}.mission-grid{gap:11px}.mission-body{padding:11px}.mission-body h3{font-size:14px}}
.field-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}.field-pair>label{min-width:0;display:flex;flex-direction:column;gap:5px;font-size:10px}.field-pair .field-label{margin:0}.property-heading{margin-bottom:18px}.property-heading h3{margin-bottom:6px}.property-heading code{font-size:8px;color:var(--muted);word-break:break-all}.properties-panel fieldset{border:1px solid #d9decb;border-radius:9px;margin:18px 0;padding:8px;max-height:210px;overflow:auto}.properties-panel fieldset legend{font-size:10px;padding:0 6px;color:#7d8b70}.properties-panel fieldset .check{font-size:10px}.properties-panel fieldset small{font-size:8px;color:#929980;display:block}.property-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:22px}.validation-issue{display:flex;align-items:flex-start;gap:8px;width:100%;text-align:left;padding:9px 0;border-bottom:1px solid var(--line);font-size:11px}.validation-issue svg{flex-shrink:0;margin-top:2px}.validation-card>#validate-close{float:right;margin-top:-8px;margin-right:-9px}.properties-panel .field-label+fieldset{margin-top:14px}@media(pointer:coarse){.palette-item{touch-action:pan-y}}

/* Room invitation: readable URL and sharing targets on desktop and phones. */
.invite-details{min-width:0;flex:1;text-align:left}.invite-label{display:block;font-size:12px;color:var(--muted);margin:12px 0 6px}.invite-details .invite-url{display:block;width:100%;min-width:0;font-size:13px;margin:0 0 12px;cursor:text}.invite-share{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.invite-share .btn{text-decoration:none;min-height:42px;justify-content:center}.invite-body{align-items:center}.invite-details .room-code{overflow-wrap:anywhere}@media(max-width:760px){.invite-details{width:100%}.invite-share{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.invite-share .btn{padding:10px 8px}.invite-details .invite-url{font-size:16px}.invite-details #copy-invite{width:100%}}

/* Creating worlds is the primary home action. */
.hero-actions{flex-direction:column;align-items:flex-start;gap:14px}.hero-play-actions{display:flex;flex-wrap:wrap;gap:12px}.hero-actions .hero-editor{width:100%;max-width:430px;min-height:66px;padding:18px 24px;font-size:17px;justify-content:flex-start;box-shadow:0 8px 20px #334f4226}.hero-editor svg:last-child{margin-left:auto}.hero-play-actions .large{font-size:13px;padding:13px 18px}.hero-editor:focus-visible{outline:3px solid #bf9a4d;outline-offset:4px}@media(max-width:760px){.hero-actions{align-items:stretch}.hero-actions .hero-editor{max-width:none;font-size:16px;min-height:62px}.hero-play-actions{gap:9px}.hero-play-actions .large{flex:1;font-size:12px;padding:12px 11px}}@media(max-height:520px) and (orientation:landscape){.hero-actions .hero-editor{min-height:50px;padding:12px 15px;font-size:14px}.hero-play-actions .large{font-size:11px;padding:9px 12px;min-height:41px}}
.account-panel{max-width:840px;margin:0 auto 60px;display:grid;gap:20px}.account-card{background:#faf7ee;border:1px solid #d9daca;border-radius:22px;padding:28px}.account-card h2{margin-top:0}.account-card form{display:grid;gap:17px;max-width:480px}.account-card input{width:100%;box-sizing:border-box}.account-heading{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.account-links{display:flex;gap:20px;margin-top:18px;flex-wrap:wrap}.account-status:empty{display:none}.account-status{padding:16px;background:#e6ecd9;border-radius:12px}.team-list{display:grid;gap:20px}.team-stats{display:flex;gap:35px;margin:24px 0}.team-stats span{display:grid;gap:7px}.team-stats b{font-size:28px}.stats-scroll{overflow:auto;margin-top:22px}.stats-scroll table{width:100%;border-collapse:collapse;text-align:left}.stats-scroll td,.stats-scroll th{padding:12px;border-bottom:1px solid #dedfce}.account-card .notice{font-size:13px;line-height:1.6}.account-card .btn:disabled{opacity:.5;cursor:not-allowed}@media(max-width:600px){.account-card{padding:20px}.account-heading{flex-direction:column}.account-links{gap:8px}.team-stats{gap:20px}}
.math-open{position:fixed;bottom:105px;left:50%;transform:translateX(-50%);z-index:12}.math-dialog{position:fixed;inset:0;z-index:1000;background:#263c35a6;display:grid;place-items:center;padding:20px}.math-card{width:min(460px,100%);max-height:90vh;overflow:auto;box-sizing:border-box;padding:26px;border-radius:24px;background:#faf7ec;box-shadow:0 20px 70px #13282055}.math-close{float:right}.math-card h2{clear:both;padding-top:10px}.math-description,.math-team-status{font-size:14px;line-height:1.55}.math-question{font-size:38px;font-weight:800;text-align:center;margin:24px 0}.math-card form{display:grid;gap:16px}.math-card label{display:grid;gap:8px}.math-card input{font-size:24px;width:100%;box-sizing:border-box}.math-feedback{font-weight:700;color:#395b40;min-height:24px}.object-icon.math:before{content:'2+3';font-weight:bold;color:#3c634a;font-size:14px}
.voice-label{font-size:11px;margin-left:5px}.hud-right #voice-button,.hud-right #speaker-button{width:auto;padding:10px;display:flex;align-items:center}.voice-note{max-width:340px}.hud-right .hud-button.active{background:#41694e;color:white}@media(max-width:700px){.voice-label{display:none}.mission-hud{max-width:150px}.hud-right{gap:5px}}
/* Shared page navigation: a single header row, with a mobile disclosure. */
.nav{position:relative;flex-wrap:nowrap}.nav .brand{flex-shrink:0}.nav nav{flex-wrap:nowrap;min-width:0}.nav .nav-link{white-space:nowrap}.nav [data-nav=account]{max-width:190px;overflow:hidden;text-overflow:ellipsis}.nav-toggle,.nav-settings-label{display:none}
@media(max-width:900px){
 .nav{height:76px;gap:16px}.nav .brand{font-size:32px}
 .nav-toggle{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:44px;min-width:92px;padding:10px 13px;border:1px solid var(--line);border-radius:12px;background:#fffcf4;font-size:13px;font-weight:750;flex-shrink:0}
 .nav-toggle-lines{position:relative;width:19px;height:14px;border-top:2px solid currentColor;border-bottom:2px solid currentColor}.nav-toggle-lines:after{content:'';position:absolute;left:0;right:0;top:5px;border-top:2px solid currentColor}
 .nav-open .nav-toggle-lines{border:0}.nav-open .nav-toggle-lines:before,.nav-open .nav-toggle-lines:after{content:'';position:absolute;left:0;right:0;top:6px;border-top:2px solid currentColor;transform:rotate(45deg)}.nav-open .nav-toggle-lines:after{transform:rotate(-45deg)}
 .nav nav{display:none;position:absolute;z-index:30;top:calc(100% + 8px);left:0;right:0;flex-direction:column;align-items:stretch;gap:4px;padding:10px;border:1px solid var(--line);border-radius:16px;background:#fffcf4;box-shadow:0 12px 32px #2d433c20;max-height:calc(100dvh - 100px);overflow-y:auto}
 .nav.nav-open nav{display:flex}.nav nav>button{display:flex;align-items:center;justify-content:flex-start;text-align:left;width:100%;min-height:46px;height:auto;padding:11px 14px;font-size:15px;border-radius:9px;flex-shrink:0}
 .nav nav>button:hover,.nav nav>button.active{background:var(--green-light)}.nav .nav-link.active:after{display:none}.nav [data-nav=account]{max-width:none;white-space:normal;overflow-wrap:anywhere}.nav-settings-label{display:inline;margin-left:10px}.nav .lang-button{margin-top:4px}
}
/* Game gestures belong to KAKU, not browser zoom, selection or page dragging. */
html.game-active{overflow:hidden;overscroll-behavior:none}
body.playing{position:fixed;inset:0;overscroll-behavior:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
body.playing #game-canvas,body.playing #game-ui,body.playing #game-ui button,body.playing #game-ui select{touch-action:none;-webkit-touch-callout:none}
body.playing .modal{touch-action:pan-y;overscroll-behavior:contain}
body.playing input,body.playing textarea,body.playing [contenteditable=true]{user-select:text;-webkit-user-select:text;-webkit-touch-callout:default}
.app-mode-link{display:flex;align-items:center;gap:7px;margin-top:15px}.app-mode-instructions{margin-top:20px;font-size:14px;line-height:1.75}.app-mode-instructions ol{padding-left:22px;margin:0}.app-mode-instructions li+li{margin-top:10px}#app-mode-status:empty{display:none}#app-mode-status{font-size:13px;margin-top:14px}
@media(pointer:coarse){input:not([type=checkbox]):not([type=range]),textarea,select,.touch-target select{font-size:16px}.math-card input:not([type=checkbox]):not([type=range]){font-size:24px}.modal{padding-left:max(22px,env(safe-area-inset-left));padding-right:max(22px,env(safe-area-inset-right))}}

/* D10: large choices and a two-click puzzle share keyboard, controller and touch focus. */
.math-card{width:min(680px,100%);padding:22px 28px}.task-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.task-player{font-size:26px;font-weight:850}.task-player small{font-size:14px;color:#687565;font-weight:600;margin-left:8px}.task-heading .icon-button{min-width:42px;min-height:42px}.math-card h2{padding-top:0;margin:16px 0 4px}.math-description{margin-top:6px}.math-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:20px 0}.math-choice{min-height:92px;background:#eff1dc;border:3px solid #c9d3af;border-radius:20px;color:#395440;font:850 40px ui-rounded,system-ui;cursor:pointer}.math-choice:hover{background:#e4edc8}.math-choice:focus-visible,.puzzle-piece:focus-visible{outline:4px solid #e7a74d;outline-offset:3px}.math-choice:focus{border-color:#e7a74d}.task-content[aria-busy=true]{opacity:.6;pointer-events:none}.task-controls,.puzzle-help{font-size:13px;color:#62715d;line-height:1.5}.puzzle-layout{display:grid;grid-template-columns:125px minmax(0,1fr);gap:22px;align-items:center;margin-top:18px}.puzzle-example img{display:block;width:100%;border-radius:14px}.puzzle-example span{display:block;font-size:12px;line-height:1.4;margin-top:7px;text-align:center;color:#66735d}.puzzle-board{display:grid;grid-template-columns:repeat(var(--columns),1fr);grid-template-rows:repeat(var(--rows),1fr);aspect-ratio:1;gap:4px;background:#788668;border:5px solid #788668;border-radius:14px;overflow:visible}.puzzle-piece{min-width:0;min-height:0;padding:0;border:0;border-radius:4px;cursor:pointer;background-repeat:no-repeat;box-shadow:inset 0 0 0 1px #ffffff44;position:relative}.puzzle-piece.picked{outline:4px solid #f5c757;outline-offset:-4px;filter:brightness(1.12)}.puzzle-piece.picked:after{content:'✓';position:absolute;right:3px;top:3px;width:24px;height:24px;border-radius:50%;background:#f8dc7e;color:#394d35;font-weight:900}.puzzle-progress{text-align:center;font-size:14px;font-weight:750;color:#48643e}.task-celebration{position:fixed;inset:0;z-index:1500;pointer-events:none;overflow:hidden}.task-celebration i{position:absolute;left:50%;top:45%;width:10px;height:16px;border-radius:2px;animation:task-confetti 1.5s var(--delay) ease-out both;transform:rotate(var(--x))}.voice-hint{display:flex;align-items:center;gap:12px}.voice-hint button{pointer-events:auto;flex-shrink:0}.player-ages{display:grid;grid-template-columns:1fr 1fr;gap:16px}.player-age label{display:grid;gap:8px;font-weight:750}.player-age small{font-weight:400;line-height:1.5}.player-age select{width:100%}.age-note{font-size:13px;line-height:1.6;color:#66735d}.voice-range{margin-top:16px}
@keyframes task-confetti{0%{opacity:1;transform:rotate(var(--x)) translateY(0) rotate(0)}70%{opacity:1}100%{opacity:0;transform:rotate(var(--x)) translateY(calc(var(--travel) * -1)) rotate(var(--spin))}}
@media(max-width:600px){.math-dialog{padding:10px}.math-card{padding:16px 18px}.task-player{font-size:22px}.math-question{font-size:34px;margin:14px 0}.math-choices{gap:10px}.math-choice{min-height:75px;font-size:34px}.puzzle-layout{grid-template-columns:75px minmax(0,1fr);gap:12px}.puzzle-example span{font-size:10px}.puzzle-board{gap:3px;border-width:4px}.math-feedback{margin-bottom:5px}.task-controls{font-size:11px}.player-ages{gap:12px}.game-hint.voice-hint{max-width:calc(100vw - 40px)}}
@media(max-height:520px){.math-card{max-height:96vh;padding:12px 20px}.math-card h2{margin-top:4px;font-size:22px}.math-description{font-size:12px;margin:4px 0}.math-question{margin:9px 0;font-size:34px}.math-choices{margin:12px 0}.math-choice{min-height:65px}.puzzle-layout{grid-template-columns:100px minmax(0,240px);justify-content:center;margin-top:8px}.puzzle-board{max-height:215px}.puzzle-help{margin:7px 0}.math-feedback{margin:6px 0;min-height:16px}.task-controls{margin:4px 0}}
@media(prefers-reduced-motion:reduce){.task-celebration i{animation-duration:.7s}}
@media(max-height:520px){.math-card .math-description{display:none}.puzzle-layout{grid-template-columns:90px minmax(0,190px);gap:18px}.puzzle-board{max-height:190px}.math-feedback:empty{display:none}.task-controls{font-size:11px}.math-card h2{margin-bottom:8px}.puzzle-help{margin:8px 0 4px}.puzzle-progress{font-size:12px}}
.mission-ages{margin-bottom:28px;max-width:740px}.mission-ages h2{margin-top:0}

/* Editor: task presets lead the scrollable palette on desktop and touch. */
.palette-panel{min-height:0;scrollbar-gutter:stable;scrollbar-width:thin}
.palette-heading{font-size:11px;color:#65755c;letter-spacing:.06em;margin:0 7px 8px;font-weight:800}
.palette-tasks{display:flex;flex-direction:column;gap:3px;padding-bottom:13px;margin-bottom:14px;border-bottom:1px solid var(--line)}
.palette-tasks .palette-heading{margin-bottom:1px}.palette-help{font-size:10px;line-height:1.5;color:var(--muted);margin:0 7px 6px}
.palette-task{background:#eff1e2;border:1px solid #dce2cb;min-height:46px;width:100%;gap:9px;padding:8px}
.palette-task.active{background:#dde9c8;border-color:#7a9465}.palette-item:focus-visible{outline:3px solid #bf9a4d;outline-offset:-3px}
.task-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:29px;height:29px;border-radius:8px;font-size:12px;font-weight:850;background:#e2e9cf;color:#4d6945}
.task-icon.puzzle{background:#e1eafa;color:#52799f}.task-icon.auto{background:#f4e7c9;color:#967743}
.task-settings{padding-bottom:10px;margin-bottom:16px;border-bottom:1px solid var(--line)}
.task-settings .field-label:first-child{margin-top:0}.task-settings p{line-height:1.6}

/* Small, countable groups for preschool and the beginning of grade one. */
.counting-question{display:flex;align-items:center;justify-content:center;gap:clamp(5px,1.8vw,18px);min-height:124px;margin:18px 0;padding:16px 10px;border-radius:20px;background:#f0eddf;box-sizing:border-box}
.counting-group{display:inline-grid;grid-template-columns:repeat(var(--count-columns),1fr);gap:7px;align-items:center;justify-items:center}
.counting-item{display:block;font:44px/1.1 "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;user-select:none}
.counting-sign,.counting-mystery{font-size:32px;font-weight:850;color:#56704e}.counting-mystery{display:grid;place-items:center;width:48px;height:60px;flex-shrink:0;border:2px dashed #a5b78c;border-radius:14px}
.counting-choices .math-choice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;min-height:140px;padding:14px 6px}
.counting-choices .counting-group{gap:4px}.counting-choices .counting-item{font-size:28px}.counting-number{font:850 27px/1 ui-rounded,system-ui}
@media(max-width:600px){.counting-question{min-height:104px;margin:14px 0;padding:12px 6px;gap:6px}.counting-question .counting-item{font-size:clamp(26px,8vw,40px)}.counting-sign,.counting-mystery{font-size:25px}.counting-mystery{width:32px;height:46px}.counting-choices .math-choice{min-height:118px;padding:12px 3px}.counting-choices .counting-item{font-size:clamp(18px,5.4vw,26px)}.counting-choices .counting-group{gap:3px}.counting-number{font-size:25px}}
@media(max-height:520px){.counting-question{min-height:72px;margin:8px 0;padding:9px}.counting-question .counting-item{font-size:30px}.counting-mystery{height:42px}.counting-choices .math-choice{min-height:90px;padding:8px 4px;gap:5px}.counting-choices .counting-item{font-size:22px}.counting-choices .counting-number{font-size:22px}}
@media(max-width:760px),(max-height:520px) and (orientation:landscape){
 .palette-heading{font-size:9px;letter-spacing:0;text-align:center;margin:2px 0 7px}.palette-help{display:none}
 .palette-tasks{padding-bottom:9px;margin-bottom:10px}.palette-task{padding:6px 2px;gap:4px;min-height:59px}.task-icon{width:25px;height:25px;font-size:10px}
}

/* Child identities stay with the child when dinosaur colours are exchanged. */
.profile-picker{width:100%;margin:18px 0 24px}.profile-picker-heading{margin-bottom:15px}.profile-picker-heading>strong{font-size:19px;letter-spacing:-.3px}.profile-picker-heading>p{font-size:12px;color:#78826e;line-height:1.6;margin-top:5px;max-width:620px}.profile-player-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.profile-player-grid.single{grid-template-columns:minmax(0,1fr)}.profile-player-card{min-width:0;padding:18px;background:#fffdf7;border:2px solid #d8dfd0;border-radius:18px;box-shadow:0 5px 16px #31443206}.profile-player-card.profile-ku{border-color:#a4bedb;background:linear-gradient(145deg,#f1f7ff,#fffdf6 60%)}.profile-player-card.profile-ka{border-color:#deb1a8;background:linear-gradient(145deg,#fff0ea,#fffdf6 60%)}.profile-player-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.profile-player-heading>span{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.6px;color:#7d8576}.profile-player-heading>b{font-size:18px}.profile-ku .profile-player-heading>b{color:#3d6d9e}.profile-ka .profile-player-heading>b{color:#b35346}.profile-name-label{margin:12px 0 6px!important;font-weight:700}.profile-name-input{font-size:17px!important;font-weight:750!important;min-height:46px!important;background:#fffefb!important}.profile-keyboard-open{display:inline-flex;gap:7px;align-items:center;min-height:36px;padding:4px 0;color:#677b5e;font-size:12px;text-align:left}.profile-keyboard-open:hover{text-decoration:underline;text-underline-offset:3px}.profile-choice-group{min-width:0;border:0;padding:0;margin:16px 0 0}.profile-choice-group>legend{font-size:11px;font-weight:800;margin-bottom:8px;padding:0;color:#6b7762}.profile-color-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.profile-color-choice{display:flex;align-items:center;justify-content:center;gap:6px;min-height:46px;padding:9px 8px;border-radius:11px;border:2px solid #d9ddcf;background:#fffdf7;font-size:12px;font-weight:750}.profile-color-choice.blue.selected{border-color:#5384b5;background:#dceaff;color:#2c5b88}.profile-color-choice.red.selected{border-color:#c96e5e;background:#f9dfd5;color:#a54538}.profile-choice-check{font-weight:950;min-width:9px}.profile-control-hint{font-size:10px!important;line-height:1.5!important;color:#79856e;margin-top:7px;min-height:30px}.profile-grade-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.profile-grade-choice{min-width:0;min-height:42px;padding:7px 4px;border:2px solid #dce1ce;border-radius:10px;background:#fafbf2;font-size:12px;font-weight:700;line-height:1.3}.profile-grade-choice.wide-choice{grid-column:span 2}.profile-grade-choice.selected{border-color:#698550;background:#e1eccd;color:#38542c;box-shadow:inset 0 0 0 1px #6985503d}.profile-picker button:focus,.profile-picker input:focus{outline:3px solid #ba8b32;outline-offset:3px;box-shadow:0 0 0 5px #fff7db}.profile-picker button:focus:not(:focus-visible){outline:3px solid #ba8b32;outline-offset:3px}.profile-picker-note{font-size:11px!important;line-height:1.6!important;margin-top:12px;color:#7a846f}.profile-pad-hint{font-size:10px!important;line-height:1.5!important;color:#7f8975;margin-top:7px}.profile-keyboard{position:fixed;inset:0;z-index:250;display:flex;align-items:center;justify-content:center;padding:20px;background:#263b38a8;overflow:auto;overscroll-behavior:contain}.profile-keyboard-panel{width:min(100%,700px);max-height:calc(100dvh - 40px);overflow:auto;background:#fcfaf0;border:2px solid #cbd7bc;border-radius:22px;box-shadow:0 24px 80px #142a3c38;padding:23px}.profile-keyboard-panel h2{font-size:25px}.profile-keyboard-panel .field-label{margin:14px 0 5px}.profile-keyboard-input{font-size:23px!important;font-weight:750!important;letter-spacing:.4px}.profile-keyboard-count{font-size:10px;line-height:1.3;color:#849077;margin:6px 0 13px;text-align:right}.profile-keyboard-letters{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:7px}.profile-keyboard-letters button{min-width:0;min-height:43px;border-radius:9px;background:#fffef7;border:1px solid #cdd7bd;font-size:17px;font-weight:750;box-shadow:0 3px 0 #dbe1cd}.profile-keyboard-letters button:hover,.profile-keyboard-tools button:hover{background:#e7edda}.profile-keyboard-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}.profile-keyboard-tools button{min-height:42px;padding:6px 8px;border-radius:10px;border:1px solid #cbd4bc;background:#edf1e3;font-size:12px;font-weight:700}.profile-keyboard-actions{display:flex;justify-content:flex-end;gap:11px;margin-top:17px}.profile-keyboard-actions .btn{min-width:105px}.profile-keyboard-panel>.profile-pad-hint{margin-top:14px;text-align:center}
@media(max-width:680px){.profile-player-grid{grid-template-columns:minmax(0,1fr)}.profile-player-card{padding:16px}.profile-grade-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.profile-control-hint{min-height:0}.profile-keyboard{padding:12px}.profile-keyboard-panel{padding:17px;max-height:calc(100dvh - 24px)}.profile-keyboard-letters{grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}.profile-keyboard-letters button{min-height:40px;font-size:16px}.profile-keyboard-tools{gap:6px}.profile-keyboard-tools button{padding:5px 4px;font-size:11px}}
@media(max-width:390px){.profile-grade-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.profile-color-choice{font-size:11px;padding:8px 4px}.profile-keyboard-panel{padding:13px}.profile-keyboard-letters{gap:5px}.profile-keyboard-letters button{min-height:35px}.profile-keyboard-actions .btn{min-width:93px;padding:10px 15px}}
@media(max-height:520px) and (orientation:landscape){.profile-keyboard{align-items:flex-start;padding:9px}.profile-keyboard-panel{max-height:calc(100dvh - 18px);padding:14px}.profile-keyboard-panel h2{font-size:21px}.profile-keyboard-panel .field-label{margin-top:8px}.profile-keyboard-letters button{min-height:34px}.profile-keyboard-input{min-height:38px!important;font-size:18px!important}.profile-keyboard-count{margin-bottom:8px}.profile-keyboard-tools{margin-top:9px}.profile-keyboard-actions{margin-top:10px}}
/* Puzzle dragging is local to the board; the surrounding dialog can still scroll. */
.puzzle-board,.puzzle-piece{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.puzzle-piece{cursor:grab}.puzzle-board.dragging,.puzzle-board.dragging .puzzle-piece{cursor:grabbing}.puzzle-piece.drag-source{opacity:.25}.puzzle-piece.drop-target{outline:4px solid #f5c757;outline-offset:-4px;filter:brightness(1.13)}.puzzle-drag-ghost{position:fixed;left:0;top:0;z-index:1200;pointer-events:none;background-repeat:no-repeat;border-radius:5px;box-shadow:0 10px 26px #10271f66,inset 0 0 0 2px #fff8d9;opacity:.95;will-change:transform;user-select:none;-webkit-user-select:none}
.home-profiles{margin-top:18px;margin-right:12px}

.task-expeditions{margin:22px 0;padding:22px 25px;border:1px solid #cbd7bc;border-radius:18px;background:#edf2e3}.task-expeditions>strong{font-size:20px}.task-expeditions>p{font-size:13px;color:#6c7a64;margin:7px 0 15px}.task-expeditions .btn{background:#fffdf5}.task-expeditions .row{gap:12px}

/* First reading: large connected answer row and the same letters for every input. */
.word-instruction{text-align:center;margin:12px 0 0;font-size:16px;color:#62715d}
.word-model{text-align:center;font:850 42px ui-rounded,system-ui;letter-spacing:.1em;color:#365840;margin:4px 0 18px}
.word-answer,.word-bank{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.word-answer{padding:12px;border-radius:17px;background:#e9efdc;border-bottom:4px solid #b2c396;min-height:66px}
.word-bank{padding:18px 6px 12px;min-height:66px;border-radius:16px}
.word-tile{display:grid;place-items:center;width:62px;height:62px;box-sizing:border-box;border:2px solid #c7bfa2;border-bottom-width:5px;border-radius:13px;background:#fffdf4;color:#36513b;font:850 32px ui-rounded,system-ui;padding:0;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none}
.word-slot{border:2px dashed #b1c198;border-radius:10px;background:#f8faef;color:#a0b18e}
.word-slot.filled{border-style:solid;border-bottom-width:4px;border-color:#a9bf8a;background:#fffdf4;color:#36513b}
.word-tile:focus{outline:4px solid #e7a74d;outline-offset:2px}.word-tile:hover{background:#f6edce}
.word-letter.used{opacity:.3;border-bottom-width:2px}.word-tile.drag-source{opacity:.25}
.word-slot.drop-target,.word-bank.drop-target{outline:4px solid #e7a74d;outline-offset:2px;background:#fff1b8}
.word-drag-ghost{position:fixed;z-index:1600;pointer-events:none;transform:translate(-50%,-50%) rotate(-5deg);box-shadow:0 12px 20px #20372440;opacity:.95}
.word-typing{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:12px;color:#62715d;font-size:13px;margin:6px 0 10px}
.math-card .word-input{font-size:24px;font-weight:750;letter-spacing:.12em;border:2px solid #cbd7bc;border-radius:10px;background:#fffdf7;padding:7px 12px;min-width:0;text-transform:uppercase}
.word-input:focus{outline:3px solid #e7a74d;outline-offset:1px}
.word-actions{display:flex;gap:10px;justify-content:center}.word-actions button:focus{outline:3px solid #e7a74d;outline-offset:2px}
.word-help{font-size:13px;line-height:1.5;text-align:center;color:#62715d;margin:12px 0 6px}.word-progress{text-align:center;color:#48643e;font-size:13px;margin:5px 0}
.task-icon.word{font-weight:850;color:#48643e;letter-spacing:1px}
@media(max-width:480px){.word-answer,.word-bank{gap:6px}.word-tile{width:47px;height:54px;font-size:28px}.word-answer{padding:10px 5px;min-height:56px}.word-bank{min-height:54px}.word-typing{grid-template-columns:1fr;gap:5px}.word-model{font-size:36px}}
@media(max-height:520px){.word-instruction{font-size:12px;margin:0}.word-model{font-size:30px;margin:0 0 7px}.word-tile{width:46px;height:46px;font-size:26px}.word-answer{padding:6px;min-height:46px}.word-bank{padding:9px 5px;min-height:46px}.word-typing{grid-template-columns:1fr 1fr;gap:10px;margin:3px 0 7px}.math-card .word-input{font-size:19px;padding:4px 9px}.word-actions button{font-size:12px;min-height:30px;padding:4px 12px}.word-help{font-size:11px;margin:6px 0 3px}.word-progress{font-size:11px;margin:3px 0}.word-dialog .math-card{padding:10px 18px}.word-dialog .task-player{font-size:21px}.word-dialog .math-feedback{font-size:12px}}

/* D18: geographically sourced country shapes share one selection for all inputs. */
.geography-dialog .math-card{width:min(760px,100%);padding:18px 24px}
.geography-dialog h2{margin-top:10px}
.geography-question{text-align:center;margin:8px 0 4px;color:#304e3a}
.geography-question small{display:block;font-size:15px;font-weight:600;line-height:1.4}
.geography-question strong{display:block;font:850 clamp(28px,5vw,42px) ui-rounded,system-ui;line-height:1.25}
.geography-instruction{font-size:14px;line-height:1.45;text-align:center;margin:5px 0 9px}
.geography-map{display:block;width:100%;max-height:43vh;aspect-ratio:720/580;touch-action:manipulation;overflow:visible}
.geography-water{fill:#e3ede9}
.geography-country{outline:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
.geography-country path{fill:#e3d8a6;stroke:#61745b;stroke-width:2.8;stroke-linejoin:round}
.country-PL path{fill:#d6e7b6}.country-AT path{fill:#eacda9}.country-SK path{fill:#d2decb}
.geography-reference{cursor:default}.geography-reference path{fill:#aac8c4;stroke:#3e665b;stroke-width:3.2}
.geography-country text{fill:#253c2a;text-anchor:middle;font:850 37px ui-rounded,system-ui;paint-order:stroke;stroke:#fffbea;stroke-width:5px;stroke-linejoin:round;pointer-events:none}
.geography-reference text{font-size:33px}
.geography-country[data-country]:hover path{filter:brightness(1.06)}
.geography-country.geography-selected path{stroke:#8b4d12;stroke-width:6}
.geography-country[data-country]:focus path{stroke:#8b4d12;stroke-width:7;filter:brightness(1.04)}
.geography-country[data-country]:focus text{text-decoration:underline;text-underline-offset:5px}
.geography-north{pointer-events:none}.geography-north path{fill:none;stroke:#536c63;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.geography-north text{text-anchor:middle;font:800 24px system-ui;fill:#536c63}
.geography-selection{text-align:center;font-weight:800;font-size:15px;margin:5px 0}
.geography-attribution{text-align:center;font-size:10px;color:#6b7668;margin:3px 0}
.geography-dialog .math-feedback:empty{display:none}
@media(max-width:480px){.geography-dialog .math-card{padding:14px 12px}.geography-question small,.geography-instruction{font-size:13px}.geography-map{max-height:none}.geography-dialog .task-player small{display:block;margin-left:0}.geography-dialog .math-description{margin:4px 0}.geography-dialog .task-controls{font-size:11px}.geography-country text{font-size:39px}.geography-reference text{font-size:34px}}
@media(max-height:520px) and (min-width:481px){.geography-dialog .math-card{max-height:96vh;padding:10px 18px}.geography-dialog .task-heading{margin-bottom:0}.geography-dialog .task-player{font-size:20px}.geography-dialog h2{margin:3px 0;font-size:19px}.geography-question{margin:2px 0}.geography-question strong{font-size:28px}.geography-question small{font-size:12px}.geography-instruction{font-size:12px;margin:2px 0}.geography-map{max-height:47vh}.geography-selection{font-size:13px;margin:2px 0}.geography-attribution{font-size:9px}.geography-dialog .task-controls{margin:4px 0}}
@media(max-height:520px) and (min-width:481px){.geography-dialog .task-content{display:grid;grid-template-columns:.9fr 1.3fr;column-gap:10px;align-items:center}.geography-map{grid-column:2;grid-row:1 / span 4;max-height:48vh}.geography-question,.geography-instruction,.geography-selection,.geography-attribution{grid-column:1}.geography-question{grid-row:1}.geography-instruction{grid-row:2}.geography-selection{grid-row:3}.geography-attribution{grid-row:4}.geography-country text{font-size:42px}.geography-reference text{font-size:36px}}

/* Local duo turns occupy the same halves as their personal game cameras. */
.math-dialog.task-half{inset:0 auto 0 0;width:50%;box-sizing:border-box;padding:76px 14px 48px;container-type:inline-size}
.math-dialog.task-half[data-side=right]{left:50%}
.task-half .math-card{width:100%;max-height:100%;padding:18px;border-top:5px solid #517fb4}
.task-half[data-side=right] .math-card{border-top-color:#cc665b}
.task-half .task-heading{gap:8px;flex-wrap:wrap}.task-half .task-heading .row{margin-left:auto;gap:5px}
.task-half .task-player{font-size:clamp(18px,4cqw,25px);overflow-wrap:anywhere}.task-half .task-player small{display:block;margin:3px 0 0;font-size:12px}
.task-half .math-card h2{font-size:clamp(19px,4.5cqw,25px);margin:12px 0 5px}.task-half .math-description{display:none}
.task-half .math-question{font-size:clamp(25px,7cqw,38px);overflow-wrap:anywhere;margin:18px 0}
.task-half .math-choices{gap:8px;margin:14px 0}.task-half .math-choice{min-width:0;min-height:75px;font-size:clamp(25px,7cqw,38px)}
.task-half .task-selected:not(.cups-cup):not(.cups-task){outline:3px solid #e7a74d;outline-offset:2px}
.task-half .task-controls,.task-half .puzzle-help{font-size:12px}.task-half .math-feedback:empty{display:none}
.task-half .puzzle-layout{grid-template-columns:minmax(50px,80px) minmax(0,1fr);gap:12px;justify-content:normal}.task-half .puzzle-board{max-height:none}
.task-half .counting-question{gap:clamp(3px,1.3cqw,9px);min-height:90px;padding:10px 5px;margin:12px 0}
.task-half .counting-question .counting-item{font-size:clamp(18px,6cqw,34px)}.task-half .counting-group{gap:3px}
.task-half .counting-sign,.task-half .counting-mystery{font-size:clamp(18px,5cqw,28px)}.task-half .counting-mystery{width:28px;height:40px}
.task-half .counting-choices .math-choice{min-height:108px;padding:9px 3px;gap:6px}.task-half .counting-choices .counting-item{font-size:clamp(14px,4.5cqw,25px)}
.task-half .word-tile{width:clamp(32px,10cqw,52px);height:clamp(40px,11cqw,56px);font-size:26px}.task-half .word-answer,.task-half .word-bank{gap:6px;padding:9px 4px}
.task-half .word-typing{grid-template-columns:1fr;gap:5px}.task-half .word-help{font-size:12px}
.task-half.geography-dialog .task-content{display:block}.task-half .geography-map{max-height:36vh}.task-half .geography-question strong{font-size:30px}
@media(max-width:700px){.math-dialog.task-half{padding:65px 5px 26px}.task-half .math-card{padding:11px;border-radius:16px}.task-half .math-choices{gap:5px}.task-half .puzzle-layout{grid-template-columns:1fr}.task-half .puzzle-example{display:none}.task-half .counting-question{flex-wrap:wrap}.task-half .counting-choices{grid-template-columns:1fr}.task-half .counting-choices .math-choice{min-height:65px;flex-direction:row}.task-half .task-controls{font-size:11px}}
@media(max-height:520px){.math-dialog.task-half{padding-top:62px;padding-bottom:22px}.task-half .math-card{padding:10px 12px}.task-half .task-player{font-size:18px}.task-half .math-card h2{margin:8px 0}.task-half .task-controls{margin-bottom:0}.task-half .geography-map{max-height:none}}

/* D18: the shared Jeep keeps visible, touch-sized controls for both local seats. */
.jeep-hud{position:fixed;left:50%;bottom:32px;transform:translateX(-50%);z-index:15;display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:center;gap:8px;width:min(660px,calc(100vw - 28px));pointer-events:auto}
.jeep-hud[hidden],.jeep-player-card[hidden],.jeep-controls[hidden]{display:none}
.jeep-player-card{padding:9px 11px;border:1px solid #cbd2b5;border-radius:15px;background:#faf7eaf5;box-shadow:0 5px 18px #22352e18;width:248px;min-width:0;max-width:100%;font-size:12px}
.jeep-player-card:has(.jeep-controls[hidden]){width:205px}.jeep-player-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:10px;align-items:center}
.jeep-player-name{grid-column:1;font-weight:850;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jeep-seat-status{grid-column:1;display:block;margin:0;color:#687563;font-size:11px;line-height:1.3}.jeep-toggle{grid-column:2;grid-row:1 / span 2;width:auto;height:auto;min-width:84px;min-height:44px;border:1px solid #9cad83;background:#e8eed8;color:#344a37;border-radius:11px;font:inherit;font-weight:800;padding:8px 11px;cursor:pointer}
.jeep-controls{display:flex;gap:6px;margin-top:7px}.jeep-drive{border:1px solid #bcc7aa;border-radius:11px;width:auto;height:auto;min-width:44px;min-height:44px;flex:1;padding:7px 5px;background:#fffdf1;color:#3f5543;font:inherit;font-size:12px;font-weight:800;touch-action:none;cursor:pointer}.jeep-drive.held{background:#dce7c3;box-shadow:inset 0 0 0 2px #6d865f}.jeep-controls-hint{display:block;margin-top:5px;font-size:10px;line-height:1.4;color:#687565}
.object-icon.jeep{border:0;background:none}.object-icon.jeep::before{content:'🚙';font-size:24px;position:static}.task-icon.geography{font-size:21px}
@media(pointer:coarse){.jeep-hud{bottom:174px;gap:6px}.jeep-player-card{padding:8px 10px}.jeep-controls-hint{display:none}.all-controlled-in-jeep #touch-control{display:none!important}.all-controlled-in-jeep .jeep-hud{bottom:max(18px,env(safe-area-inset-bottom))}}
@media(max-width:480px){.jeep-hud{width:calc(100vw - 18px);bottom:32px;gap:6px}.jeep-player-card,.jeep-player-card:has(.jeep-controls[hidden]){width:100%;padding:7px 10px}.jeep-controls-hint{font-size:9px}.jeep-controls{gap:5px}.jeep-player-name{font-size:13px}}
@media(pointer:coarse) and (max-width:480px){.jeep-hud{bottom:172px}.all-controlled-in-jeep .jeep-hud{bottom:max(18px,env(safe-area-inset-bottom))}}
@media(pointer:coarse) and (max-height:520px) and (orientation:landscape){.all-controlled-in-jeep .jeep-hud{width:calc(100vw - 24px);justify-content:space-between}.all-controlled-in-jeep .jeep-player-card{width:clamp(208px,29vw,248px)}.all-controlled-in-jeep .jeep-controls{gap:3px}.all-controlled-in-jeep .jeep-player-card:has(.jeep-controls[hidden]){width:clamp(160px,24vw,205px)}.all-controlled-in-jeep .jeep-seat-status{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}

/* D19: independent racing cameras and the same KU-left / KA-right control order. */
.race-hud{position:fixed;top:81px;left:50%;transform:translateX(-50%);z-index:14;display:grid;gap:2px;justify-items:center;max-width:calc(100vw - 26px);padding:7px 17px;border:1px solid #d7dec5;border-radius:15px;background:#fffbeaeb;text-align:center;pointer-events:none;color:#36513c}
.race-hud strong{font-size:21px;line-height:1.15}.race-hud span{font-size:11px;line-height:1.4}.race-hud[data-phase=countdown] strong{font-size:40px}.race-hud[data-phase=finished]{border-color:#b4c491;background:#f3f5dcf2}
.jeep-player-card[data-jeep-player="1"]{order:0}.jeep-player-card[data-jeep-player="0"]{order:1}.jeep-player-card[data-jeep-player="0"]:only-child{margin-left:auto}.jeep-player-card[data-jeep-player="1"]:only-child{margin-right:auto}
@media(max-height:520px){.race-hud{top:57px;padding:4px 10px;border-radius:11px;gap:1px}.race-hud strong{font-size:16px}.race-hud span{font-size:10px}.race-hud[data-phase=countdown] strong{font-size:28px}.playing:has(.race-hud) .game-hint{display:none}}
@media(min-height:521px){.playing:has(.race-hud) .game-hint{top:150px}}
/* D18: give a narrow portrait editor a full-width property panel below its canvas. */
@media(max-width:480px) and (orientation:portrait){
 .workshop{grid-template-columns:70px minmax(0,1fr);grid-template-rows:auto minmax(100px,1fr) minmax(160px,34dvh)}
 .workshop-top{grid-column:1/-1;grid-row:1;flex-wrap:wrap;align-content:center;padding:7px 8px;gap:4px 6px;min-width:0}
 .workshop-top .toolbar-actions{flex:0 0 100%;width:100%;max-width:100%;min-width:0;margin-left:0;gap:2px;overflow-x:auto;overflow-y:hidden;overscroll-behavior:contain;scrollbar-width:thin;padding:1px 0 3px;touch-action:pan-x}
 .workshop-top .toolbar-actions>.icon-button{flex:0 0 32px;width:32px;height:40px;min-height:40px;padding:0}
 .workshop-top .toolbar-actions>.btn{flex:0 0 auto;min-height:38px;padding:8px;font-size:10px}
 .workshop>.palette-panel{grid-column:1;grid-row:2;min-height:0;overflow-y:auto;overflow-x:hidden}
 .workshop>.editor-stage{grid-column:2;grid-row:2;min-width:0;min-height:0;overflow:hidden}
 .workshop>.properties-panel{grid-column:1/-1;grid-row:3;min-width:0;min-height:0;overflow:auto;border-left:0;border-top:1px solid var(--line)}
 .workshop .editor-viewbar{width:max-content;max-width:calc(100% - 8px);min-width:0;box-sizing:border-box;overflow-x:auto;overflow-y:hidden;overscroll-behavior:contain;scrollbar-width:thin;touch-action:pan-x}
 .workshop .editor-viewbar>*{flex-shrink:0}
 .workshop>.editor-footer{display:none}
}

/* A controller keeps its focus visible even after a mouse or touch interaction. */
[data-gamepad-focus="true"]:focus,.gamepad-keyboard button:focus,.gamepad-keyboard input:focus,.gamepad-keyboard textarea:focus{outline:3px solid #d49326;outline-offset:3px}
.puzzle-piece:focus{outline:4px solid #e7a74d;outline-offset:3px}
.puzzle-piece.picked:focus{outline:4px solid #f5c757;outline-offset:-4px;box-shadow:0 0 0 3px #394d35;z-index:1}
.pause-tools{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:8px}
.pause-tools>.btn{flex:1 1 160px}
.editor-pad-cursor{position:absolute;top:0;left:0;z-index:3;width:28px;height:28px;margin:-14px;border:3px solid #fffaf0;border-radius:50%;box-shadow:0 0 0 2px #344f41,0 2px 12px #20332e80;pointer-events:none}
.editor-pad-cursor:before,.editor-pad-cursor:after{content:'';position:absolute;background:#344f41;box-shadow:0 0 0 1px #fffaf0}
.editor-pad-cursor:before{height:2px;width:36px;left:-7px;top:10px}
.editor-pad-cursor:after{width:2px;height:36px;top:-7px;left:10px}
.editor-pad-cursor.holding{background:#f5c757a8;box-shadow:0 0 0 3px #d49326}
.editor-pad-cursor.panning{border-style:dashed}
.editor-pad-help{position:absolute;left:12px;right:12px;bottom:60px;z-index:3;pointer-events:none;border-radius:10px;background:#fffdf2ed;padding:8px 10px;font-size:11px;line-height:1.5;text-align:center}
@media(max-width:760px){.editor-pad-help{left:5px;right:5px;padding:5px;font-size:10px}.editor-viewbar #ed-gamepad{padding:7px;font-size:11px}}

/* Remembered players stay compact between missions; the full picker remains editable. */
.saved-profiles{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}.saved-profile-list{display:flex;gap:24px;flex-wrap:wrap}.saved-profile{display:flex;flex-direction:column;gap:4px}.saved-profile>span{font-size:14px;color:var(--muted,#63715e)}.profile-save-status{margin:12px 0 0}.profile-start-actions{display:flex;justify-content:flex-end;gap:12px;position:sticky;bottom:0;padding:14px 0 0;background:var(--paper,#fffdf0)}.modal:has(#profiles-continue){max-width:920px;width:min(920px,calc(100vw - 32px))}.modal:has(#profiles-continue) .profile-name-input{min-width:0}@media(max-width:600px){.saved-profile-list{gap:14px}.saved-profiles>.btn{width:100%}.profile-start-actions>.btn{flex:1}}
