@font-face{font-family:Game;src:local('Trebuchet MS');font-display:swap}
:root{color-scheme:dark;--ink:#f9ebd1;--muted:#adc2bb;--gold:#ffce62;--teal:#2ec5b7;--dark:#102c31;--paper:#f5e6c8;--paper-ink:#483322;--edge:#734b2c;--safe:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box}html,body{margin:0;width:100%;min-height:100%;overscroll-behavior:none}body{font:16px/1.35 Game,'Trebuchet MS',Arial,sans-serif;background:#091b20;color:var(--ink);background-image:radial-gradient(ellipse at 50% 25%,#23484c 0,transparent 64%);user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer;touch-action:manipulation}button:disabled{cursor:default;filter:saturate(.2);opacity:.5}button:focus-visible{outline:3px solid #fce18e;outline-offset:3px}button,img{ -webkit-user-drag:none}img{object-fit:contain;max-width:100%}h1,h2,h3,p{margin:0}h2{font-size:27px;line-height:1.15}h3{font-size:18px}button{border:0}small{font-size:12px}[hidden]{display:none!important}
#game{position:relative;max-width:490px;height:100dvh;min-height:640px;max-height:1000px;margin:0 auto;display:flex;flex-direction:column;overflow:hidden;background:#132d32;border-inline:1px solid #57706a66;box-shadow:0 0 100px #0009;background-image:linear-gradient(#142e34aa,#102c31e8),url('../assets/cave.webp');background-size:cover;background-position:center}
#hud{height:76px;flex:none;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;padding:13px 15px 9px;background:linear-gradient(#172b2dd9,#13292ac2);border-bottom:1px solid #f4cb7433;z-index:3}.brand{font-size:23px;line-height:.96;font-weight:1000;text-align:center;letter-spacing:-1.3px;text-shadow:0 2px #201b1a,0 3px 8px #000}.brand span{color:#f8bf51}.brand small{display:block;font-size:9px;color:#afc2b4;letter-spacing:3px;font-weight:600;margin-top:6px}.resource{display:flex;align-items:center;gap:7px;border:1px solid #7c785d;border-radius:11px;background:linear-gradient(#263e40,#152b2d);padding:5px 8px;min-width:0;box-shadow:inset 0 1px #ffffff16,0 2px 3px #0006}.resource b{font-size:20px}.resource em{font:12px Arial;color:#99b8b4}.resource .bolt{font-size:27px;color:#ffd45f;line-height:1;filter:drop-shadow(0 2px 0 #84521e)}.resource .coin{width:27px;height:27px;border-radius:50%;box-shadow:0 2px #41331d}#coins{justify-self:end}.energy-line{height:3px;background:#0b181c;border-radius:4px;margin-top:2px}.energy-line i{display:block;height:100%;background:#f4ca64;border-radius:4px}
#main-view{flex:1;display:flex;flex-direction:column;min-height:0;position:relative}#orders{padding:10px 12px 0;z-index:3}.milestone{display:flex;align-items:center;gap:9px;padding:7px 11px 9px;background:linear-gradient(#29484a,#193334);border:1px solid #617267;border-radius:13px;box-shadow:0 3px #07191d99;margin-bottom:10px}.milestone-left{flex:1;min-width:0}.milestone-title{display:flex;justify-content:space-between;font-size:12px;color:#d5e2d7;margin-bottom:5px;letter-spacing:.5px}.milestone-title strong{color:#ffd575}.segments{display:grid;grid-template-columns:repeat(10,1fr);gap:4px}.segments i{height:15px;border:1px solid #64807970;background:#102b30;border-radius:4px;box-shadow:inset 0 2px #0004}.segments i.filled{background:linear-gradient(#ffe590,#e6a236);border-color:#eec67d;box-shadow:0 0 8px #f5b84230}.milestone img{width:57px;height:45px;border-radius:7px}.order-panel{position:relative;color:var(--paper-ink);border:3px solid #b18550;border-radius:15px;background:radial-gradient(ellipse at 50% 0,#fff3d9,#ead2a7);box-shadow:0 4px 0 #36291e,0 5px 16px #0004;padding:10px 12px}.order-title{font-size:15px;font-weight:900;display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.order-title small{font-size:11px;font-weight:500;color:#8b704b}.order-body{display:flex;align-items:center;gap:10px}.requirements{display:flex;align-items:center;gap:9px;flex:1}.requirement{position:relative;text-align:center;min-width:46px}.requirement img{width:48px;height:48px;display:block}.requirement .level-tag{position:absolute;right:-2px;top:-3px}.requirement strong{display:block;font-size:13px;color:#a54530}.requirement.ready strong{color:#358643}.order-reward{display:flex;align-items:center;gap:5px;margin-left:auto;flex-wrap:wrap;justify-content:center;max-width:96px;font-size:13px}.order-reward img{width:37px;height:30px;border-radius:5px}.order-submit{font-size:14px;border-radius:8px;padding:9px 12px;background:linear-gradient(#28b9a8,#14786f);color:#fff8e9;font-weight:900;box-shadow:0 3px #095550;border:1px solid #146b64;min-width:65px}.order-submit:disabled{background:#b6ae99;border-color:#a49b86;box-shadow:0 3px #8b806c}.order-empty{display:flex;align-items:center;gap:13px;padding:5px}.order-empty b{display:block;font-size:16px}.order-empty span{font-size:13px}.order-empty .seal{font-size:26px;color:#ad8551;border:2px dashed #ba9664;padding:6px 10px;border-radius:50%}
#mine{flex:1;min-height:0;display:flex;flex-direction:column;position:relative;background-image:linear-gradient(#142d3255,#152b3080),url('../assets/cave.webp');background-size:cover;background-position:center}#target-info{padding-top:18px;flex:none;text-align:center;z-index:1}.depth-pill{font-size:12px;letter-spacing:1.1px;text-transform:uppercase;color:#b9c8b5;margin-bottom:5px}.target-name{font-size:26px;font-weight:1000;letter-spacing:-.5px;text-shadow:0 2px 2px #000}.target-level{font-size:12px;background:#345354;border:1px solid #78958d80;border-radius:6px;padding:3px 7px;margin-left:7px;vertical-align:middle;letter-spacing:0;font-weight:600}.health{position:relative;width:68%;height:24px;margin:9px auto 0;background:#111e22;border:2px solid #b4a883;border-radius:9px;box-shadow:0 2px #0007;overflow:hidden}.health i{display:block;height:100%;background:linear-gradient(#69bf9e,#28866c);width:100%;border-radius:5px;transition:width .1s linear;box-shadow:inset 0 2px #c2f0b64d}.health.monster i{background:linear-gradient(#fc7d62,#c23d37)}.health span{position:absolute;inset:0;display:grid;place-content:center;font-size:12px;font-weight:900;text-shadow:0 1px 3px #000}.battle-stats{display:flex;gap:16px;justify-content:center;margin-top:8px;color:#bed5cc;font-size:12px}.battle-stats b{color:#f6d786}.status-fire{font-size:12px;color:#ffc873;min-height:16px;margin-top:3px}
#battlefield{flex:1;position:relative;min-height:230px;max-height:440px;margin-top:-4px;isolation:isolate}#target{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:2;pointer-events:none}.target-button{width:60%;max-width:280px;aspect-ratio:1;background:none;padding:0;position:relative;pointer-events:auto;touch-action:manipulation;filter:drop-shadow(0 12px 7px #0008);transition:filter .1s}.target-button img{width:100%;height:100%;object-fit:contain;pointer-events:none}.target-button.monster{width:63%;max-width:310px}.target-button.punch{animation:rock-hit .17s ease-out}.target-button .shine{position:absolute;inset:10%;border-radius:20%;background:radial-gradient(#ffffff40,transparent 70%);pointer-events:none;opacity:0}.target-button.punch .shine{opacity:1}.target-button:focus-visible{outline-offset:-8px;border-radius:30px}
#team{position:absolute;inset:0;pointer-events:none;z-index:3}.team-slot{position:absolute;width:25%;height:30%;left:-1.5%;top:2%;padding:0;background:none;pointer-events:auto;display:flex;align-items:center;justify-content:center;flex-direction:column}.team-slot:nth-child(2n){left:auto;right:-1.5%}.team-slot:nth-child(3),.team-slot:nth-child(4){top:34%}.team-slot:nth-child(5),.team-slot:nth-child(6){top:66%}.team-slot canvas{width:130%;height:auto;max-height:140px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 6px 3px #0008)}.slot-empty{width:58px;height:65px;background:linear-gradient(#163237cc,#10282fcc);border:2px dashed #98a78c75;border-radius:20px;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#a8c4b5;transition:.2s}.slot-empty b{font-size:30px;font-weight:400;line-height:1}.slot-empty small{font-size:9px;text-transform:uppercase;letter-spacing:1px;margin-top:5px}.team-slot:hover .slot-empty{border-color:#ffce69;color:#ffce69}.slot-level{font-size:10px;padding:1px 5px;background:#162b2edb;border:1px solid #798779aa;border-radius:5px;position:absolute;bottom:2%;color:#e1ddbd}.team-slot.has-hero{top:0%}.team-slot.has-hero:nth-child(3),.team-slot.has-hero:nth-child(4){top:32%}.team-slot.has-hero:nth-child(5),.team-slot.has-hero:nth-child(6){top:64%}.team-slot.buff{filter:drop-shadow(0 0 7px #7adfff)}
#effects{position:absolute;inset:0;pointer-events:none;z-index:9}.damage-number{position:absolute;left:47%;top:43%;font-size:25px;font-weight:1000;color:#fff6ce;text-shadow:0 2px 0 #532b1b,1px 0 #532b1b;animation:float-damage .75s forwards}.damage-number.crit{font-size:34px;color:#ffe465}.damage-number.burn{color:#ff9860}.spark{position:absolute;left:50%;top:50%;width:7px;height:7px;background:#ffdc86;border-radius:2px;animation:spark .55s forwards}.ring{position:absolute;left:50%;top:50%;width:30px;height:30px;border:2px solid #fff1b5;border-radius:50%;animation:ring .4s forwards}
#mine-footer{flex:none;text-align:center;padding:0 17px 12px;position:relative;z-index:4}.tap-hint{font-size:12px;color:#c0cec1;margin-bottom:10px;height:16px}.inventory-toggle{width:100%;padding:11px 16px;border-radius:13px;border:2px solid #7bddd0;background:linear-gradient(#24b6a6,#107b78);box-shadow:inset 0 2px #8ef9df66,0 4px #064a51,0 5px 16px #0006;display:flex;align-items:center;justify-content:space-between;font-size:21px;font-weight:900;text-shadow:0 1px 1px #1c5247}.inventory-toggle span{font-size:14px;color:#c6ece0;text-shadow:none}.inventory-toggle .caret{font-size:18px}.inventory-toggle.alert{border-color:#ffc979}.inventory-toggle b{display:flex;align-items:center;gap:9px}.inventory-toggle .grid-symbol{font-size:25px;color:#ffe1a3}
#inventory{position:absolute;left:9px;right:9px;bottom:9px;z-index:5;border:2px solid #7e9e8b;border-radius:16px;background:linear-gradient(#224f50,#112e34);padding:12px;box-shadow:0 -15px 35px #071a27c9,0 5px 0 #061b21;max-height:calc(100% - 180px);overflow:auto}.inventory-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-weight:900;font-size:19px}.inventory-head small{font-size:12px;color:#c3d5c6;font-weight:400}.close-small{background:#0e282d;border:1px solid #607d73;border-radius:7px;padding:3px 9px;font-size:20px}.board{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;touch-action:none}.cell{aspect-ratio:1;position:relative;padding:0;border-radius:8px;background:#0c252de8;border:1px solid #59757266;box-shadow:inset 0 2px 4px #0008;touch-action:none;min-width:0}.cell img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}.level-tag{background:#1c2b35;color:#fff5d7;font:bold 11px Arial;padding:2px 4px;border:1px solid #718491;border-radius:5px;box-shadow:0 1px 2px #0008}.cell .level-tag{position:absolute;right:0;bottom:0}.cell.selected{outline:2px solid #ffdb72;outline-offset:1px;background:#456653}.cell.merge-ready{box-shadow:inset 0 0 0 2px #70d8bc,0 0 9px #41b78950}.cell.obsolete{background:#682b2c;border-color:#de6e56}.cell.obsolete .level-tag{background:#883c32}.cell.merged{animation:merge-pop .45s}.board-note{font-size:11px;color:#bad4cb;margin:7px 0;text-align:center}.inventory-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px}.trash{background:#482b2b;border:1px dashed #bc7163;color:#eeafa0;border-radius:8px;padding:8px 10px;font-size:12px}.trash.active{background:#aa4a32;color:white}.parts-button{background:#15343b;border:1px solid #70958b;color:#dbe6cf;padding:8px 12px;border-radius:8px;font-size:12px}.drag-ghost{position:fixed;width:66px;height:66px;pointer-events:none;z-index:500;filter:drop-shadow(0 8px 6px #0008);transform:translate(-50%,-60%)}
#bottom-nav{flex:none;display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:10px 12px calc(9px + var(--safe));background:linear-gradient(#172e31,#0d2227);border-top:1px solid #6d715b;z-index:10;min-height:69px}#bottom-nav button{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;background:linear-gradient(#2d4345,#1e3236);border:1px solid #586d64;border-radius:11px;padding:10px 4px;font-size:14px;font-weight:900;color:#9ab3ad;box-shadow:0 3px #061920}#bottom-nav button.active{background:linear-gradient(#168c87,#10616a);border:2px solid #e5c677;color:#fff2ce;box-shadow:inset 0 0 0 2px #2ca9a055,0 3px #092733}.nav-icon{font-size:23px;line-height:1}.notification{position:absolute;right:9px;top:5px;width:9px;height:9px;border-radius:50%;background:#ffd266;box-shadow:0 0 6px #ffd26680}
#collection-view{min-height:0;flex:1;overflow:auto;padding:17px 14px 25px;background:linear-gradient(#18383d,#10272e)}.collection-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.collection-title h2{font-size:25px}.text-button{background:none;color:#a9c8bf;font-size:20px;padding:4px 8px}.collection-tabs{display:grid;grid-template-columns:repeat(3,1fr);padding:4px;background:#0b2229;border:1px solid #43635e;border-radius:11px;margin-bottom:18px;gap:4px}.collection-tabs button{padding:9px 2px;background:none;border-radius:7px;color:#9dbcb6;font-size:14px;font-weight:bold}.collection-tabs button.active{background:#326963;color:#fff0c7;box-shadow:0 2px 4px #0006}.rarity-label{font-size:13px;text-transform:uppercase;letter-spacing:1.8px;display:flex;align-items:center;gap:8px;margin:19px 0 9px;color:#d8e1d3}.rarity-label:after{content:'';height:1px;background:currentColor;flex:1;opacity:.25}.r1{--rarity:#69b5ee}.r2{--rarity:#c997ff}.r3{--rarity:#ffce63}.r0{--rarity:#a3c5b5}.rarity-label{color:var(--rarity)}.cards-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.collect-card{position:relative;background:linear-gradient(#365958,#1b383f);border:2px solid var(--rarity);border-radius:12px;padding:7px 5px 8px;box-shadow:0 4px #081c2399;min-width:0;display:flex;flex-direction:column;align-items:stretch;text-align:center}.collect-card .card-art{height:92px;width:100%;display:block;object-fit:contain;filter:drop-shadow(0 4px 3px #0005)}.collect-card .card-name{font-size:12px;font-weight:800;min-height:31px;display:grid;align-items:center;line-height:1.15;margin:3px 0 5px}.card-level{font-size:10px;position:absolute;right:4px;top:4px;border-radius:4px;background:#10262dd9;padding:2px 4px;color:#fff1cf;z-index:1}.copy-bar{height:18px;position:relative;overflow:hidden;border-radius:5px;background:#0b242c;border:1px solid #63817a}.copy-bar i{display:block;height:100%;background:linear-gradient(#5ebaae,#278d91)}.copy-bar.ready i{background:linear-gradient(#9ee45d,#5aab3b)}.copy-bar span{position:absolute;inset:0;font-size:10px;font-weight:900;display:grid;place-content:center;color:#fffce8;text-shadow:0 1px #203421}.collect-card.locked{background:linear-gradient(#26383e,#172a32);border-color:#6c747080}.locked-symbol{height:92px;display:grid;place-content:center;font-size:35px;color:#829287}.collect-card.locked .card-name{color:#b2bcae;font-size:11px}.collect-card.locked .lock-note{font-size:10px;line-height:1.2;color:#8faaa2;min-height:23px}.empty-text{font-size:14px;color:#b9cabe;padding:20px 5px;text-align:center}
#toast{position:fixed;bottom:calc(90px + var(--safe));left:50%;transform:translate(-50%,10px);background:#09272ded;color:#fff1c9;border:1px solid #a68b50;border-radius:10px;padding:11px 18px;font-size:14px;z-index:200;max-width:90vw;pointer-events:none;opacity:0;transition:.2s;box-shadow:0 5px 15px #0007;text-align:center}#toast.show{opacity:1;transform:translate(-50%,0)}
dialog{padding:0;border:2px solid #a3ad8a;border-radius:20px;width:min(440px,calc(100vw - 24px));max-height:calc(100dvh - 28px);color:var(--ink);background:linear-gradient(145deg,#254c4e,#122e38);box-shadow:0 15px 100px #000a;overflow:auto}dialog::backdrop{background:#06151acc;backdrop-filter:blur(4px)}#modal-content{padding:22px 20px 20px;position:relative}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px}.modal-head h2{font-size:23px}.modal-close{background:#0f2c35;border:1px solid #76908466;color:#d4dcc6;border-radius:8px;padding:2px 9px;font-size:25px}.modal-eyebrow{color:#e6c26b;text-transform:uppercase;letter-spacing:2px;font-size:11px;margin-bottom:8px;text-align:center}.modal-center{text-align:center}.modal-center h2{color:#ffe0a0;text-shadow:0 2px #392a1d;font-size:29px}.modal-center .subtitle{font-size:14px;color:#abcac0;margin:8px 0 0}.hero-art-large{height:180px;width:100%;object-fit:contain;filter:drop-shadow(0 8px 6px #0007);margin:6px 0}.hero-preview{display:block;margin:0 auto;width:190px;height:190px}.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.stat-box{background:#0d2832a6;border:1px solid #79928150;border-radius:9px;padding:9px 10px}.stat-box small{display:block;color:#a3c4b8;font-size:11px}.stat-box b{font-size:21px;color:#f6e4b5}.stat-box span{color:#7ed2ae;font-size:14px}.stat-full{background:#102e38;border:1px solid #67827980;border-radius:9px;padding:12px;margin:12px 0;font-size:15px;line-height:1.5;color:#ece3bf}.primary-button{background:linear-gradient(#39baa3,#1b8279);border:1px solid #91dfb4;border-radius:10px;color:#fff9de;padding:12px 16px;font-weight:900;font-size:17px;box-shadow:0 4px #0b4d4f, inset 0 2px #b0ffe130;width:100%;margin-top:12px}.primary-button.gold{background:linear-gradient(#ffe18c,#dfa33e);border-color:#fff0ba;color:#563713;box-shadow:0 4px #916020,inset 0 2px #fff3ba}.secondary-button{background:#173c43;border:1px solid #6f9c90;color:#d9e4c9;padding:10px 12px;border-radius:9px;font-weight:700;margin-top:10px;width:100%;font-size:14px}.danger-button{background:#713c38;border-color:#cb8370}.small-note{font-size:12px;color:#adc4b8;text-align:center;margin-top:12px;line-height:1.5}.item-list{display:flex;flex-direction:column;gap:8px;max-height:54dvh;overflow:auto}.item-row{width:100%;display:flex;align-items:center;gap:9px;padding:8px;background:#0d2d35;border:1px solid #5b807880;border-radius:11px;text-align:left}.item-row img{width:62px;height:62px;flex:none}.item-row b{display:block;font-size:14px;color:#fff0cd}.item-row small{display:block;color:#a2beb4;font-size:11px;margin-top:3px}.item-row .choose{margin-left:auto;font-size:20px;color:#92d0b4;padding:0 5px}.gear-slots{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.gear-slot{display:flex;align-items:center;gap:8px;background:#102d35;border:1px dashed #789687;border-radius:10px;padding:8px;text-align:left;min-height:69px}.gear-slot img{width:54px;height:54px}.gear-slot strong{font-size:13px}.gear-slot small{font-size:10px;display:block;color:#9dbdb3}.gear-empty{font-size:26px;color:#9ba891;width:50px;text-align:center}.buttons-row{display:flex;gap:9px}.position-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.position-grid button{min-height:100px;border:1px solid #759a8e;border-radius:10px;background:#163a42;padding:8px}.position-grid img{width:65px;height:70px}.position-grid span{display:block;font-size:12px}.reward-row{display:flex;justify-content:center;align-items:stretch;gap:10px;flex-wrap:wrap;margin:15px 0}.reward-chip{border:1px solid #97ab8060;border-radius:10px;background:#12313b;padding:10px 17px;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:72px}.reward-chip strong{font-size:22px;color:#ffe09c}.reward-chip span{font-size:11px;color:#bfd1c0;margin-top:3px}.reward-chip img{width:56px;height:56px}.power-gain{padding:13px;border:1px solid #99b68a80;border-radius:10px;background:#274e4380;color:#d9efd2;font-size:14px;text-align:center}.power-gain b{font-size:22px;color:#ffdf8a}.unlocks{display:flex;gap:8px;justify-content:center;margin-top:12px;flex-wrap:wrap}.unlock-item{border:1px solid #95b39480;border-radius:8px;padding:5px;width:72px;background:#183944}.unlock-item img{width:58px;height:60px}.unlock-item small{display:block;font-size:10px;text-align:center}.discovery-art{width:190px;height:190px;margin:15px auto;position:relative;isolation:isolate}.discovery-art:before{content:'';position:absolute;inset:-22px;background:conic-gradient(from 20deg,transparent,#ffda7228,transparent,#ffda7228,transparent,#ffda7228,transparent);border-radius:50%;z-index:-1;animation:rotate 18s linear infinite}.discovery-art img{width:100%;height:100%;filter:drop-shadow(0 8px 10px #0008);animation:float 3s ease-in-out infinite}.chest-scene{position:relative;width:calc(100% + 40px);margin:12px -20px 0;aspect-ratio:1.23;overflow:hidden;background:#15232a}.chest-scene img{width:100%;height:100%;object-fit:cover}.chest-scene:after{content:'';position:absolute;inset:0;background:linear-gradient(#234b4d,transparent 16%,transparent 80%,#14313a)}.chest-scene.shake img{animation:chest-shake .7s infinite}.chest-label{position:absolute;bottom:15px;left:0;right:0;text-align:center;color:#ffedb5;font-weight:900;z-index:1;text-shadow:0 2px 4px #000}.chest-reveal{border:3px solid var(--rarity);border-radius:17px;background:radial-gradient(#45646c,#173544);padding:15px;max-width:220px;margin:22px auto 14px;box-shadow:0 0 40px color-mix(in srgb,var(--rarity) 30%,transparent);animation:reveal .4s cubic-bezier(.2,.8,.2,1.2);text-align:center;position:relative}.chest-reveal img{height:175px;width:100%;object-fit:contain}.chest-reveal h3{font-size:17px;margin:6px 0}.chest-reveal .quantity{position:absolute;right:-13px;top:-12px;background:#f8d371;color:#61411a;padding:4px 11px;border:2px solid #fff0c0;border-radius:12px;font-size:20px;font-weight:900}.new-ribbon{background:#62b48b;color:#fff7d9;padding:3px 8px;border-radius:5px;font-size:11px;display:inline-block;margin-top:8px}.summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:15px 0}.summary-card{padding:7px 4px;border:1px solid var(--rarity);border-radius:10px;background:#102d35;text-align:center}.summary-card img{height:75px;width:100%;object-fit:contain}.summary-card b{font-size:12px;display:block;line-height:1.2}.summary-card strong{color:#ffe18a;font-size:16px}.monster-rewards{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px}.monster-choice{background:linear-gradient(#fff0d0,#dfc694);border:2px solid #b89354;color:#48371f;border-radius:13px;padding:11px 8px;text-align:center}.monster-choice.bonus{background:linear-gradient(#fff2c0,#efc564);border-color:#ffe8a5;box-shadow:0 0 22px #ffca5325}.monster-choice h3{font-size:16px}.monster-choice img{height:86px;width:100%;object-fit:contain}.monster-choice strong{font-size:18px}.monster-choice .reward-currency{font-size:13px;margin:5px 0}.monster-choice .primary-button{font-size:14px;padding:9px 6px}.settings-row{display:flex;align-items:center;justify-content:space-between;padding:12px 0;border-bottom:1px solid #5a7f7440;font-size:14px}.settings-row input{accent-color:#34b39f;width:21px;height:21px}.part-list{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.part-entry{background:#112c35;border:1px solid #557d7180;border-radius:10px;padding:8px;text-align:center}.part-entry img{height:65px;width:100%}.part-entry b{display:block;color:#ffe28b}.part-entry small{font-size:10px;line-height:1.2;display:block;color:#acc6ba}
@keyframes rock-hit{30%{transform:translateX(-4px) rotate(-2deg) scale(.97)}65%{transform:translateX(3px) rotate(1deg)}}@keyframes float-damage{0%{opacity:1;transform:translate(-50%,0) scale(.7)}20%{transform:translate(-50%,-8px) scale(1.1)}100%{opacity:0;transform:translate(-50%,-90px) scale(.9)}}@keyframes spark{to{transform:translate(var(--dx),var(--dy)) rotate(110deg);opacity:0}}@keyframes ring{to{transform:translate(-50%,-50%) scale(4);opacity:0}}@keyframes merge-pop{40%{transform:scale(1.2);filter:brightness(1.6)}}@keyframes float{50%{transform:translateY(-7px)}}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes chest-shake{0%,100%{transform:rotate(0)}20%{transform:rotate(-2deg)}30%{transform:rotate(2deg)}40%{transform:rotate(-1deg)}}@keyframes reveal{from{opacity:0;transform:scale(.5) translateY(40px) rotate(-6deg)}to{opacity:1;transform:none}}
@media(min-width:600px){body{padding:20px 0}#game{height:calc(100dvh - 40px);border-radius:24px;border:2px solid #526d6755;min-height:700px}dialog{width:440px}#toast{bottom:110px}}
@media(max-height:760px){#hud{height:65px;padding-top:8px}.brand{font-size:21px}#orders{padding-top:7px}.milestone{padding-top:4px;padding-bottom:5px;margin-bottom:8px}.milestone img{height:36px;width:48px}.order-panel{padding:7px 10px}.requirement img{width:41px;height:41px}.order-title{margin-bottom:5px}#target-info{padding-top:12px}.target-name{font-size:23px}.health{height:21px;margin-top:6px}.battle-stats{margin-top:5px}#battlefield{min-height:180px}#mine-footer{padding-bottom:9px}.inventory-toggle{padding:9px 13px;font-size:18px}.tap-hint{margin-bottom:7px}#bottom-nav{min-height:60px;padding-top:8px;padding-bottom:7px}.slot-empty{width:47px;height:52px}.slot-empty small{font-size:8px}#inventory{max-height:calc(100% - 155px);padding:9px}.board{gap:4px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

#inventory .board{width:min(100%,max(270px,calc(100dvh - 390px)));margin-inline:auto}.brand.text-button{color:var(--ink);padding:0}.target-button img{image-rendering:auto}
/* Developer panel: compact controls with the same cave palette. */
.cheat-feedback{position:sticky;top:0;z-index:3;padding:10px 12px;margin:0 0 10px;border:1px solid #cbb779;border-radius:9px;background:#234944;color:#ffe6a5;font-size:13px;box-shadow:0 3px 12px #0006}
.cheat-status{display:flex;flex-wrap:wrap;gap:7px 14px;padding:10px 12px;background:#0b2831;border:1px solid #6b94755c;border-radius:10px;font-size:12px;color:#ffe2a0}.cheat-status small{flex-basis:100%;color:#93bbae;font-size:11px}.cheat-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:14px 0}.cheat-tabs button{border:1px solid #5e837b;border-radius:8px;background:#12343d;color:#afc9bf;padding:9px 2px;font-size:12px;font-weight:700}.cheat-tabs button.active{background:#ead08c;color:#42371e;border-color:#fff0b6;box-shadow:0 2px #8b6b37}.cheat-group{border:1px solid #6a8d774d;background:#102c3466;border-radius:12px;padding:13px;margin-top:12px}.cheat-group h3{font-size:15px;color:#ffe4ab;margin:0 0 9px}.cheat-group .secondary-button{font-size:13px;min-height:42px;margin-top:8px}.cheat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 8px}.cheat-field{display:flex;flex-direction:column;gap:6px;color:#b8d0bf;font-size:12px;margin:11px 0 4px;min-width:0}.cheat-field input,.cheat-field select{font:inherit;font-size:16px;width:100%;min-width:0;box-sizing:border-box;border:1px solid #658c7e;border-radius:8px;background:#0b252e;color:#fff0d0;padding:11px 9px;min-height:44px;outline:none}.cheat-field input:focus,.cheat-field select:focus{border-color:#ffdf8b;box-shadow:0 0 0 2px #ffdf8b30}.cheat-field select option,.cheat-field select optgroup{background:#12323b;color:#fff0d0}.cheat-check{display:flex;align-items:center;gap:8px;margin:13px 0 4px;font-size:12px;color:#cbd9bd}.cheat-check input{width:19px;height:19px;accent-color:#3dbea0}.cheat-note{font-size:12px;line-height:1.5;color:#a7c4b8;margin:10px 0 2px}.cheat-preview{display:flex;align-items:center;gap:10px;background:#102731;border-radius:9px;margin-top:12px;padding:7px}.cheat-preview img{height:66px;width:66px;object-fit:contain;flex:none}.cheat-preview b{display:block;font-size:13px;color:#ffe6b4}.cheat-preview span{display:block;font-size:11px;color:#a4c5b5;margin-top:4px}.cheat-chests{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:12px}.cheat-chest{background:linear-gradient(#42574b,#22383d);border:1px solid #b49c63;border-radius:10px;padding:8px 2px;color:#ffdf96;min-width:0}.cheat-chest img{height:58px;width:100%;object-fit:contain}.cheat-chest b,.cheat-chest small{display:block;font-size:11px;line-height:1.5}.cheat-chest small{font-size:10px;color:#a9c6b4}.cheat-content button:disabled{opacity:.4;cursor:not-allowed}.cheat-content button:focus-visible,.cheat-tabs button:focus-visible{outline:2px solid #ffe294;outline-offset:3px}

/* Balance lab extends the existing cheat panel. */
.balance-upload{display:block;margin:14px 0;padding:14px;border:1px dashed #b8a77e;border-radius:12px;font-size:14px;font-weight:700;line-height:1.5}
.balance-upload input{display:block;width:100%;max-width:100%;margin-top:10px;font:inherit;font-weight:400;color:inherit}
.balance-guide{display:inline-block;margin-top:16px;color:#096577;font-size:14px;font-weight:700}
.balance-diff{max-height:260px;overflow:auto;margin:12px 0;border-radius:8px;background:#e4dccb}
.balance-diff>div{padding:10px;border-bottom:1px solid #b9ac92;font-size:13px;overflow-wrap:anywhere;word-break:break-word}
.balance-diff b,.balance-diff span,.balance-diff strong{display:block}.balance-diff b{font-size:14px}.balance-diff span{color:#68594a}.balance-diff strong{color:#075451}
.balance-error{padding:10px;background:#f2d6cc;color:#852711;border-radius:8px;font-size:14px}
.balance-badge{font-size:13px;font-weight:700;color:#087382;overflow-wrap:anywhere}.cheat-group p{line-height:1.5}
.balance-guide,.balance-badge{color:#82e5d7}.balance-diff{color:#352b21}.balance-upload~.cheat-grid button{font-size:14px;min-width:0;overflow-wrap:anywhere}
.order-reward small{display:block;font-size:12px;line-height:1.2}.requirements{min-width:0;overflow-x:auto;padding:4px 3px}.requirement{flex:none}.segments{grid-template-columns:repeat(var(--segment-count,10),minmax(0,1fr))}
