:root{font-family:Inter,Segoe UI,Arial,system-ui,sans-serif;color:#eaf4e6;background:#10251f;font-size:16px;line-height:1.5}*{box-sizing:border-box}html{min-width:320px}body{margin:0;background:radial-gradient(ellipse at 50% -10%,#33674d 0%,#173529 39%,#0e211c 90%);padding:22px 18px 26px}.app{max-width:1510px;margin:0 auto}button,input{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible{outline:3px solid #ffe39d;outline-offset:2px}.top{display:flex;gap:26px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:16px}.brand{display:flex;align-items:center;gap:15px}.brand-logo{display:grid;place-items:center;height:68px;width:66px;background:#f6c678;color:#18372d;border:4px solid #fff0b4;box-shadow:5px 5px 0 #75543e;font-size:38px;font-weight:1000;transform:rotate(-3deg)}.brand h1{font-size:35px;line-height:1;margin:1px 0;color:#fff1d1;letter-spacing:1.5px;font-weight:1000}.brand h1 span{color:#facf83}.brand sup{font-size:12px;vertical-align:top;background:#44836c;border:1px solid #81c4a5;padding:2px 5px}.overline{color:#b6d9b9;font-weight:900;letter-spacing:2px;font-size:11px}.stats{display:flex;gap:10px;flex-wrap:wrap}.stat{border:2px solid #608270;background:#1c4036;min-width:133px;padding:9px 16px;box-shadow:3px 4px 0 #071c17}.stat small{display:block;font-size:12px;letter-spacing:.7px;color:#c6e7d0;font-weight:750}.stat strong{display:block;font-size:23px;font-weight:950;color:#ffe0a0;font-variant-numeric:tabular-nums}.ticker{background:#e9c184;color:#234338;padding:8px 13px;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;font-weight:900;letter-spacing:.5px;border:3px solid #6a543e}.ticker-sep{opacity:.5;margin:0 7px}.layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:17px;margin-top:17px}.screen-column{min-width:0}.screen-bar{padding:9px 12px;background:#1f4236;border:3px solid #688b70;border-bottom:0;display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13px}.screen-bar strong{font-size:16px;color:#fff2cd}.live-dot{display:inline-block;width:10px;height:10px;background:#a9f6ae;box-shadow:0 0 0 3px #4e7964;margin-right:5px}.light-text{color:#c1d7c8}.game-wrap{aspect-ratio:16/9;position:relative;overflow:hidden;border:5px solid #a8ba8c;background:#8eb29b;box-shadow:0 9px 0 #10271f,0 18px 34px #0005}.game-wrap canvas{width:100%;height:100%;display:block;image-rendering:pixelated;touch-action:none}.scene-chip{position:absolute;top:13px;left:13px;background:#16392fed;color:#fff1b9;border:2px solid #f0d294;box-shadow:3px 3px #12251e;padding:7px 13px;font-size:16px;font-weight:1000;text-shadow:1px 1px #152d27;pointer-events:none}.action-prompt{position:absolute;bottom:61px;left:50%;transform:translateX(-50%);display:flex;gap:10px;align-items:center;white-space:nowrap;padding:8px 13px;background:#fff1cc;color:#213a29;border:3px solid #384d36;box-shadow:3px 4px #16281b;font-size:16px;font-weight:900}.action-prompt kbd{background:#f8cd7d;border:2px solid #ae8950;padding:2px 8px;font-size:20px}.game-message{position:absolute;right:9px;bottom:10px;left:9px;margin:auto;max-width:600px;text-align:center;padding:7px 14px;background:#1a332bdc;border:1px solid #9bbba0;color:#ffffff;font-size:13px;pointer-events:none}.game-message b{color:#ffe099}.instructions{margin-top:15px;display:flex;gap:13px;align-items:center;flex-wrap:wrap;color:#e3eed9;font-size:13px;font-weight:750}.instructions kbd{display:inline-block;color:#fff1d4;padding:2px 7px;background:#315748;border:2px solid #708978;margin:0 2px}.instructions button{margin-left:auto;padding:8px 12px;color:#fff0c6;background:#34634d;border:2px solid #96b18c;font-weight:900}.sidebar{display:flex;flex-direction:column;background:#1a382f;border:3px solid #63816c;box-shadow:5px 6px 0 #10251c;min-height:500px;padding:17px}.side-heading small,.label{font-size:12px;letter-spacing:1.3px;font-weight:900;color:#ffcf80}.side-heading h2{font-size:21px;line-height:1.13;margin:7px 0;color:#fff3d5}.side-heading p{font-size:13px;color:#d3e5d6;margin:6px 0 15px}.destinations{display:grid;gap:8px}.destination{width:100%;border:2px solid #769d82;background:#315848;color:#fff6df;padding:10px;text-align:left;display:flex;gap:12px;align-items:center;min-height:68px}.destination:hover,.destination.active{background:#52775b;border-color:#f8d48e;box-shadow:3px 3px #112d21}.dest-icon{width:36px;height:36px;display:grid;place-items:center;background:#17372c;border:1px solid #7bad86;font-size:23px}.destination span:nth-child(2){flex:1}.destination b{font-size:14px;display:block}.destination small{font-size:12px;color:#d5e7d5;display:block}.side-bottom{margin-top:auto;background:#102b24;border-left:4px solid #e9c382;padding:14px;margin-top:18px}.side-bottom p{margin:8px 0;font-size:13px}.progress{color:#a7dfb1;font-size:12px;font-weight:900}footer{margin-top:25px;border-top:1px solid #527261;padding-top:14px;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;color:#c1d4c1;font-size:12px;font-weight:800}.modal-backdrop{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:14px;background:#061914d9;backdrop-filter:blur(4px)}.modal{position:relative;background:#19392e;border:4px solid #eec78b;box-shadow:8px 9px #081810;width:min(100%,750px);max-height:90vh;overflow-y:auto;padding:27px 27px 23px}.close{position:absolute;top:14px;right:14px;border:2px solid #ffdbb1;background:#a5504f;color:#fff8e5;font-weight:1000;font-size:20px;width:43px;height:43px}.tag{font-size:12px;color:#f5c97d;letter-spacing:1.5px;font-weight:900;text-transform:uppercase;margin-right:48px}.modal h2{font-size:28px;line-height:1.15;margin:8px 50px 9px 0;font-weight:1000;color:#ffdfaa}.sub{color:#e0f0df;font-size:15px;line-height:1.55;margin:0 0 14px}.panel{border:2px solid #658973;background:#102920;padding:17px;font-size:16px;line-height:1.6;margin:13px 0}.panel b{color:#ffe4aa}.metrics{display:flex;gap:9px;flex-wrap:wrap;margin:14px 0}.metric{border:2px solid #64866a;background:#112d25;padding:9px 13px;flex:1;min-width:130px}.metric small{display:block;font-size:12px;color:#cce6d0;font-weight:900}.metric b{font-size:20px;color:#ffe2a2}.button-row{display:flex;gap:11px;flex-wrap:wrap;margin-top:18px}.primary,.secondary,.choice{background:#e9bf79;color:#1c392e;border:2px solid #fff0b4;font-size:15px;font-weight:900;min-height:45px;padding:10px 16px;box-shadow:3px 4px #091b16}.secondary{background:#9cd1a5}.primary:hover,.secondary:hover,.choice:hover{filter:brightness(1.12)}button:disabled{opacity:.45;cursor:not-allowed;box-shadow:none}.trade-chart{display:block;width:100%;height:208px;background:#132d28;border:2px solid #79987c;margin-top:14px}.qty-row{display:flex;gap:12px;align-items:center;margin-top:14px;font-weight:800}.qty-row input{width:92px;font-size:18px;background:#10251f;color:#fff4d8;border:2px solid #e0c28d;padding:8px 12px}.notice{background:#34584b;border-left:4px solid #e8c079;color:#f2f5e5;padding:10px 14px;margin-top:16px;font-size:13px}.log{color:#d3ebd5;font-size:14px;padding-left:22px;line-height:1.6}.choice{background:#254c3c;color:#f5f6e5;border:2px solid #63876c;box-shadow:none}.choice.selected{background:#eed08d;color:#19352a;border-color:#fff4c8}.dice-stage{display:flex;justify-content:center;gap:12px;margin:20px auto}.die{width:77px;height:80px;display:grid;place-items:center;border-radius:9px;background:#fff1d1;border:3px solid #ab996e;box-shadow:4px 5px #12251f;color:#282e2d;font-size:65px;line-height:1}.dice-result{text-align:center;background:#25483b;border:2px solid #7aab7f;padding:12px;font-size:18px;font-weight:950}.pack-list{display:flex;flex-wrap:wrap;gap:12px}.pack{font-size:19px;font-weight:950;min-width:84px;height:86px;background:#ab7455;color:#fff6db;border:4px solid #e7b87c;box-shadow:4px 5px #0d221b}.pack.done{background:#5f936d}.pack:disabled{opacity:.8}.hint{font-size:14px;color:#d8ecd2}.toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,160px);transition:transform .2s ease;z-index:80;background:#ffdf9b;border:3px solid #334c33;box-shadow:5px 6px #071910;color:#172b23;font-weight:950;padding:13px 20px;max-width:90vw;text-align:center}.toast.show{transform:translate(-50%,0)}.touch-controls{display:none}.hidden{display:none!important}@media(max-width:1200px){.layout{grid-template-columns:minmax(0,1fr) 290px}.stat{min-width:116px}.sidebar{padding:11px}.side-heading h2{font-size:19px}}@media(max-width:920px){.layout{grid-template-columns:1fr}.sidebar{min-height:0}.destinations{grid-template-columns:repeat(2,minmax(0,1fr))}.side-bottom{margin-top:10px}.stats{width:100%}.stat{flex:1}.side-heading p{margin-bottom:10px}}@media(max-width:600px){body{padding:10px 7px}.brand-logo{width:43px;height:46px;font-size:28px}.brand h1{font-size:28px}.overline{font-size:9px;letter-spacing:.5px}.stats{gap:5px}.stat{padding:6px 7px;min-width:0}.stat small{font-size:9px}.stat strong{font-size:16px}.ticker{font-size:10px;padding:5px}.screen-bar{font-size:10px}.screen-bar strong{font-size:13px}.game-wrap{aspect-ratio:4/4;max-height:70vh}.game-wrap canvas{width:100%;height:100%;object-fit:cover}.scene-chip{font-size:11px;padding:5px;top:5px;left:5px}.game-message{display:none}.touch-controls{display:flex;align-items:end;justify-content:space-between;position:absolute;bottom:5px;left:5px;right:5px;z-index:5}.dpad{display:grid;grid-template-columns:repeat(3,43px);grid-template-rows:repeat(2,43px);gap:2px}.dpad button{background:#203e36d9;border:2px solid #ffdfa5;color:#fff4e0;font-size:20px;font-weight:900;touch-action:none}.dpad [data-dir=up]{grid-column:2;grid-row:1}.dpad [data-dir=left]{grid-column:1;grid-row:2}.dpad [data-dir=down]{grid-column:2;grid-row:2}.dpad [data-dir=right]{grid-column:3;grid-row:2}.touch-action{background:#f5cf8c;border:3px solid #25382e;color:#223a2c;font-size:19px;font-weight:950;padding:8px}.touch-action small{display:block;font-size:10px}.action-prompt{bottom:102px;font-size:12px}.instructions{font-size:11px}.destinations{grid-template-columns:1fr 1fr;gap:6px}.destination{min-height:65px;padding:6px;gap:5px}.dest-icon{width:26px;height:30px;font-size:18px}.destination b{font-size:11px}.destination small{font-size:10px}.destination span:last-child{display:none}.modal{padding:19px 12px}.modal h2{font-size:24px}.panel{font-size:14px;padding:12px}.metric{min-width:92px}.metric b{font-size:17px}.die{width:60px;height:64px;font-size:53px}}

/* V3: readable UI at 100% zoom + explicit cloud status */
.account-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 14px;padding:9px 13px;background:#163c32;border:2px solid #7d9a78;font-size:13px;color:#f5ebd2}
#account-btn{padding:10px 15px;min-height:42px;background:#f0d396;border:2px solid #9c7c4b;color:#243b2d;font-weight:900;font-size:14px;cursor:pointer}
#storage-hint{font-weight:800;color:#f3c996}
.key-input{display:block;width:100%;max-width:560px;padding:12px;font-family:ui-monospace,Consolas,monospace;font-size:16px;background:#fff2d6;color:#233c31;border:3px solid #8c9e7e;letter-spacing:.3px;margin:10px 0}
.modal h3{font-size:19px;color:#ffe3ae}
.quest-banner{background:#273f33;padding:10px;border-left:4px solid #f1d088;margin:12px 0}
@media(max-width:600px){.account-toolbar{font-size:11px}#account-btn{font-size:12px}.key-input{font-size:12px}button{min-height:40px}body{font-size:15px}.destination small{font-size:11px}.stat strong{font-size:18px}}

.toast:not(.show){visibility:hidden;opacity:0;pointer-events:none}

/* V4 HD: clean readable UI against detailed pixel world. */
:root{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;font-size:16px}
body{background:radial-gradient(ellipse at 15% 0%,#315b4f 0%,transparent 42%),linear-gradient(145deg,#0d1d21,#14352e 58%,#0c181b);}
.app{max-width:1580px}
.top{padding:12px 15px;background:linear-gradient(110deg,#1d3d36,#142a2a);border:2px solid #72947d;border-radius:8px;box-shadow:0 15px 30px #0718135e}
.stat{background:#0e2927;border-radius:5px}.stat strong{font-size:25px}
.game-wrap{border:5px solid #ccae73;border-radius:4px;box-shadow:0 12px 0 #1f2d27,0 23px 45px #030e0ca6}
.screen-bar{background:#19332e}.sidebar{box-shadow:0 10px 26px #06130f4b}.destination{transition:transform .15s ease,filter .15s ease}.destination:hover{transform:translateY(-2px);filter:brightness(1.08)}
.scene-chip{backdrop-filter:blur(4px);border-radius:4px}
.modal{border-radius:10px;box-shadow:0 32px 100px #000c}
.modal h2{line-height:1.15}.modal p,.modal .notice{font-size:15px;line-height:1.6}
.trade-cooldown{margin:10px 0 14px;border:2px solid #477e6c;border-radius:7px;background:#183b36;color:#e5eede;padding:11px 15px;font-weight:800;display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}
.trade-cooldown b{color:#ffd184;font-variant-numeric:tabular-nums}
.dice-stage .die{filter:drop-shadow(2px 6px 1px #11272d77);animation:diceBob 1.6s ease-in-out infinite alternate}
.dice-stage .die:nth-child(2){animation-delay:.3s}.dice-stage .die:nth-child(3){animation-delay:.55s}
@keyframes diceBob{from{transform:translateY(0) rotate(-4deg)}to{transform:translateY(-4px) rotate(5deg)}}
@media(max-width:900px){body{padding:8px}.top{padding:11px}.stat{min-width:105px;padding:6px 9px}.stat strong{font-size:20px}.game-wrap{border-width:3px}.scene-chip{font-size:12px;padding:4px 7px}}
