:root{font:18px/1.35 Nunito,system-ui,sans-serif;color:#253b4a;background:#fff7e8;color-scheme:light}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;height:100dvh;overflow:hidden;padding:env(safe-area-inset-top) max(7px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(7px,env(safe-area-inset-left))}button{font:inherit;line-height:1.2;min-width:44px;min-height:44px;padding:7px 11px;color:inherit;border:2px solid #4e747a;border-radius:12px;background:#fffaf0;touch-action:none;overflow-wrap:anywhere;cursor:pointer}button:hover:not(:disabled){background:#dcf0e9}button:focus-visible,#stage:focus-visible{outline:3px solid #ad5688;outline-offset:2px}button:disabled{opacity:.42;cursor:default}button[aria-pressed=true]{background:#c9e9e1;border-color:#217f83}h1,h2,p{margin:0}#app{height:100%;max-width:1000px;margin:auto;display:flex;flex-direction:column;min-height:0}.mast{display:flex;align-items:center;gap:6px;padding:5px 0;flex:none}.mast h1{font-size:1.02rem;line-height:1.1;flex:1;min-width:0}.mast button{flex:none}#home{flex:1;overflow:auto;padding:8px 3px}#home p{margin:7px 0}#progress{font-weight:800;color:#216f75}.row{display:flex;gap:6px;flex-wrap:wrap;margin:7px 0}.row button{flex:1 1 auto}#jobs{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:7px;margin:12px 0}#jobs button{display:flex;justify-content:space-between;gap:10px;text-align:left;padding:12px}#run{flex:1;min-height:0;display:grid;grid-template-rows:auto auto minmax(130px,1fr) auto auto auto;gap:4px}.runTop{display:flex;gap:5px;flex-wrap:wrap;align-items:center}.runTop strong{font-size:.88rem;flex:1 1 150px}.runTop button{font-size:.82rem;padding:6px 9px}.hud{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));text-align:center;min-height:1.5em;align-items:center;gap:4px;font-weight:800;font-size:.85rem}.hud span{min-width:0;overflow-wrap:anywhere}#stage{position:relative;min-height:0;overflow:hidden;border:2px solid #4e747a;border-radius:14px;background:#f3d4b1;touch-action:none}#phaser,#fallback{position:absolute;inset:0;width:100%;height:100%}#phaser canvas{display:block!important;width:100%!important;height:100%!important}#pauseVeil{position:absolute;bottom:8px;left:8px;right:8px;text-align:center;padding:6px;border-radius:9px;background:#fff7e8e8;pointer-events:none;font-size:.83rem;font-weight:800}#status{min-height:1.3em;height:1.3em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;font-size:.83rem;overflow-wrap:anywhere}#gameControls{display:grid;grid-template-columns:repeat(4,minmax(44px,1fr));gap:6px;flex:none}#gameControls button{font-weight:800;min-height:55px;padding:9px 5px}.runActions{margin:0;min-height:44px}.runActions:empty{display:none}.runActions button{font-size:.83rem;min-height:44px}#notice{font-size:.8rem;color:#8c3b25;overflow-wrap:anywhere;flex:none;max-height:3.3em;overflow:auto;padding:3px 0}#notice:empty{display:none}dialog{width:min(680px,calc(100% - 16px));max-height:calc(100dvh - 16px);border:2px solid #4e747a;border-radius:16px;padding:0;background:#fff7e8;color:#253b4a;overflow:hidden}dialog[open]{display:flex;flex-direction:column}dialog::backdrop{background:#253b4a88}dialog>header{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;padding:10px;border-bottom:1px solid #96ac9b;flex:none}dialog h2{font-size:1.15rem;line-height:1.2;flex:1 1 160px;min-width:0;overflow-wrap:anywhere}dialog>header button{flex:none}dialog .sheetBody{overflow:auto;overscroll-behavior:contain;padding:12px;min-height:0}.sheetBody p{margin:9px 0}.sheetBody button{margin:4px}.setting{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0}dialog>p,dialog>footer{padding:12px}dialog footer{display:flex;gap:8px;flex:none}dialog footer button{flex:1}#loading{padding:20px;max-width:420px}#loading p{padding:0 0 12px}.motionOff *{animation:none!important;transition:none!important;scroll-behavior:auto!important}@media(max-width:450px){:root{font-size:17px}.mast h1{font-size:1rem}#gameControls{grid-template-columns:repeat(2,minmax(44px,1fr))}#gameControls button{min-height:48px;padding:6px 5px}.runTop strong{flex-basis:100%;font-size:.83rem}.runTop{gap:4px}.runTop button{flex:1;font-size:.78rem}.row{gap:5px}.mast button{padding:6px}#jobs{grid-template-columns:1fr}}@media(orientation:landscape) and (max-height:500px){.mast{padding:2px 0}.mast h1{font-size:.85rem}.mast button{min-height:44px}.runTop strong{flex:1 1 auto}.runTop button{min-height:44px}.hud{font-size:.77rem;min-height:1.3em}#gameControls{grid-template-columns:repeat(4,minmax(44px,1fr))}#gameControls button{min-height:44px;padding:5px}.runActions button{min-height:44px}#run{gap:2px;grid-template-rows:auto auto minmax(105px,1fr) auto auto auto}#status{font-size:.75rem}#notice{max-height:1.3em}}

.hud{height:2.7em;min-height:2.7em;overflow:hidden}#jobs .jobCard{flex-direction:column;align-items:stretch}.jobTarget{display:block;font-size:.82em;font-weight:500;line-height:1.35}

@media(orientation:landscape) and (max-height:500px){#run{grid-template-columns:minmax(0,1fr) minmax(220px,32%);grid-template-rows:auto minmax(170px,1fr) auto;gap:4px}.runTop{grid-column:1/-1;grid-row:1}#stage{grid-column:1;grid-row:2/4}.hud{grid-column:2;grid-row:2;align-self:start}#gameControls{grid-column:2;grid-row:2;grid-template-columns:repeat(2,minmax(44px,1fr));align-self:center}#status{grid-column:2;grid-row:2;align-self:end}.runActions{grid-column:2;grid-row:3}}
#cover{display:block;width:100%;height:auto;max-height:270px;object-fit:cover;border-radius:16px;border:2px solid #d5aa77;margin-bottom:10px}.courierGrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px}.courierGrid button{display:flex;flex-direction:column;align-items:center}.courierGrid img{width:96px;height:96px;object-fit:contain}.postcard{margin:15px 0}.postcard img{display:block;max-width:100%;width:260px;height:auto;border-radius:12px}.setting select{font:inherit;max-width:65%;min-height:44px;background:#fffaf0;color:inherit;border:2px solid #4e747a;border-radius:9px;padding:5px}.lockedCard{padding:16px;border:2px dashed #9c947b;border-radius:12px}.sheetBody h3{font-size:1rem}#run{--scene-min:130px}body{background:linear-gradient(#fff7e8,#f6e6c9)}#gameControls button{background:#fcebcf;box-shadow:0 2px 0 #c5a47c}#gameControls button:active:not(:disabled){box-shadow:none}@media(max-width:450px){#cover{max-height:180px}}@media(orientation:landscape) and (max-height:500px){#cover{max-height:160px}}
