:root{color-scheme:dark;--bg:#142e31;--line:#4a6969;--cream:#fff0cc;--muted:#a6bfba;--gold:#ffd078;--teal:#29bbae;font-family:Trebuchet MS,Arial,sans-serif;color:var(--cream);font-synthesis:none}*{box-sizing:border-box}body{display:flow-root;margin:0;background:radial-gradient(ellipse at 50% 35%,#29403e,#091b21 75%);min-height:100svh}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation;border:1px solid var(--line);background:#1c393b;border-radius:12px;transition:transform .12s,filter .12s,background .2s;user-select:none}button:active:not(:disabled){transform:translateY(2px) scale(.98);filter:brightness(1.14)}button:focus-visible,a:focus-visible{outline:3px solid #ffe1a0;outline-offset:3px}button:disabled{cursor:default;filter:saturate(.25);opacity:.48}button img{pointer-events:none}img{object-fit:contain;user-select:none}button[hidden],[hidden]{display:none!important}h1,h2,h3,p{margin:0}#app{position:relative;isolation:isolate;width:100%;max-width:500px;height:100svh;min-height:570px;max-height:1050px;margin:auto;background:#142e31;display:flex;flex-direction:column;overflow:hidden;border:1px solid #345153;box-shadow:0 20px 90px #0008}header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:15px 14px 12px;flex:none;background:linear-gradient(#1d393b,#152e31);border-bottom:1px solid #365252}.location{font-size:10px;letter-spacing:1.1px;color:#b5c9bd;line-height:1.5}.location strong{display:block;font-size:14px;color:var(--gold);letter-spacing:0}.logo{font-size:23px;font-weight:1000;letter-spacing:-1.3px;color:#ffc967;text-shadow:0 2px #6c461e}.logo span{color:#fff0cf}#wallet{display:flex;align-items:center;gap:5px;min-width:83px;padding:6px 9px;border-color:#927950;background:linear-gradient(#263f3d,#172e31);box-shadow:inset 0 1px #fbd58422}#wallet img{width:25px;height:25px}#wallet b{font-size:19px;font-variant-numeric:tabular-nums}.activities{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:8px 12px}.activities button{display:flex;align-items:center;text-align:left;padding:8px 9px;gap:9px;background:linear-gradient(#27494a,#1b373b);border-color:#497274}.activity-icon{display:grid;place-items:center;width:31px;height:31px;border-radius:50%;color:#fcd079;font-size:26px;background:#413e2c;box-shadow:inset 0 0 0 1px #a07f3c}.fish-icon{color:#8be6d5;background:#204c50;box-shadow:inset 0 0 0 1px #4b9190;font-size:31px}.activities button>span:nth-child(2){font-size:13px;font-weight:bold;flex:1}.activities small{display:block;font-size:10px;font-weight:normal;color:var(--muted);margin-top:3px}.activities b{font-size:14px;color:var(--gold)}#orders{display:grid;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;gap:8px;padding:0 12px 8px}.order{position:relative;border:2px solid #bc9461;background:linear-gradient(130deg,#fff0ce,#e9d3aa);border-radius:14px;padding:9px 10px;color:#51422c;box-shadow:0 3px #061d2444,inset 0 0 0 2px #fff4db66;min-width:0}.order h3{font-size:13px;line-height:1.1}.order .order-chain{font-size:10px;opacity:.7;margin-top:3px}.order-content{display:flex;align-items:center;justify-content:space-between;min-height:51px;gap:5px}.requirements{display:flex;gap:7px}.ingredient{width:34px;position:relative;text-align:center;display:block}.ingredient img{width:33px;height:33px;display:block;filter:drop-shadow(0 2px 1px #342a2444)}.ingredient b{position:absolute;top:0;right:-2px;background:#254247;border:1px solid #aec3b5;color:#fff5dd;border-radius:4px;font-size:10px;padding:0 3px}.ingredient small{font-size:11px;font-weight:bold;color:#aa573d}.ingredient.complete small{color:#3d864c}.reward{white-space:nowrap;font-size:14px;font-weight:bold;display:flex;align-items:center;gap:3px}.reward img{width:18px;height:18px}.submit{display:block;width:100%;padding:6px;font-weight:bold;font-size:12px;border-radius:8px;background:#bbb29b;border-color:#a89b84;color:#fff9e7;box-shadow:inset 0 1px #fff6}.submit:disabled{opacity:.75}.submit.ready{background:linear-gradient(#43bda0,#278773);border-color:#286b5c;box-shadow:0 2px #1d695d;color:white}.mine-progress{padding:3px 18px 9px;font-size:11px;color:#b3c7c4;flex:none}.mine-progress>div:first-child{display:flex;justify-content:space-between;margin-bottom:6px}.mine-progress b{color:#ffdc8e;font-size:12px}.track{height:5px;border-radius:5px;background:#0b2227;overflow:hidden;box-shadow:0 0 0 1px #547177}.track i{display:block;height:100%;background:linear-gradient(90deg,#5ab4c8,#adb6ef);transition:width .4s;border-radius:5px}#arena{position:relative;flex:1;min-height:195px;display:flex;flex-direction:column;overflow:hidden}.cave{position:absolute;inset:-20px 0 -40px;z-index:-1;background:linear-gradient(#142e31 0%,#142e3108 22%,#142e3155 75%,#142e31 100%),url('../art/cave.webp') center/cover;opacity:.5}#target-info{text-align:center;z-index:2;padding:7px 30px 0;pointer-events:none;flex:none}.target-tag{font-size:9px;font-weight:bold;letter-spacing:1.7px;color:#b3c9c1;margin-bottom:5px}h1{font-size:22px;line-height:1.15;color:#ffe7b8;text-shadow:0 2px 2px #1118}#target-value{height:26px;display:flex;align-items:center;justify-content:center;gap:5px;font-size:13px;color:#ffd981;font-weight:bold}#target-value img{width:18px;height:18px}.health{position:relative;height:17px;border:1px solid #b6b582;border-radius:8px;background:#101f24;overflow:hidden;max-width:290px;margin:auto}.health i{position:absolute;inset:0 auto 0 0;width:100%;border-radius:6px;background:linear-gradient(#8dcf93,#3c9b84);transition:width .13s}.health #hp-trail{background:#f7d279;transition:width .6s}.health b{position:relative;display:block;font-size:10px;color:#fffce8;line-height:15px;text-shadow:0 1px #1c5e4f;font-variant-numeric:tabular-nums}#battle{position:relative;flex:1;min-height:145px;width:100%;max-height:420px;margin:auto}.ground{position:absolute;left:17%;right:17%;top:67%;height:21%;border-radius:50%;background:radial-gradient(ellipse,#82957b28,transparent 70%)}#target{border:0;background:transparent;position:absolute;left:50%;top:50%;width:46%;height:90%;transform:translate(-50%,-50%);padding:0;z-index:3;filter:drop-shadow(0 10px 9px #0006);cursor:default}#target:active{transform:translate(-50%,-50%)}#target-art{width:100%;height:100%;display:block}.target-shine{position:absolute;inset:10%;border-radius:28%;box-shadow:0 0 50px #ffd56900;pointer-events:none}.hero{position:absolute;width:30%;height:48%;z-index:4;border:0;background:none;padding:0;bottom:5%}.hero canvas{width:100%;height:100%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 4px 2px #09191977)}.hero:nth-child(1){left:-1%;bottom:37%}.hero:nth-child(2){left:0;bottom:14%}.hero:nth-child(3){left:12%;bottom:-4%}.hero:nth-child(4){right:-1%;bottom:37%}.hero:nth-child(5){right:0;bottom:14%}.hero:nth-child(6){right:12%;bottom:-4%}.hero small{position:absolute;bottom:5%;left:31%;width:36%;height:3px;background:#102f32;border-radius:3px;overflow:hidden;opacity:.6}.hero small i{display:block;background:#c6c795;height:100%;transform-origin:left}.hero:active{filter:brightness(1.15)}#status{font-size:10px;line-height:1.4;color:#b5c8bb;text-align:center;padding:3px 8px 9px;min-height:23px}#start{position:absolute;bottom:33px;left:50%;transform:translateX(-50%);z-index:5;width:225px;min-height:43px;font-size:16px;font-weight:bold;box-shadow:0 4px 20px #001c25bb}#start:active{transform:translateX(-50%) translateY(2px)}#start span{margin-left:14px}.gold{background:linear-gradient(#f9d983,#c78f39);border:2px solid #ffe5a3;color:#503813;box-shadow:inset 0 1px #fff9,0 3px #624b28}.teal{background:linear-gradient(#28bbaa,#087575);border:2px solid #8cded0;box-shadow:inset 0 1px #fff4,0 3px #064e57;color:#fff4ce}.main-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:5px 12px 12px;z-index:2;background:#142e31}.main-actions button{min-height:53px;display:flex;align-items:center;justify-content:center;gap:10px;position:relative;font-weight:bold;font-size:16px}.main-actions small{display:block;font-weight:normal;font-size:10px;margin-top:2px}.button-icon{font-size:27px;line-height:1}#upgrade-dot{position:absolute;top:-5px;right:-3px;width:12px;height:12px;border:2px solid #fff2c6;border-radius:50%;background:#e8a633;box-shadow:0 0 12px #ffd55977}footer{display:flex;gap:8px;padding:9px 12px max(9px,env(safe-area-inset-bottom));border-top:1px solid #456160;background:#193337}footer button{flex:1;height:37px;font-size:13px;font-weight:bold;background:#213b40;color:#9db5b7}footer .active{border-color:#f4cc77;background:linear-gradient(#218880,#13636a);color:#fff0c7}footer .settings{flex:0 0 37px;font-size:20px}#overlay{position:absolute;inset:0;z-index:20;background:#03141bcb;display:flex;align-items:center;justify-content:center;padding:16px;backdrop-filter:blur(3px);animation:veil .17s}.modal{width:100%;max-height:94%;overflow:auto;border:1px solid #75928a;border-radius:21px;background:linear-gradient(145deg,#264546,#132f34);box-shadow:0 16px 60px #0009,inset 0 1px #ccddbd44;padding:20px 17px;color:#fff0cf;animation:modal .24s cubic-bezier(.2,.8,.2,1);scrollbar-width:thin}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:17px}.modal h2{font-size:23px;letter-spacing:-.5px}.eyebrow{font-size:9px;letter-spacing:1.7px;color:#87b5a9;margin-bottom:6px;font-weight:bold}.close{width:32px;height:32px;flex:none;border-radius:50%;color:#b5cebf;font-size:22px;line-height:1;background:#123036}.sub{font-size:12px;line-height:1.55;color:#abc5c1;text-align:center;margin:12px 0}.wide{width:100%;min-height:43px;font-size:14px;font-weight:bold;margin-top:10px}.mine-up{border:1px solid #9d8854;border-radius:12px;padding:13px;background:linear-gradient(120deg,#435044,#273e3e);display:flex;gap:12px;align-items:center}.mine-up>div{flex:1;font-weight:bold;font-size:16px}.mine-up small{display:block;font-size:11px;font-weight:normal;color:#d1d2b2;margin-top:5px;line-height:1.4}.mine-up button{padding:9px 10px;font-size:13px;white-space:nowrap}.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0}.stat{border-radius:10px;background:#0f282c88;padding:11px;text-align:center;font-size:19px;font-weight:bold;color:#f8d68f}.stat small{display:block;color:#a9c3bc;font-size:10px;font-weight:normal;margin-top:4px}.offer{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:7px 0 4px}.choice{--rarity:#9faeac;position:relative;background:linear-gradient(145deg,color-mix(in srgb,var(--rarity) 23%,#213638),#112e33);border:1.5px solid var(--rarity);border-radius:13px;padding:12px 7px 8px;text-align:center;box-shadow:0 5px 12px #0003;animation:deal .3s backwards;display:flex;flex-direction:column;align-items:center}.rarity-1{--rarity:#77c6ed}.rarity-2{--rarity:#c28bff}.rarity-3{--rarity:#ffce65}.choice:nth-child(2){animation-delay:.08s}.choice:nth-child(3){animation-delay:.16s}.choice .rarity{font-size:8px;text-transform:uppercase;color:var(--rarity);font-weight:bold;letter-spacing:.4px;min-height:14px}.effect-icon{display:grid;place-items:center;height:61px;font-size:38px;color:var(--rarity);text-shadow:0 2px 5px #0007}.choice h3{font-size:12px;line-height:1.3;min-height:33px;margin:5px 0}.choice .amount{color:#fff0bd;font-size:24px;font-weight:bold;line-height:1.4}.choice .who{display:flex;align-items:center;justify-content:center;gap:2px;min-height:41px;font-size:9px;line-height:1.25;color:#b7cfc4}.who img{width:30px;height:33px}.choice button{width:100%;margin-top:9px;padding:8px 3px;border-color:var(--rarity);font-size:11px;font-weight:bold;background:#275650}.upgrade-log{font-size:11px;color:#adc5bb;text-align:center;margin-top:13px}#overlay.inventory-mode{background:linear-gradient(transparent 25%,#02192088 48%);backdrop-filter:none!important;pointer-events:none}.inventory-sheet{pointer-events:auto;position:absolute;bottom:0;left:0;right:0;max-height:var(--sheet-space,75%);border-radius:22px 22px 0 0;padding:15px 14px max(14px,env(safe-area-inset-bottom));box-shadow:0 -12px 45px #001a2088}.inventory-sheet .modal-head{margin-bottom:12px}.board{display:grid;grid-template-columns:repeat(6,1fr);gap:5px;max-width:min(100%,calc(var(--sheet-space,500px) - 145px));margin:auto}.cell{aspect-ratio:1;background:linear-gradient(#17353a,#0e282f);border:1px solid #496762;border-radius:8px;position:relative;min-width:0;padding:3px;transition:border-color .15s,background .15s}.cell img{width:100%;height:100%;filter:drop-shadow(0 3px 1px #0006);pointer-events:none}.cell b{position:absolute;bottom:1px;right:2px;background:#112c32e8;border:1px solid #89a69c;border-radius:4px;font-size:9px;padding:0 3px;line-height:13px;color:#f8e9c5}.cell.selected{border:2px solid #ffce68;background:#647055;box-shadow:0 0 10px #ffd77255}.cell.match{border-color:#7ddea5;background:#245a50;box-shadow:inset 0 0 7px #a1efa333}.board-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:12px;color:#b9ccc1;font-size:11px;min-height:30px}.trash{padding:6px 10px;font-size:11px;color:#eabda0}.team-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.team-card{padding:7px 3px;background:#123039;font-size:12px;font-weight:bold}.team-card img{width:100%;height:95px}.team-card small{display:block;font-size:9px;color:#a8c9bd;font-weight:normal;margin:3px 0}.hero-large{width:140px;height:150px;display:block;margin:0 auto}.slot-window{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:9px;border:2px solid #b69b60;border-radius:17px;background:#0b2027;box-shadow:inset 0 3px 12px #0009,0 6px 0 #0b252b;margin:22px 0 16px;position:relative}.slot-window:after{content:'';position:absolute;inset:9px;pointer-events:none;border-radius:9px;background:linear-gradient(#041b2266,transparent 22%,transparent 75%,#041b2266)}.reel{height:110px;overflow:hidden;border-radius:8px;background:linear-gradient(#e4c998,#fff1cf 40%,#f0dab1);border:1px solid #ffd79955}.reel-strip{will-change:transform}.symbol{height:110px;display:grid;place-items:center;font-size:49px}.symbol img{width:80%;height:85px;filter:drop-shadow(0 3px 2px #70512b44)}.mini-result{text-align:center;min-height:64px;display:flex;flex-direction:column;justify-content:center;font-size:15px;color:#d4e0c5;line-height:1.5}.mini-result strong{display:block;font-size:28px;color:#ffd77c}.resource-line{display:flex;align-items:center;justify-content:space-between;color:#a9c4b9;font-size:12px}.resource-line b{color:#f2d490}.fishing-lake{height:230px;border-radius:13px;position:relative;overflow:hidden;background:linear-gradient(#0c2a4344,#082b3855),url('../art/fishing-scene.webp') center/cover;border:1px solid #5e8988;margin-top:14px}.rod{position:absolute;width:130px;height:5px;background:linear-gradient(#be9b58,#6f482a);left:10%;top:70%;transform:rotate(-48deg);transform-origin:left;border:1px solid #dab76e;border-radius:4px}.line{position:absolute;left:47%;top:34%;width:1px;height:40%;background:#d5ecd399;transform:rotate(-16deg)}.bobber{position:absolute;left:58%;top:65%;width:12px;height:21px;border:2px solid #ebd9a9;background:linear-gradient(#ea6849 50%,#fff0cf 50%);border-radius:45%;animation:bob 1.7s infinite ease-in-out;z-index:2}.ripples{position:absolute;left:51%;top:72%;width:70px;height:15px;border:1px solid #a5e4d788;border-radius:50%;animation:ripple 2s infinite}.catch-art{position:absolute;inset:10%;width:80%;height:80%;filter:drop-shadow(0 8px 5px #021b30aa);animation:catch .5s cubic-bezier(.2,.9,.3,1)}.caught .rod,.caught .line,.caught .bobber,.caught .ripples{display:none}.timing{position:relative;height:18px;border-radius:10px;background:#10282f;border:1px solid #668982;margin-top:20px}.timing-zone{position:absolute;left:35%;width:30%;height:100%;background:#47b58e99;border-left:1px solid #9ee3a4;border-right:1px solid #9ee3a4}.timing-pointer{position:absolute;height:26px;width:5px;background:#ffd775;top:-5px;left:0;border:1px solid #fff2ca;border-radius:3px;box-shadow:0 0 8px #ffe19277}.fish-progress{height:4px;background:#102a30;border-radius:4px;margin-top:12px;overflow:hidden}.fish-progress i{display:block;height:100%;background:#91d9b0;transition:width .1s}.vein-scene{height:245px;position:relative;display:grid;place-items:center;background:radial-gradient(ellipse,#dfc36b30,transparent 65%)}.vein-rock{border:0;background:none;width:220px;height:220px;padding:0;filter:drop-shadow(0 9px 12px #0006)}.vein-rock img{width:100%;height:100%}.vein-score{text-align:center;font-size:36px;color:#ffdb84;font-weight:bold;font-variant-numeric:tabular-nums}.tap-hint{text-align:center;font-size:12px;color:#c3d0ae;margin-top:8px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:13px 0}.settings-grid button{padding:13px 7px;font-size:12px}.notice{font-size:11px;line-height:1.6;color:#a1bcb3;margin:12px 0}.danger{color:#ffb5a4;border-color:#a77361}.confirm-actions{display:flex;gap:8px;margin-top:18px}.confirm-actions button{flex:1;padding:12px}.gain{position:absolute;left:50%;top:40%;font-weight:bold;font-size:16px;color:#ffe39b;text-shadow:0 2px 3px #032528;white-space:nowrap;pointer-events:none;z-index:6}.critical{color:#fff1aa;font-size:23px}.hit-spark{position:absolute;width:24px;height:24px;background:#f7e4b7;clip-path:polygon(50% 0,61% 36%,100% 50%,64% 62%,50% 100%,37% 64%,0 50%,37% 38%);pointer-events:none}.particle{position:absolute;width:5px;height:5px;border-radius:2px;background:#ecc77a;pointer-events:none}.flight{position:absolute;width:28px;height:28px;pointer-events:none;z-index:80}.flight img{width:100%;height:100%}.beam{position:absolute;height:4px;transform-origin:left;border-radius:5px;background:#a9eff0;box-shadow:0 0 8px #5ee4eb}.ring{position:absolute;width:75px;height:75px;border:4px solid #ffd794;border-radius:50%;pointer-events:none}#battle-fx{position:absolute;inset:0;z-index:6;pointer-events:none}#flights{position:absolute;inset:0;pointer-events:none;z-index:40;overflow:hidden}#toast{position:absolute;bottom:145px;left:50%;transform:translate(-50%,10px);max-width:90%;width:max-content;background:#061e2ff2;color:#ffe5af;border:1px solid #6a897f;padding:11px 15px;border-radius:12px;font-size:12px;line-height:1.4;z-index:70;pointer-events:none;opacity:0;transition:opacity .2s,transform .2s;box-shadow:0 8px 25px #0005}#toast.show{opacity:1;transform:translate(-50%,0)}#loader{position:absolute;inset:0;z-index:100;background:#173537;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:18px;transition:opacity .3s}#loader p{font-size:13px;color:#aec6bb}#loader i{width:25px;height:25px;border-radius:50%;border:2px solid #365953;border-top-color:#f5cc75;animation:spin .8s linear infinite}#loader.done{opacity:0;pointer-events:none}
@keyframes spin{to{transform:rotate(360deg)}}@keyframes bob{50%{transform:translateY(4px) rotate(4deg)}}@keyframes ripple{to{transform:scale(1.5);opacity:0}}@keyframes veil{from{opacity:0}}@keyframes modal{from{opacity:0;transform:translateY(14px) scale(.97)}}@keyframes deal{from{opacity:0;transform:translateY(14px) rotate(-2deg)}}@keyframes catch{from{transform:translateY(120px) scale(.2);opacity:0}}
@media(min-width:550px) and (min-height:650px){#app{height:calc(100svh - 24px);margin:12px auto;border-radius:23px}}
@media(max-height:760px){header{padding:10px 12px}.activities{padding:6px 12px}.activities button{padding:6px 8px}.activities small{display:none}#orders{padding-bottom:5px}.order{padding:7px 9px}.order-content{min-height:47px}.mine-progress{padding-top:2px;padding-bottom:5px}#target-info{padding-top:4px}h1{font-size:20px}#target-value{height:22px}#arena{min-height:175px}#battle{min-height:120px}.main-actions button{min-height:46px}.main-actions{padding-bottom:9px}footer{padding-top:6px;padding-bottom:6px}footer button{height:32px}.fishing-lake{height:190px}.modal{padding:16px 14px}.vein-scene{height:205px}.vein-rock{height:190px;width:190px}}
@media(max-width:380px){.logo{font-size:20px}.location{font-size:9px}.location strong{font-size:12px}#wallet{min-width:70px;padding:5px}#wallet b{font-size:16px}.main-actions button{font-size:14px}.choice{padding:10px 4px 6px}.choice h3{font-size:11px}.choice .amount{font-size:22px}.offer{gap:5px}.modal{padding:15px 12px}.modal h2{font-size:21px}.order h3{font-size:12px}.ingredient{width:28px}.ingredient img{width:28px;height:30px}.requirements{gap:4px}.reward{font-size:12px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

.activity-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}.effect-icon svg{width:43px;height:43px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round}

.vein-hero{position:absolute;width:29%;height:45%;z-index:2;pointer-events:none}.vein-hero canvas{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 3px 2px #0005)}.vh-0{left:-4%;top:12%}.vh-1{left:-1%;top:32%}.vh-2{left:8%;top:52%}.vh-3{right:-4%;top:12%}.vh-4{right:-1%;top:32%}.vh-5{right:8%;top:52%}.vein-rock{width:54%;height:90%}.vein-scene .vein-rock{z-index:1}#overlay.inventory-mode{background:linear-gradient(transparent 30%,#02192088 55%)}

/* V2: three strictly aligned opposing pairs, with a protected name band per row. */
#target{width:52%;height:94%}
#battle .hero{width:27%;height:33.333%;bottom:auto;left:auto;right:auto;transform:none;overflow:visible}
#battle .hero:nth-child(-n+3){left:-.5%}
#battle .hero:nth-child(n+4){right:-.5%}
#battle .hero:nth-child(1),#battle .hero:nth-child(4){top:0}
#battle .hero:nth-child(2),#battle .hero:nth-child(5){top:33.333%}
#battle .hero:nth-child(3),#battle .hero:nth-child(6){top:66.666%}
#battle .hero canvas{position:absolute;top:0;left:0;width:100%;height:calc(100% - 24px);object-fit:contain}
.hero-name{position:absolute;bottom:5px;left:50%;transform:translateX(-50%);white-space:nowrap;max-width:100%;font-size:11px;font-weight:bold;line-height:15px;color:var(--hero-color);text-shadow:0 1px 2px #00131c;padding:0 4px;border-radius:5px;background:#08252cc9;pointer-events:none}
#battle .hero small{bottom:0;left:30%;width:40%;height:2px;opacity:.8}
#battle .hero small i{background:var(--hero-color)}
.damage-number{position:absolute;z-index:10;pointer-events:none;font-weight:1000;font-size:17px;font-variant-numeric:tabular-nums;line-height:1;white-space:nowrap;text-shadow:0 2px 2px #082026,1px 0 2px #082026,-1px 0 2px #082026;transform:translateX(-50%)}
.damage-number.is-crit{font-size:20px;text-shadow:0 2px 2px #082026,0 0 7px #000}
.vein-scene .vein-hero{width:27%;height:33.333%;left:auto;right:auto;top:auto}
.vein-scene .vh-0,.vein-scene .vh-1,.vein-scene .vh-2{left:-4%}
.vein-scene .vh-3,.vein-scene .vh-4,.vein-scene .vh-5{right:-4%}
.vein-scene .vh-0,.vein-scene .vh-3{top:0}
.vein-scene .vh-1,.vein-scene .vh-4{top:33.333%}
.vein-scene .vh-2,.vein-scene .vh-5{top:66.666%}
.vein-hero canvas{height:calc(100% - 16px)}
.vein-hero .hero-name{font-size:9px;line-height:13px;bottom:0}
.vein-rock{width:61%;height:97%}
@media(max-height:760px){#target-info{padding-top:2px}.target-tag{margin-bottom:3px;font-size:8px}#target-value:empty{height:9px}.hero-name{font-size:9px;line-height:13px}#battle .hero canvas{height:calc(100% - 21px)}.damage-number{font-size:15px}.damage-number.is-crit{font-size:18px}}

.card-preview{font-size:12px;font-weight:bold;color:#bde4cc;text-align:center;margin-top:7px;min-height:31px}.card-preview small{display:block;font-size:8px;font-weight:normal;color:#b5c9c0;margin-top:2px}

/* Decorative cave overflow must never scroll the mining HUD on focus. */
#arena{overflow:clip}

.activities{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}

#battle .hero.just-upgraded .hero-name{box-shadow:0 0 0 1px var(--hero-color),0 0 12px color-mix(in srgb,var(--hero-color) 45%,transparent);background:#244449;transition:box-shadow .4s}
#battle .hero.just-upgraded canvas{filter:drop-shadow(0 0 5px var(--hero-color))}

/* Monster health is distinct; block durability stays green. */
.health.monster-health{border-color:#e7958f}.health.monster-health #hp{background:linear-gradient(#f27570,#c43c47)}.health.monster-health #hp-trail{background:#ffb0a0}.health.monster-health b{text-shadow:0 1px #671d28}

.late-order{border-color:#d3a44d}.late-progress{height:15px;border-radius:5px;background:#c6b796;position:relative;overflow:hidden;margin:0 0 5px}.late-progress i{position:absolute;inset:0 auto 0 0;background:#68b29888;transition:width .25s}.late-progress span{position:relative;display:block;text-align:center;font-size:9px;line-height:15px;color:#3b5147;font-weight:bold}

/* V7 inventory: persistent order tint, independently selectable and draggable. */
.board{touch-action:none;user-select:none;-webkit-user-select:none}.cell{cursor:grab;-webkit-touch-callout:none;touch-action:none;-webkit-user-drag:none}.cell img{-webkit-user-drag:none}.cell:empty{cursor:default}.cell.needed{background:linear-gradient(#377756,#225139);border-color:#91d78c;box-shadow:inset 0 0 9px #8fe29530}.cell.needed:after{content:'✓';position:absolute;left:2px;top:0;color:#cbffc3;font-size:10px;font-weight:bold;text-shadow:0 1px 2px #164329}.cell.selected{border:2px solid #ffce68}.cell.drag-source{opacity:.4}.cell.drop-target,.trash.drop-target{outline:2px solid #ffe398;outline-offset:1px;box-shadow:0 0 14px #efc67588}.inventory-drag-ghost{position:fixed;z-index:9999;pointer-events:none;transform:translate(-50%,-58%) scale(1.15);border-radius:8px;padding:3px;background:#416653e8;border:2px solid #ffe09a;box-shadow:0 8px 20px #001b28aa;cursor:grabbing}.inventory-drag-ghost img{width:100%;height:100%;object-fit:contain}.inventory-drag-ghost b{position:absolute;bottom:1px;right:2px;font-size:10px;color:#fff1c6;background:#183d36;border-radius:3px;padding:0 3px}.board-footer span{max-width:78%;line-height:1.35}
.upgrade-float{position:absolute;top:3px;left:50%;transform:translateX(-50%);width:96px;max-width:108%;padding:4px 3px 3px;border:1px solid #a5d3aa;border-radius:8px;background:#163d3af2;box-shadow:0 3px 12px #05212899;pointer-events:none;z-index:12;text-align:center;line-height:17px;color:#efffd2}.upgrade-float>img{width:23px;height:25px;vertical-align:middle;margin-right:1px}.upgrade-float .upgrade-symbol{display:inline-block;font-size:14px;vertical-align:middle;margin-right:3px}.upgrade-symbol svg{width:15px;height:15px;fill:currentColor}.upgrade-float>b{font-size:14px;vertical-align:middle}.upgrade-float>small{position:static!important;display:block!important;width:auto!important;height:auto!important;opacity:1!important;font-size:9px!important;line-height:12px!important;color:#c7e2bc!important;font-weight:normal}.main-actions button{transition:background .25s,border-color .25s,box-shadow .25s,transform .1s}

.upgrade-float{top:0;padding:2px 2px;line-height:18px;width:93px}.upgrade-float>img{width:17px;height:19px}.upgrade-float>b{font-size:13px}.upgrade-float>small{font-size:8px!important;line-height:10px!important}.upgrade-float .upgrade-symbol{font-size:12px}

.location a{color:#9fd8cf;font-size:10px;letter-spacing:.4px;text-decoration:none}
.location a:hover{color:#ffe1a0}
#complete-label{position:absolute;inset:18% 8%;display:grid;place-items:center;text-align:center;font-size:34px;font-weight:1000;letter-spacing:1px;color:#ffe7a8;text-shadow:0 3px 0 #6c461e,0 8px 18px #000;z-index:4;pointer-events:none}
#target.done img{visibility:hidden}
