@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root{font-family:'DM Sans',sans-serif;color:#17302d;font-size:14px;--ink:#090b10;--gold:#d7b777;--surface-y:62vh;--grid-size:350px}*{box-sizing:border-box}html,body{width:100%;height:100%;height:100dvh;margin:0;overflow:hidden}body{background:#70b9e7}button,a,input{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;touch-action:manipulation}button:disabled{cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #ffcc76;outline-offset:3px}button{color:inherit}button[hidden],[hidden]{display:none!important}button{border:0}h1,h2,p{margin:0}button svg{pointer-events:none}.landscape{position:fixed;inset:0;background:linear-gradient(#1876be26,#bfe5ff0a),url('./assets/hills.webp') center center/cover;z-index:-2}.earth{position:fixed;top:var(--surface-y);bottom:0;left:0;right:0;background:linear-gradient(#77b735 0 6px,#398322 6px 14px,#a98456 14px 90px,#c2a076 90px 150px,#785337 150px);border-top:3px solid #b7dd5c;z-index:-1}.earth:after{content:'';position:absolute;inset:14px 0 0;background-image:radial-gradient(#3e2c1e38 1px,transparent 1px),radial-gradient(#f0d4a326 2px,transparent 2px);background-size:17px 19px,41px 31px}
.layout{display:grid;grid-template-columns:clamp(280px,26vw,390px) minmax(250px,1fr) clamp(250px,23vw,340px);height:100%;width:100%;gap:0}.blacksmith{background:var(--ink);color:#f2eee5;padding:22px 24px 16px;display:flex;flex-direction:column;gap:14px;min-height:0;box-shadow:7px 0 25px #18251f33;z-index:12}.forge-brand{display:flex;justify-content:space-between;align-items:center;font:700 18px 'Space Grotesk',sans-serif;letter-spacing:3px}.forge-brand a{color:#eee5d4;text-decoration:none}.forge-brand span{font:11px 'DM Sans',sans-serif;letter-spacing:0;color:#777f8d}.smith-scene{height:clamp(110px,19vh,210px);flex-shrink:0;display:flex;justify-content:center}.smith-scene svg{height:100%;width:auto;max-width:100%}.forge-title{font:600 23px 'Space Grotesk',sans-serif}.upgrade-tabs{display:flex;gap:4px;border-bottom:1px solid #30333d;padding-bottom:8px}.upgrade-tabs button{flex:1;padding:12px 4px;border-radius:6px;background:transparent;color:#b1b8c5;font-size:14px;font-weight:700}.upgrade-tabs .active{background:#2a2830;color:#efcb8b}.upgrades{display:grid;gap:12px;min-height:0}.upgrade{border:1px solid #30333e;background:#13161e;border-radius:10px;padding:14px}.upgrade-top{display:flex;gap:11px;align-items:center}.upgrade-icon{display:grid;place-items:center;flex:0 0 36px;height:36px;background:#282633;border:1px solid #4e4356;border-radius:8px;color:#e4bf7b;font-size:23px}.upgrade-title{display:flex;flex-direction:column;gap:5px}.upgrade-title b{font-size:16px}.upgrade-title small{font-size:12px;color:#d0b68d}.upgrade p{color:#aeb7c8;font-size:13px;line-height:1.45;margin:10px 0}.upgrade-buy{display:flex;justify-content:space-between;align-items:center;width:100%;min-height:44px;background:#2d303a;color:#8991a1;padding:10px 12px;border-radius:6px;font-weight:700;font-size:14px}.upgrade-buy.can-buy{background:#d5b476;color:#211c13;box-shadow:0 3px 0 #8e7043}.upgrade-buy.can-buy:hover{background:#edcc92}.pager{display:flex;justify-content:center;align-items:center;gap:20px;min-height:36px;font-size:12px}.pager button{width:42px;height:34px;border-radius:6px;background:#d2e2d9;color:#183128;font-size:19px}.pager button:disabled{opacity:.3}.blacksmith .pager{color:#9da5b5;margin-top:auto}.blacksmith .pager button{background:#252935;color:#e4c38b}.auto-controls{font-size:13px;color:#c8cdda}.auto-controls input{accent-color:#d5b476;vertical-align:middle;width:18px;height:18px}.forge-toggle{display:none}.hammer{transform-origin:67px 170px;animation:hammer 2s ease-in-out infinite}.sparks{animation:spark 2s linear infinite}.flame,.flame-inner{transform-origin:240px 240px;animation:flame 1.2s ease-in-out infinite alternate}@keyframes hammer{0%,55%,100%{transform:rotate(0)}30%{transform:rotate(25deg)}40%{transform:rotate(-7deg)}}@keyframes spark{0%,35%,55%,100%{opacity:0}40%,47%{opacity:1}}@keyframes flame{to{transform:scale(.93,1.08);opacity:.8}}
.operation{position:relative;min-width:0;min-height:0;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:18px 12px;isolation:isolate}.board{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(5,minmax(0,1fr));gap:4px;width:var(--grid-size);height:var(--grid-size);flex-shrink:0;padding:6px;background:#daeffb48;border:1px solid #e7faff8c;border-radius:12px;box-shadow:0 10px 40px #1a587f20,inset 0 0 30px #e4f5ff30;backdrop-filter:blur(3px);touch-action:none}.slot{position:relative;display:grid;place-items:center;aspect-ratio:1;background:#dceefc50;border:1px solid #f6fbff8c;border-radius:7px;padding:0;overflow:visible;transition:background .12s,box-shadow .12s}.slot:hover{background:#eff9ff8c}.slot .tool-icon{height:85%;width:85%;display:block;pointer-events:none;filter:drop-shadow(1px 3px 2px #20353c45)}.tool-icon svg{width:100%;height:100%}.slot .level{position:absolute;bottom:3px;right:5px;font:bold 10px 'Space Grotesk',sans-serif;color:#244350}.slot.empty{background:#c4e1f62e;border:1px dashed #f4fbff75}.slot.selected,.slot.dragover{box-shadow:inset 0 0 0 3px #ffe3a0;background:#fff0b45c}.slot.match{box-shadow:inset 0 0 0 2px #ffffc7}.slot.buffed:after{content:'✦';position:absolute;top:2px;left:4px;color:#ffe3a0;text-shadow:0 1px 2px #4b4727;font-size:12px}.slot.placement{box-shadow:inset 0 0 0 3px #c0ffbc;background:#7fed9a7a}.slot.in-flight .tool-icon,.slot.in-flight .level{visibility:hidden}.slot.animating .tool-icon{opacity:.2}.slot.high-tier{background:#e4d5ff70}.board-actions{width:var(--grid-size);display:grid;grid-template-columns:1fr 1fr;gap:8px;flex-shrink:0;min-height:55px;z-index:3}.button{position:relative;min-height:55px;border-radius:8px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;overflow:hidden;box-shadow:0 3px 0 #254c3a44;padding:8px 4px;line-height:1.15}.button b{font:700 14px 'Space Grotesk',sans-serif}.button small{font-size:9px;font-weight:700;letter-spacing:1px}.button-content{z-index:1;display:flex;flex-direction:column;gap:3px;align-items:center}.spawn{background:#e6f6e5;color:#234c32}.spawn .fill{position:absolute;inset:0 auto 0 0;background:#b9dc9d;transition:width .1s linear}.spawn:disabled{color:#426242}.play{background:#1c4939;color:#f4f4da}.play:disabled{background:#36604a;color:#e0e9d4}.mine-viewport{width:var(--grid-size);height:var(--grid-size);flex-shrink:0;border:1px solid #4f4639;box-shadow:0 5px 18px #35261d50;touch-action:none;overflow:hidden}.mine-viewport canvas{display:block;width:100%;height:100%}#flight,#animationLayer{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:6}.action-ghost{position:absolute;display:block;pointer-events:none;filter:drop-shadow(0 3px 3px #10352f66)}.action-ghost svg{width:100%;height:100%}.merge-flash{position:absolute;border:3px solid #fff7b8;border-radius:50%;box-shadow:0 0 25px #ffd674}.rock-warning{position:absolute;top:51%;left:2%;right:2%;z-index:10;background:#221b16;color:#ffe6ad;border:2px solid #ebae57;box-shadow:0 8px 30px #211a1c80;padding:14px 8px;text-align:center;pointer-events:none;border-radius:6px;display:flex;flex-direction:column;gap:4px}.rock-warning b{font:700 clamp(16px,1.5vw,23px) 'Space Grotesk',sans-serif;letter-spacing:1px}.rock-warning span{font-size:12px}.placement-hint{position:absolute;top:5px;left:6px;right:6px;display:flex;align-items:center;justify-content:center;gap:8px;background:#16382a;color:#eaffdc;z-index:10;padding:9px;border-radius:8px;font-size:13px}.placement-hint button{background:#355e41;color:white;width:30px;height:30px;border-radius:50%}
.player-column{min-height:0;display:flex;flex-direction:column;gap:16px;padding:20px 20px 18px 8px;z-index:7}.player-info{background:#daf2fc88;backdrop-filter:blur(14px);border:1px solid #f1fcffb3;border-radius:14px;padding:16px;color:#183b37;box-shadow:0 8px 30px #254d5d13}.player-toolbar{display:flex;align-items:center;gap:4px}.save-state{flex:1;font-size:10px;line-height:1.3;color:#31564e}.icon-button{width:31px;height:31px;border-radius:50%;background:#eefaff80;font-weight:700}.icon-button:hover{background:#fffad9}.wallet{padding:18px 0 12px;border-bottom:1px solid #3c776326}.stat-label,.stats-grid span{display:block;font-size:10px;letter-spacing:1.2px;font-weight:700;color:#346258}.gold-total{display:flex;align-items:center;gap:9px;font:600 clamp(32px,3vw,48px) 'Space Grotesk',sans-serif;line-height:1.2}.coin{color:#b28635;font-size:25px;text-shadow:1px 2px #fbeb9b}#goldRate{font-size:12px;color:#36664f}.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px 8px;padding:15px 0}.stats-grid strong{display:block;font:600 24px 'Space Grotesk',sans-serif;margin-top:3px}.run-details{display:grid;grid-template-columns:1fr 1fr;gap:9px 12px;margin:0 0 16px;font-size:12px}.run-details div{display:flex;justify-content:space-between;gap:4px}.run-details dt{color:#3d6259}.run-details dd{margin:0;font-weight:700;font-variant-numeric:tabular-nums}.durability-line{display:flex;justify-content:space-between;font-size:11px}.durability-track,.speed-track{height:5px;background:#305a4c26;border-radius:5px;overflow:hidden;margin-top:6px}.durability-track span{display:block;height:100%;background:#356b49;transition:width .1s}.boost-button{margin-top:16px;background:#e5c276;color:#3b3019;border:1px solid #8d713c;width:100%;min-height:65px;border-radius:8px;display:flex;align-items:center;justify-content:space-between;text-align:left;padding:10px;touch-action:none;box-shadow:0 3px 0 #a78743}.boost-button span{display:flex;flex-direction:column;gap:6px}.boost-button b{font-size:13px}.boost-button small{font-size:8px;letter-spacing:.7px}.boost-button strong{font:700 22px 'Space Grotesk',sans-serif}.boost-button.held{background:#ffdb79;box-shadow:0 0 20px #ffe4a8}.boost-button:disabled{opacity:.65}.speed-track span{height:100%;display:block;background:#bb8230}.return-button{width:100%;padding:9px;font-size:11px;background:transparent;color:#34594c;margin-top:5px}.relic-area{margin-top:auto;background:#c7d9aaab;border:1px solid #edffd177;border-radius:12px;padding:14px;backdrop-filter:blur(8px);color:#233f29}.relic-area header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.relic-area h2{font:600 18px 'Space Grotesk',sans-serif}.bag-button{display:flex;align-items:center;gap:5px;background:#244934;color:#e6efd6;padding:5px 9px;border-radius:8px;font-size:12px}.bag-button svg{width:24px;height:24px}.relic-rack{display:grid;grid-template-columns:repeat(5,1fr);gap:5px}.relic-slot{display:grid;place-items:center;aspect-ratio:1;background:#183d2a36;border:1px solid #345b3f69;border-radius:6px;font-size:24px;text-shadow:0 1px 3px #173b31}.relic-slot.empty{font-size:20px;color:#41643e;text-shadow:none}.relic-slot.selected{outline:2px solid #ffed99;outline-offset:1px}.relic-detail{margin-top:10px;display:flex;flex-direction:column;gap:5px;font-size:12px}.relic-detail>span{font-size:10px}.relic-detail>div{display:flex;gap:6px;margin-top:3px}.relic-detail button{background:#e1ecc8;border:1px solid #56725055;padding:8px 10px;border-radius:5px;font-size:11px}.toast{position:fixed;bottom:20px;left:50%;transform:translate(-50%,15px);opacity:0;background:#112b23;color:#eef6da;border:1px solid #c0d095;max-width:calc(100vw - 24px);padding:12px 18px;border-radius:10px;box-shadow:0 8px 30px #19332f55;z-index:40;pointer-events:none;transition:.2s;font-size:13px}.toast.show{opacity:1;transform:translate(-50%,0)}
dialog{background:#e6eee0;color:#1f3e2c;border:1px solid #f5ffe9;border-radius:16px;box-shadow:0 20px 90px #081a26aa;padding:28px;width:min(580px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:hidden}dialog::backdrop{background:#09232d99;backdrop-filter:blur(5px)}dialog h2{font:600 28px 'Space Grotesk',sans-serif;margin-bottom:16px}.close-dialog{position:absolute;top:10px;right:10px;width:32px;height:32px;border-radius:50%;background:#bdcebb;font-size:23px}#helpContent{min-height:240px;font-size:15px;line-height:1.7}#helpContent h3{font-size:19px;margin:0 0 10px}#helpContent p{margin-bottom:14px}#bagCaption{font-size:13px;margin-bottom:16px}.bag-items{display:grid;grid-template-columns:1fr 1fr;gap:10px;min-height:180px}.bag-item{display:flex;gap:12px;align-items:center;text-align:left;background:#ccdcc5;padding:16px;border:1px solid #a0b79c;border-radius:9px;min-height:94px}.bag-item .symbol{font-size:33px;text-shadow:0 2px 3px #274f3a}.bag-item b,.bag-item small{display:block}.bag-item b{font-size:14px}.bag-item small{font-size:11px;margin:6px 0;line-height:1.4}.bag-empty{grid-column:1/-1;align-self:center;text-align:center;line-height:1.7;color:#526d53;font-size:15px}
@media(min-height:950px){.upgrades{gap:14px}.upgrade{padding:16px}.blacksmith{gap:18px}.smith-scene{height:190px}}
@media(max-height:780px){.blacksmith{padding:15px 20px;gap:10px}.smith-scene{height:100px}.forge-title{font-size:21px}.upgrade{padding:12px}.player-column{padding-top:12px;padding-bottom:12px;gap:10px}.player-info{padding:12px}.wallet{padding:9px 0}.stats-grid{padding:10px 0;gap:10px}.stats-grid strong{font-size:22px}.run-details{gap:6px;font-size:11px;margin-bottom:10px}.boost-button{min-height:55px;margin-top:10px}.relic-area{padding:10px}}
@media(max-height:630px) and (min-width:761px){.smith-scene{display:none}.forge-brand{font-size:16px}.blacksmith{gap:8px}.upgrade p{margin:7px 0}.upgrade-title b{font-size:14px}.player-toolbar{height:28px}.wallet{display:grid;grid-template-columns:1fr auto;align-items:center;padding:7px 0}.gold-total{grid-row:1/3;grid-column:2;font-size:30px}.stats-grid{gap:6px;padding:8px 0}.stats-grid strong{font-size:20px}.run-details{margin-bottom:7px}.boost-button{min-height:46px}.relic-detail>span{display:none}.relic-area header{margin-bottom:4px}.relic-rack{max-width:250px}}
@media(max-width:1100px) and (min-width:761px){.layout{grid-template-columns:280px minmax(200px,1fr) 250px}.blacksmith{padding-left:16px;padding-right:16px}.player-column{padding-right:12px}.player-info{padding:12px}.board-actions .button b{font-size:12px}.board-actions .button small{font-size:8px}}
@media(max-width:760px){.layout{display:block;position:relative}.operation{position:absolute;inset:91px 0 95px;height:auto;padding:6px 8px;gap:7px}.blacksmith{position:fixed;left:0;top:0;bottom:0;width:min(350px,92vw);transform:translateX(-105%);transition:transform .2s;padding-top:54px}.blacksmith.open{transform:translateX(0)}.smith-scene{height:105px}.forge-brand{font-size:16px}.forge-title{font-size:21px}.forge-toggle{display:block;position:fixed;top:8px;left:8px;z-index:20;background:#0b1018;color:#e7d4a9;padding:9px 12px;border-radius:7px;font-size:12px;min-height:34px}.player-column{display:contents}.player-info{position:absolute;top:0;left:0;right:0;height:88px;border-radius:0;padding:6px 9px 6px 126px;display:grid;grid-template-columns:1fr auto;gap:2px;background:#d6eff9bf}.player-toolbar{position:absolute;left:9px;top:48px;gap:4px}.save-state{display:none}.icon-button{width:30px;height:30px}.wallet{border:0;padding:0;display:flex;gap:5px;align-items:center}.wallet>.stat-label{display:none}.gold-total{font-size:24px;gap:5px}.coin{font-size:16px}#goldRate{font-size:9px;max-width:70px}.stats-grid{grid-column:1/3;display:flex;justify-content:space-between;gap:9px;padding:3px 0 0}.stats-grid span{font-size:7px;letter-spacing:.5px}.stats-grid strong{font-size:15px;margin-top:2px}.run-details,.durability-line,.durability-track,.speed-track{display:none}.boost-button{position:absolute;right:8px;top:7px;width:57px;min-height:29px;height:29px;padding:3px 6px;margin:0;box-shadow:none}.boost-button span{display:none}.boost-button strong{font-size:16px}.return-button{display:none!important}.relic-area{position:absolute;bottom:0;left:0;right:0;height:89px;display:grid;grid-template-columns:62px 1fr;gap:8px;padding:8px 12px;border-radius:0;background:#a5bf88db}.relic-area header{flex-direction:column;justify-content:center;gap:5px;margin:0}.relic-area h2{font-size:12px}.bag-button{padding:2px 7px}.bag-button svg{width:21px;height:21px}.relic-rack{align-self:center;max-width:340px;gap:6px}.relic-slot{max-height:58px}.relic-detail{position:absolute;bottom:96px;right:10px;background:#e1edce;border:1px solid #78966d;border-radius:8px;padding:10px;width:210px;z-index:9}.board-actions{min-height:42px;gap:6px}.button{min-height:42px;padding:5px}.button b{font-size:12px}.button small{font-size:8px;letter-spacing:.5px}.board{padding:4px;gap:3px;border-radius:8px}.slot{border-radius:5px}.slot .level{font-size:8px;bottom:2px;right:3px}.slot.buffed:after{font-size:9px}.rock-warning{top:51%;padding:11px 5px}.rock-warning b{font-size:17px}.rock-warning span{font-size:10px}.toast{bottom:100px;font-size:12px;width:max-content;max-width:90vw;text-align:center}.placement-hint{font-size:11px;padding:5px;top:0}.bag-items{gap:8px}.bag-item{padding:10px;gap:7px}.bag-item .symbol{font-size:26px}.bag-item b{font-size:12px}.bag-item small{font-size:10px}dialog{padding:24px 18px}#helpContent{font-size:14px;min-height:290px}.blacksmith .pager{margin-top:auto}}
@media(max-height:620px) and (max-width:760px){.smith-scene{display:none}.blacksmith{gap:9px}.upgrade p{display:none}.upgrade-title{margin-bottom:8px}.upgrade{padding:10px}.forge-title{display:none}#helpContent{min-height:0;font-size:12px;line-height:1.5}dialog h2{font-size:23px}.bag-item{min-height:80px}.bag-items{min-height:120px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
@media(max-height:480px) and (min-width:761px){.blacksmith{padding:12px 16px;gap:6px}.forge-title{font-size:18px}.upgrade-tabs{padding-bottom:4px}.upgrade-tabs button{padding:8px 4px}.upgrade p{display:none}.upgrade-top{margin-bottom:10px}.upgrade{padding:10px}.player-column{padding:8px 10px 8px 6px;gap:6px}.player-info{padding:8px}.player-toolbar{height:24px}.icon-button{width:24px;height:24px}.wallet{padding:4px 0}.gold-total{font-size:26px}.stats-grid{padding:6px 0;gap:4px}.stats-grid strong{font-size:18px}.stats-grid span{font-size:8px}.run-details{display:none}.durability-line{font-size:10px}.boost-button{min-height:42px;margin-top:6px;padding:6px}.return-button{padding:5px;margin:0}.relic-area{padding:8px}.relic-area header{margin-bottom:4px}.relic-area h2{font-size:14px}.bag-button{padding:2px 6px}.bag-button svg{height:20px}.relic-slot{max-height:41px}.relic-detail{position:absolute;bottom:105px;right:12px;width:215px;background:#e1edce;border-radius:8px;padding:10px;border:1px solid #78966d}}
@media(max-height:480px){dialog{padding:18px;max-height:calc(100dvh - 20px)}dialog h2{font-size:22px;margin-bottom:10px}#helpContent{min-height:0;font-size:12px;line-height:1.45}#helpContent h3{font-size:16px;margin-bottom:8px}#helpContent p{margin-bottom:10px}.bag-item{min-height:68px;padding:8px}.bag-items{min-height:80px;gap:7px}#bagCaption{margin-bottom:8px}}
.landscape:after{content:'';position:absolute;inset:0;background:linear-gradient(#090d3bea,#291f4dbb);opacity:var(--night,0);transition:opacity 2s;pointer-events:none}.earth{filter:brightness(calc(1 - var(--night,0)*.45));transition:filter 2s}#applyRelic{background:#e5c276;color:#253b25;border-radius:8px;padding:10px;font-size:12px;font-weight:bold}#applyRelic:disabled{opacity:.55}.relic-area header{gap:8px}.relic-slot{cursor:default}#dragGhost{position:fixed;width:65px;height:65px;transform:translate(-50%,-50%) rotate(10deg);pointer-events:none;z-index:100;filter:drop-shadow(0 8px 8px #152a3277)}#dragGhost svg{width:100%;height:100%}#resetMaze{position:relative;width:320px;max-width:100%;height:140px;margin:20px auto;touch-action:none}#resetMaze svg{width:100%;height:100%}#resetBall{position:absolute;width:20px;height:20px;border-radius:50%;transform:translate(-50%,-50%);background:#ffca70;border:2px solid #fff0b0;touch-action:none}#resetConfirm{padding:12px 18px;border-radius:7px;background:#a83232;color:white}#resetConfirm:disabled{opacity:.35}#resetMessage{font-size:12px;margin-top:10px}@media(max-width:760px){.relic-area{grid-template-columns:100px 1fr}.relic-area header{display:grid;grid-template-columns:1fr auto;gap:3px}#applyRelic{grid-column:1/3;padding:5px;font-size:10px}.player-toolbar{gap:1px}.icon-button{width:26px;height:26px}}
.relic-area{display:grid;grid-template-columns:68px minmax(0,1fr) 34px;gap:8px}.relic-area header{display:contents}.relic-area h2{grid-column:1/3;grid-row:1}.relic-area .bag-button{grid-column:3;grid-row:1;justify-self:end}.relic-rack{grid-column:2/4;grid-row:2;align-self:center}#applyRelic{grid-column:1;grid-row:2;align-self:stretch;padding:7px 4px;font-size:11px}.relic-detail{grid-column:1/-1}@media(max-width:760px){.relic-area{grid-template-columns:75px minmax(0,1fr) 36px;gap:4px}.relic-area header{display:contents}.relic-area h2{align-self:center}#applyRelic{grid-column:1;grid-row:2;min-height:36px}.relic-rack{width:100%;max-width:none}.bag-button svg{height:18px}.relic-slot{font-size:21px}}

/* Dawn, shared encounter timing and relic spells */
#sun{position:fixed;left:58%;top:10%;width:64px;height:64px;border-radius:50%;background:#fff2a6;box-shadow:0 0 55px 16px #ffed9b99;pointer-events:none;transform:translateY(calc(var(--sun-height,0)*40vh));z-index:0}.landscape:after,.earth{transition:none}.mine-viewport{position:relative}.rock-warning{background:rgba(34,27,22,.7);border-color:#ffe25b;color:#fff2a0}.rock-warning b{color:#ffe052}
#patchHealth{position:absolute;top:5px;left:5px;right:5px;text-align:center;color:#fff1b0;background:#181c24d9;padding:6px;font:bold 11px sans-serif;z-index:8;pointer-events:none}#timingCue{position:absolute;inset:24% 10% auto;min-height:120px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;z-index:9;pointer-events:none;color:white;text-shadow:0 2px 5px black}#timingCue b{font:bold clamp(18px,2vw,28px) sans-serif;background:#17212bea;padding:8px 12px;border-radius:8px;z-index:1}#timingCue small{background:#17212bea;padding:4px 8px;z-index:1;font-size:11px}.timing-ring{position:absolute;width:80px;height:80px;border:5px solid #ffdc68;border-radius:50%;transform:scale(var(--ring-scale,1.8));box-shadow:0 0 18px #fede7955}#timingCue.ready .timing-ring{border-color:#83ff79;background:#53b53d55;box-shadow:0 0 25px #83ff79}#timingCue.ready b{color:#a1ff96}
.spells{padding:11px;background:#d9e8f1c7;border:1px solid #ecf8ff;border-radius:10px;display:grid;grid-template-columns:1fr auto;gap:7px;color:#243a43}.spells h2{font:600 17px 'Space Grotesk',sans-serif}.spells small{grid-column:1/-1;font-size:11px}.spells button{background:#34455a;color:#f3ecff;border-radius:6px;padding:8px;font-weight:bold;font-size:11px}.spells button:disabled{opacity:.55}#keeperBtn{grid-column:1/-1;grid-row:3;background:#254934;color:#f3efcd;border-radius:5px;font-size:11px;min-height:27px}.player-column{gap:9px}.relic-area{margin-top:auto}#tileInspector{position:fixed;right:calc(clamp(250px,23vw,340px) + 10px);top:17%;background:#111722f5;color:#e6e8ef;border:1px solid #a2b6b9;border-radius:9px;padding:15px;width:240px;max-height:45vh;overflow:auto;z-index:22;font-size:12px;box-shadow:0 8px 30px #14213177}#tileTitle{font-size:16px}#tileBuffs p{margin:10px 0 0;line-height:1.6}#closeInspector{float:right;border-radius:50%;width:25px;height:25px;background:#38414d;color:white;font-size:19px}
@media(max-width:760px){.spells{position:absolute;bottom:116px;left:8px;right:8px;padding:6px 9px;gap:3px;min-height:47px}.spells h2{font-size:14px}.spells small{font-size:9px}.spells button{padding:5px 8px}.operation{bottom:171px}.relic-area{height:110px}#keeperBtn{min-height:21px;font-size:10px}#tileInspector{right:10px;top:100px;width:215px;max-height:30vh}#timingCue{inset:19% 5% auto;min-height:100px}#patchHealth{font-size:9px;padding:4px}}
@media(max-height:650px) and (min-width:761px){.spells{padding:6px;gap:4px}.spells small{display:none}.player-column{gap:6px}.stats-grid{gap:6px}.relic-area{padding:7px}.run-details{display:none}}

/* Avoid repainting blurred backdrops beneath every animated frame. */
.board,.player-info,.relic-area{backdrop-filter:none}.board{background:#d6edfa66}.player-info{background:#daf2fcd9}.relic-area{background:#c7d9aad9}.timing-target{position:absolute;width:80px;height:80px;border:2px solid #fff7bd;border-radius:50%;box-shadow:0 0 0 4px #15252f99}.timing-ring{will-change:transform}#timingCue.ready .timing-target{border-color:#b5ffa7;background:#8dff7833}

.tool-sprite{display:block;width:100%;height:100%;background-image:url('./assets/tools-v6.webp');background-size:400% 400%;background-repeat:no-repeat;pointer-events:none}.slot,.tool-icon,.tool-sprite{user-select:none;-webkit-user-drag:none}#dragGhost{will-change:transform;contain:layout paint;filter:none}.slot.legendary{box-shadow:inset 0 0 0 2px #bd7dff;background:#ae70d64f}.slot.legendary:after{color:#e6b7ff;text-shadow:0 0 5px #7900ff}.relic-slot.legendary{border:2px solid #b876ee;background:#6c3a9855;color:#e4b6ff!important}.relic-flight{position:absolute;pointer-events:none;background-image:url('./assets/effects-v6.webp');background-size:400% 200%;background-position:0 100%;animation:relicOrbit .48s step-end infinite;will-change:transform;z-index:10}@keyframes relicOrbit{0%{background-position:0 100%}25%{background-position:33.333% 100%}50%{background-position:66.666% 100%}75%,100%{background-position:100% 100%}}#tileInspector{pointer-events:none;top:auto;bottom:24px;right:calc(clamp(250px,23vw,340px) + 12px)}#closeInspector{display:none}.smith-scene.blessing{animation:smithBless .7s ease-out}@keyframes smithBless{40%{filter:drop-shadow(0 0 15px #fbd67b);transform:scale(1.05)}}#bossControls{position:absolute;bottom:7px;left:7px;right:7px;z-index:11;display:flex;align-items:center;justify-content:space-between;gap:8px;background:#151728ed;border:1px solid #aa82bb;border-radius:7px;padding:6px;color:#efe2ff;font-size:11px}#dodgeBtn{background:#dfa66c;color:#251c25;border-radius:5px;min-height:38px;min-width:78px;font-weight:bold}#dodgeBtn:disabled{opacity:.45}#timingCue.danger .timing-ring{border-color:#ff7e63;background:#e13e1833}#timingCue.danger .timing-target{border-color:#ffb36d}.spells{grid-template-columns:1fr 30px}.spells h2{grid-column:1}.spells #transferSpell{grid-column:1/-1;grid-row:2}.spells #blessingSpell{grid-column:1;grid-row:4}#blessingUpgrade{grid-column:2;grid-row:4;font-size:18px}#blessingHint{grid-row:5}.spells{padding:8px;gap:4px}.spells small{font-size:10px}.player-column{gap:7px}.spells button{min-height:32px}.player-info .run-details{gap:5px;margin-bottom:8px}
@media(min-width:761px) and (max-height:800px){.player-info .run-details{display:none}.player-info .wallet{padding:6px 0}.player-info .stats-grid{padding:8px 0;gap:7px}.spells{margin-top:auto}.relic-area{margin-top:0}}
@media(max-width:760px){.spells{bottom:116px;min-height:84px;grid-template-columns:1fr 30px;padding:6px 9px}.spells h2{display:none}.spells #transferSpell{grid-row:1;grid-column:1}.spells #spellHint{display:none}.spells #blessingSpell{grid-row:2}.spells #blessingUpgrade{grid-row:2}.spells #blessingHint{grid-row:3}.operation{bottom:207px}#tileInspector{bottom:210px;right:8px;top:auto;width:210px}#bossControls{font-size:9px;padding:4px}#dodgeBtn{min-width:64px;min-height:32px}}
@media(min-width:761px) and (max-height:550px){.spells{grid-template-columns:1fr 30px;padding:5px}.spells h2,.spells small{display:none}.spells #transferSpell{grid-row:1}.spells #blessingSpell,.spells #blessingUpgrade{grid-row:2}.player-info .boost-button{min-height:36px}.player-info .stats-grid strong{font-size:17px}.relic-area{padding:5px}}
/* v0.7: one-screen specialists and a larger mine */
.blacksmith{padding:12px 14px;gap:8px}.forge-brand{font-size:15px}.smith-scene{height:120px;min-height:70px;position:relative}.smith-scene svg{display:none}.smith-scene:after{content:'';display:block;width:150px;height:120px;background:url('./assets/staff-v7.webp') 0 0/400% 300%;background-repeat:no-repeat}.smith-scene[data-vendor=jeweler]:after{background-position-y:50%}.smith-scene[data-vendor=acolyte]:after{background-position-y:100%}.smith-scene[data-vendor=excavator]:after{background-image:url('./assets/entities-v7.webp');background-size:400% 200%;background-position:33.333% 100%}.smith-scene.working:after{animation:forgeStrike .55s step-end}.forge-title{font-size:19px}.vendor-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:3px}.vendor-tabs button{padding:9px 2px;font-size:11px;background:#181d29;color:#b6c3d0;border-radius:5px}.vendor-tabs button.active{background:#d5b476;color:#181b21}.upgrades{grid-template-columns:1fr 1fr;gap:5px;align-content:start}.compact-upgrade{display:flex;text-align:left;flex-direction:column;justify-content:space-between;gap:3px;min-height:48px;padding:7px;border:1px solid #343744;border-radius:6px;background:#222635;color:#f6e3b9}.compact-upgrade:disabled{color:#a4adbc;background:#121620}.compact-upgrade span{display:flex;flex-direction:column;gap:3px}.compact-upgrade b{font-size:12px;font-weight:600}.compact-upgrade small{font-size:10px;color:#bbc5d0;line-height:1.2}.compact-upgrade em{font-size:10px;font-style:normal;color:#eac487;align-self:flex-end}.compact-upgrade:hover:not(:disabled){background:#3e3a3c}.blacksmith #upgradePager,.staff-art,.upgrade-tabs{display:none!important}#conductorTarget,#excavatorService{padding:8px;background:#344059;color:#eee;border-radius:4px;font-size:11px}#excavatorStatus{font-size:10px;color:#a8b5c9;line-height:1.4}.blacksmith:has([data-vendor=excavator].active) #excavatorStatus{display:block}#excavatorStatus{display:none}@keyframes forgeStrike{0%{background-position-x:0}25%{background-position-x:33.333%}50%{background-position-x:66.666%}70%,95%{background-position-x:100%}100%{background-position-x:0}}
.operation{gap:8px;justify-content:center;padding:8px 10px}.board{height:calc(var(--grid-size)*.6);grid-template-rows:repeat(3,minmax(0,1fr));padding:0;gap:0;border:0;border-radius:5px}.slot{border-radius:4px;margin:2px;aspect-ratio:auto}.mine-viewport{width:var(--grid-size);height:calc(var(--grid-size)*1.4);flex-shrink:0;aspect-ratio:5/7}#mine{width:100%;height:100%;aspect-ratio:5/7}.board-actions{width:100%;gap:6px;min-height:48px}.board-actions .button{min-height:48px}.player-column{position:relative;padding-top:12px}.player-info{padding:12px}.player-info .wallet{padding:4px 0}.player-info .gold-total{font-size:32px}.currencies{display:flex;gap:18px;align-items:center;font-size:16px;color:#375b79}.currencies span:last-of-type{color:#8055aa}.currencies small{font-size:9px}.player-info .run-details{display:none}.player-info .stats-grid{padding:8px 0}.toast{top:10px;bottom:auto;left:auto;right:16px;max-width:260px;transform:none;font-size:11px;pointer-events:none}#bossControls{display:none!important}.excavator-strip{display:none;position:absolute;left:6px;top:50%;transform:translateY(-50%);height:calc(var(--cell)*10);width:calc(var(--cell)*1.82);overflow:hidden;border:2px solid #594633;background:#2c261e;border-radius:4px}.excavator-strip canvas{width:100%;height:100%;display:block}.motherlode .excavator-strip{display:block}.motherlode .operation{padding-left:calc(var(--cell)*2 + 12px)}.speed-flare{position:absolute;pointer-events:none;left:-100px;bottom:185px;width:95px;height:130px;display:grid;place-items:center;z-index:8;transform:scale(var(--speed-scale,1));transform-origin:center}.speed-flare b{font:bold italic 26px 'Space Grotesk',sans-serif;transform:rotate(-12deg);color:#fff066;text-shadow:2px 3px #7b4b21;z-index:2}.speed-flare i{position:absolute;inset:0;background:url('./assets/entities-v7.webp') 66.666% 100%/400% 200%;opacity:0}.speed-flare.hot i{opacity:1;animation:speedPulse .3s ease-in-out infinite alternate}.speed-flare.hot b{color:#ff9b39;font-size:30px}.speed-flare.ultimate i{background-position:100% 100%}.speed-flare.ultimate b{color:#ff5141;font-size:36px;text-shadow:0 0 12px #6cdbff,2px 3px #572649}@keyframes speedPulse{to{transform:scale(1.1,.95)}}.landscape{background-position:center bottom;background-size:100% var(--surface-y);background-repeat:no-repeat;background-color:#1685df;background-image:url('./assets/hills-v7.webp')}.spells{margin-top:auto}#transferTarget{grid-column:1/-1;font-size:10px}.spells:has(#transferTarget:not([hidden])) #blessingHint{display:none}
@media(min-width:761px) and (max-height:780px){.smith-scene{height:85px}.smith-scene:after{height:85px;width:110px}.blacksmith{gap:5px}.compact-upgrade{min-height:44px;padding:5px}.compact-upgrade b{font-size:11px}.compact-upgrade small{font-size:9px}.forge-title{font-size:16px}}
@media(min-width:761px) and (max-height:580px){.smith-scene,.forge-brand{display:none}.blacksmith{padding:6px;gap:3px}.compact-upgrade{min-height:40px;padding:4px}.compact-upgrade span{gap:1px}.upgrades{gap:3px}.vendor-tabs button{padding:6px 2px}.board-actions .button{min-height:35px}.board-actions{min-height:35px}.player-column{padding:6px}.spells small{display:none}}
@media(max-width:760px){.blacksmith{width:min(360px,95vw);padding:10px;gap:5px}.blacksmith .smith-scene{height:70px}.blacksmith .smith-scene:after{height:70px;width:90px}.blacksmith .compact-upgrade{min-height:43px;padding:5px}.operation{top:138px;bottom:195px;height:auto;left:0;right:0;padding:4px 8px;gap:6px}.player-column .board-actions{position:absolute;top:86px;left:8px;right:8px;width:auto;min-height:42px;grid-template-columns:1fr 1fr}.board-actions .button{min-height:42px}.player-info .currencies{position:absolute;top:30px;right:12px;font-size:11px;gap:8px}.currencies small{display:none}.spells{bottom:110px;min-height:78px}.speed-flare{left:auto;right:6px;bottom:208px;width:65px;height:85px}.speed-flare b{font-size:22px}.speed-flare.hot b{font-size:24px}.speed-flare.ultimate b{font-size:26px}.toast{top:130px;right:8px;max-width:200px}.excavator-strip{left:4px}.motherlode .operation{padding-left:calc(var(--cell)*2 + 8px)}#tileInspector{bottom:205px;right:8px}}
@media(prefers-reduced-motion:reduce){.smith-scene.working:after,.speed-flare i{animation:none}}
.speed-flare b{display:flex;align-items:center;justify-content:center}.speed-digit{display:inline-block;width:21px;height:32px;background:url("./assets/digits-v7.webp") 0 0/500% 200%}.speed-flare.hot .speed-digit{filter:hue-rotate(-20deg)}.speed-flare.ultimate .speed-digit{filter:hue-rotate(-38deg);width:25px;height:40px}
.landscape{background-position:center top}.player-column{gap:6px;padding-bottom:10px}.player-info{flex-shrink:0;padding:9px}.player-info .wallet{padding:2px 0}.player-info .gold-total{font-size:28px}.player-info .stats-grid{gap:5px;padding:6px 0}.player-info .stats-grid strong{font-size:20px;margin-top:1px}.player-info .boost-button{min-height:45px;padding:8px}.player-info .boost-button small{font-size:8px}.relic-area{flex-shrink:0;padding:8px}.spells{padding:6px;gap:3px;flex-shrink:0}.spells button{min-height:29px}.spells small{font-size:9px}.compact-upgrade b{font-size:12px}.compact-upgrade small{font-size:10px}.return-button{padding:4px}.stats-grid span{font-size:9px}
@media(max-width:760px){.player-column .board-actions{top:86px}.player-info{padding:8px}.player-info .wallet{padding:0}.player-info .stats-grid{padding:0}.player-info .stats-grid strong{font-size:13px}.player-info .boost-button{min-height:30px}.player-info .currencies{top:28px}.player-info .gold-total{font-size:20px}.relic-area{height:104px}.spells{bottom:110px}.blacksmith .compact-upgrade b{font-size:12px}.blacksmith .compact-upgrade small{font-size:10px}}
@media(max-width:760px){.player-info{padding:6px 9px 6px 126px}.player-info #goldRate{display:none}.player-info .stats-grid{align-self:end;gap:5px}.player-info .currencies{top:31px;right:12px}.relic-area{grid-template-rows:20px 40px 20px;gap:3px;padding:6px 10px;height:104px}.relic-area #keeperBtn{grid-row:3;min-height:20px}.relic-rack{grid-row:2}.relic-slot{max-height:39px}.relic-area #applyRelic{min-height:36px}}
@media(min-width:761px) and (max-height:600px){.player-info .wallet{display:flex;align-items:center;justify-content:space-between;gap:4px}.player-info .wallet .stat-label{display:none}.player-info .gold-total{font-size:23px}.player-info #goldRate{font-size:9px}.player-info .stats-grid strong{font-size:16px}.player-info .icon-button{height:24px;width:24px}.player-info .boost-button{min-height:32px;padding:4px}.player-info .boost-button small{display:none}.player-info .boost-button strong{font-size:19px}.player-info .currencies{font-size:12px}.player-column .relic-area{height:101px;padding:5px;display:grid;grid-template-columns:1fr;grid-template-rows:25px 36px 20px;gap:4px}.relic-area header{grid-column:1;grid-row:1;margin:0}.relic-area #applyRelic{min-height:23px;font-size:9px}.relic-area #keeperBtn{grid-column:1;grid-row:3;min-height:20px}.relic-area .relic-rack{grid-column:1;grid-row:2;max-width:none}.relic-area .relic-slot{height:35px;min-height:35px;font-size:20px}.relic-area .bag-button{height:23px}.spells button{min-height:24px;padding:4px}.spells{margin-top:auto}.board-actions .button{min-height:35px}}
/* The Big Dig: readable rows and a full-height HUD */
.layout{grid-template-columns:clamp(300px,28vw,420px) minmax(270px,1fr) clamp(280px,25vw,400px)}.upgrades{grid-template-columns:1fr;gap:3px}.compact-upgrade{min-height:27px;padding:5px 8px;flex-direction:row;align-items:center}.compact-upgrade span{flex:1;display:grid;grid-template-columns:1fr 1.15fr;align-items:center;gap:8px}.compact-upgrade b{font-size:12px}.compact-upgrade small{font-size:10px}.compact-upgrade em{align-self:center;min-width:52px;text-align:right;display:flex;justify-content:flex-end;align-items:center}.smith-scene{height:90px}.vendor-tabs{display:flex}.vendor-tabs button{flex:1}.player-column{height:100dvh;padding:16px 18px;gap:16px;background:#c7e5ecb5}.player-info{padding:18px;flex:1}.player-info .stats-grid{padding:18px 0;gap:20px}.spells{padding:12px;margin-top:0}.relic-area{padding:12px}.board-actions{position:absolute;top:18px;right:calc(100% + 12px);width:130px;grid-template-columns:1fr;gap:9px}.operation{padding-right:125px}.speed-flare{left:-100px}.currency-icon{display:inline-block;width:23px;height:23px;background:url('./assets/currency-v8.webp') 0 50%/200% 100%;vertical-align:middle;flex-shrink:0}.currency-icon.essence{background-position:100% 50%}.currencies>span{display:flex;align-items:center;gap:5px}.compact-upgrade .currency-icon{width:18px;height:18px}.smith-scene[data-vendor=jeweler]:after,.smith-scene[data-vendor=acolyte]:after{background-image:url('./assets/staff-v8.webp');background-size:400% 200%}.smith-scene[data-vendor=jeweler]:after{background-position-y:0}.smith-scene[data-vendor=acolyte]:after{background-position-y:100%}.smith-scene.working:after{animation-duration:.8s}
@media(min-width:761px) and (max-height:780px){.player-column{padding:10px;gap:10px}.player-info{padding:10px}.player-info .stats-grid{padding:9px 0;gap:9px}.smith-scene{height:70px}.compact-upgrade{min-height:26px;padding:4px 7px}}
@media(min-width:761px) and (max-height:600px){.compact-upgrade{min-height:24px;padding:3px 5px}.compact-upgrade b{font-size:11px}.player-column{gap:5px}.player-info .stats-grid{padding:5px 0;gap:5px}.player-info{padding:6px}.spells{padding:5px}.board-actions{width:105px}.operation{padding-right:105px}}
@media(max-width:760px){.player-column{display:contents}.operation{padding-right:8px}.player-info{padding:6px 9px 6px 126px}.player-info .stats-grid{padding:0;gap:5px}.player-column .board-actions{top:86px;right:8px;left:8px;width:auto;grid-template-columns:1fr 1fr}.blacksmith .compact-upgrade{min-height:28px;padding:5px}.blacksmith .compact-upgrade b{font-size:12px}.blacksmith .compact-upgrade small{font-size:10px}.spells{padding:6px}.relic-area{padding:6px 10px}.currency-icon{width:17px;height:17px}}
#transferGuide{position:absolute;top:2px;left:10px;right:10px;z-index:15;background:#30204fea;color:#f1daff;border:1px solid #c497ff;padding:9px;text-align:center;border-radius:8px;font-weight:bold;font-size:12px;pointer-events:none;animation:guideIn .25s ease-out}.slot.transfer-candidate{animation:selectPulse 1s ease-in-out infinite alternate}.slot.transfer-chosen{box-shadow:inset 0 0 0 4px #bb77ff;background:#9d59c980}.slot.transfer-chosen:before{content:attr(data-selection);position:absolute;top:3px;right:3px;border-radius:50%;width:20px;height:20px;display:grid;place-items:center;background:#7435ab;color:white;z-index:3;font-weight:bold}.slot.transfer-destination{animation:targetPulse 1s ease-in-out infinite alternate}@keyframes selectPulse{to{box-shadow:inset 0 0 0 3px #dba5ff;background:#d8b4f755}}@keyframes targetPulse{to{box-shadow:inset 0 0 0 3px #8cffb0}}@keyframes guideIn{from{opacity:0;transform:translateY(-8px)}}
#managersBtn{background:#283b46;color:#ecf5ec;padding:11px;border-radius:7px;font-weight:bold}#managerPanel{position:absolute;inset:55px 8px auto;z-index:25;background:#0e1721;color:#eee;padding:12px;border:1px solid #8aafad;border-radius:9px;box-shadow:0 12px 30px #0007}#managerPanel h2{font-size:17px;margin-bottom:8px}#managerOptions{display:grid;gap:6px}#managerOptions .compact-upgrade{min-height:44px}#managerOptions .compact-upgrade span{grid-template-columns:1fr}.player-column{gap:7px}.player-info{min-height:0}.board-actions{width:180px}.board-actions .button{min-height:64px}.board-actions .button b{font-size:16px}.operation{padding-right:185px}.excavator-strip{width:calc(var(--cell)*3);height:calc(var(--cell)*8.25)}.motherlode .operation{padding-left:calc(var(--cell)*3 + 12px)}#motherMulti{position:absolute;top:2px;left:2px;right:2px;z-index:2;background:#152621d9;color:#d6f4ad;text-align:center;padding:4px;font:bold 11px sans-serif}.rover-controls{position:absolute;bottom:3px;left:3px;right:3px;display:flex;gap:3px}.rover-controls button{flex:1;background:#1b3029dc;color:#ecf8ce;min-height:26px;border:1px solid #8b9e70}.smith-scene[data-vendor=excavator].working:after{animation:none!important;background-position:33.333% 100%}.smith-scene[data-vendor=excavator].drilling:after{animation:drillWork .65s ease-in-out;background-position:33.333% 100%}@keyframes drillWork{20%,60%{transform:translateY(5px) rotate(2deg);filter:brightness(1.3)}40%,80%{transform:translateY(2px) rotate(-2deg)}100%{transform:none}}
@media(max-width:760px){.operation{padding-right:8px}.motherlode .operation{padding-left:calc(var(--cell)*3 + 8px)}.player-column .board-actions .button{min-height:45px}.player-column #managersBtn{position:absolute;top:128px;right:8px;padding:5px;z-index:10;font-size:11px}.operation{top:155px}.player-column #managerPanel{top:158px;left:8px;right:8px}.spells{min-height:78px}.rover-controls button{padding:2px;font-size:11px}#motherMulti{font-size:8px}}
@media(prefers-reduced-motion:reduce){.slot.transfer-candidate,.slot.transfer-destination{animation:none;box-shadow:inset 0 0 0 2px #bf87ef}}
#motherMulti{top:auto;bottom:32px;font-size:10px}#playSub:empty{display:none}#managerPanel #conductorTarget{width:100%;margin-top:8px}#transferGuide{right:200px}
#closeManagers{float:right;background:#344550;color:white;border-radius:4px;width:26px;height:26px;font-size:20px}@media(max-width:760px){#transferGuide{right:8px}}
/* Explicit combat states, progression cards, and service bay. */
#timingCue{inset:auto 8% 32%;min-height:0;padding:14px 8px;border-radius:10px;border:3px solid #f6d343;background:#453615e8;color:#fff18a;font:bold clamp(18px,2.4vw,32px) 'Space Grotesk',sans-serif;line-height:1.1;text-align:center;box-shadow:0 4px 16px #0006;pointer-events:none;transition:background .07s,border-color .07s}#timingCue[data-state=hit]{background:#4dce42e8;border-color:#caffba;color:#082b12}#timingCue[data-state=perfect]{background:#075d2cef;border-color:#8dffad;color:#e0ffe9;box-shadow:0 0 0 5px #53d65b88,0 0 22px #62e98b}#timingCue[data-state=success]{background:#075d2cef;color:#d9ffe5;border-color:#a9ffbd;animation:perfectPop .2s ease-out}#timingCue[data-state=danger]{background:#9f2027ef;color:#fff0e8;border-color:#ff6e66}@keyframes perfectPop{from{transform:scale(.8)}to{transform:scale(1)}}
.smith-progression{display:block}.next-upgrade{width:100%;display:flex;flex-direction:column;align-items:center;gap:10px;padding:16px;background:linear-gradient(#252331,#111721);border:1px solid #84704e;border-radius:12px;color:#f7e7c3;text-align:center;min-height:330px}.next-upgrade:disabled{color:#c5c1b8;border-color:#4b4d59}.next-upgrade:not(:disabled):hover{border-color:#ffe2a4;background:linear-gradient(#343047,#161d28)}.upgrade-art{display:block;width:min(170px,90%);height:145px;background:url('./assets/upgrades-v10.webp') 0 0/400% 300%;background-repeat:no-repeat}.next-upgrade b{font-size:22px}.next-label{font-size:10px;color:#c3a569;letter-spacing:2px}.next-upgrade small{font-size:12px}.next-upgrade strong{font-size:15px;color:#dfd1ad}.next-upgrade p{font-size:12px;line-height:1.5;color:#b5bfcc}.next-upgrade em{font-style:normal;margin-top:6px;font-weight:bold;font-size:19px;padding:9px;background:#323746;border-radius:6px;min-width:110px}.next-upgrade .currency-icon{vertical-align:middle}
#managerPanel{position:fixed;left:auto;right:calc(clamp(280px,25vw,400px) + 8px);bottom:auto;width:min(590px,calc(100vw - 350px));padding:12px;background:#111b26;z-index:40;max-height:none}#managerOptions{grid-template-columns:repeat(2,1fr);gap:8px}.manager-card{display:flex;align-items:center;gap:9px;padding:8px;border:1px solid #40505e;border-radius:8px;background:#1c2634;min-height:96px}.manager-portrait{background-image:url('./assets/managers-v10.webp');background-size:300% 200%;background-repeat:no-repeat;background-color:transparent;flex:0 0 70px;height:80px;border-radius:7px}.manager-card b{font-size:12px}.manager-card p{font-size:10px;color:#b9c6cc;line-height:1.35;margin:4px 0}.manager-card small{display:block;font-size:9px;color:#b9cbb5}.manager-card [data-manager]{background:#d4b778;color:#212330;border-radius:4px;padding:5px 7px;font-size:10px;margin-top:5px}.manager-card [data-manager]:disabled{opacity:.45}.manager-card.targeting{border-color:#ffe367;box-shadow:0 0 13px #ffe36788}.manager-card.assigned,.slot.manager-assigned{box-shadow:inset 0 0 0 3px #78ff8b,0 0 20px #78ff8b88;background:#27814688}#centerConfirm{position:fixed;left:50%;top:45%;transform:translate(-50%,-50%);z-index:60;background:#123b26ef;color:#baffc5;border:2px solid #78ff8b;padding:18px 24px;border-radius:10px;font-weight:bold;pointer-events:none}
.excavator-strip{overflow:visible}.excavator-strip canvas{border-radius:4px}.rover-controls{display:none}#motherControls{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:7px;padding-top:8px}#motherControls #motherMulti{position:static;padding:10px 4px;font-size:11px;border:1px solid #7f986b;border-radius:5px;background:#173d2e;color:#d9f6aa;width:100%}#motherControls #excavatorService{padding:11px 4px;min-height:45px;font-size:11px;background:#d4b773;color:#202a23;width:100%}#motherControls #excavatorService:disabled{opacity:.65}#motherControls #excavatorStatus{display:block;font-size:9px;color:#f0dfb9;text-align:center;background:#2f281dcc;padding:5px;border-radius:4px}.excavator-strip{transform:translateY(calc(-50% - 40px))}
@media(max-height:650px){.next-upgrade{min-height:260px;padding:10px;gap:6px}.upgrade-art{height:100px;width:130px}.next-upgrade b{font-size:18px}.next-upgrade p{font-size:11px}}
@media(max-width:760px){#managerPanel{right:8px;left:8px;width:auto;top:160px!important}#managerOptions{gap:5px}.manager-card{padding:5px;gap:4px;min-height:105px}.manager-portrait{flex-basis:45px;height:64px}.manager-card b{font-size:10px}.manager-card p{font-size:9px}.manager-card small{font-size:8px}.manager-card [data-manager]{font-size:9px;padding:4px}.next-upgrade{min-height:330px}.upgrade-art{height:140px;width:170px}#motherControls{gap:3px;padding-top:4px}#motherControls #motherMulti{padding:5px 2px;font-size:8px}#motherControls #excavatorService{padding:5px 2px;font-size:8px;min-height:30px}#motherControls #excavatorStatus{font-size:7px}.excavator-strip{transform:translateY(calc(-50% - 24px))}#timingCue{font-size:17px;padding:9px 3px}}
@media(max-width:760px){#managerPanel:has(.targeting){top:auto!important;bottom:210px;left:auto;right:8px;width:230px}#managerPanel:has(.targeting) .manager-card:not(.targeting){display:none}#managerPanel:has(.targeting) #managerOptions{grid-template-columns:1fr}#managerPanel:has(.targeting) h2{font-size:13px}}
@media(min-width:761px) and (max-height:600px){.excavator-strip{transform:translateY(calc(-50% - 75px))}#motherControls{gap:4px;padding-top:4px}#motherControls #motherMulti{padding:6px 2px}#motherControls #excavatorService{min-height:34px;padding:6px 2px}}
@media(max-width:760px){.excavator-strip{transform:translateY(calc(-50% - 50px))}}
#motherMulti{position:absolute;top:auto;bottom:calc(100% + 7px);left:0;right:0;width:100%;padding:8px 4px;border:1px solid #7f986b;border-radius:5px;background:#173d2e;color:#d9f6aa;font-size:11px;line-height:1.3} @media(max-width:760px){#motherMulti{font-size:8px;padding:5px 2px;bottom:calc(100% + 4px)}}
/* Motherlode crest and readable instruments. */
#motherMulti{height:100px;bottom:calc(100% + 3px);padding:23px 0 15px;border:0;border-radius:0;background:none;color:#ffe7a0;isolation:isolate;display:flex;flex-direction:column;align-items:center;justify-content:center;text-shadow:0 2px 3px #182130,1px 0 #182130,-1px 0 #182130;pointer-events:none}
#motherMulti:before{content:'';position:absolute;inset:-5px -12px;background:url('./assets/mother-crest-v11.webp') center/100% 100% no-repeat;z-index:-1;filter:saturate(.65)}
#motherMulti span{font-size:12px;font-weight:800;letter-spacing:.3px}#motherMulti b{font:bold italic 30px/1.05 'Space Grotesk',sans-serif;letter-spacing:-1px}#motherMulti small{font-size:9px;letter-spacing:2px}
#motherMulti[data-tier='1']{color:#fff65a}#motherMulti[data-tier='1']:before{filter:saturate(1.3)}
#motherMulti[data-tier='2']{color:#ffb34d}#motherMulti[data-tier='2']:before{filter:saturate(1.6) hue-rotate(-15deg)}
#motherMulti[data-tier='3']{color:#ff7161}#motherMulti[data-tier='3']:before{filter:saturate(2) hue-rotate(-35deg)}
#motherMulti[data-tier='4']{color:#b4f7ff;text-shadow:0 0 8px #39bcff,0 2px 3px #142a46}#motherMulti[data-tier='4']:before{filter:hue-rotate(170deg) saturate(1.7);animation:motherGlow 1.2s ease-in-out infinite alternate}
#motherControls #excavatorStatus{display:grid;grid-template-columns:1fr 1fr;gap:5px;background:none;padding:0;color:#fff2d2;text-align:center}.excavator-stat{padding:4px 2px;background:linear-gradient(135deg,#213444ee,#17202ae8);border-bottom:2px solid #c8a368;border-radius:8px 2px}.excavator-stat span{display:block;font-size:10px;letter-spacing:.8px;color:#cfdddf}.excavator-stat b{font-size:21px;line-height:1.15;font-variant-numeric:tabular-nums}.excavator-stat.low b{color:#ff987f}.excavator-stat.low{border-color:#ff785e}
.manager-portrait.mechanic-portrait{background-image:url('./assets/service-v10.webp');background-size:400% 200%;background-position:66.666% 0!important}#managerPanel{max-height:calc(100vh - 16px);overflow:auto}
@keyframes motherGlow{to{opacity:.78;transform:scale(1.025)}}
@media(prefers-reduced-motion:reduce){#motherMulti:before{animation:none!important}}
@media(max-width:760px){#motherMulti{height:77px;padding:15px 0 10px}#motherMulti b{font-size:25px}#motherMulti span{font-size:10px}#motherMulti small{font-size:8px}.excavator-stat b{font-size:17px}.excavator-stat span{font-size:9px}.excavator-stat{padding:3px 1px}#motherControls #excavatorStatus{gap:3px}}
@media(min-width:761px) and (max-height:600px){#motherMulti{height:80px}#motherMulti b{font-size:27px}.excavator-stat b{font-size:18px}.excavator-stat{padding:2px}}

@media(max-width:760px){#managerPanel{max-height:calc(100vh - 175px)}}
@media(min-width:761px) and (max-height:650px){.excavator-strip{top:90px;transform:none;height:calc(100vh - 240px);width:calc((100vh - 240px)*4/11)}#motherMulti{height:80px}#motherControls{gap:4px;padding-top:4px}#motherControls #excavatorService{min-height:32px;padding:5px 2px}.excavator-stat b{font-size:18px}}
@media(max-width:760px){.excavator-strip{top:85px;transform:none;height:max(100px,calc(100vh - 570px));width:max(36px,calc((100vh - 570px)*4/11))}#motherMulti:before{inset:-3px -6px}#motherMulti b{font-size:24px}#motherMulti span{font-size:9px}#motherControls #excavatorService{font-size:9px}.excavator-stat b{font-size:16px}.excavator-stat span{font-size:8px}}
/* Next-state countdown is driven by the same clock as combat, not CSS timing. */
#timingCue{transition:none;overflow:visible}#qteForecast{position:absolute;border:3px solid #f6d343;border-radius:12px;pointer-events:none;box-shadow:0 0 12px currentColor;color:#f6d343}#qteForecast[data-state=hit]{border-color:#caffba;color:#6dff68}#qteForecast[data-state=perfect]{border-color:#087b3c;color:#139947}#qteForecast[data-state=danger]{border-color:#ff6e66;color:#ff6e66}#perfectAccent{position:absolute;right:-8px;top:-30px;transform:rotate(12deg);font:bold italic clamp(18px,2vw,26px)/1 'Space Grotesk',sans-serif;color:#c6ffd1;text-shadow:2px 2px #123b21,0 0 9px #1c7b39;white-space:nowrap;z-index:2}#perfectAccent[data-earned=true]{color:#fff5a6;text-shadow:2px 2px #174627,0 0 12px #70ff99}#timingCue[data-state=none]{background:none;border-color:transparent;box-shadow:none}#qteLabel{position:relative;z-index:1}
@media(max-width:760px){#perfectAccent{font-size:18px;top:-25px;right:-3px}#qteForecast{border-width:2px}}
/* Expanded manager roster: approximately twice the desktop area. */
#managerPanel{top:12px!important;right:calc(clamp(280px,25vw,400px) + 8px);left:auto;width:min(1180px,calc(100vw - clamp(280px,25vw,400px) - 24px));max-height:calc(100dvh - 24px);padding:20px;border-radius:14px}#managerPanel h2{font-size:26px;margin:0 0 16px}#closeManagers{min-width:44px;min-height:44px;font-size:24px}#managerOptions{gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}.manager-card{padding:12px;gap:14px;min-height:142px;border-radius:10px}.manager-portrait{flex-basis:100px;height:118px}.manager-card>div{min-width:0}.manager-card b{font-size:19px;line-height:1.2}.manager-card p{font-size:15px;line-height:1.4;color:#dce5ea;margin:6px 0}.manager-card small{font-size:13px;line-height:1.35;color:#d0e4c9}.manager-card [data-manager]{font-size:15px;min-height:40px;padding:8px 14px;margin-top:8px}
#rapidHint{position:absolute;bottom:calc(100% + 15px);left:-5%;width:110%;font:bold clamp(12px,1.3vw,18px)/1.25 'Space Grotesk',sans-serif;color:#e2ffd4;text-shadow:0 2px 3px #102820,1px 0 #102820,-1px 0 #102820;z-index:2}#timingCue.rapid #perfectAccent{top:auto;bottom:calc(100% + 66px)}
@media(max-width:1050px) and (min-width:761px){.manager-portrait{flex-basis:68px;height:90px}.manager-card{gap:8px;padding:9px}.manager-card b{font-size:17px}.manager-card p{font-size:14px}}
@media(max-width:760px){#managerPanel{inset:8px 8px auto!important;width:auto;padding:14px;max-height:calc(100dvh - 16px)}#managerOptions{grid-template-columns:1fr;gap:10px}.manager-card{min-height:132px;padding:12px;gap:12px}.manager-portrait{flex-basis:88px;height:104px}.manager-card b{font-size:19px}.manager-card p{font-size:15px}.manager-card small{font-size:13px}.manager-card [data-manager]{font-size:15px;min-height:42px}#managerPanel:has(.targeting){inset:auto 8px 210px auto!important;width:280px;max-height:300px}#managerPanel:has(.targeting) h2{font-size:21px}#rapidHint{font-size:13px}#timingCue.rapid #perfectAccent{bottom:calc(100% + 60px)}}
.player-column:has(#managerPanel:not([hidden])){z-index:50}#managerPanel{padding:16px}#managerPanel h2{margin-bottom:12px}#managerOptions{gap:8px}.manager-card{padding:10px;min-height:132px}.manager-card p{line-height:1.3;margin:4px 0}.manager-card [data-manager]{min-height:36px;margin-top:6px;padding:6px 12px}.manager-portrait{height:105px}
/* Forged controls and inventory artwork. */
#buyAllSmith{flex-shrink:0;min-height:44px;width:100%;padding:10px 16px;border:1px solid #e4c780;border-radius:7px;background:linear-gradient(#dcbf7c,#a77e3f);color:#201a15;font-size:17px;font-weight:800;box-shadow:inset 0 1px #fff7c7,0 3px 0 #604928}#buyAllSmith:disabled{opacity:.45}#buyAllSmith:not(:disabled):active{transform:translateY(2px)}
@media(min-width:761px){.board-actions{width:var(--action-width,280px);gap:12px;top:18px;right:calc(100% + 10px)}.board-actions .button{min-height:96px}.board-actions .button b{font-size:clamp(20px,1.7vw,28px)}.operation{padding-right:calc(var(--action-width,280px) + 15px)}}
.board-actions .button{position:relative;border:0;border-radius:10px;background-color:transparent;background-image:url('./assets/hud-forged-v12.webp');background-repeat:no-repeat;background-size:200% 394%;background-position:0 12.4%;box-shadow:0 5px 8px #14201e55;padding:15px 24px;overflow:hidden;color:#183323}.board-actions .play{background-position:100% 12.4%;color:#fff3cd}.board-actions .button:disabled{opacity:.8;filter:saturate(.6)}.board-actions .button:not(:disabled):hover{filter:brightness(1.12)}.board-actions .button small{font-size:11px;letter-spacing:1px}.board-actions .spawn .fill{top:auto;bottom:10px;left:9%;height:4px;max-width:82%;background:#eddb88;opacity:.8}.button-content{z-index:1;position:relative}
.player-info,.spells,.relic-area{position:relative;isolation:isolate;border:1px solid #bd995b;border-radius:12px}.player-info{background:#d6e3de;color:#233b37}.player-info:before,.spells:before,.relic-area:before{content:'';position:absolute;inset:-3px;z-index:-1;pointer-events:none;border-radius:12px;background:url('./assets/hud-forged-v12.webp') 0 100%/200% 190% no-repeat;opacity:.5}.spells,.relic-area{background:#202a39;color:#f6e8c5}.spells:before,.relic-area:before{background-position:100% 100%;opacity:.4}.spells small{color:#d3dcca}.spells button,#managersBtn{background:linear-gradient(#384e57,#20343d);border:1px solid #b69559;color:#ffedc2;box-shadow:inset 0 1px #748b8b}.relic-area h2{color:#f6e5b3}.relic-area #keeperBtn{background:#354936;color:#f5e6bd;border:1px solid #7e8f64}
#returnBtn{display:block;width:100%;min-height:42px;margin-top:7px;padding:10px 16px;background:linear-gradient(#c44443,#861f2a);border:2px solid #ed9080;border-radius:7px;box-shadow:inset 0 1px #ffc2a7,0 3px 0 #541b24;color:#fff3df;font-size:16px;font-weight:800;text-decoration:none}#returnBtn:hover{filter:brightness(1.15)}#returnBtn:active{transform:translateY(2px)}
.relic-art{display:inline-block;width:40px;height:40px;flex-shrink:0;vertical-align:middle;background-image:url('./assets/relics-v12.webp');background-size:400% 300%;background-repeat:no-repeat}.relic-slot{background:#18232d;border:1px solid #8d784d;box-shadow:inset 0 0 8px #0008}.relic-slot .relic-art{width:100%;height:100%;max-height:46px;aspect-ratio:1}.bag-item>.relic-art{width:52px;height:52px}#tileBuffs .relic-art{width:28px;height:28px;margin-right:5px}
@media(min-width:761px) and (max-height:650px){.board-actions .button{min-height:78px}.board-actions .button b{font-size:20px}#returnBtn{min-height:32px;padding:5px;font-size:14px}.next-upgrade{min-height:270px}#buyAllSmith{min-height:36px;padding:7px;font-size:15px}}
@media(max-width:760px){.player-column .board-actions .button{min-height:60px;padding:10px 14px}.board-actions .button b{font-size:17px}.board-actions .button small{font-size:9px}.player-column #managersBtn{top:150px}.operation{top:180px}.player-info:before{opacity:.25}#returnBtn{position:fixed;right:8px;top:177px;width:105px;min-height:33px;padding:5px;font-size:13px;z-index:12}.relic-art{width:34px;height:34px}.next-upgrade{min-height:280px}#buyAllSmith{min-height:40px;font-size:16px}}
.player-info:before,.spells:before,.relic-area:before{background-size:213.33% 200.8%;background-position:3% 85.6%;opacity:.35}.spells:before,.relic-area:before{background-position:97% 85.6%}
@media(min-width:761px){#returnBtn{flex-shrink:0;margin:0;min-height:40px}.player-info{min-height:325px}.spells{padding:9px;gap:3px;min-height:0}.spells h2{font-size:17px}.spells button{min-height:27px;padding:5px}.spells small{font-size:9px}.relic-area{padding:9px}.player-column:has(#returnBtn:not([hidden])){gap:5px}.player-column:has(#returnBtn:not([hidden])) .player-info .stats-grid{padding:6px 0;gap:6px}}
@media(min-width:761px) and (max-height:650px){.player-info{min-height:210px}#returnBtn{min-height:29px;padding:3px}.player-info .boost-button{min-height:30px}.player-info .stats-grid strong{font-size:17px}.player-info .stats-grid{padding:5px 0;gap:5px}}
@media(max-width:760px){.spells,.relic-area{position:absolute}.spells{left:8px;right:8px;bottom:110px}.relic-area{left:8px;right:8px;bottom:8px}.player-info{position:absolute}.player-info:before{opacity:.2}}
@media(max-width:760px){.excavator-strip{height:max(100px,calc(100vh - 600px));width:max(36px,calc((100vh - 600px)*4/11))}}
@media(min-width:761px) and (max-height:650px){.player-column .relic-area{grid-template-columns:60px minmax(0,1fr) 34px;grid-template-rows:23px 36px 20px;gap:4px;height:101px}.relic-area header{display:contents}.relic-area h2{grid-column:1/3;grid-row:1}.relic-area .bag-button{grid-column:3;grid-row:1}.relic-area #applyRelic{grid-column:1;grid-row:2;min-height:32px;font-size:9px}.relic-area .relic-rack{grid-column:2/4;grid-row:2}.relic-area #keeperBtn{grid-column:1/-1;grid-row:3}}
#managerPanel{top:8px!important;height:calc(100dvh - 16px);max-height:calc(100dvh - 16px)}#managerOptions{grid-auto-rows:minmax(140px,1fr);min-height:calc(100% - 60px)}.manager-card{cursor:pointer;transition:border-color .12s,background .12s}.manager-card:hover{border-color:#dbc17d;background:#29364a}.manager-card:focus-visible{outline:3px solid #ffe9a5;outline-offset:2px}.manager-card.maxed{border-color:#7faa8c;background:#1d352e}.maxed-badge{display:inline-block;margin:5px 0 0 7px;padding:3px 7px;border:1px solid #92ccab;border-radius:4px;color:#c4f8d2;font-size:11px;letter-spacing:1px;background:#254e3a}.manager-card [data-assign-conductor]{display:block;min-height:32px;padding:5px 12px;margin-top:6px;background:#486e8a;color:#fff;border:1px solid #8eb8d6;border-radius:4px;font-size:13px}.vendor-complete{padding:24px;text-align:center;color:#dfd6a9}
@media(max-width:760px){#managerPanel:has(.targeting){height:auto}#managerPanel:has(.targeting) #managerOptions{min-height:0}}
#managerOptions{min-height:calc(100% - 72px)}#timingCue.lower-boss{bottom:5%}
/* Full-height vendor cards and readable upgrade details. */
.blacksmith .upgrades{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.blacksmith .next-upgrade{flex:1;min-height:0;width:100%;justify-content:space-evenly;padding:18px 14px;gap:12px}.next-upgrade .upgrade-art{width:min(240px,80%);height:clamp(130px,24vh,260px);flex-shrink:1}.next-upgrade>b{font-size:clamp(23px,2vw,31px);line-height:1.15}.next-upgrade>small{font-size:17px}.next-upgrade>strong{font-size:20px;line-height:1.3}.next-upgrade>p{font-size:16px;line-height:1.45;max-width:95%}.next-upgrade>em{font-size:20px;min-height:44px}.next-label{font-size:13px}
.board,.mine-viewport{transform:translateX(var(--board-nudge,0px))}@media(min-width:761px){.board-actions{width:calc(var(--action-width) - var(--board-nudge))}}
#mineViewport[data-light=green]{outline:5px solid #63ff76;box-shadow:0 0 25px #4dfc7c,inset 0 0 20px #4dfc7c;z-index:2}#mineViewport[data-light=red]{outline:5px solid #ff525b;box-shadow:0 0 25px #ff354a,inset 0 0 20px #ff354a;z-index:2}
#timingCue.combat-light-icon{inset:50% auto auto 50%;transform:translate(-50%,-50%);width:min(160px,65%);aspect-ratio:1;height:auto;padding:0;min-height:0;border:0;border-radius:0;box-shadow:none;background:url('./assets/combat-lights-v14.webp') 0 50%/200% 100% no-repeat;animation:none;pointer-events:none}#timingCue[data-light=red]{background-position:100% 50%}#qteForecast,#perfectAccent,#rapidHint{display:none!important}
#purchaseReel{position:absolute;inset:25% 8px auto;z-index:5;background:#17252df5;border:2px solid #e2c17f;box-shadow:0 6px 25px #0009;border-radius:12px;padding:18px 10px;pointer-events:none;color:#fff4cf}#purchaseReel>strong{display:block;text-align:center;font-size:19px;margin-bottom:12px}.purchase-window{height:90px;overflow:hidden}.purchase-track{animation:purchaseScroll var(--reel-time) linear forwards}.purchase-item{height:90px;display:flex;align-items:center;gap:12px;font-size:18px;font-weight:bold}.purchase-item i{width:75px;height:75px;flex-shrink:0;background:url('./assets/upgrades-v10.webp') 0 0/400% 300%}.purchase-item small{display:block;font-size:15px;color:#dfca91}@keyframes purchaseScroll{to{transform:translateY(var(--reel-end))}}
@media(max-height:650px){.blacksmith .next-upgrade{padding:8px;gap:6px}.next-upgrade .upgrade-art{height:110px;width:140px}.next-upgrade>b{font-size:23px}.next-upgrade>small{font-size:14px}.next-upgrade>strong{font-size:16px}.next-upgrade>p{font-size:14px}.next-upgrade>em{font-size:17px;min-height:32px}}
@media(max-width:760px){.next-upgrade>b{font-size:25px}.next-upgrade>p{font-size:16px}#timingCue.combat-light-icon{width:115px}}

/* Keep the mine square while reserving actual space for its HUD. */
.excavator-strip canvas{width:auto;max-width:100%;height:100%;aspect-ratio:4/11;margin:auto}.excavator-strip{background:transparent;border:0}

/* v0.11: readable panels and a separate bottom run control. */
.player-info:before,.spells:before,.relic-area:before{display:none!important}
.player-info,.spells,.relic-area{border:1px solid #6d888a;box-shadow:0 2px 6px #172b2630}
.run-dock.board-actions{position:absolute;top:auto;bottom:12px;right:14px;left:auto;width:calc(var(--action-width,280px) - var(--board-nudge,0px));display:flex;flex-direction:column;z-index:10}
.run-dock #returnBtn{width:100%;position:static;min-height:48px;font-size:18px}
.run-dock #playBtn{width:100%}.run-dock:has(#returnBtn:not([hidden])) #playBtn{display:none}
#motherControls #excavatorService{background:transparent url('./assets/service-button-v11.webp') center/100% 100% no-repeat;border:0;box-shadow:none;color:#fff0cc;text-shadow:0 1px 2px #000;min-height:56px;padding:10px 24%;font-size:10px;font-weight:bold}
.spawn-magic{position:absolute;inset:-20%;background:url('./assets/action-v11.webp') 0 0/400% 400%;pointer-events:none;animation:summonFrames .55s steps(1) forwards;z-index:-1}
@keyframes summonFrames{0%{background-position:0 0}30%{background-position:33.333% 0}65%{background-position:66.666% 0}90%,100%{background-position:100% 0}}
.action-ghost{isolation:isolate}
@media(max-width:760px){.player-column>.board-actions{grid-template-columns:1fr}.run-dock.board-actions{position:fixed;bottom:8px;right:8px;width:145px}.run-dock #playBtn{min-height:52px;font-size:15px}.player-column .relic-area{right:160px}.run-dock #returnBtn{min-height:52px}#motherControls #excavatorService{min-height:48px;font-size:9px}}
@media(prefers-reduced-motion:reduce){.spawn-magic{animation:none;background-position:100% 0}}
/* v0.13 */
.slot.in-flight .tool-icon{visibility:visible!important;opacity:.7!important;filter:url(#tool-outline)}.slot.in-flight .level{visibility:visible;opacity:.4}
.recall-magic{position:absolute;inset:-25%;z-index:-1;background:url('./assets/combat-return-v13.webp') 0 100%/400% 400%;animation:recallFrames .85s steps(1) forwards}
@keyframes recallFrames{0%{background-position:0 100%}30%{background-position:33.333% 100%}65%{background-position:66.666% 100%}100%{background-position:100% 100%}}
#purchaseReel.card-procession{position:fixed;inset:0;z-index:80;pointer-events:none;display:grid;place-items:center;background:none;border:0;padding:0;overflow:hidden}
.purchased-card{width:min(340px,80vw);height:min(440px,65vh);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;padding:22px;background:linear-gradient(#343043,#101c27);border:2px solid #ebc879;border-radius:18px;box-shadow:0 12px 50px #0009;color:#fff0cb;text-align:center}.purchased-card .upgrade-art{width:160px;height:160px;flex:none}.purchased-card b{font-size:26px}.purchased-card strong{font-size:18px}.purchased-card small{color:#aff0b2;letter-spacing:3px}
.manager-upgrade-note{color:#d3bf80!important}#motherBack{display:none}
@media(min-width:761px){.run-dock.board-actions{width:calc((var(--action-width,280px) - var(--board-nudge,0px))*1.3)}.run-dock #playBtn{min-height:154px}@media(max-height:650px){.run-dock #playBtn{min-height:125px}}}
