/* Two mines retain the original painted cave, paper orders and modular hero art. */
#game{min-height:700px}#hud{height:68px;padding:8px 12px}.mine-badge{background:transparent;text-align:left;color:#b2d2c8;font-size:12px;letter-spacing:1px;padding:0}.mine-badge b{display:block;font-size:15px;color:#ffdd89;letter-spacing:0}.brand{font-size:22px}.resource b{font-size:20px}#orders{padding:8px 10px 0}.milestone{padding:5px 9px;margin-bottom:7px}.milestone img{width:43px;height:35px}.milestone-title{font-size:12px}.segments i{height:10px}.order-columns{display:grid;grid-template-columns:1fr;gap:7px}.order-columns.double{grid-template-columns:1fr 1fr}.order-panel{padding:8px 10px;border-width:2px}.order-title{font-size:14px;gap:4px;margin-bottom:4px}.order-title small{font-size:12px}.order-body{gap:5px}.order-reward{font-size:15px;min-width:53px;max-width:80px}.order-reward img{width:31px;height:26px}.order-submit{margin-top:5px;width:100%;padding:5px;min-height:30px}.requirement{min-width:35px}.requirement img{width:40px;height:40px}.requirements{gap:4px;overflow-x:auto}.double .order-title{flex-direction:column;align-items:flex-start;gap:0}.double .order-reward{min-width:40px;font-size:14px}.double .requirement img{width:32px;height:32px}.double .requirement{min-width:30px}.double .order-panel{padding:7px}.double .order-body{min-height:53px}.order-title small{color:#695136}
#target-info{padding-top:10px}.mine-progress{display:flex;flex-wrap:wrap;justify-content:space-between;gap:5px;margin:0 18px 10px;font-size:13px;color:#c1dace}.mine-progress b{color:#ffe09a}.mine-progress>div{flex-basis:100%;height:8px;background:#071d23;border:1px solid #577169;border-radius:8px;overflow:hidden}.mine-progress i{display:block;height:100%;background:linear-gradient(90deg,#18b6a8,#90e4b2);transition:width .2s}.target-name{font-size:23px}.target-kind{font-size:13px;color:#e0cda0;margin-top:3px}.health{margin-top:6px;height:22px}.battle-stats{font-size:13px;margin-top:5px}#battlefield{min-height:150px;max-height:340px}.target-button{width:61%;max-width:250px;pointer-events:none}.target-button.valuable{filter:drop-shadow(0 0 18px #ffd26455) drop-shadow(0 9px 7px #0008)}.valuable-badge{position:absolute;bottom:15%;right:8%;font-size:28px;filter:drop-shadow(0 2px 2px #000)}.team-slot,.team-slot.has-hero{top:28%;height:46%;width:29%;left:-3%}.team-slot:nth-child(2n){right:-3%}.team-slot canvas{width:138%;max-height:155px}.slot-empty{width:53px;height:62px}.slot-empty b{font-size:21px}.slot-empty small{font-size:12px;letter-spacing:0;text-transform:none}.slot-level{font-size:12px;bottom:-2%}#mine-footer{padding:0 12px 10px}.tap-hint{height:auto;min-height:18px;font-size:12px;margin-bottom:7px}.mine-actions{display:grid;grid-template-columns:1.1fr 1fr;gap:8px}.develop-button{background:linear-gradient(#f6cf72,#bb842e);border:2px solid #ffe3a3;color:#3f2c19;border-radius:12px;box-shadow:0 3px #664418;font-size:17px;font-weight:bold;padding:10px 5px}.buy-count{background:#274c43;color:#fff4c8;border-radius:6px;padding:1px 5px;font-size:13px}.inventory-toggle{padding:10px 8px;font-size:17px;display:block}.inventory-toggle b{display:inline;font-size:13px;margin-left:4px}.start-note{font-size:14px;max-width:330px;margin:0 auto 6px;color:#d5e0cb}#bottom-nav{min-height:59px;padding-top:7px;padding-bottom:calc(7px + var(--safe))}#bottom-nav button{font-size:16px;padding:9px}
#inventory{bottom:7px;max-height:calc(100% - 181px);padding:9px;left:8px;right:8px;background:linear-gradient(#245451,#12343a)}.inventory-head{font-size:17px;margin-bottom:7px}.inventory-head small{font-size:12px}.board{gap:4px}.board-note{font-size:12px;margin:5px 0}.inventory-bottom{gap:5px}.parts-button{padding:7px;font-size:12px}.chain-dot{position:absolute;left:3px;top:3px;width:6px;height:6px;border-radius:50%;background:#d6bf79}.chain-dot.chain-1{background:#68def1}.chain-dot{pointer-events:none}.level-tag{font-size:12px}.coin-float{color:#ffdf7d;left:54%;top:28%;font-size:27px}.crystal-mine #mine{background-image:linear-gradient(#293f7866,#102b4baa),url('../assets/cave.webp')}.crystal-mine .mine-progress i{background:linear-gradient(90deg,#559edc,#bdb4ff)}
.develop-wallet{display:flex;align-items:center;justify-content:space-between;font-size:23px;color:#ffe199;margin:8px 0 14px;gap:12px}.develop-wallet span{font-size:13px;color:#b0ccc4;max-width:140px}.mine-level-card{border:2px solid #d9b561;border-radius:14px;padding:14px;background:linear-gradient(135deg,#315650,#263b42);margin-bottom:12px}.mine-level-card p{font-size:14px;margin:9px 0;color:#d9dfc6}.mine-level-card small{font-size:13px;color:#c9ddcf}.mine-level-card h3{font-size:23px}.mine-level-card .primary-button{margin-top:8px;font-size:16px}.upgrade-list{display:grid;gap:8px}.upgrade-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px;border:1px solid #597c6c;border-radius:12px;background:#1d3b3e}.upgrade-row h3{font-size:16px}.upgrade-row h3 small{font-size:12px;color:#adc8bf}.upgrade-row p{font-size:13px;color:#b5cfc4;margin:4px 0}.upgrade-row b{font-size:14px;color:#92dcc2}.upgrade-buy{min-width:87px;min-height:46px;padding:8px;background:linear-gradient(#25b09b,#137c71);border-radius:9px;border:1px solid #73d5b4;font-size:16px;font-weight:bold}.empty-rarity{font-size:13px;color:#a4b7b0;padding:3px 0}.chest-coins{font-size:26px;color:#ffe18d;margin:12px}.small-note{font-size:14px}.copy-bar span{font-size:12px}.card-name{font-size:14px}.card-level{font-size:12px}#balance-feedback{color:#ffd5a0;white-space:pre-wrap;font-size:14px;margin:8px 0}.stat-full{font-size:16px}.cheat-grid button{font-size:14px}.modal-eyebrow{font-size:13px}.collect-card{min-height:150px}
@media(max-height:760px){#game{min-height:640px}#hud{height:60px}.milestone{margin-bottom:5px}.mine-progress{margin-bottom:5px}.target-name{font-size:20px}.battle-stats{font-size:12px}#target-info{padding-top:7px}#battlefield{min-height:135px}.health{height:20px}.tap-hint{font-size:12px;margin-bottom:4px}.target-kind{font-size:12px}.order-submit{margin-top:3px}.order-panel{padding-top:5px;padding-bottom:5px}}
@media(min-width:700px){#game{margin:15px auto;height:calc(100dvh - 30px);border-radius:22px;max-height:980px}.mine-progress{font-size:14px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition:none!important}}

body{padding:0}.target-button{max-height:100%}.team-slot .gear-notice{top:22%;right:18%;width:11px;height:11px}.target-button img{max-height:100%}
/* Explicit sides win over legacy occupied-slot specificity. */
#team .team-slot[data-slot="0"]{left:-3%;right:auto}#team .team-slot[data-slot="1"]{left:auto;right:-3%}
.target-kind{display:flex;justify-content:center;align-items:center;gap:5px;min-height:24px}.target-drop-icon{width:23px;height:23px}.kind-valuable{color:#ffdd78;font-weight:bold}.kind-block{color:#b7e7db}.kind-monster{color:#ffb1a1}.target-button.elite{filter:drop-shadow(0 0 15px #ff624e88) drop-shadow(0 9px 6px #0008)}.target-button.elite>img{filter:saturate(1.45) contrast(1.12);transform:scale(1.05)}.elite-badge{position:absolute;right:7%;top:12%;padding:3px 8px;background:#6a2526;border:2px solid #ffcd73;color:#ffe0a2;border-radius:8px;font-weight:900;font-size:22px}.depth-warning{color:#ffdc9f!important;border-top:1px solid #cdb25a66;padding-top:8px}.resource-target{filter:drop-shadow(0 9px 7px #0008)}
#loot-flight-layer{position:fixed;inset:0;pointer-events:none;z-index:40;overflow:hidden}.loot-flight{position:absolute;left:0;top:0;object-fit:contain;filter:drop-shadow(0 3px 3px #0007);will-change:transform;pointer-events:none}.coin-arrival{position:absolute;font-size:19px;font-weight:900;color:#ffe384;text-shadow:0 2px 3px #15292d;animation:coin-arrival .7s ease-out forwards;transform:translateX(-50%)}.reward-pulse{animation:reward-pulse .38s ease-out}.cell.loot-landed{animation:loot-landed .4s ease-out}.damage-number{font-size:20px;animation-duration:.48s}
@keyframes reward-pulse{40%{filter:brightness(1.5);transform:scale(1.06)}100%{filter:brightness(1);transform:scale(1)}}
@keyframes loot-landed{30%{box-shadow:inset 0 0 0 2px #a3f2ce,0 0 14px #80dbb7;transform:scale(1.08)}100%{transform:scale(1)}}
@keyframes coin-arrival{0%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,-18px)}}

/* Value stays in the information row, above the unobscured target. */
.treasure-value{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:#e6cf9b;font-size:18px;line-height:1.4;font-weight:600}
.treasure-value strong{color:#ffe4a0;font-size:21px;font-weight:800;font-variant-numeric:tabular-nums}
.treasure-value .value-coin{width:23px;height:23px;object-fit:contain}
.kind-ore{color:#d9efd8}

/* Reserve room for actions before sizing the mine art, including mobile browser bars. */
#game{height:100vh;height:100dvh;min-height:0;padding-top:env(safe-area-inset-top,0px)}
#orders{flex:none}
#mine{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
#battlefield{min-height:0;align-self:stretch}
#team .team-slot canvas{height:100%;max-height:155px;object-fit:contain}
#mine-footer{min-width:0}
#mine-footer>.primary-button{margin-top:0;min-height:44px}
#mine-footer .start-note{margin-bottom:8px}
#bottom-nav{position:relative}
@media(min-width:700px){#game{height:calc(100dvh - 30px)}}
@media(max-height:720px){
 #hud{height:54px}
 #orders{padding-top:4px}
 .milestone{padding-top:3px;padding-bottom:3px;margin-bottom:4px}
 .mine-progress{margin-bottom:4px}
 #target-info{padding-top:5px}
 .target-name{font-size:20px}
 #mine-footer{padding-bottom:8px}
 #mine-footer .start-note{display:none}
 #mine-footer>.primary-button{padding:10px 12px}
 .mine-actions>button{min-height:44px;padding-top:8px;padding-bottom:8px}
}
/* Tiny/landscape viewports can scroll the play area; navigation stays reachable. */
@media(max-height:560px){
 #main-view{overflow-y:auto;overscroll-behavior:contain}
 #mine{flex:none;min-height:340px}
 #battlefield{min-height:110px}
}
