#wallet{position:absolute;top:80px;left:25px;color:#ffda87;background:#111510db;border:1px solid #8d7447;padding:9px 14px;font:12px system-ui;pointer-events:none}
#weather-label{top:120px}
#legacy-controls{position:absolute;right:25px;bottom:87px;display:flex;gap:8px;max-width:calc(100% - 50px);flex-wrap:wrap;justify-content:flex-end}
#legacy-controls[hidden],#legacy-controls button[hidden]{display:none}
#legacy-controls button{font:12px system-ui;padding:10px 14px;background:linear-gradient(#383e30ed,#111b16ef);max-width:220px}
#legacy-controls #volley{border-color:#c9d3a0;background:linear-gradient(#536044ed,#18231aef)}
#overlay.legacy .panel,#overlay.lost .panel{width:min(1320px,100%);padding:26px}
#overlay.legacy .panel *,#overlay.lost .panel *{touch-action:pan-y}
#overlay.legacy .actions,#overlay.lost .actions{position:sticky;bottom:-26px;background:#141b16f5;padding:14px 4px;border-top:1px solid #7d6b43;z-index:2}
.legacy-intro{max-width:760px;margin:24px auto}.legacy-intro>b{color:#ffda87;font:18px system-ui}.legacy-intro p{margin-bottom:12px}
.legacy-branches{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px;text-align:left;margin:20px 0 30px}
.legacy-branch{--branch:#bea269}.branch-0{--branch:#bd725e}.branch-1{--branch:#a6b4a1}.branch-3{--branch:#e7a263}.branch-4{--branch:#90c5be}.branch-5{--branch:#b3a1d1}
.legacy-branch h3{color:var(--branch);font-weight:400;text-align:center;font-size:20px;margin:8px 0 20px}
.legacy-node{position:relative;min-height:192px;background:linear-gradient(140deg,#303328,#141c18);padding:14px 12px;border:1px solid #665d45;margin-bottom:22px;display:flex;flex-direction:column;gap:8px;box-shadow:inset 0 0 14px #0006}
.legacy-node:not(:last-child):after{content:'↓';position:absolute;top:100%;left:calc(50% - 7px);height:22px;color:var(--branch)}
.legacy-node.learned{border-color:var(--branch);box-shadow:inset 0 2px var(--branch)}.legacy-node.locked{background:#151b17}
.legacy-node b{color:var(--branch);font-size:15px;font-weight:400;min-height:36px}.legacy-node small{display:block;font:11px system-ui;color:#c7bda5;margin-top:5px}
.legacy-node p{font:12px/1.5 system-ui;margin:0;color:#c5c5b9;flex:1}.legacy-node button{font:11px/1.4 system-ui;padding:8px;min-height:44px;width:100%}.legacy-node button:disabled{opacity:.65}
@media(max-width:1100px){.legacy-branches{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){#weather-label{top:105px}#wallet{left:12px;top:72px;font-size:10px;padding:7px 9px}#legacy-controls{right:12px;bottom:83px;gap:5px;max-width:calc(100% - 24px)}#legacy-controls button{font-size:10px;padding:8px;max-width:170px;min-height:44px}.legacy-branches{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#overlay.legacy .panel,#overlay.lost .panel{padding:20px 12px}.legacy-node{padding:11px 9px;min-height:198px}.legacy-intro h2{font-size:24px}}
@media(max-height:500px){#legacy-controls{bottom:74px}#wallet{top:66px}}

#legacy-controls #wallbuild{border-color:#b59a62;background:linear-gradient(#55432bed,#1d1c16ef);color:#f0d28f}
.skin-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px;margin:20px 0}.skin-card{padding:10px;background:radial-gradient(ellipse at 50% 40%,#43423c,#161c1b 75%);border:1px solid #82724c;text-align:center}.skin-card canvas{width:100%;max-width:220px;height:auto}.skin-card h3{font-size:17px;min-height:40px}.skin-card button{width:100%;font-size:13px}.shop .panel{max-width:1100px;width:95%;max-height:90vh;overflow:auto}
#shop-toggle{position:absolute;right:22px;top:76px;z-index:35;padding:9px 14px;font-size:15px;min-height:46px;background:#202923ee;border:1px solid #b79a5c;box-shadow:0 3px 12px #0008} .shop .panel{max-height:80vh;margin-top:45px}@media(max-width:600px){#shop-toggle{right:10px;top:73px;padding:7px 10px;font-size:13px}.shop .panel{max-height:76vh;margin-top:70px}}
.story-dialog{position:absolute;bottom:3%;left:50%;transform:translateX(-50%);width:min(780px,88%);padding:20px 26px;background:linear-gradient(#111718dd,#080b0ff5);border-top:1px solid #a88b59;color:#e9dfc9;pointer-events:auto}.story-dialog small{color:#b9a471;letter-spacing:1px}.story-dialog h2{margin:10px 0;font-size:23px}.story-dialog p{font-size:18px;line-height:1.55;margin:12px 0 18px}.story-dialog button{padding:10px 22px;margin-right:10px}.story-skip{font-size:12px;opacity:.7}@media(max-width:600px){.story-dialog{padding:12px;bottom:2%;width:90%}.story-dialog p{font-size:15px}.story-dialog h2{font-size:19px}}
#overlay.story{background:transparent;padding:0}#game[data-mode=story] #hud,#game[data-mode=story] #bottom,#game[data-mode=story] #wallet,#game[data-mode=story] #toast,#game[data-mode=story] #bossbar{visibility:hidden}.story-dialog{max-height:52vh;overflow:auto;touch-action:pan-y}
.story-dialog{bottom:4%;width:min(900px,88%);padding:12px 20px;border:0;background:transparent;text-align:center;max-height:33vh}.story-dialog small{font-size:11px;letter-spacing:2px;color:#b3a184}.story-dialog h2{font-size:18px;letter-spacing:1px;color:#d6bd86;margin:9px 0}.story-dialog p{font-size:18px;line-height:1.5;margin:10px auto 14px;max-width:800px;text-shadow:0 2px 5px #000}.story-dialog button{background:#14181b99;border-color:#8a795b;padding:7px 22px}.story-dialog .story-skip{border-color:transparent;background:transparent}@media(max-width:600px){.story-dialog{bottom:4%;padding:8px;max-height:39vh}.story-dialog p{font-size:15px}.story-dialog h2{font-size:16px}.story-dialog small{font-size:10px}}
