@font-face{font-family:"Lilita One";src:url("assets/fonts/LilitaOne-Regular.ttf") format("truetype");font-weight:400;font-style:normal;font-display:swap}
:root{color-scheme:dark;--ink:#192b32;--game-font:"Lilita One",ui-rounded,system-ui,sans-serif;--sand:#294e5b;--stone:#426575;--gold:#ebb13e;--pick:url('assets/pickaxe-cursor.svg') 4 14,crosshair}*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden}body{background:#2e3c28;font-family:var(--game-font);font-synthesis:none;color:var(--ink);user-select:none}button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}button:focus-visible{outline:3px solid #fbe1a0;outline-offset:4px}button:disabled{cursor:default}button:not(:disabled):active{transform:translateY(3px);box-shadow:inset 0 2px 0 #fff2,0 1px 0 #20251c}button[hidden],[hidden]{display:none!important}#game{position:relative;width:100vw;height:100dvh;overflow:hidden}canvas{display:block;width:100%;height:100%;outline:none;touch-action:none;cursor:var(--pick)}canvas.panning{cursor:url('assets/closed-hand-cursor.svg?v=23') 16 17,grabbing}.settings{position:absolute;top:18px;right:18px;display:flex;gap:10px;z-index:3}.stone-button{border:3px solid var(--ink);border-radius:9px 11px 8px 10px;background:#456577;box-shadow:inset 0 3px 0 #7295a7,inset 0 -3px 0 #2c465a,0 3px 0 #14222b66}.stone-button:hover{background:#567e91}.icon-button{width:56px;height:56px;display:grid;place-items:center;padding:10px}.icon-button svg{width:30px;height:30px;stroke:#f3d9a4;stroke-width:2.3;fill:none;stroke-linecap:round;stroke-linejoin:round}.stone-panel{border:5px solid var(--ink);border-radius:19px 14px 20px 13px;background:var(--sand);box-shadow:inset 0 7px 0 #48798a,inset 0 -8px 0 #183644,0 11px 0 #101b2877}.gold-button{border:3px solid var(--ink);border-radius:10px 8px 12px 9px;background:var(--gold);box-shadow:inset 0 4px 0 #ffe08a,inset 0 -4px 0 #b97b27,0 3px 0 #12293388;font-weight:800;padding:13px 20px}.gold-button:hover:not(:disabled){background:#edbf65}.coin,.tinycoin{display:inline-block;background:#edb544;border:3px solid #4b442b;box-shadow:inset 2px 2px 0 #ffe196,inset -2px -2px 0 #c18932;border-radius:50%;width:25px;height:25px;flex-shrink:0}.tinycoin{width:16px;height:16px;border-width:2px}.shop-gold{display:flex;align-items:center;gap:9px}.shop-gold strong{font-size:26px;font-weight:850;color:#ffe3a1}#shop,#paused-overlay{position:absolute;inset:0;z-index:5;background:#1c271a99;display:grid;place-items:center;padding:24px}.shop-window{width:min(760px,100%);padding:27px 29px 29px;position:relative}.shop-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:23px}.shop-title h1,.pause-panel h2{margin:0;font:400 35px/1.1 var(--game-font);letter-spacing:.5px;color:#ffe2a5;text-shadow:0 3px 0 #132b39}.shop-haul{display:flex;align-items:center;gap:20px;padding:13px 15px;background:#e3cfaa;border:3px solid #192b32;border-radius:11px 8px 12px 9px;margin-bottom:16px;box-shadow:inset 0 4px 0 #f9e7c5,inset 0 -4px 0 #b9a482}#shop-items{display:flex;align-items:center;flex-wrap:wrap;gap:10px 17px;flex:1;min-height:42px}.shop-item{display:flex;align-items:center;gap:7px;font-size:15px;font-weight:800}.shop-item svg{width:30px;height:30px}#sell{display:flex;align-items:center;justify-content:space-between;gap:25px;min-width:170px;font-size:14px}#sell strong{display:flex;align-items:center;gap:7px}.upgrades{display:grid;grid-template-columns:1fr 1fr;gap:13px}.upgrade{display:grid;grid-template-columns:45px 1fr auto;align-items:center;gap:11px;min-height:96px;padding:13px 15px;text-align:left;border:3px solid var(--ink);border-radius:10px 13px 9px 12px;background:var(--face);box-shadow:inset 0 4px 0 var(--light),inset 0 -4px 0 var(--shade),0 3px 0 #10273188}.upgrade:not(:disabled):hover{filter:brightness(1.13)}.upgrade-icon{display:grid;place-items:center}.upgrade-icon svg{width:42px;height:42px;stroke:#252e21;stroke-width:2.8;stroke-linejoin:round;stroke-linecap:round}.upgrade-icon img{width:43px;height:43px;display:block}.upgrade-name{font-size:15px;font-weight:850;color:#fff0d1;margin-bottom:6px;white-space:nowrap}.upgrade-stat{font-size:11px;font-weight:700;color:#ecd5b6}.level{font-size:10px;color:#dcc4ac;margin-left:6px}.price{display:flex;align-items:center;gap:6px;color:#ffe7b4;font-size:14px;font-weight:850;white-space:nowrap}#enter-mine{display:flex;align-items:center;justify-content:center;gap:40px;width:100%;margin-top:24px;font-size:16px;min-height:54px}#enter-mine span{font-size:21px}.pause-panel{padding:30px 35px;text-align:center}.pause-panel h2{font-size:31px;margin-bottom:25px}.pause-panel button{min-width:160px}#notice{position:absolute;bottom:24px;left:50%;transform:translateX(-50%);opacity:0;pointer-events:none;background:#303a29;color:#e8ddbf;border:2px solid #1e281b;padding:8px 15px;border-radius:6px;font-size:12px;font-weight:700;transition:opacity .2s;z-index:6}#notice.show{opacity:1}@media(max-width:650px){.settings{top:11px;right:11px;gap:6px}.icon-button{width:48px;height:48px;padding:8px}.icon-button svg{width:28px;height:28px}#shop,#paused-overlay{padding:12px}.shop-window{padding:22px 17px 24px;border-width:4px}.shop-title h1{font-size:30px}.shop-gold strong{font-size:22px}.shop-title{margin-bottom:18px}.shop-haul{gap:12px;padding:11px}.shop-item{font-size:12px;gap:4px}.shop-item svg{width:23px;height:23px}#shop-items{gap:7px 9px}#sell{min-width:122px;padding:11px 12px;gap:12px;font-size:12px}.upgrades{gap:10px}.upgrade{grid-template-columns:32px 1fr;gap:7px;padding:10px;min-height:103px;position:relative}.upgrade-icon svg,.upgrade-icon img{width:31px;height:31px}.upgrade-name{font-size:11px;margin-bottom:5px}.upgrade-stat{font-size:10px}.price{grid-column:1 / 3;justify-self:end;font-size:12px;margin-top:-2px}.level{font-size:8px;margin-left:3px}#enter-mine{margin-top:20px;font-size:14px}.coin{width:22px;height:22px}#fullscreen{display:none}}@media(max-height:540px){.shop-window{padding:18px 24px}.shop-title{margin-bottom:12px}.shop-haul{padding:9px 12px}.upgrade{min-height:72px;padding:9px 12px}#enter-mine{margin-top:15px;min-height:45px;padding:9px}.shop-title h1{font-size:28px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.upgrade[data-upgrade="pick"]{--face:#a85e38;--light:#d98c52;--shade:#713b2a}.upgrade[data-upgrade="armor"]{--face:#426b96;--light:#76a1c1;--shade:#2b466b}.upgrade[data-upgrade="cart"]{--face:#287862;--light:#5daa88;--shade:#1c5046}.upgrade[data-upgrade="hire"]{--face:#83517f;--light:#b47fa4;--shade:#58345d}.upgrade:disabled .price{color:#d0c7b0}.upgrade.maxed .price{color:#ecd396}.upgrade:disabled:not(.maxed){filter:brightness(.87)}
.end-run{position:absolute;top:18px;left:18px;z-index:3;min-width:128px;min-height:56px;padding:12px 20px;font-size:19px;line-height:1;font-weight:400;color:#f3d9a4}
.shop-window{padding:19px 25px 23px}.shop-title{margin-bottom:13px}.shop-title h1{font-size:29px}.shop-haul{padding:9px 12px;gap:15px;margin-bottom:12px}#shop-items{min-height:31px;gap:6px 12px}.shop-item{font-size:12px;gap:4px}.shop-item svg{width:23px;height:23px}#sell{min-width:142px;padding:10px 14px;font-size:12px}.tree-tabs{display:flex;gap:7px;justify-content:center;margin-bottom:12px}.tree-tab{flex:1;min-width:0;border:3px solid #192b32;border-radius:9px 11px 8px 10px;padding:6px 4px;display:flex;align-items:center;justify-content:center;gap:6px;background:var(--face);box-shadow:inset 0 3px 0 var(--light),inset 0 -3px 0 var(--shade),0 2px 0 #122932;color:#ffe7b3;filter:brightness(.76)}.tree-tab.selected{border-color:#eac66d;filter:none}.tree-tab span{display:grid;place-items:center;width:27px;height:27px}.tree-tab img,.tree-tab svg{width:27px;height:27px}.tree-tab svg{stroke:#1b2b2b;stroke-width:2.8;stroke-linejoin:round;stroke-linecap:round}.tree-tab b{font-size:10px}.skill-tree{height:306px;position:relative}.tree-links{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.tree-links path{fill:none;stroke:#82a0a0;stroke-width:6;stroke-linejoin:round;stroke-linecap:round}.tree-links path.lit{stroke:#efce72}.tree-links path.off{stroke:#3c5d67}.fork-or{position:absolute;top:132px;left:50%;transform:translateX(-50%);padding:2px 8px;border-radius:6px;background:#294e5b;color:#f2d893;font-size:10px;font-weight:850;letter-spacing:1px}.skill-node{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:3px solid #192b32;border-radius:12px 15px 10px 14px;background:var(--face);box-shadow:inset 0 4px 0 var(--light),inset 0 -4px 0 var(--shade),0 4px 0 #132b35;cursor:pointer;color:#fff0d1;padding:8px 10px}.skill-node:not(:disabled):hover{filter:brightness(1.12)}.root-node{width:184px;height:102px;top:0;left:50%;transform:translateX(-50%);display:grid;grid-template-columns:45px 1fr;gap:3px 8px;text-align:left;justify-items:start}.root-node:not(:disabled):active{transform:translate(-50%,3px)}.root-node .node-icon{grid-row:1 / 4}.root-node .price{justify-self:end}.fork-node{width:38%;height:128px;top:178px}.left-node{left:7.5%}.right-node{right:7.5%}.skill-node.owned{border-color:#c7b16c}.skill-node.chosen{border-color:#f5d477;box-shadow:inset 0 4px 0 var(--light),inset 0 -4px 0 var(--shade),0 0 0 2px #987a3d,0 4px 0 #132b35}.skill-node.locked{opacity:.55}.node-mark{position:absolute;top:6px;right:9px;font-size:14px;font-weight:900;color:#ffe596}.node-icon{display:grid;place-items:center;height:40px}.node-icon img,.node-icon svg{display:block;width:41px;height:41px}.node-icon svg{stroke:#1c2c28;stroke-width:2.6;stroke-linejoin:round;stroke-linecap:round}.node-name{font-size:14px;font-weight:850;line-height:1.2}.node-stat{font-size:10px;line-height:1.25;color:#ecd5b6;font-weight:700;text-align:center}.root-node .node-stat{text-align:left}.skill-node .price{font-size:12px;min-height:16px}.skill-node .tinycoin{width:13px;height:13px}.skill-node:disabled{cursor:default}#enter-mine{margin-top:17px;min-height:46px;padding:11px 18px;font-size:14px}
[data-theme="pick"]{--face:#a85e38;--light:#d98c52;--shade:#713b2a}[data-theme="armor"]{--face:#426b96;--light:#76a1c1;--shade:#2b466b}[data-theme="cart"]{--face:#287862;--light:#5daa88;--shade:#1c5046}[data-theme="hire"]{--face:#83517f;--light:#b47fa4;--shade:#58345d}[data-theme="warrior"]{--face:#974e57;--light:#c77f85;--shade:#613440}
@media(max-width:650px){.end-run{top:11px;left:11px;min-width:112px;min-height:48px;font-size:17px;padding:9px 16px}.shop-window{padding:16px 13px 19px}.shop-title{margin-bottom:11px}.shop-title h1{font-size:26px}.shop-haul{padding:8px 9px;gap:9px;margin-bottom:10px}.tree-tabs{gap:5px;margin-bottom:11px}.tree-tab{padding:5px 2px}.tree-tab b{display:none}.tree-tab span,.tree-tab img,.tree-tab svg{width:27px;height:27px}.skill-tree{height:299px}.root-node{width:162px;height:101px}.fork-node{width:46%;height:122px;top:177px}.left-node{left:1.5%}.right-node{right:1.5%}.node-name{font-size:12px}.node-stat{font-size:9px}.node-icon,.node-icon img,.node-icon svg{height:37px;width:37px}.fork-or{top:131px}#enter-mine{margin-top:15px;min-height:45px}#shop-items{gap:5px 8px}.shop-item{font-size:11px}.shop-item svg{width:20px;height:20px}#sell{min-width:115px;padding:10px;font-size:11px}}
@media(max-height:650px){.shop-window{padding-top:13px;padding-bottom:17px}.shop-title{margin-bottom:9px}.shop-title h1{font-size:25px}.shop-haul{margin-bottom:9px;padding-top:7px;padding-bottom:7px}.tree-tab{padding-top:3px;padding-bottom:3px}.tree-tabs{margin-bottom:9px}.skill-tree{height:244px}.root-node{height:82px}.root-node .node-icon img,.root-node .node-icon svg{width:36px;height:36px}.fork-node{top:139px;height:105px;gap:2px}.fork-node .node-icon,.fork-node .node-icon img,.fork-node .node-icon svg{width:29px;height:29px}.fork-or{top:107px;font-size:9px}.node-name{font-size:12px}.node-stat{font-size:9px}#enter-mine{margin-top:13px;min-height:42px;padding:9px}}

canvas.live-cursor{cursor:none}canvas.live-cursor.panning{cursor:none}

/* Three generations of upgrades fit the same single-window shop. */
.skill-tree{height:350px}.root-node{height:62px;width:180px;padding:5px 10px;grid-template-columns:36px 1fr}.root-node .node-icon,.root-node .node-icon img,.root-node .node-icon svg{width:34px;height:34px}.root-node .node-name{font-size:12px}.root-node .node-stat{font-size:9px}.root-node .price{font-size:10px}.fork-node{top:94px;height:88px;gap:2px;flex-direction:row;flex-wrap:wrap;padding:6px 10px}.fork-node .node-icon{width:33px;height:33px;grid-row:1/4;flex-shrink:0}.fork-node .node-icon img,.fork-node .node-icon svg{width:32px;height:32px}.fork-node .node-name{width:calc(100% - 42px);font-size:12px}.fork-node .node-stat{width:100%;font-size:9px}.fork-node .price{font-size:10px;min-height:12px}.fork-or{top:64px;font-size:9px}.talent-node{top:231px;width:44%;height:116px;gap:3px;padding:7px 8px}.talent-left{left:3%}.talent-right{right:3%}.talent-node .node-name{font-size:12px}.talent-node .node-stat{font-size:10px}.talent-node .node-icon,.talent-node .node-icon svg{width:34px;height:34px}.talent-sealed{position:absolute;top:232px;left:10%;width:80%;height:90px;display:flex;align-items:center;justify-content:space-around;color:#8aa5a6;opacity:.3}.talent-sealed svg{width:45px;height:45px;stroke:#d3d4af;stroke-width:2.5;fill:none}
#boss-hud{position:absolute;left:50%;bottom:20px;transform:translateX(-50%);width:min(660px,calc(100% - 48px));z-index:4;pointer-events:none}#boss-name{text-align:center;font:400 clamp(28px,3.2vw,38px)/1.12 var(--game-font);color:#ed4246;-webkit-text-stroke:5px #08080b;paint-order:stroke fill;text-shadow:0 4px 0 #000,2px 0 0 #000,-2px 0 0 #000,0 -2px 0 #000;margin-bottom:10px}#boss-health{height:20px;border:4px solid #1c2930;border-radius:10px 7px 9px 7px;background:#2e252e;box-shadow:0 0 0 2px #aa8550,0 4px 0 #10202c80;overflow:hidden}#boss-health-fill{height:100%;width:100%;background:linear-gradient(#db9477 0 23%,#ab4f5f 23% 80%,#713746 80%);border-radius:3px;transition:width .12s linear}
@media(max-width:650px){.skill-tree{height:342px}.root-node{height:59px;width:158px}.fork-node{top:92px;height:86px;width:46%;padding:5px 6px}.fork-node .node-name{font-size:10px}.fork-node .node-stat{font-size:8px}.fork-or{top:63px}.talent-node{top:226px;height:113px;width:46%;padding:5px}.talent-left{left:1.5%}.talent-right{right:1.5%}.talent-node .node-name{font-size:11px}.talent-node .node-stat{font-size:8px}#boss-name{font-size:clamp(23px,5vw,30px);-webkit-text-stroke-width:4px}#boss-hud{bottom:17px}}
@media(max-height:650px){.skill-tree{height:284px}.root-node{height:49px}.root-node .node-icon,.root-node .node-icon img,.root-node .node-icon svg{width:28px;height:28px}.fork-node{top:77px;height:73px;gap:0}.fork-node .node-icon,.fork-node .node-icon img,.fork-node .node-icon svg{width:27px;height:27px}.fork-node .node-name{font-size:10px}.fork-or{top:51px}.talent-node{top:187px;height:95px;gap:1px}.talent-node .node-icon,.talent-node .node-icon svg{width:27px;height:27px}.talent-node .node-name{font-size:11px}.talent-node .node-stat{font-size:8px}.talent-sealed{top:190px;height:75px}.skill-tree .price{font-size:10px}}
/* Scale the three tree rows to the space left by the haul. */
.skill-tree{height:clamp(260px,calc(100dvh - 375px),350px)}.root-node{height:18%;padding:3px 8px}.fork-node{top:27%;height:25%;gap:1px;padding:4px 8px}.talent-node{top:66%;height:33%;gap:2px;padding:5px}.fork-or{top:18.5%}.talent-sealed{top:66%;height:30%}.root-node .node-icon,.root-node .node-icon img,.root-node .node-icon svg{height:28px;width:28px}.fork-node .node-icon,.fork-node .node-icon img,.fork-node .node-icon svg{height:27px;width:27px}
@media(max-width:650px){.skill-tree{height:clamp(244px,calc(100dvh - 430px),342px)}.fork-node{padding:3px 5px}.fork-node .node-name{font-size:10px}.fork-node .node-icon,.fork-node .node-icon img,.fork-node .node-icon svg{height:24px;width:24px}.talent-node .node-icon,.talent-node .node-icon svg{height:26px;width:26px}.talent-node .node-name{font-size:10px}.talent-node .node-stat{font-size:8px}.skill-tree .price{font-size:9px}.root-node .node-name{font-size:10px}.root-node .node-stat{font-size:8px}.root-node .price{font-size:9px}}

.talent-preview{top:66%;width:23.5%;height:33%;padding:5px 4px;opacity:.5;gap:4px}.talent-preview .node-icon,.talent-preview .node-icon svg{width:31px;height:31px}.talent-preview .node-name{font-size:10px;text-align:center;line-height:1.2}.talent-preview .price{font-size:9px}.tree-links path.preview{opacity:.35}@media(max-width:650px){.talent-preview{gap:2px}.talent-preview .node-icon,.talent-preview .node-icon svg{width:24px;height:24px}.talent-preview .node-name{font-size:8px}}
/* A fourth generation: every specialization has an exclusive capstone pair. */
.skill-tree{height:clamp(310px,calc(100dvh - 314px),420px)}
.shop-window{padding:15px 22px 18px}.shop-title{margin-bottom:10px}.shop-haul{margin-bottom:10px}.tree-tabs{margin-bottom:9px}
.root-node{height:12%;width:174px;grid-template-columns:29px 1fr;gap:0 5px}.root-node .node-name{font-size:11px}.root-node .node-stat{font-size:8px}.root-node .price{font-size:9px}.root-node .node-icon,.root-node .node-icon img,.root-node .node-icon svg{width:26px;height:26px}
.fork-or{top:12.5%;font-size:8px;padding:1px 6px}.fork-node{top:20%;height:19%;width:43%;left:3%;right:auto;display:grid;grid-template-columns:30px 1fr;gap:1px 5px;padding:4px 8px;justify-items:center}.fork-node.right-node{left:auto;right:3%}.fork-node .node-name,.fork-node .node-stat{width:auto}.fork-node .node-icon{grid-row:1/4}.fork-node .node-name{font-size:11px}.fork-node .node-stat{font-size:9px}.fork-node .price{font-size:9px;min-height:11px}
.talent-node{top:45%;height:21%;width:44%;display:grid;grid-template-columns:32px 1fr;gap:1px 5px;padding:5px 9px;justify-items:center}.talent-node .node-icon{grid-row:1/4}.talent-node .node-name{font-size:11px}.talent-node .node-stat{font-size:9px}.talent-node .node-icon,.talent-node .node-icon svg{width:31px;height:31px}.talent-node .price{font-size:9px;min-height:11px}
.talent-preview{top:45%;height:21%;gap:2px}.talent-preview .node-name{font-size:10px}.talent-preview .node-icon,.talent-preview .node-icon svg{height:27px;width:27px}
.mastery-browser{position:absolute;top:68%;height:7%;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:7px;background:#294e5b;padding:0 6px;white-space:nowrap;font-size:10px;font-weight:800;color:#f7df9e}.mastery-browser button{border:0;background:#477381;box-shadow:inset 0 2px 0 #6c98a0;border-radius:5px 4px 6px 4px;color:#ffe3a3;font-weight:900;font-size:18px;line-height:19px;padding:0 7px}.mastery-node{top:78%;height:22%;width:44%;display:grid;grid-template-columns:34px 1fr;gap:2px 5px;padding:5px 9px;justify-items:center}.mastery-node .node-icon{grid-row:1/4;width:32px;height:32px}.mastery-node .node-icon svg,.mastery-node .node-icon img{height:31px;width:31px}.mastery-node .node-name{font-size:12px}.mastery-node .node-stat{font-size:9px}.mastery-node .price{font-size:10px;min-height:11px}.mastery-icon{position:relative;filter:drop-shadow(0 0 3px var(--rune))}.mastery-icon i{position:absolute;right:-2px;bottom:-4px;font-size:12px;font-style:normal;color:var(--rune);text-shadow:0 1px #152c33}.node-mark{top:3px;right:5px;font-size:11px}
#enter-mine{margin-top:13px;min-height:42px;padding:8px 18px}
@media(max-width:650px){.shop-window{padding:13px 10px 16px}.skill-tree{height:clamp(310px,calc(100dvh - 345px),410px)}.fork-node{width:46%;left:1.5%;padding:3px 4px;grid-template-columns:23px 1fr;gap:0 2px}.fork-node.right-node{right:1.5%}.fork-node .node-icon,.fork-node .node-icon img,.fork-node .node-icon svg{width:22px;height:22px}.fork-node .node-name,.talent-node .node-name{font-size:10px}.fork-node .node-stat,.talent-node .node-stat{font-size:8px}.talent-node,.mastery-node{width:46%;padding:4px;grid-template-columns:24px 1fr;gap:1px 3px}.talent-left{left:1.5%}.talent-right{right:1.5%}.talent-node .node-icon,.talent-node .node-icon svg,.mastery-node .node-icon,.mastery-node .node-icon svg,.mastery-node .node-icon img{width:23px;height:23px}.mastery-node .node-name{font-size:10px}.mastery-node .node-stat{font-size:8px}.mastery-node .price{font-size:9px}.talent-preview .node-name{font-size:8px}.talent-preview .node-icon,.talent-preview .node-icon svg{width:23px;height:23px}.mastery-browser{font-size:9px;gap:4px}.shop-haul{gap:7px}#shop-items{max-height:76px;overflow:auto}}
@media(max-height:600px){#shop{padding:8px}.shop-window{padding:9px 14px 11px}.shop-title h1{font-size:22px}.shop-title{margin-bottom:6px}.shop-haul{padding:5px 8px;margin-bottom:6px}#shop-items{max-height:50px;overflow:auto}.tree-tabs{margin-bottom:6px}.tree-tab{padding:2px}.tree-tab span,.tree-tab svg,.tree-tab img{width:22px;height:22px}.skill-tree{height:clamp(270px,calc(100dvh - 220px),340px)}#enter-mine{margin-top:9px;min-height:35px;padding:5px}.root-node .node-icon,.root-node .node-icon img,.root-node .node-icon svg{width:22px;height:22px}.mastery-node .node-name{font-size:10px}.mastery-node .node-stat{font-size:8px}}

#pause-actions,#new-game-confirm{display:flex;flex-direction:column;gap:12px}.pause-panel .stone-button{padding:12px 18px;font-weight:800;color:#efdba8}.pause-panel h3{margin:0 0 5px;color:#f4d8aa;font:400 19px var(--game-font)}.pause-panel #confirm-new-game{background:#c87859;box-shadow:inset 0 4px 0 #e5a779,inset 0 -4px 0 #8d493e,0 3px 0 #12293388}

@media(max-width:380px){.settings{top:10px;right:10px;gap:5px}.icon-button{width:44px;height:46px;padding:7px}.icon-button svg{width:26px;height:26px}.end-run{top:10px;left:10px;min-width:100px;min-height:46px;padding:9px 12px;font-size:16px}}

/* Spacious shop: every fork is present; smaller windows scroll inside the stone frame. */
#shop{padding:12px}
#shop .shop-window{width:min(1480px,100%);height:calc(100dvh - 24px);max-height:1000px;padding:14px 18px;display:flex;flex-direction:column;min-height:0}
#shop .shop-title{flex:none;margin-bottom:8px}#shop .shop-title h1{font-size:32px}#shop .shop-gold strong{font-size:28px}
#shop .shop-haul{flex:none;min-height:54px;max-height:76px;padding:7px 12px;margin-bottom:8px;gap:12px}
#shop #shop-items{max-height:58px;overflow:auto;gap:6px 12px}#shop .shop-item{font-size:16px}#shop .shop-item svg{width:26px;height:26px}
#shop #sell{min-width:150px;padding:10px 14px;font-size:18px}
#shop .tree-tabs{flex:none;gap:9px;margin-bottom:10px}#shop .tree-tab{min-height:44px;padding:6px 8px;gap:8px}#shop .tree-tab b{display:block;font-size:17px}
#shop .tree-tab span,#shop .tree-tab img,#shop .tree-tab svg{width:28px;height:28px}
#shop .skill-tree{flex:1;min-height:0;height:auto;position:relative;overflow:auto;padding:0 5px 9px;scrollbar-color:#d5b66c #1c3b49;scrollbar-width:thin;overscroll-behavior:contain}
#shop .skill-node{position:relative;inset:auto;transform:none;width:100%;height:auto;min-height:80px;display:grid;grid-template-columns:30px minmax(0,1fr);grid-template-rows:auto auto auto;column-gap:7px;row-gap:0;align-content:center;justify-items:start;align-items:center;text-align:left;padding:6px 9px;border-width:3px;opacity:1;flex-wrap:nowrap}
#shop .skill-node:not(:disabled):active{transform:translateY(3px)}
#shop .skill-node .node-icon{grid-column:1;grid-row:1/4;position:relative;width:30px;height:34px}
#shop .node-icon img,#shop .node-icon svg{width:30px;height:34px}
#shop .skill-node .node-name{grid-column:2;grid-row:1;width:auto;font-size:18px;font-weight:400;line-height:1.12;padding-right:6px;overflow-wrap:anywhere}
#shop .skill-node .node-stat{grid-column:2;grid-row:2;width:auto;font-size:14px;font-weight:400;line-height:1.15;text-align:left;color:#fff0d0;margin-top:2px}
#shop .skill-node .price{grid-column:2;grid-row:3;justify-self:end;margin:2px 0 0;font-size:16px;min-height:17px;color:#ffe3a0}
#shop .skill-node .tinycoin{width:15px;height:15px}
#shop .skill-node.locked{background:#3d5560;border-color:#223941;box-shadow:inset 0 3px 0 #59717b,inset 0 -3px 0 #2d424d,0 3px 0 #132b35}
#shop .skill-node.locked .node-name,#shop .skill-node.locked .node-stat,#shop .skill-node.locked .price{color:#c8d1cd}
#shop .node-mark{right:5px;top:3px;font-size:13px}
#shop .tree-root{display:flex;justify-content:center;position:relative;margin-bottom:20px}
#shop .root-node{width:min(290px,75%);min-height:54px;grid-template-columns:35px 1fr auto;grid-template-rows:auto auto;padding:5px 12px}
#shop .root-node .node-icon{grid-row:1/3}#shop .root-node .node-name{font-size:21px}#shop .root-node .node-stat{font-size:16px}
#shop .root-node .price{grid-column:3;grid-row:1/3;font-size:18px;margin-left:8px}
#shop .fork-families{display:grid;grid-template-columns:1fr 1fr;gap:24px;position:relative}
#shop .fork-family{min-width:0;position:relative}
#shop .branch-node{width:min(370px,100%);min-height:68px;margin:0 auto}
#shop .branch-node .node-name{font-size:20px}#shop .branch-node .node-stat{font-size:15px}
#shop .special-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;position:relative;padding-top:20px}
#shop .choice-column{min-width:0;position:relative}
#shop .capstone-pair{display:grid;gap:8px;position:relative;margin-top:14px;padding-left:13px}
#shop .capstone-node{min-height:78px}#shop .capstone-node .node-name{font-size:17px}#shop .capstone-node .node-stat{font-size:14px}
#shop .capstone-rune{position:absolute;right:-4px;top:-5px;font-style:normal;font-size:15px;text-shadow:1px 1px #182a32,-1px -1px #182a32}
#shop .tree-root:after,#shop .fork-family:before,#shop .special-grid:after,#shop .choice-column:before{content:'';position:absolute;width:0;border-left:4px solid #8ca5a1;left:50%;height:12px}
#shop .tree-root:after{bottom:-12px}#shop .fork-family:before{top:-12px}
#shop .fork-families:before,#shop .special-grid:before{content:'';position:absolute;left:25%;right:25%;border-top:4px solid #8ca5a1}
#shop .fork-families:before{top:-12px}#shop .special-grid:before{top:8px}#shop .special-grid:after{top:0;height:8px}#shop .choice-column:before{top:-12px}
#shop .capstone-pair:before{content:'';position:absolute;left:2px;top:-14px;bottom:38px;border-left:3px solid #8ca5a1}
#shop .capstone-node:before{content:'';position:absolute;left:-13px;top:50%;width:11px;border-top:3px solid #8ca5a1}
#shop .path-chosen:before,#shop .path-chosen>.special-grid:after,#shop .path-chosen>.special-grid:before{border-color:#efce72}
#shop #enter-mine{flex:none;margin-top:8px;min-height:46px;padding:8px 18px;font-size:20px}
@media(max-width:1000px){#shop .fork-families{grid-template-columns:1fr;gap:30px}#shop .fork-families:before{display:none}#shop .branch-node{width:min(420px,80%)}#shop .special-grid{gap:20px}#shop .fork-family:before{top:-16px;height:16px}#shop .skill-node .node-name{font-size:19px}#shop .capstone-node .node-name{font-size:18px}}
@media(max-width:600px){#shop{padding:6px}#shop .shop-window{height:calc(100dvh - 12px);padding:10px;border-width:4px}#shop .shop-title h1{font-size:28px}#shop .shop-gold strong{font-size:24px}#shop .tree-tabs{gap:4px}#shop .tree-tab{padding:5px 2px;min-height:44px}#shop .tree-tab b{display:none}#shop .shop-haul{padding:6px;gap:6px}#shop #sell{min-width:110px;padding:9px 8px;font-size:16px}#shop .shop-item{font-size:15px}#shop .special-grid{grid-template-columns:1fr;gap:24px;padding-top:18px}#shop .special-grid:before{display:none}#shop .choice-column:before{top:-12px}#shop .branch-node{width:100%}#shop .capstone-pair{padding-left:20px}#shop .capstone-pair:before{left:6px}#shop .capstone-node:before{left:-17px;width:15px}#shop .skill-node .node-name{font-size:20px}#shop .skill-node .node-stat{font-size:15px}#shop .skill-node .price{font-size:17px}#shop .capstone-node{min-height:82px}}
@media(min-width:1001px){#shop .skill-node{padding-top:5px;padding-bottom:5px}#shop .tree-root{margin-bottom:16px}#shop .special-grid{padding-top:16px}#shop .special-grid:before{top:4px}#shop .special-grid:after{height:4px}#shop .capstone-pair{margin-top:12px;gap:6px}}

/* Permanent fork choices use the same stone-and-gold dialog as the game controls. */
#fork-confirm{position:absolute;inset:0;z-index:9;display:grid;place-items:center;padding:18px;background:#14222cbb}
.fork-panel{width:min(510px,100%);max-height:calc(100dvh - 36px);overflow-y:auto;padding:27px 28px 29px;text-align:center;color:#ffe8bd}
#fork-choice-icon{display:grid;place-items:center;width:74px;height:74px;margin:0 auto 16px;border:3px solid #192b32;border-radius:15px 12px 16px 11px;background:#d4b473;box-shadow:inset 0 4px #f0d49b,inset 0 -4px #aa844b}
#fork-choice-icon svg,#fork-choice-icon img{width:52px;height:52px;stroke:#25322c;stroke-width:2.6;stroke-linejoin:round;stroke-linecap:round;fill:none}
.fork-panel h2{margin:0;font:400 31px/1.15 var(--game-font);color:#ffe3a1;text-shadow:0 3px #142e3b}
#fork-choice-lock{font-size:19px;line-height:1.35;margin:15px 0 24px;color:#f3d5bc}
.fork-actions{display:flex;gap:12px;justify-content:center}.fork-actions button{min-height:54px;font-size:20px;padding:11px 20px}.fork-actions .stone-button{color:#efdba8;min-width:112px}
#fork-choose{display:flex;align-items:center;justify-content:center;gap:24px;min-width:205px}#fork-choice-price{display:flex;align-items:center;gap:6px;white-space:nowrap;font-size:18px}
@media(max-width:430px){.fork-panel{padding:22px 17px}.fork-panel h2{font-size:27px}#fork-choice-lock{font-size:18px}.fork-actions{flex-direction:column-reverse}.fork-actions button{width:100%}}

.fork-actions .gold-button{color:var(--ink)}
@media(max-height:500px){.fork-panel{padding:16px 22px}#fork-choice-icon{width:50px;height:50px;margin-bottom:10px}#fork-choice-icon svg,#fork-choice-icon img{width:36px;height:36px}.fork-panel h2{font-size:26px}#fork-choice-lock{font-size:17px;margin:12px 0 16px}.fork-actions button{min-height:46px;padding:8px 15px}}

/* Fast-forward shares the stone controls; gold marks the active 2× state. */
#speed{position:relative}#speed svg{fill:#f3d9a4;stroke:#192b32;stroke-width:1.8}
#speed .speed-label{display:none;position:absolute;bottom:3px;left:0;right:0;text-align:center;font-size:12px;line-height:1;color:#192b32;pointer-events:none}
#speed[aria-pressed="true"]{background:#ebb13e;box-shadow:inset 0 3px #ffe08a,inset 0 -3px #b97b27,0 3px #14222b66}
#speed[aria-pressed="true"]:hover{background:#edbf65}#speed[aria-pressed="true"] svg{fill:#243d48;stroke:#243d48;transform:translateY(-5px)}
#speed[aria-pressed="true"] .speed-label{display:block}

/* Specializations stay neutral until their parent branch reaches rank three. */
#shop .skill-node.prerequisite-locked{background:#535b5d;border-color:#2d3a3d;box-shadow:inset 0 3px #778080,inset 0 -3px #394245,0 3px #132b35}
#shop .skill-node.prerequisite-locked .node-icon{grid-row:1/5;filter:grayscale(1)}
#shop .skill-node.prerequisite-locked .node-name,#shop .skill-node.prerequisite-locked .node-stat,#shop .skill-node.prerequisite-locked .price{color:#d5dcd7}
#shop .skill-node .node-requirement{grid-column:2;grid-row:3;font-size:15px;line-height:1.2;color:#ffe0a6;margin-top:5px;overflow-wrap:anywhere}
#shop .skill-node.prerequisite-locked .price{grid-row:4}

/* Prestige shares the carved stone shop, with amethyst and gold for permanent rewards. */
#shop .shop-pages{display:flex;gap:8px;align-items:center}
#shop .shop-page-button{display:flex;align-items:center;gap:6px;min-height:47px;padding:6px 15px;border:3px solid #1c3039;border-radius:10px 13px 9px 12px;background:#365665;box-shadow:inset 0 3px #587e8b,inset 0 -3px #233f4d;color:#c3d4d0;font-size:24px}
#shop .shop-page-button img{width:31px;height:31px}
#shop .shop-page-button[aria-pressed="true"]{color:#ffe6b0;border-color:#e7c571;background:#526b76}
#shop #shop-prestige[aria-pressed="true"]{background:#78547e;box-shadow:inset 0 3px #ad82ac,inset 0 -3px #50395d}
#standard-shop{display:flex;flex-direction:column;flex:1;min-height:0}
#sell-multiplier{color:#5a3d5c;padding-left:5px;font-weight:400}
#prestige-shop{display:grid;grid-template-columns:minmax(270px,.9fr) minmax(300px,1.2fr);gap:20px;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:8px 4px 14px;scrollbar-color:#d5b66c #1c3b49}
.prestige-altar,.prestige-future{border:4px solid #1c3039;border-radius:17px 12px 19px 13px;box-shadow:inset 0 5px #92688f,inset 0 -6px #3e334e,0 4px #142f3b;background:#59455f;color:#ffecc9}
.prestige-altar{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:18px 22px;gap:10px}
.prestige-crest{width:clamp(90px,13vh,140px);height:clamp(90px,13vh,140px);filter:drop-shadow(0 5px #251f2c55)}
.prestige-altar h1{font-size:34px;font-weight:400;margin:0;color:#f3ce83;text-shadow:0 3px #2d2739}
.prestige-bonus{width:min(320px,100%);padding:9px 15px;border:3px solid #302f3c;border-radius:9px 13px 10px 8px;background:#403747;box-shadow:inset 0 3px #65506a;text-align:center}
.prestige-bonus>span{font-size:18px;color:#e0c2d8}
.prestige-bonus strong{display:flex;gap:22px;align-items:center;justify-content:center;font-size:36px;font-weight:400;line-height:1.15;margin-top:4px}
.prestige-bonus b{font-weight:400}.prestige-bonus b:first-child{color:#b5c4bc}.prestige-bonus b:last-child{color:#ffe292}.prestige-bonus i{font-size:26px;font-style:normal;color:#bc9dc2}
.prestige-earn{display:flex;align-items:center;justify-content:center;gap:7px;font-size:20px;color:#efcfed}.prestige-earn img{width:28px;height:28px}
#prestige-buy{color:#192b32;width:min(320px,100%);display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:57px;font-size:23px;padding:11px 18px;font-weight:400;flex:none}
#prestige-buy>span{display:flex;align-items:center;gap:7px;font-size:21px;white-space:nowrap}#prestige-buy:disabled{background:#81716f;box-shadow:inset 0 4px #a2948a,inset 0 -4px #5b4e55;color:#e2d8c4;opacity:1}
.prestige-reset{margin:0;font-size:16px;color:#d0b4cc;text-align:center}
.prestige-future{background:#344a57;box-shadow:inset 0 5px #58707f,inset 0 -6px #233541;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:25px 20px;position:relative;gap:30px}
.prestige-future-title{display:flex;align-items:center;flex-direction:column;gap:12px}.prestige-future h2{font-size:30px;font-weight:400;margin:0;text-align:center;color:#eed9b1}
.prestige-point-bank{display:flex;align-items:center;justify-content:center;gap:6px;padding:4px 16px 5px;border:3px solid #263540;border-radius:10px 8px 12px 9px;background:#63496c;box-shadow:inset 0 3px #89638f;font-size:21px;color:#edcfef}.prestige-point-bank strong{font-weight:400;color:#ffe7b1;font-size:26px}.prestige-point-bank img{width:32px;height:32px}
.prestige-locked-art{display:flex;gap:14px;justify-content:center;align-items:center;width:100%}.prestige-locked-art>div{width:80px;height:88px;display:grid;place-items:center;border:3px solid #22343c;border-radius:13px 9px 14px 11px;background:#425462;box-shadow:inset 0 4px #5c6b76,inset 0 -4px #2c404d;transform:rotate(-8deg)}.prestige-locked-art>div:nth-child(2){width:96px;height:104px;transform:translateY(-10px)}.prestige-locked-art>div:nth-child(3){transform:rotate(8deg)}.prestige-locked-art img,.prestige-locked-art svg{width:58px;height:66px;filter:grayscale(.45);opacity:.6}.prestige-locked-art>div:nth-child(2) svg{width:70px;height:70px}
.prestige-soon{display:flex;align-items:center;gap:10px;color:#c8b6d4}.prestige-soon svg{width:25px;height:30px;fill:#af91bc;stroke:#23333d;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.prestige-soon h3{margin:0;font-size:30px;font-weight:400}
#prestige-confirm{position:absolute;inset:0;z-index:10;display:grid;place-items:center;padding:18px;background:#14222cbb}
.prestige-confirm-panel{padding:22px 27px 28px;width:min(550px,100%);max-height:calc(100dvh - 36px);overflow-y:auto;text-align:center;color:#f7dcb8}
.prestige-confirm-panel>img{width:94px;height:94px}.prestige-confirm-panel h2{font-size:34px;font-weight:400;color:#ffe0a0;margin:0 0 14px}.prestige-confirm-panel p{font-size:19px;line-height:1.4}.prestige-confirm-panel #prestige-confirm-reward{font-size:24px;color:#edcaf1;margin:0 0 16px}.prestige-confirm-panel #prestige-confirm-reset{margin:0 0 22px}.prestige-confirm-panel .gold-button{display:flex;gap:6px;align-items:center}
@media(max-width:740px){#prestige-shop{grid-template-columns:1fr;gap:16px}.prestige-altar{padding:18px;gap:10px}.prestige-future{padding:24px 14px;gap:22px}.prestige-crest{width:94px;height:94px}.prestige-future h2{font-size:27px}#shop .shop-page-button{font-size:21px;padding:6px 10px;min-height:44px}#shop .shop-page-button img{width:26px;height:26px}#shop .shop-pages{gap:5px}.prestige-confirm-panel{padding:18px}.prestige-confirm-panel .fork-actions{flex-direction:column-reverse}.prestige-confirm-panel .fork-actions button{justify-content:center}}
@media(max-width:420px){#shop .shop-page-button{font-size:19px;padding:6px 8px}#shop .shop-page-button img{display:none}#shop .shop-gold strong{font-size:21px}#shop .shop-gold{gap:5px}}
@media(max-height:580px) and (min-width:741px){.prestige-altar{gap:6px;padding:12px}.prestige-crest{width:64px;height:64px}.prestige-altar h1{font-size:27px}.prestige-bonus{padding:5px 10px}.prestige-bonus strong{font-size:29px}.prestige-earn{font-size:18px}#prestige-buy{min-height:46px;font-size:21px;padding:8px 14px}.prestige-reset{font-size:14px}.prestige-future{gap:18px;padding:15px}.prestige-locked-art>div{height:64px;width:64px}.prestige-locked-art>div:nth-child(2){height:80px;width:80px}.prestige-future h2{font-size:26px}}

.pause-logo{display:block;width:min(280px,65vw);height:auto;margin:-12px auto 8px}.pause-panel:has(.pause-logo){max-height:calc(100dvh - 24px);overflow-y:auto}
