:root{color-scheme:dark;--bg:#111a17;--panel:#1b2822;--panel-hi:#24362b;--line:#34483a;--text:#edf1df;--muted:#a0b09a;--lime:#d8e98c;--orange:#f2bb61}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;background:radial-gradient(ellipse at 50% -20%,#2b4534 0,#111a17 65%);color:var(--text);font-family:system-ui,-apple-system,"Segoe UI",sans-serif}
button,a{-webkit-tap-highlight-color:transparent}
button{font:inherit;cursor:pointer}
button:focus-visible,a:focus-visible,#world:focus-visible{outline:3px solid var(--orange);outline-offset:3px}
.game-shell{max-width:1420px;margin:auto;padding:20px 28px 14px}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:4px 2px 20px;border-bottom:1px solid #ffffff17}
.back-link{color:#d6e0cd;text-decoration:none;font-size:13px;font-weight:700}
.brand{display:flex;align-items:center;gap:12px}
.brand-icon{display:grid;place-items:center;width:44px;height:44px;border:1px solid #718b4f;background:linear-gradient(145deg,#8daa51,#4b6e3e);border-radius:11px;color:#f8f6cd;font-size:27px;box-shadow:inset 0 2px #ffffff38,0 4px #0a110e}
.eyebrow,.card-kicker,.world-label{margin:0;color:var(--lime);font:500 10px 'DM Mono',monospace;letter-spacing:1.9px}
.brand h1{margin:1px 0 0;font-size:19px;letter-spacing:-.4px}
.world-status{display:flex;align-items:center;gap:9px;color:#c3d1ba;font:12px 'DM Mono',monospace}
.status-dot{width:8px;height:8px;border-radius:50%;background:#a3d56c;box-shadow:0 0 12px #a3d56c}
.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 286px;gap:18px;padding-top:20px;align-items:start}
.world-panel,.card{border:1px solid var(--line);border-radius:15px;background:#1a2620;box-shadow:0 12px 30px #0002}
.world-panel{padding:14px}
.world-heading{display:flex;align-items:center;justify-content:space-between;padding:1px 3px 12px}
.world-heading h2{margin:4px 0 0;font-size:16px}
.coordinates{color:#b4c4a8;font:12px 'DM Mono',monospace}
.canvas-frame{position:relative;overflow:hidden;border:1px solid #637549;border-radius:10px;background:#91b86b;box-shadow:inset 0 0 30px #172f1b66}
#world{display:block;width:100%;height:auto;aspect-ratio:8/5;touch-action:manipulation;cursor:crosshair;image-rendering:pixelated}
.toast{position:absolute;left:50%;bottom:15px;transform:translate(-50%,10px);padding:8px 13px;border:1px solid #ffffff2a;border-radius:8px;background:#17231ee8;color:#f0edca;font-size:12px;font-weight:700;opacity:0;pointer-events:none;transition:opacity .15s,transform .15s;white-space:nowrap}
.toast.visible{opacity:1;transform:translate(-50%,0)}
.hotbar-wrap{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 2px 0}
.hotbar{display:grid;grid-template-columns:repeat(5,minmax(62px,76px));gap:7px}
.slot{position:relative;display:grid;grid-template-columns:30px 1fr;grid-template-rows:1fr 16px;align-items:center;min-height:55px;padding:6px;border:1px solid #4d614c;border-radius:8px;background:#26362b;color:var(--text);text-align:left}
.slot.selected{border-color:var(--lime);background:#394a32;box-shadow:0 0 0 2px #d8e98c38,inset 0 0 0 1px #d8e98c55}
.slot-swatch,.block-swatch{display:block;width:23px;height:23px;border:1px solid #ffffff35;border-radius:4px;box-shadow:inset 2px 2px #ffffff27,inset -2px -2px #0003}
.slot-name{font-size:10px;font-weight:800;line-height:1.05}
.slot-count{grid-column:2;align-self:end;color:#d0d9ba;font:10px 'DM Mono',monospace}
.slot-key{position:absolute;right:5px;top:3px;color:#b1bf9c;font:9px 'DM Mono',monospace}
.hotbar-tip{color:#879987;font-size:10px}
.side-panel{display:grid;gap:11px}
.card{padding:16px}
.card h2{margin:10px 0 7px;font-size:17px}
.card>p:not(.card-kicker){margin:0;color:#b5c3b0;font-size:12px;line-height:1.7}
.selected-card{background:linear-gradient(145deg,#26362b,#1a2620)}
.target-block{display:flex;align-items:center;gap:11px;margin:14px 0}
.block-swatch{width:38px;height:38px;border-radius:6px}
.target-block b,.target-block small{display:block}
.target-block b{font-size:13px}
.target-block small{margin-top:4px;color:#9dad96;font-size:10px}
.action-row{display:flex;gap:7px}
.action-button{flex:1;padding:10px 8px;border:1px solid #90a55d;border-radius:8px;background:#708d45;color:#fff9dd;font-size:11px;font-weight:800}
.action-button:hover{background:#829f53}
.action-button.secondary{border-color:#51634c;background:#2e3c31;color:#d8e4d1}
.action-button.secondary:hover{background:#3a4b3b}
.key-guide{display:flex;align-items:center;gap:5px;margin:12px 0;color:#bfccb8;font-size:10px}
.key{display:inline-grid;place-items:center;min-width:24px;padding:4px 5px;border:1px solid #5b6d57;border-bottom-width:2px;border-radius:5px;background:#29382d;color:#eef3d8;font:10px 'DM Mono',monospace}
.small-note{margin:13px 0 0;color:#94a391;font-size:10px;line-height:1.6}
.touch-controls{display:none;grid-template-columns:repeat(3,43px);grid-template-rows:repeat(2,38px);gap:4px;margin:14px auto 0;width:max-content}
.touch-controls button{border:1px solid #728b56;border-radius:7px;background:#394a33;color:#f0f3db;font-weight:800;touch-action:manipulation}
.touch-controls button:first-child{grid-column:2}
.touch-controls button:nth-child(2){grid-column:1;grid-row:2}
.touch-controls button:nth-child(3){grid-column:2;grid-row:2}
.touch-controls button:nth-child(4){grid-column:3;grid-row:2}
.new-world{width:100%;padding:11px;border:1px solid #4a5b47;border-radius:8px;background:#17221c;color:#b9c9b3;font-size:11px;font-weight:700}
.new-world:hover{border-color:#94a967;color:#edf1df}
footer{display:flex;justify-content:space-between;gap:12px;padding:16px 3px 0;color:#879987;font-size:10px}
footer span{font-family:'DM Mono',monospace}
@media(max-width:900px){.game-layout{grid-template-columns:minmax(0,1fr) 240px;gap:12px}.world-panel{padding:10px}.hotbar{grid-template-columns:repeat(5,minmax(48px,1fr));gap:4px}.slot{grid-template-columns:22px 1fr;min-height:50px;padding:4px}.slot-swatch{width:19px;height:19px}.slot-name{font-size:9px}.hotbar-tip{display:none}}
@media(max-width:680px){.game-shell{padding:12px 10px}.topbar{padding-bottom:13px}.back-link{font-size:11px}.brand{gap:7px}.brand-icon{width:36px;height:36px;font-size:23px}.brand h1{font-size:15px}.eyebrow{font-size:8px}.world-status{font-size:9px}.game-layout{grid-template-columns:1fr;padding-top:12px;gap:10px}.world-panel{padding:7px;border-radius:11px}.world-heading{padding:2px 3px 8px}.world-heading h2{font-size:13px}.coordinates{font-size:10px}.hotbar-wrap{padding-top:8px}.hotbar{width:100%;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}.slot{grid-template-columns:22px 1fr;min-width:0;min-height:48px;padding:4px}.slot-key{display:none}.side-panel{grid-template-columns:1fr 1fr;align-items:stretch;gap:8px}.card{padding:12px}.card h2{font-size:14px}.card>p:not(.card-kicker){font-size:10px}.controls-card{grid-column:1/-1}.selected-card{grid-column:1/-1}.touch-controls{display:grid}.key-guide{margin:8px 0}.new-world{grid-column:1/-1}footer{font-size:9px}footer span{max-width:45%;text-align:right;font-size:8px}}
@media(max-width:390px){.world-status{max-width:84px}.hotbar-tip{display:none}.side-panel{grid-template-columns:1fr}.controls-card,.selected-card,.new-world{grid-column:auto}}
