@charset "UTF-8";
:root{--ink:#344b3e;--muted:#738270;--cream:#fffbed;--green:#257c63;--coral:#eb8258;--line:#dddcc3;--shadow:0 9px 30px #243f2920;font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;color:var(--ink);font-size:14px}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 90% 0,#f4eacb,transparent 55%),#edf2e2;min-height:100vh}button,input,select{font:inherit}button{border:0;cursor:pointer;background:none;color:inherit;touch-action:manipulation;transition:transform .15s,box-shadow .15s,background .15s}button:disabled{opacity:.4;cursor:default}button:hover:not(:disabled){filter:brightness(1.035);transform:translateY(-2px)}button:active:not(:disabled){transform:translateY(2px);box-shadow:none}button,a,input,select{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #126bb2;outline-offset:4px}[hidden]{display:none!important}h1,h2,h3,p{margin:0}h3{font-size:14px}button,a{user-select:none}.icon-library{position:absolute;width:0;height:0;overflow:hidden}.icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.masthead{max-width:1464px;margin:auto;padding:18px 38px 15px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;gap:9px;align-items:center;color:#36553f;text-decoration:none;font-size:24px;letter-spacing:1px;font-weight:900}.brand img{height:54px;width:50px;object-fit:contain;filter:drop-shadow(0 3px 1px #a9956833)}.brand small{display:block;letter-spacing:2.2px;font-size:8px;font-weight:700;color:#8c9376;margin-top:5px}nav{display:flex;gap:10px;align-items:center}.text-button{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;padding:12px 16px;border-radius:15px;color:#617355}.nav-adventure{background:#fffbee;box-shadow:0 3px 0 #d3d9bd}.nav-adventure .icon{color:#db8751}.round-button{height:42px;width:42px;display:grid;place-items:center;border:1px solid #d4ddc5;border-radius:50%;color:#6f8067;background:#f7faee}.round-button.active{background:#327e65;color:#fff}.nav-divider{width:1px;height:24px;background:#cbd4ba;margin:0 7px}
.workspace{max-width:1464px;padding:0 28px;margin:auto}.game-area{position:relative}.scene-frame{position:relative;border:7px solid #fffcf1;border-radius:34px;overflow:hidden;background:#add197;box-shadow:0 5px 0 #c7d2ad,0 16px 36px #63764b1a;isolation:isolate}.scene-frame canvas{width:100%;height:auto;display:block;aspect-ratio:7/3}.scene-heading{position:absolute;top:23px;left:27px;max-width:42%;padding:12px 19px 13px;border-radius:20px;background:#fff9e9ee;box-shadow:0 4px 0 #5d71451a;backdrop-filter:blur(8px);border:1px solid #fffcf6}.eyebrow{font-size:10px;font-weight:800;letter-spacing:2px;color:#7a895d}.scene-heading h1{font-size:29px;letter-spacing:1px;font-weight:900;line-height:1.5;color:#3d573b}.level-indicator{font-size:11px;display:flex;align-items:center;gap:6px;color:#859162}.tiny-star{color:#d9a137;font-size:15px}.scene-top{position:absolute;top:30px;left:50%;transform:translateX(-50%);text-align:center;white-space:nowrap}.scene-top>span{display:block;font-size:11px;color:#4c7050;letter-spacing:.5px}.scene-top>span:first-child{display:inline-flex;align-items:center;gap:8px;border:1px solid #fffbdf80;background:#f5ffe4b8;border-radius:30px;padding:8px 14px;box-shadow:0 3px 9px #476a4020;font-weight:700}.scene-top>span:last-child{margin-top:8px;font-size:10px}.scene-top i{width:6px;height:6px;border-radius:50%;background:#429876;box-shadow:0 0 0 4px #52a17522}
.supplies{position:absolute;right:25px;top:23px;width:174px;padding:13px 17px 12px;background:#fff9e9f5;border:2px solid #fffef2;border-radius:22px;box-shadow:0 4px 0 #997a3930}.supplies>.eyebrow{font-size:9px;letter-spacing:1px;color:#928551}.supply-count{display:flex;align-items:center;gap:10px;margin:2px 0 5px}.supply-count strong{font-size:36px;line-height:1.3;font-weight:850;font-variant-numeric:tabular-nums;color:#866530}.supply-count>span:last-child{color:#94815b;font-size:12px}.marble{display:inline-block;flex-shrink:0;width:10px;height:10px;border-radius:50%;background:radial-gradient(circle at 30% 25%,#fffbd8 0,#ffc950 32%,#cf862a 90%);box-shadow:inset -1px -2px 1px #84561b35,0 1px 1px #75541a25}.marble.large{width:28px;height:28px;border:2px solid #fae3a2;box-shadow:0 3px 0 #c2985340,inset -2px -3px 1px #a7661740}.resource-track{height:5px;background:#ebe3c8;border-radius:10px;overflow:hidden}.resource-track i{display:block;height:100%;background:linear-gradient(90deg,#eab057,#edc966);border-radius:10px;transition:width .3s}.resource-caption{display:flex;justify-content:space-between;font-size:10px;margin-top:7px;color:#948464}
.wave-preview{position:absolute;top:167px;left:29px;display:flex;gap:6px;flex-wrap:wrap;max-width:50%}.wave-preview button,.training-forecast{background:#fffbedec;border:1px solid #fffef5;border-radius:12px;box-shadow:0 2px 0 #38644419;padding:9px 12px;font-size:13px;display:flex;align-items:center;gap:12px;color:#506442}.wave-preview button.selected{background:#fbefba;border-color:#edd28d}.wave-preview small{font-size:10px;color:#86946c}.wave-preview button span{font-weight:800}.training-forecast{display:block;font-size:12px;line-height:1.8}.training-forecast b{font-size:17px;color:#3c7154}
.lane-buttons{position:absolute;left:22px;top:44%;bottom:26%;display:flex;flex-direction:column;justify-content:space-around;gap:5px}.lane-select{width:43px;height:43px;background:#fffbee;box-shadow:0 3px 0 #697c5b55;border:2px solid #fffef5;border-radius:15px;font-size:17px;font-weight:800;line-height:1}.lane-select small{display:block;font-size:8px;line-height:1.5;font-weight:500}.lane-select.selected{background:#398464;color:white;border-color:#b9d7a3}.bear-message{position:absolute;left:28px;bottom:18px;display:flex;align-items:flex-end;gap:1px;max-width:69%;pointer-events:none}.bear-message>img{height:148px;width:137px;object-fit:contain;filter:drop-shadow(0 7px 3px #65532e22);animation:breathe 4s ease-in-out infinite;z-index:1}.speech{position:relative;padding:13px 47px 15px 20px;min-height:72px;margin:0 0 13px -5px;border:2px solid white;border-radius:20px 20px 20px 4px;background:#fffdf1f5;box-shadow:0 5px 0 #48694416;pointer-events:auto;max-width:450px}.speech strong{font-size:10px;color:#bf8850;letter-spacing:1px;display:block;margin-bottom:5px}.speech p{font-size:13px;line-height:1.75;font-weight:600}.speech button{position:absolute;right:9px;top:50%;transform:translateY(-30%);width:29px;height:29px;display:grid;place-items:center;background:#ecf0da;border-radius:50%;color:#7b9862}.speech .icon{width:16px;height:16px}
.workbench{margin:19px 7px 0;padding:21px 23px 14px;display:grid;grid-template-columns:155px minmax(160px,.8fr) minmax(290px,1.7fr) 180px;gap:15px 24px;border:2px solid #fffef6;border-radius:25px;background:#fffbed;box-shadow:0 4px 0 #d2d6b8,0 10px 25px #66724d10;position:relative}.workbench-heading{display:flex;gap:9px;flex-wrap:wrap;align-content:start;align-items:center;padding-top:2px}.tool-symbol{display:grid;place-items:center;width:34px;height:34px;color:#cd9261;background:#f6e8cb;border-radius:12px}.workbench-heading small{font-size:9px;letter-spacing:1px;color:#9d9477}.workbench-heading h2{font-size:17px;font-weight:850;margin-top:4px}.tag{margin-left:43px;background:#e7efdc;border-radius:6px;padding:4px 8px;font-size:10px;color:#71835c}.tool-section{min-width:0}.section-label{display:flex;justify-content:space-between;align-items:center;gap:6px;min-height:26px}.section-label>span{font-size:10px;color:#9b997e}.barrel-buttons{display:flex;gap:6px;flex-wrap:wrap;margin-top:12px}.barrel-button{min-width:36px;flex:1;max-width:56px;height:40px;border:2px solid #e6e7cd;box-shadow:0 3px 0 #d7dbc1;border-radius:12px;background:#f4f5e6;font-weight:850;font-size:16px}.barrel-button.selected{background:#398566;border-color:#398566;color:white;box-shadow:0 3px 0 #23543d}.quiet{font-size:11px;line-height:1.7;color:#879071;margin-top:11px}.magazine-section{padding-left:23px;border-left:1px dashed #d9d9bd}.section-label b{font-size:14px;background:#ebefd9;border-radius:8px;padding:3px 9px;margin-left:5px;color:#5b7b4b}.inline-button{font-size:11px;color:#578369;padding:6px 2px;text-decoration:underline;text-underline-offset:3px;text-decoration-color:#c2ccb0;min-height:30px}.magazine{display:flex;flex-wrap:wrap;align-content:flex-start;gap:5px;padding:9px;min-height:47px;max-height:77px;overflow:auto;border:1px solid #e4e3c9;border-radius:11px;background:repeating-linear-gradient(90deg,transparent 0 23px,#e6e4cb30 23px 24px),#f5f2dc;margin-top:9px}.ammo-row{height:19px;display:flex;align-items:center;gap:3px;padding:3px 5px;background:#fffdf0;border:1px solid #e2d4a7;border-radius:7px;animation:pop-in .22s ease-out}.empty-magazine{width:100%;text-align:center;line-height:27px;letter-spacing:6px;color:#b7b58f}.closed-magazine{background:#78936c;width:100%;text-align:center;padding:8px;border-radius:6px;color:#fffbea}.group-label{font-size:10px;line-height:1.5;color:#8a8e6c;margin:7px 0;min-height:15px}.load-buttons{display:flex;gap:7px}.load-buttons button{font-size:12px;font-weight:700;min-height:38px;padding:8px 13px;border-radius:10px;background:#eaf0dc;box-shadow:0 3px 0 #ced6b3;white-space:nowrap}.load-buttons button:nth-child(2){flex:1;background:#f4c15c;color:#765122;box-shadow:0 3px 0 #dca446}.load-buttons small{font-size:10px;margin-left:6px;opacity:.8}.return-button{font-size:10px;margin-top:7px;min-height:21px}.playbar{grid-column:4;grid-row:1;display:flex;flex-direction:column;justify-content:space-between;gap:14px;padding-left:19px;border-left:1px dashed #d9d9bd}.edit-actions{display:flex;gap:9px}.small-button{font-size:11px;padding:10px 7px;border-radius:9px;color:#7f8d6f;background:#eef1e2}.transport{display:flex;flex-direction:column;gap:9px}.primary-button{background:linear-gradient(#f49968,#e6794d);box-shadow:0 5px 0 #b85d3a,0 7px 15px #d58d4b25;border:1px solid #ffa984;border-radius:14px;color:#fffdf2;padding:14px 17px;min-height:46px;font-weight:800;letter-spacing:.5px;font-size:14px;white-space:nowrap}.transport .small-button{background:transparent;padding:3px 8px;font-size:11px;min-height:30px}.secondary-button{border:1px solid #c7d5b4;border-radius:10px;background:#eaf1da;padding:10px 14px;color:#557948;font-size:12px;font-weight:700;box-shadow:0 2px 0 #cbd6b8}.splitter-section{grid-column:1/3;grid-row:2;display:flex;align-items:center;justify-content:space-between;gap:8px;background:#edf2dd;padding:10px;border-radius:12px;align-self:start}.splitter-section>div{display:flex;align-items:center;gap:8px}.split-icon{font-size:26px;color:#709660}.splitter-section strong{font-size:11px}.splitter-section small{display:none}.splitter-section .secondary-button{font-size:10px;padding:8px;white-space:nowrap}.notebook{grid-column:3/5;display:flex;align-items:center;gap:14px;border-top:1px dashed #dddcc0;padding-top:9px;min-height:29px;align-self:end}.notebook>span{font-size:10px;letter-spacing:1px;color:#b19b76;white-space:nowrap}.notebook p{font-size:11px;color:#6e8257;line-height:1.7}.workbench:not(:has(.splitter-section:not([hidden]))) .notebook{grid-column:1/-1}.field-note{display:flex;justify-content:center;align-items:center;gap:8px;font-size:10px;color:#8b9473;padding:12px 10px 2px}.field-note span{color:#bdac66;font-size:17px}footer{max-width:1420px;margin:auto;display:flex;justify-content:space-between;gap:10px;padding:12px 24px 17px;color:#949c82;font-size:10px}
.dispatch-section{grid-column:2/3;grid-row:1}.dispatch-section h3{font-size:14px}.dispatch-section p{font-size:11px;line-height:1.8;color:#879071;margin-top:7px}.dispatch-section label{font-size:10px;color:#8a9778;display:block;margin:8px 0 5px}.dispatch-section form>div{display:flex;gap:6px}.dispatch-section input{min-width:0;font-size:24px;padding:7px 12px;font-weight:800}.dispatch-section .secondary-button{padding:7px 12px;white-space:nowrap}.training-group{display:inline-flex;gap:3px;align-items:center;padding:4px;border:1px solid #d8dbb9;background:#fffde9;border-radius:6px}.training-group .marble{width:9px;height:9px}.training-minus .marble{opacity:.25}.training-note{font-size:11px;line-height:1.6;color:#74915e;flex-basis:100%}#trainingSupport{display:flex;flex-wrap:wrap;gap:3px;max-height:170px;overflow:auto;margin-top:6px}#trainingSupport>div{display:flex;flex-wrap:wrap;gap:3px;width:100%}
.result-panel{position:absolute;left:50%;top:49%;transform:translate(-50%,-50%);width:min(385px,90%);background:#fffbedf7;backdrop-filter:blur(12px);border:4px solid #fffdf5;border-radius:30px;box-shadow:0 8px 0 #59734733,0 24px 80px #24453638;padding:23px;text-align:center;z-index:5;animation:result-in .3s ease-out}.result-icon{font-size:34px;color:#e8ad45;letter-spacing:6px;text-shadow:0 3px 0 #d1953233}.result-panel h2{font-size:25px;color:#3d6c4c;margin:9px 0}.result-panel p{font-size:12px;line-height:1.9;color:#7c866b;margin:10px 0 20px}.result-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.result-actions button{font-size:12px}.result-panel small{display:block;margin-top:17px;font-size:10px;color:#949b80}
dialog{border:4px solid #fffdf4;border-radius:30px;background:#f9f8e9;color:var(--ink);width:min(720px,94vw);padding:28px;max-height:88dvh;box-shadow:0 25px 90px #243f3e50;overscroll-behavior:contain}dialog::backdrop{background:#244b4059;backdrop-filter:blur(7px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.dialog-heading h2{font-size:25px;margin-top:8px}.close-button{border-radius:50%;width:39px;height:39px;font-size:25px;background:#e4ead2;box-shadow:0 3px 0 #cbd6b9;flex-shrink:0}dialog p{font-size:13px;line-height:1.9;color:#7c876c}.map-chapter{position:relative;border-radius:23px;background:linear-gradient(130deg,#dfebc9,#eef2dc);padding:18px;margin-top:15px}.map-chapter:nth-child(2){background:linear-gradient(130deg,#e0ece3,#e9f5e6)}.map-chapter:nth-child(3){background:linear-gradient(130deg,#f3e6bf,#f7efd7)}.map-chapter:nth-child(4){background:linear-gradient(130deg,#d8e4ec,#edf3ed)}.map-chapter h3{font-size:14px;display:flex;justify-content:space-between;gap:10px;margin-bottom:17px}.map-chapter small{font-size:10px;font-weight:500;color:#8b9979}.map-levels{display:flex;justify-content:space-between;position:relative;gap:8px}.map-levels:before{content:"";position:absolute;left:8%;right:8%;top:35px;border-top:6px dotted #fefcedb8}.map-level{position:relative;flex:1;display:flex;flex-direction:column;gap:8px;align-items:center;padding:4px}.map-level:nth-child(even){padding-top:20px}.map-level b{width:47px;height:47px;display:grid;place-items:center;border-radius:50%;background:#fffbea;border:3px solid #fffef5;box-shadow:0 5px 0 #b7c49a;color:#698257;font-size:20px}.map-level.active b{background:#eead57;color:white;box-shadow:0 5px 0 #c88d3e}.map-level.complete b{background:#66a47c;color:white;box-shadow:0 5px 0 #45865d}.map-level span{font-size:10px;line-height:1.5;max-width:80px}.map-level:disabled{opacity:.4}.map-level:disabled b{background:#c4cbb5;color:#87947c;border-color:#d1dac1;box-shadow:0 4px 0 #a6b391}input,select{width:100%;border:2px solid #dce3c4;border-radius:12px;background:#fffdf0;padding:11px;color:#476749}#labForm{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:20px}#labForm label{display:flex;flex-direction:column;gap:8px;font-size:12px}#labForm>.primary-button{grid-column:1/-1;margin:6px 0}.parent-stats{display:flex;gap:12px;margin-bottom:20px}.parent-stats>div{flex:1;background:#eaf0d8;border-radius:15px;padding:16px}.parent-stats strong{display:block;font-size:29px;color:#729155}.parent-stats span{font-size:11px;color:#8d9a77}.parent-copy{background:#eeefdc;border-radius:15px;padding:16px;margin:15px 0;font-size:12px;line-height:1.9;color:#788269}.skill-summary{padding:12px 0;border-bottom:1px solid #dee3ca}.skill-summary strong{font-size:14px}.skill-summary p{font-size:12px;margin-top:5px}.range-buttons{display:flex;flex-wrap:wrap;gap:7px;margin:15px 0}.range-buttons button{background:#e4edd1;border:1px solid #d2debd;border-radius:9px;padding:10px;font-size:11px}.trial-row{display:flex;justify-content:space-between;gap:12px;padding:11px 0;border-bottom:1px dashed #dee3ca;font-size:11px;color:#82906d}#exportButton{margin-top:20px}#toast{position:fixed;left:50%;bottom:25px;transform:translate(-50%,15px);opacity:0;pointer-events:none;z-index:30;background:#365d42ed;color:#fffbea;padding:14px 20px;border-radius:15px;max-width:90vw;box-shadow:var(--shadow);transition:.2s;font-size:12px;line-height:1.7}#toast.show{opacity:1;transform:translate(-50%,0)}
@keyframes breathe{50%{transform:translateY(-4px) rotate(-1.5deg)}}@keyframes pop-in{from{transform:scale(.6) translateY(-8px);opacity:.3}to{transform:scale(1);opacity:1}}@keyframes result-in{from{opacity:0;transform:translate(-50%,-47%) scale(.93)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@media(min-width:1600px){.masthead{padding-top:23px}.workspace{padding-top:6px}.workbench{margin-top:25px}}
@media(max-width:1100px){.masthead{padding:15px 24px}.workspace{padding:0 17px}.workbench{grid-template-columns:123px minmax(130px,.8fr) minmax(230px,1.5fr) 155px;gap:15px;padding:18px}.workbench-heading{gap:6px}.workbench-heading h2{font-size:14px}.tool-symbol{width:29px;height:29px}.tag{margin-left:35px}.magazine-section{padding-left:15px}.playbar{padding-left:12px}.load-buttons button{padding:8px 9px;font-size:11px}.scene-heading{top:18px;left:20px;padding:10px 15px}.scene-heading h1{font-size:24px}.wave-preview{top:148px;left:21px}.supplies{top:18px;right:18px;width:155px}.bear-message{bottom:11px;left:18px}.bear-message>img{height:122px;width:109px}.speech p{font-size:12px}.speech{padding:10px 43px 12px 15px}.text-button{padding:10px;font-size:12px}.scene-top{left:54%}}
@media(max-width:760px){body{padding-bottom:77px}.masthead{padding:12px 16px;gap:8px}.brand{font-size:19px;gap:6px;letter-spacing:0}.brand img{width:38px;height:42px}.brand small{font-size:6px;letter-spacing:1.2px;margin-top:4px}nav{gap:6px}.text-button{padding:8px;border-radius:11px}.text-button span,.nav-divider{display:none}.icon{width:19px;height:19px}.round-button{width:32px;height:32px}.workspace{padding:0 10px}.scene-frame{border-width:4px;border-radius:23px}.scene-frame canvas{aspect-ratio:10/8.3}.scene-heading{top:15px;left:13px;padding:0;background:none;border:0;box-shadow:none;backdrop-filter:none;max-width:65%}.scene-heading .eyebrow{font-size:8px;letter-spacing:1px;color:#607a4b}.scene-heading h1{font-size:23px;line-height:1.6;text-shadow:0 1px 0 #fff9e6}.level-indicator{font-size:9px;gap:4px}.tiny-star{font-size:12px}.supplies{right:11px;top:13px;width:90px;padding:8px 9px 7px;border-radius:16px;border-width:1px}.supplies>.eyebrow{font-size:8px;letter-spacing:0}.supply-count{gap:6px;margin:2px 0}.supply-count strong{font-size:26px}.supply-count>span:last-child{font-size:9px}.marble.large{width:19px;height:19px;border-width:1px}.resource-caption{font-size:8px;gap:4px;margin-top:5px}.resource-caption #budgetCount{display:none}.resource-track{height:4px}.scene-top{top:auto;left:auto;right:13px;bottom:87px;transform:none}.scene-top>span:first-child{padding:5px 9px;font-size:9px;gap:6px}.scene-top>span:last-child{display:none}.scene-top i{width:5px;height:5px}.wave-preview{top:108px;left:13px;max-width:calc(100% - 26px);gap:5px}.wave-preview button{padding:6px 8px;gap:6px;font-size:11px;border-radius:9px}.wave-preview small{font-size:8px}.training-forecast{font-size:10px;padding:6px 8px;line-height:1.4}.training-forecast b{font-size:13px}.bear-message{bottom:6px;left:5px;max-width:calc(100% - 10px);gap:0}.bear-message>img{height:96px;width:85px}.speech{padding:9px 34px 10px 12px;min-height:56px;margin-bottom:6px;border-radius:14px 14px 14px 3px;max-width:255px}.speech strong{font-size:8px;margin-bottom:3px;letter-spacing:.5px}.speech p{font-size:10px;line-height:1.65}.speech button{width:23px;height:23px;right:6px}.speech .icon{width:13px;height:13px}.lane-buttons{left:7px;top:47%;bottom:32%}.lane-select{width:29px;height:29px;border-radius:10px;font-size:12px;border-width:1px}.lane-select small{display:none}
.workbench{margin:13px 2px 0;padding:15px;border-radius:21px;grid-template-columns:1fr;gap:13px}.workbench-heading{flex-wrap:nowrap;gap:8px;grid-column:1}.workbench-heading h2{font-size:17px;display:inline}.workbench-heading small{font-size:9px;display:block;margin-bottom:4px}.tool-symbol{width:36px;height:36px}.tag{margin-left:auto;font-size:10px;padding:6px 9px}.tool-section,.dispatch-section{grid-column:1;grid-row:auto}.section-label{min-height:24px}.section-label h3{font-size:13px}.barrel-buttons{margin-top:8px;gap:7px}.barrel-button{height:41px;max-width:none;min-width:38px;font-size:16px}.quiet{margin-top:8px;font-size:10px}.magazine-section{padding:12px 0 0;border:0;border-top:1px dashed #d9ddc2}.magazine{min-height:47px;max-height:91px}.group-label{font-size:10px}.load-buttons button{font-size:12px;min-height:43px;padding:10px 12px}.return-button{margin-top:7px;font-size:10px}.notebook{grid-column:1!important;gap:10px;padding-top:11px}.notebook>span{font-size:8px}.notebook p{font-size:10px}.splitter-section{grid-column:1;grid-row:auto;padding:9px}.splitter-section strong{font-size:11px}.splitter-section .secondary-button{font-size:10px}.playbar{position:fixed;z-index:9;left:9px;right:9px;bottom:max(8px,env(safe-area-inset-bottom));display:flex;flex-direction:row;align-items:center;padding:10px;border:2px solid #fffef5;border-radius:17px;box-shadow:0 3px 0 #c8d2b4,0 -4px 25px #35492c14;background:#fffbedf5;backdrop-filter:blur(12px);gap:5px}.edit-actions{gap:4px}.small-button{font-size:10px;padding:10px 7px;min-height:37px}.transport{flex-direction:row;align-items:center;gap:6px}.transport .small-button{font-size:10px;padding:5px}.primary-button{font-size:12px;padding:12px 13px;min-height:40px;border-radius:11px;box-shadow:0 3px 0 #b85d3a}.field-note{font-size:9px;line-height:1.7;padding:12px 11px 2px}.field-note span{font-size:14px;flex-shrink:0}footer{font-size:8px;gap:5px;padding:13px 17px;flex-wrap:wrap}.dispatch-section p{font-size:11px}.dispatch-section input{padding:8px 12px}.dispatch-section .inline-button{font-size:11px;min-height:35px}.result-panel{padding:15px 16px;border-width:3px;border-radius:23px;top:52%;width:86%}.result-icon{font-size:24px}.result-panel h2{font-size:21px;margin:6px 0}.result-panel p{font-size:11px;margin:7px 0 13px}.result-panel small{font-size:8px;margin-top:12px}.result-actions{gap:8px}.result-actions button{font-size:11px}dialog{padding:19px;border-radius:23px;border-width:3px}.dialog-heading h2{font-size:23px}.map-chapter{padding:15px 10px}.map-chapter h3{font-size:12px}.map-chapter small{font-size:8px}.map-levels{gap:3px}.map-level{padding:0}.map-level b{width:37px;height:37px;font-size:16px;border-width:2px}.map-level span{font-size:9px}.parent-stats{gap:7px}.parent-stats>div{padding:12px}.parent-stats strong{font-size:25px}.parent-stats span{font-size:9px}#toast{bottom:86px}}
@media(max-width:370px){.masthead{padding:11px}.brand{font-size:17px}.brand img{height:37px;width:32px}.brand small{font-size:5px}.text-button{padding:6px}.round-button{width:28px;height:28px}nav{gap:3px}.icon{width:17px;height:17px}.scene-heading h1{font-size:20px}.wave-preview{top:99px}.wave-preview button{padding:5px 6px;font-size:10px;gap:4px}.scene-top{bottom:79px}.bear-message>img{height:82px;width:72px}.speech{padding:7px 30px 8px 10px}.speech p{font-size:9px}.speech strong{font-size:7px}.playbar{left:6px;right:6px;padding:8px}.playbar .small-button{padding:8px 5px;font-size:9px}.transport{gap:5px}.primary-button{font-size:11px;padding:11px 10px}.load-buttons small{display:none}}
.bear-message{max-width:385px}.speech{max-width:242px}.workbench{scroll-margin-top:12px}.wave-preview{flex-direction:column;max-width:205px;top:160px}.scene-top>span:last-child{background:#f8fde0d9;padding:5px 10px;border-radius:20px;color:#597144}@media(max-width:760px){.scene-frame canvas{aspect-ratio:auto}.bear-message{max-width:calc(100% - 10px)}.speech{max-width:260px}.scene-heading{padding:8px 11px;background:#fff9e9ee;border:1px solid #fffdf4;border-radius:14px;top:12px;left:11px;max-width:calc(100% - 120px)}.scene-heading h1{font-size:20px}.wave-preview{flex-direction:row;top:113px;max-width:calc(100% - 26px)}.scene-heading .eyebrow{font-size:7px}}
.lane-buttons{inset:0;display:block;width:100%;pointer-events:none}.lane-select{position:absolute;left:40%;transform:translateY(-50%);pointer-events:auto}.lane-select:hover:not(:disabled){transform:translateY(-52%)}.lane-select:active:not(:disabled){transform:translateY(-48%)}@media(max-width:760px){.lane-select{left:16%}}
#scenePause{display:block;margin:8px auto 0;background:#fffbea;border:1px solid #d7dfbd;box-shadow:0 2px 0 #85926a3d;color:#4e7452;font-size:11px;padding:7px 12px;min-height:32px}#scenePause[hidden]{display:none}@media(max-width:760px){#scenePause{font-size:10px;padding:7px 9px}.scene-top:has(#scenePause:not([hidden])){bottom:78px}.scene-top:has(#scenePause:not([hidden])) #phaseLabel{display:none}}
.mechanism-section{margin-top:12px;border-top:1px dashed #dddcc0;padding-top:10px}.mechanism-buttons{display:flex;gap:6px}.mechanism-buttons button{flex:1;padding:8px 6px;border:1px solid #dddcc3;border-radius:10px;background:#f3f2de;text-align:left}.mechanism-buttons b{font-size:11px;display:block}.mechanism-buttons small{display:block;font-size:8px;margin-top:4px;white-space:nowrap}.mechanism-buttons button.selected{background:#e7c481;border-color:#d6b369;color:#76532a;box-shadow:0 2px 0 #c5a063}.mechanism-section p{font-size:9px;line-height:1.7;color:#8a9170;margin-top:7px}@media(min-width:761px) and (max-width:900px){.bear-message{max-width:230px}.bear-message>img{width:75px;height:100px}.speech{max-width:150px;padding:8px 30px 10px 12px}.speech p{font-size:10px}.speech strong{font-size:8px}}
.blueprint-library{border-top:1px dashed #d9dec4;margin-top:24px;padding-top:20px}.blueprint-library h3{font-size:15px;margin-bottom:12px}#blueprintList{display:grid;grid-template-columns:1fr 1fr;gap:10px}#blueprintList>p{grid-column:1/-1;font-size:12px}.blueprint-card{text-align:left;border:1px solid #d8dfbf;border-radius:15px;background:#edf2da;padding:14px}.blueprint-card>span{float:left;font-size:25px;color:#bd9963;margin-right:10px}.blueprint-card strong{font-size:12px;display:block;margin-bottom:7px}.blueprint-card small{font-size:10px;line-height:1.7;display:block;color:#889674}.blueprint-card em{font-size:10px;font-style:normal;display:block;margin-top:10px;color:#598466}.keep-blueprint{display:block;margin:12px auto 0;font-size:11px}@media(max-width:760px){#blueprintList{grid-template-columns:1fr}.mechanism-buttons button{padding:10px}.mechanism-buttons b{font-size:12px}.mechanism-buttons small{font-size:10px}.mechanism-section p{font-size:10px}}
@media(max-width:760px){.wave-preview{right:13px;max-width:none}.wave-preview button{flex:1;flex-direction:column;gap:3px;min-width:0;justify-content:center}.wave-preview button span{white-space:nowrap}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* The companion lives below the canvas, so every cannon remains visible. */
.adventure-bar{max-width:1408px;margin:0 auto 15px;padding:0 12px;display:flex;align-items:center;gap:14px;font-weight:750}.journey-button{display:flex;align-items:center;gap:12px;background:#fffbed;border:1px solid #d9ddbd;border-radius:14px;padding:12px 18px;color:#55704a}.journey-button span{font-size:11px;color:#89936b}.treasure{margin-left:auto;display:flex;align-items:center;gap:18px;color:#a4782d}.treasure>span{white-space:nowrap}.treasure small{font-size:10px;color:#86916e}.treasure button{display:flex;gap:8px;align-items:center;padding:10px 17px;background:#fae6b2;border-radius:14px;box-shadow:0 3px 0 #dcbf79}.treasure button span{font-size:12px}.account-button{padding:11px 14px;background:#e0e9d6;border:1px solid #cfdbbd;border-radius:14px;color:#527356;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.game-area>.bear-message{position:relative;left:auto;bottom:auto;max-width:none;display:flex;align-items:center;padding:0 15px;gap:8px;margin:8px 0 -5px;pointer-events:auto}.game-area>.bear-message>img{width:73px;height:95px;flex-shrink:0;object-fit:contain;align-self:center;animation:none}.game-area>.bear-message>.speech{max-width:none;flex:1;min-height:65px;margin:0;padding:13px 52px 13px 18px;background:#fffcf0;border:1px solid #dce1c6;box-shadow:0 3px 0 #dbe1c8}.speech button{width:34px;height:34px}.mission-strip{display:flex;gap:20px;align-items:center;justify-content:space-between;background:#f8f9e9;padding:14px 20px;margin:11px 7px 0;border:1px solid #d4ddbd;border-radius:17px}.mission-strip strong{font-size:12px;color:#577250}.mission-strip p{font-size:12px;color:#7b8868;margin-top:5px;line-height:1.7}.mission-strip>span{font-size:25px;letter-spacing:4px;color:#d29b37;white-space:nowrap}.workbench{margin-top:16px}.scene-frame canvas{aspect-ratio:auto}.rating-lines{display:flex;gap:7px;justify-content:center;flex-wrap:wrap;font-size:11px}.rating-lines>span{background:#eeeede;color:#9b9e8b;border-radius:9px;padding:7px}.rating-lines .earned{color:#996629;background:#ffe6a5}.reward-coins{font-size:14px;color:#a27327;margin:12px 0}.reward-coins button{font-size:11px;display:block;margin:8px auto}.result-panel{max-height:95%;overflow:auto}.map-explainer{line-height:1.8;color:#7d8b70;font-size:13px;margin-bottom:15px}.map-levels{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.map-level{display:flex;flex-direction:column;align-items:center;gap:7px;padding:12px 5px!important;border-radius:14px;background:#fffbed9c;min-width:0}.map-level em{color:#c38b2c;font-style:normal;letter-spacing:3px}.map-level small{font-size:9px!important;letter-spacing:0;color:#7f8b70;line-height:1.5}.map-level span{white-space:normal}.map-level.active{outline:2px solid #43876a;outline-offset:2px}.map-level:disabled{opacity:.5}.map-chapter{background:#e7efda}.map-chapter h3{margin-bottom:15px}
.shop-dialog{width:min(960px,94vw);max-width:960px}.shop-intro{display:flex;gap:15px;align-items:center;justify-content:space-between;margin-bottom:20px}.shop-intro p{font-size:12px;line-height:1.9;color:#7a8866}.shop-intro strong{flex-shrink:0;padding:12px 18px;border-radius:15px;background:#fae5ac;color:#9b692e;font-size:20px}.shop-tabs{display:flex;gap:8px;margin:16px 0}.shop-tabs button{border-radius:12px;background:#e9eed9;padding:10px 18px;font-weight:700}.shop-tabs button.selected{background:#397d61;color:#fffbed}.shop-preview{display:flex;align-items:center;gap:20px;border:1px solid #d6ddbb;border-radius:22px;padding:13px 20px;background:radial-gradient(ellipse at 10% 40%,#f7dfb0,transparent 55%),#edf1db;margin:12px 0 20px}.shop-preview h3{font-size:22px;margin:5px 0}.shop-preview p{font-size:12px;line-height:1.8;color:#7e896a}.shop-preview small{font-size:10px;color:#89946f}.shop-preview button{font-size:11px;margin-top:8px}.shop-sprite{display:block;width:120px;height:120px;flex-shrink:0;background-repeat:no-repeat;background-size:400% 300%;background-position:var(--sx) var(--sy);filter:drop-shadow(0 7px 4px #76684222)}.shop-sprite.ammo{background-image:url('assets/ammo-atlas-v3.png')}.shop-sprite.cannon{background-image:url('assets/cart-atlas.png')}.classic-preview{width:120px;height:110px;display:grid;place-items:center;font-size:75px;color:#d6a647;flex-shrink:0}.shop-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.shop-card{border:1px solid #dedec5;border-radius:20px;background:#fffdf1;display:flex;flex-direction:column;align-items:center;text-align:center;padding:12px 10px;min-width:0}.shop-card.equipped{border:2px solid #6c9d7b;background:#edf4df}.shop-card .shop-sprite{width:100%;height:auto;aspect-ratio:1}.shop-card h3{font-size:14px;margin:5px 0}.shop-card p{font-size:10px;line-height:1.7;color:#8a9077;min-height:34px;margin:4px 0 12px}.shop-card button{font-size:11px;padding:9px 6px;min-height:36px;width:100%;margin-top:auto;box-shadow:none}.shop-card small{font-size:9px;margin-top:9px;color:#839472}.shop-note{font-size:11px;line-height:1.8;color:#89916f;margin-top:20px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 0;border-bottom:1px dashed #d3daba}.setting-row small{display:block;font-size:11px;color:#849370;margin-top:7px}.setting-row input{width:24px;height:24px;accent-color:#367c5d}.setting-row:last-of-type{margin-bottom:20px}.account-status{font-size:12px;color:#758a64;padding:10px 0;line-height:1.8}#accountForm{display:grid;gap:15px}#accountForm label{display:grid;gap:8px;font-size:12px;font-weight:700}#accountForm input{width:100%;padding:13px 12px;border:1px solid #cdd8b8;border-radius:11px;background:#fffff7;color:#385642}#accountForm p,#loggedAccount>p{font-size:12px;color:#7b8b6c;line-height:1.9}.account-actions{display:flex;gap:14px;margin-top:20px}.form-error{color:#b2513d;font-size:12px;line-height:1.7;margin-top:15px}.recovery-card{border:1px solid #deca92;background:#fff2cd;padding:18px;border-radius:16px;margin-top:15px}.recovery-card p{font-size:12px;line-height:1.8;margin:9px 0}.recovery-card code{display:block;word-break:break-all;font-size:14px;margin-bottom:15px;user-select:text}.account-button,.journey-button,.shop-tabs button{min-height:44px}
@media(min-width:761px) and (max-width:1100px){.masthead{padding:15px 25px;gap:10px}.brand{font-size:21px}.text-button{padding:9px 10px;font-size:12px}.masthead nav{gap:5px}.nav-divider{margin:0 3px}.workspace{padding:0 18px}.scene-heading h1{font-size:23px}.scene-heading{left:15px;top:15px;padding:8px 12px}.supplies{right:15px;top:15px;width:145px}.wave-preview{left:15px;top:135px;max-width:180px}.scene-top{left:53%;top:20px}.adventure-bar{padding:0 26px}}
@media(max-width:800px){.game-area>.bear-message{padding:0 5px;margin-top:10px}.game-area>.bear-message>img{width:60px;height:80px}.game-area>.bear-message>.speech{padding:10px 45px 10px 13px}.game-area>.bear-message .speech p{font-size:11px}.game-area>.bear-message .speech strong{font-size:9px}.mission-strip{padding:11px 13px;gap:10px}.mission-strip p{font-size:10px}.mission-strip strong{font-size:11px}.mission-strip>span{font-size:21px;letter-spacing:1px}.scene-top{bottom:auto;top:18px;left:50%;right:auto;transform:translateX(-50%)}.scene-top>span:first-child{display:none}.scene-top:has(#scenePause:not([hidden])){bottom:auto;top:90px;left:auto;right:15px;transform:none}.scene-top:has(#scenePause:not([hidden])) #phaseLabel{display:none}.shop-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.map-levels{grid-template-columns:repeat(3,minmax(0,1fr))}.map-level b{width:43px;height:43px}.map-level span{font-size:11px}.result-panel{width:94%;padding:14px;top:50%;max-height:97%}.result-panel h2{font-size:20px}.rating-lines{font-size:9px;gap:4px}.rating-lines>span{padding:5px}.result-actions{gap:5px;flex-wrap:wrap}.result-panel small{margin-top:8px}.reward-coins{font-size:12px;margin:8px 0}.scene-frame{border-radius:25px}}
@media(max-width:760px){.masthead{padding:12px 14px 10px;gap:8px;flex-wrap:wrap}.brand{font-size:20px}.brand img{width:38px;height:47px}.brand small{font-size:6px}.masthead nav{margin-left:auto;gap:5px}.masthead .text-button{padding:8px}.masthead .nav-adventure{display:none}.masthead nav .nav-divider{display:none}.masthead .text-button span{display:none}.adventure-bar{gap:7px;padding:0 13px;margin-bottom:12px;flex-wrap:wrap}.journey-button{font-size:12px;gap:5px;padding:9px 10px}.journey-button span{font-size:9px}.treasure{gap:10px;font-size:12px}.treasure button{padding:10px 12px;gap:5px}.treasure button span{font-size:10px}.account-button{font-size:11px;padding:8px 10px;max-width:none;margin-left:auto;min-height:34px}.scene-top #waveLabel{display:none}.scene-heading{max-width:calc(100% - 120px)}.wave-preview{top:113px}.scene-frame canvas{height:auto;aspect-ratio:auto}.workbench{margin-top:12px;padding-bottom:18px}.game-area>.bear-message>img{height:76px;width:56px}.game-area>.bear-message .speech p{font-size:10px}.game-area>.bear-message .speech strong{font-size:8px}.shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.shop-preview{padding:10px;gap:10px}.shop-preview .shop-sprite,.classic-preview{width:92px;height:92px}.shop-preview h3{font-size:19px}.shop-preview p{font-size:10px}.shop-card{padding:8px}.shop-card h3{font-size:12px}.shop-card p{font-size:9px}.shop-tabs button{font-size:12px;padding:9px 13px}.shop-intro{gap:10px}.shop-intro p{font-size:10px}.shop-intro strong{font-size:17px;padding:10px}.shop-note{font-size:10px}.map-level small{font-size:8px!important}.map-chapter h3{font-size:14px}.shop-dialog{width:96vw}.mission-strip{margin-top:9px}.account-actions{flex-wrap:wrap}.playbar{padding-bottom:max(10px,env(safe-area-inset-bottom));bottom:8px}body{padding-bottom:90px}}
@media(max-width:370px){.masthead .brand{font-size:18px}.masthead .round-button{height:28px;width:28px}.masthead nav{gap:1px}.masthead .text-button{padding:6px}.treasure{gap:6px}.treasure small{display:none}.journey-button span{display:none}.adventure-bar{gap:6px}.scene-heading h1{font-size:19px}.shop-preview .shop-sprite{width:72px;height:72px}}
.shop-sprite.cannon{background-size:400% 400%}
.shop-sprite.ammo{clip-path:inset(1% 4% 6%)}
@media(max-width:800px){.scene-top:has(#scenePause:not([hidden])){top:auto;bottom:9px;right:12px}}
.shop-tabs button{transition:transform .15s,box-shadow .15s}
.shop-dialog>.dialog-heading{position:sticky;top:0;z-index:5;background:#f9f8e9;padding:8px 0;box-shadow:0 7px 0 #f9f8e9;margin-top:-8px}#shopPreview{scroll-margin-top:110px}
.wardrobe-button{display:flex;align-items:center;gap:2px;flex-shrink:0;border-radius:14px;background:#edf1dc;border:1px solid #d8dfbd;padding:0 8px 0 0;min-height:44px}.wardrobe-button canvas{width:48px;height:48px}.wardrobe-button span{font-size:10px;color:#657e53}.workbench-heading .tag{margin-left:auto}.shop-card .try-card{background:transparent;margin:0 0 4px;padding:0;display:block;box-shadow:none;border-radius:14px;min-height:0;color:#748365}.try-card>span:last-child{font-size:10px;display:block;padding:4px}.shop-card .collection-icon{display:block;width:100%;height:auto;aspect-ratio:1}.shop-card.trying{outline:3px solid #ddb46f;outline-offset:1px}.shop-card .try-card:focus-visible{outline:3px solid #397d61;outline-offset:2px}.shop-preview{padding:14px;align-items:center;gap:24px;min-width:0}.fitting-stage{position:relative;flex:0 0 210px;max-width:46%;overflow:hidden;border-radius:22px;border:1px solid #e1dbb7;box-shadow:0 5px 14px #7d794619}.fitting-stage canvas{display:block;width:100%;height:auto}.fitting-stage>span{position:absolute;bottom:8px;left:0;right:0;text-align:center;letter-spacing:2px;font-size:10px;color:#8b8b62;pointer-events:none}.fitting-info{flex:1;min-width:0}.fitting-info>.primary-button,.fitting-info>.secondary-button{padding:10px 18px;min-height:44px;margin-top:10px;font-size:12px}.fitting-info .inline-button{display:block;min-height:32px}.fitting-info .outfit-tip{font-size:10px;line-height:1.8;margin-top:12px;color:#899275}.wardrobe-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:-5px 0 18px}.wardrobe-slots>div{min-width:0;border:1px solid #e0dec7;border-radius:13px;background:#fffdf2;padding:10px 12px;display:grid;grid-template-columns:1fr auto;gap:5px}.wardrobe-slots small{font-size:10px;color:#8a9476;grid-column:1/-1}.wardrobe-slots b{font-size:11px;align-self:center;overflow-wrap:anywhere}.wardrobe-slots button{font-size:10px;min-height:32px}.chapter-gifts{border:1px dashed #d9c79d;border-radius:13px;background:#fbf2d9;margin:0 0 18px;padding:12px 14px;color:#8e7346}.chapter-gifts summary{font-size:11px;cursor:pointer;line-height:1.8}.chapter-gifts>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:12px}.chapter-gifts span{padding:8px;background:#fffbed;border-radius:9px;text-align:center}.chapter-gifts b,.chapter-gifts small{display:block;font-size:10px;line-height:1.8}.chapter-gifts .complete{background:#e0ebd2;color:#58774b}.chapter-gift{display:block;font-size:11px;line-height:1.7;margin:7px 0}.shop-tabs{flex-wrap:wrap}.shop-tabs button{flex:1}.shop-grid .shop-sprite{margin:auto}.shop-card h3{line-height:1.5}
@media(min-width:1051px){.workbench-heading{flex-wrap:wrap}.wardrobe-button{margin-left:auto}}
@media(max-width:760px){.shop-preview{gap:12px;padding:10px}.fitting-stage{flex-basis:150px;max-width:46%;border-radius:16px}.fitting-info h3{font-size:17px}.fitting-info>.primary-button,.fitting-info>.secondary-button{padding:8px 12px;min-height:40px;font-size:11px}.fitting-info .outfit-tip{font-size:9px;margin-top:7px}.wardrobe-slots{gap:6px}.wardrobe-slots>div{padding:8px;display:flex;flex-direction:column;gap:4px}.wardrobe-slots b{align-self:stretch;min-height:29px;font-size:10px}.wardrobe-slots button{align-self:flex-start}.chapter-gifts>div{grid-template-columns:repeat(2,minmax(0,1fr))}.chapter-gifts summary{font-size:10px}.shop-tabs{gap:6px}.shop-tabs button{padding:9px 8px}.workbench-heading .wardrobe-button{margin-left:0}.wardrobe-button canvas{width:42px;height:42px}.wardrobe-button span{font-size:9px}.fitting-stage>span{font-size:8px;letter-spacing:1px;bottom:5px}}
@media(max-width:370px){.fitting-stage{flex-basis:118px}.fitting-info h3{font-size:15px}.fitting-info .outfit-tip{display:none}.workbench-heading{gap:7px}.workbench-heading .tool-symbol{display:none}}
@media(min-width:761px) and (max-width:1050px){.workbench{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:"heading heading" "barrels magazine" "splitter magazine" "note note" "play play";gap:16px 22px}.workbench-heading{grid-area:heading;flex-wrap:nowrap}.workbench-heading h2{font-size:18px}.workbench-heading .tag{margin-left:auto}#barrelSection,#dispatchSection{grid-area:barrels}.magazine-section{grid-area:magazine}.splitter-section{grid-area:splitter;display:flex;flex-wrap:wrap;gap:8px}.notebook{grid-area:note}.playbar{grid-area:play;flex-direction:row;align-items:center;padding:13px 0 0;border-left:0;border-top:1px dashed #d9d9bd}.playbar .transport{display:flex;flex-direction:row;align-items:center;gap:15px}.barrel-button{flex:0 0 calc(20% - 5px);min-width:0;max-width:none;height:43px}.mechanism-buttons button{padding:10px}.mechanism-buttons b{font-size:12px}.mechanism-buttons small{font-size:9px}.mechanism-section p{font-size:11px;line-height:1.7}.workbench .small-button{font-size:12px;min-height:42px}.workbench .load-buttons button{font-size:12px;min-height:43px}.workbench .quiet{font-size:11px}}
/* Expedition atlas, encounter timing, and the bear's own wardrobe. */
.game-area>.bear-message{align-items:center;pointer-events:auto}.companion-dress{flex:0 0 110px;width:110px;position:relative;padding:0 0 15px;border-radius:20px;pointer-events:auto}.companion-dress canvas{display:block;width:110px;height:110px;filter:drop-shadow(0 5px 4px #75694120)}.companion-dress span{position:absolute;bottom:1px;left:0;right:0;font-size:10px;color:#58704c}.companion-dress:hover{background:#fffae1}.encounter-note{margin:14px 5px -3px;font-size:12px;line-height:1.7;color:#586c60}.wave-preview button>span{display:grid;grid-auto-flow:column;grid-template-rows:auto auto;column-gap:8px;align-items:center}.wave-preview b{grid-row:1;font-size:15px}.wave-preview b small{margin-left:2px}.wave-preview em{grid-row:2;font-style:normal;font-size:10px;white-space:nowrap;color:#6b5f82;font-weight:500}.wave-preview i{grid-row:1/3;font-style:normal;font-size:12px;color:#9fa48b}.wave-preview button{gap:8px}.mode-icon{font-size:25px;color:#bc884e}.modes-button{background:#fff1d3}.masthead nav{gap:5px}.masthead .text-button{padding-left:10px;padding-right:10px}
#mapDialog{width:min(1060px,96vw);max-width:1060px}#mapDialog>.dialog-heading,#modeDialog>.dialog-heading{position:sticky;top:-1px;z-index:4;background:#f9f8e9;padding:8px 0}.atlas-intro{display:flex;gap:12px;justify-content:space-between;align-items:center;flex-wrap:wrap;padding:16px 18px;margin-bottom:20px;border-radius:17px;background:#e9efda;color:#5f7759}.atlas-intro span{font-size:13px;font-weight:700}.atlas-intro p{font-size:11px;width:100%;line-height:1.7}.atlas-intro b{color:#a37d33}.region-atlas{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.region-atlas .map-chapter{margin:0;padding:0;border:1px solid #d9dfc7;border-radius:20px;overflow:hidden;background:#fffdf1}.map-chapter>summary{list-style:none;display:flex;gap:12px;align-items:center;cursor:pointer;position:relative;padding:0 12px 0 0;min-height:108px}.map-chapter>summary::-webkit-details-marker{display:none}.map-chapter>summary>strong{font-size:11px;white-space:nowrap;color:#7a8d70;margin-left:auto}.map-chapter>summary:after{content:'⌄';font-size:20px;color:#96a484}.map-chapter[open]>summary:after{transform:rotate(180deg)}.region-art{align-self:stretch;min-height:108px;flex:0 0 105px;background-image:url('assets/biomes-v4.webp');background-size:200% 300%;background-position:var(--scene-x) var(--scene-y);position:relative}.region-art.scene--1{background-image:url('assets/forest-v2.png');background-size:cover;background-position:center}.region-art i{position:absolute;top:9px;left:10px;background:#fffbeadb;color:#566c54;padding:5px 8px;border-radius:9px;font-size:12px;font-style:normal;font-weight:800}.region-heading{display:flex;flex-direction:column;gap:8px;min-width:0}.region-heading b{font-size:16px}.region-heading small{font-size:10px;line-height:1.5;color:#7e8d6f}.region-heading em{font-size:10px;font-style:normal;color:#a57848}.map-chapter[open]{grid-column:1/-1}.map-chapter .map-levels{padding:18px;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;border-top:1px solid #ebe7d3}.boss-level{background:#fbefcf!important}.boss-level b{background:#b38b53!important;color:#fff4cb!important}.map-level{min-width:0}.map-level span{line-height:1.6}
#modeDialog{width:min(850px,96vw);max-width:850px}.mode-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.mode-cards>button{display:flex;flex-direction:column;align-items:flex-start;text-align:left;border:1px solid #dbe0c6;border-radius:22px;min-height:215px;padding:21px;background:linear-gradient(145deg,#fff8df,#e6efdc);box-shadow:0 4px 0 #d2dbc044}.mode-cards>button:nth-child(2n){background:linear-gradient(145deg,#fff7e5,#f0e4da)}.mode-cards>button:last-child{background:linear-gradient(145deg,#edf0fa,#e9ddf2)}.mode-cards i{font-size:32px;font-style:normal;color:#b08852;margin-bottom:17px}.mode-cards b{font-size:18px;margin-bottom:9px}.mode-cards span{font-size:12px;line-height:1.8;color:#78876d}.mode-cards small{font-size:10px;color:#918463;margin-top:auto;padding-top:14px}.mode-note{font-size:11px;line-height:1.9;color:#819070;margin-top:20px}.boss-choices{margin-top:20px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.boss-choices h3,.boss-choices p{grid-column:1/-1;padding:10px}.boss-choices button{display:flex;flex-direction:column;gap:7px;text-align:left;background:#f4ebd0;border:1px solid #d8ca9f;border-radius:12px;padding:15px}.boss-choices span{font-size:10px;color:#938258}
@media(max-width:760px){.companion-dress{flex-basis:84px;width:84px}.companion-dress canvas{width:84px;height:90px}.companion-dress span{font-size:9px}.encounter-note{font-size:10px;margin-top:12px}.game-area>.bear-message .speech p{font-size:12px}.wave-preview button{padding:7px 9px}.wave-preview em{font-size:9px}.wave-preview b{font-size:13px}.wave-preview{max-width:95%}.mode-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.mode-cards>button{padding:16px 12px;min-height:195px}.mode-cards b{font-size:16px}.mode-cards span{font-size:11px}.region-atlas{grid-template-columns:1fr}.region-art{flex-basis:89px}.region-heading b{font-size:15px}.map-chapter .map-levels{grid-template-columns:repeat(3,minmax(0,1fr));padding:14px;gap:9px}.map-chapter>summary{gap:10px}.atlas-intro{padding:13px}.atlas-intro span{font-size:11px}.shop-tabs button{min-width:calc(50% - 6px)}.boss-choices{grid-template-columns:1fr}.masthead .modes-button{padding:4px 7px}.mode-icon{font-size:23px}.masthead .brand{font-size:18px}.wave-preview button>span{column-gap:5px}}
@media(prefers-reduced-motion:reduce){.companion-dress canvas{animation:none}*{scroll-behavior:auto!important}}
.masthead .modes-button .mode-icon{display:block}.masthead .text-button{white-space:nowrap}
@media(min-width:761px) and (max-width:1000px){.masthead .text-button>span:not(.mode-icon){display:none}.masthead .text-button{padding:10px}.masthead nav{gap:10px}}
/* Mobile: reserve real space for the HUD and keep transport inside the workbench. */
.battlefield{position:relative;min-width:0}.wave-preview button>span{display:flex;align-items:center;gap:8px}.forecast-enemy{display:inline-grid;grid-template-rows:auto auto;gap:2px}.forecast-enemy>b{grid-row:1}.forecast-enemy>em{grid-row:2}
@media(max-width:760px),(max-width:1000px) and (max-height:500px){
 body{padding-bottom:env(safe-area-inset-bottom,0px)}.masthead{padding:9px max(12px,env(safe-area-inset-right)) 9px max(12px,env(safe-area-inset-left));gap:6px}.masthead .brand{font-size:17px;white-space:nowrap}.brand small{display:none}.brand img{width:31px;height:37px}.masthead nav{gap:2px;margin-left:auto}.masthead .text-button{min-width:36px;min-height:40px;padding:6px!important}.masthead .text-button>span:not(.mode-icon),.masthead .nav-adventure,.nav-divider{display:none}.masthead .round-button{width:36px;height:40px}.masthead .icon{width:18px;height:18px}.masthead .mode-icon{font-size:23px}
 .adventure-bar{padding:0 12px;margin-bottom:10px;gap:6px;display:flex;flex-wrap:wrap;align-items:center}.journey-button{font-size:12px;min-height:40px;padding:8px 10px}.journey-button span{display:none}.treasure{gap:6px;margin-left:auto;font-size:12px}.treasure small{display:none}.treasure button{font-size:12px;min-height:40px;padding:8px 10px}.treasure button span{display:none}.account-button{min-height:40px;padding:8px;font-size:11px;margin-left:0}.workspace{padding:0 max(10px,env(safe-area-inset-right)) 0 max(10px,env(safe-area-inset-left))}
 .scene-frame{display:grid;grid-template-columns:minmax(0,1fr) 104px;grid-template-areas:'heading supplies' 'status status' 'forecast forecast' 'field field';gap:8px;padding:10px 0 0;border-width:4px;border-radius:22px;background:#edf2df;overflow:hidden}.scene-heading{grid-area:heading;position:static;max-width:none;min-width:0;margin-left:10px;padding:3px 0;background:none;border:0;box-shadow:none;backdrop-filter:none}.scene-heading h1{font-size:21px;line-height:1.35;margin:5px 0;overflow-wrap:anywhere;text-shadow:none}.scene-heading .eyebrow{font-size:10px;letter-spacing:0}.level-indicator{font-size:10px;line-height:1.4}.supplies{grid-area:supplies;position:static;margin:0 10px 0 0;width:auto;padding:8px;border-radius:14px}.supplies>.eyebrow{font-size:9px}.supply-count strong{font-size:28px}.resource-caption{font-size:9px}.resource-caption #budgetCount{display:none}
 .scene-top,.scene-top:has(#scenePause:not([hidden])){grid-area:status;position:static;transform:none;display:flex;align-items:center;justify-content:space-between;text-align:left;gap:8px;margin:0 10px;white-space:normal}.scene-top>#phaseLabel,.scene-top:has(#scenePause:not([hidden])) #phaseLabel{display:inline-flex;align-items:center;gap:6px;font-size:11px;padding:4px 8px;margin:0}.scene-top>#waveLabel{display:none}.scene-top #scenePause{min-height:40px;font-size:12px;padding:8px 12px;background:#fffbed}
 .wave-preview{grid-area:forecast;position:static;display:grid;grid-template-columns:repeat(var(--lanes,1),minmax(0,1fr));max-width:none;width:auto;margin:0 10px;gap:6px}.wave-preview>button{min-width:0;min-height:50px;display:flex;flex-direction:column;align-items:center;gap:4px;padding:7px 4px}.wave-preview button>small{font-size:10px}.wave-preview button>span{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;min-width:0}.wave-preview b{font-size:14px}.wave-preview em{font-size:10px}.wave-preview i{font-size:11px}.forecast-enemy{flex-shrink:0}.wave-preview .training-forecast{grid-column:1/-1;font-size:12px;line-height:1.8}.wave-preview .training-forecast b{font-size:16px}
 .battlefield{grid-area:field;overflow:hidden;border-top:1px solid #d4dec1}.scene-frame .battlefield canvas{aspect-ratio:auto;width:100%;height:auto}.battlefield .lane-buttons{position:absolute;inset:0;pointer-events:none;width:auto;height:auto;display:block}.battlefield .lane-select{position:absolute;left:5px;transform:translateY(-50%);pointer-events:auto;width:44px;height:44px;border-radius:14px;font-size:16px;border:2px solid #fffbed}.battlefield .lane-select small{display:none}
 .game-area>.bear-message{gap:5px}.game-area>.bear-message .speech{min-width:0;max-width:none;margin:0;flex:1;padding:12px 43px 12px 12px}.game-area>.bear-message .speech p{font-size:12px}.speech button{width:34px;height:34px}.companion-dress{flex-basis:72px;width:72px}.companion-dress canvas{width:72px;height:84px}.mission-strip{padding:12px;font-size:12px}.mission-strip p{font-size:11px;line-height:1.8}.encounter-note{line-height:1.8}
 .workbench{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:none;margin:14px 2px 0;padding:12px;gap:14px;isolation:isolate}.workbench-heading{grid-area:auto;grid-column:1;grid-row:1;gap:7px;flex-wrap:nowrap}.workbench-heading h2{font-size:16px}.workbench-heading .tool-symbol{display:none}.workbench-heading .tag{margin-left:auto;padding:6px}.workbench .wardrobe-button canvas{width:38px;height:38px}.workbench .playbar{grid-area:auto;grid-column:1;grid-row:2;position:sticky;top:max(6px,env(safe-area-inset-top));bottom:auto;left:auto;right:auto;width:100%;min-width:0;z-index:3;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:5px;padding:7px 5px;background:#fffbed;border:1px solid #d4dcc0;border-radius:14px;box-shadow:0 3px 8px #35492c12;backdrop-filter:none}.workbench .playbar .edit-actions{gap:3px}.workbench .playbar .small-button{min-width:40px;min-height:44px;font-size:11px;padding:6px 3px}.workbench .playbar .transport{display:grid;grid-template-columns:54px minmax(0,1fr);gap:4px;align-items:center}.workbench .playbar .primary-button{min-width:0;min-height:44px;font-size:12px;white-space:normal;padding:8px 4px;line-height:1.4}.workbench .playbar .transport .small-button{font-size:11px;padding:6px 2px}
 #barrelSection,#dispatchSection,.magazine-section,.splitter-section,.notebook{grid-area:auto;grid-column:1;grid-row:auto}.magazine-section{padding:12px 0 0;border-left:0;border-top:1px dashed #d9ddc2}.barrel-buttons{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.barrel-button{height:44px;min-width:0;max-width:none;font-size:17px}.workbench .quiet,.group-label{font-size:12px;line-height:1.7}.mechanism-buttons button{min-height:58px}.mechanism-buttons b{font-size:14px}.mechanism-buttons small{font-size:11px}.mechanism-section p{font-size:12px;line-height:1.8}.load-buttons{gap:6px}.workbench .load-buttons button{min-height:44px;padding:9px 7px;font-size:12px}.workbench .return-button{min-height:36px;font-size:12px}.splitter-section{display:flex;flex-wrap:wrap}.workbench .splitter-section .secondary-button{min-height:44px;font-size:12px}.notebook{display:block}.notebook p{font-size:12px;line-height:1.8;margin-top:5px}.dispatch-section input,#accountForm input{font-size:16px;min-height:44px}.dispatch-section input{font-size:24px}button,input,select{scroll-margin-top:105px}
 .battlefield>.result-panel{position:relative;inset:auto;transform:none;width:auto;max-height:none;overflow:visible;margin:12px;padding:18px;z-index:4}.battlefield:has(>.result-panel:not([hidden]))>canvas{display:none}.battlefield:has(>.result-panel:not([hidden]))>.lane-buttons{display:none}.result-panel p{font-size:13px;line-height:1.9}.result-panel .small-button,.result-panel .primary-button{min-height:44px}.result-actions{flex-wrap:wrap}
 dialog{max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);width:calc(100% - 20px);max-width:calc(100% - 20px);padding:16px;border-radius:20px;margin:auto;overflow:auto}.close-button{width:44px;height:44px}.dialog-heading{gap:10px}.dialog-heading h2{font-size:21px}.shop-dialog{width:calc(100% - 20px)}.shop-dialog>.dialog-heading,#mapDialog>.dialog-heading,#modeDialog>.dialog-heading{top:-1px}.shop-preview{align-items:flex-start}.shop-tabs button{font-size:13px}.fitting-info .primary-button,.fitting-info .secondary-button{min-height:44px}.shop-grid .shop-card>button{min-height:44px}.region-heading b{font-size:15px}.map-chapter .map-levels{grid-template-columns:repeat(3,minmax(0,1fr))}.mode-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:380px){.masthead{flex-wrap:wrap}.masthead .brand{flex:1}.masthead nav{justify-content:space-between;width:100%;margin:0;gap:5px}.masthead .text-button,.masthead .round-button{flex:1}.adventure-bar{gap:5px}.journey-button{padding:8px}.account-button{font-size:10px;padding:7px}.wave-preview button>span{flex-direction:column;gap:2px}.forecast-enemy{display:flex;gap:4px;align-items:center}.wave-preview i{font-size:10px;line-height:10px;transform:rotate(90deg)}.wave-preview em{font-size:9px}.scene-heading h1{font-size:19px}}
@media(max-width:760px),(max-width:1000px) and (max-height:500px){.masthead .text-button{min-width:44px;min-height:44px}.masthead .round-button{width:44px;height:44px}.journey-button,.treasure button,.account-button{min-height:44px}}
