/* v661: three scenic cards and a persistent action row; no gameplay changes. */
body[data-ui-version="3"] #app .player-sheet:has([data-home-panel="explore"]:not([hidden]) .cave-template-v2){position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;transform:none!important;border:0!important;border-radius:0!important;background:var(--tp-surface)!important;overflow:hidden!important;color:var(--tp-ink)!important;}
body[data-ui-version="3"] #app .player-sheet:has([data-home-panel="explore"]:not([hidden]) .cave-template-v2)>.sheet-head{position:absolute!important;inset:8px 12px auto!important;height:52px!important;min-height:0!important;padding:6px 12px!important;background:var(--tp-surface)!important;border-radius:22px!important;display:flex!important;color:var(--tp-ink)!important;}
body[data-ui-version="3"] #app .player-sheet:has([data-home-panel="explore"]:not([hidden]) .cave-template-v2) .sheet-head h2{background:var(--tp-surface)!important;color:var(--tp-ink)!important;padding:6px 16px!important;border-radius:24px!important;font-size:22px!important;}
body[data-ui-version="3"] #app .player-sheet:has([data-home-panel="explore"]:not([hidden]) .cave-template-v2)>:is(.sheet-handle,.sheet-environment,.v4-system-rail){display:none!important;}
body[data-ui-version="3"] #app .player-sheet:has([data-home-panel="explore"]:not([hidden]) .cave-template-v2)>.sheet-scroll{position:absolute!important;inset:68px 12px 10px!important;height:auto!important;padding:0!important;overflow:hidden!important;}
body[data-ui-version="3"] #app .player-sheet:has([data-home-panel="explore"]:not([hidden]) .cave-template-v2) [data-home-panel="explore"]{position:relative!important;inset:auto!important;width:100%!important;height:100%!important;padding:0!important;margin:0!important;overflow:hidden!important;background:none!important;}
body[data-ui-version="3"] #app .player-sheet:has([data-home-panel="explore"]:not([hidden]) .cave-template-v2) .ex-panel{display:flex!important;flex-direction:column!important;height:100%!important;min-height:0!important;gap:6px!important;padding:0!important;overflow:hidden!important;}
body[data-ui-version="3"] #app .player-sheet:has([data-home-panel="explore"]:not([hidden]) .cave-template-v2) .ex-panel>:is(.ex-status,.staff-msg:empty){display:none!important;}
body[data-ui-version="3"] #app .player-sheet:has([data-home-panel="explore"]:not([hidden]) .cave-template-v2) button{background:var(--tp-surface)!important;color:var(--tp-ink)!important;border:1px solid var(--tp-edge)!important;box-shadow:none!important;text-shadow:none!important;}
body[data-ui-version="3"] #app .player-sheet:has([data-home-panel="explore"]:not([hidden]) .cave-template-v2) .ex-idle-tabs{flex:none!important;margin:0!important;padding:0!important;}
body[data-ui-version="3"] #app .cave-template-v2{display:flex!important;flex:1!important;flex-direction:column!important;min-height:0!important;height:auto!important;gap:8px!important;padding:12px!important;border-radius:24px!important;overflow:hidden!important;background:linear-gradient(#e8effa44,#e8effa77),url("../img/mining-park/mining-park-overview-v1.webp") center/cover!important;font-size:15px!important;}
body[data-ui-version="3"] #app .cave-template-v2 *{box-sizing:border-box!important;text-shadow:none!important;}
body[data-ui-version="3"] #app .cave-template-v2 :is(b,strong,small,em,p,span,h3,summary){color:var(--tp-ink)!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-board-heading{flex:none!important;gap:8px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-board-heading h3{background:var(--tp-surface)!important;color:var(--tp-ink)!important;border:1px solid var(--tp-edge)!important;box-shadow:none!important;font-size:20px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-board-heading>span{background:var(--tp-surface)!important;color:var(--tp-ink)!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-browse{display:flex!important;gap:6px!important;margin-left:auto!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-browse button{width:40px!important;height:36px!important;min-height:36px!important;border-radius:12px!important;font-size:24px!important;padding:0!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-strip{flex:1!important;min-height:0!important;display:grid!important;grid-auto-flow:column!important;grid-auto-columns:calc((100% - 24px)/3)!important;gap:12px!important;align-items:stretch!important;padding:4px!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-strip::before{display:none!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-card{--cave-accent:#dcd7fa!important;display:flex!important;flex-direction:column!important;align-items:center!important;gap:4px!important;min-height:0!important;height:100%!important;padding:0 8px 8px!important;background:var(--tp-surface)!important;color:var(--tp-ink)!important;border:1px solid var(--tp-edge)!important;border-radius:22px!important;overflow:hidden!important;opacity:1!important;box-shadow:var(--tp-shadow)!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-card:is(.is-on,[aria-pressed="true"]){background:var(--tp-blue)!important;border-color:var(--tp-edge)!important;box-shadow:var(--tp-shadow)!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-scene{position:static!important;width:calc(100% + 16px)!important;margin:0 -8px!important;height:0!important;flex:1!important;min-height:40px!important;aspect-ratio:auto!important;object-fit:cover!important;border-radius:18px 18px 0 0!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-level{position:relative!important;margin-top:-15px!important;padding:3px 20px!important;background:var(--tp-surface)!important;color:var(--tp-ink)!important;border:1px solid var(--tp-edge)!important;border-radius:18px!important;font-size:15px!important;box-shadow:none!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-card>strong{font-size:21px!important;line-height:1.2!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-card>small{font-size:12px!important;line-height:1.2!important;color:var(--tp-ink)!important;padding:0!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-gain{font-size:12px!important;font-style:normal!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-materials{display:flex!important;flex:none!important;gap:8px!important;margin:0!important;padding:0!important;flex-wrap:nowrap!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-materials>span{background:var(--tp-surface)!important;padding:5px!important;border-radius:12px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-materials .inv-art{width:40px!important;height:40px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-selection{position:relative!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) 150px!important;flex:none!important;max-height:none!important;overflow:visible!important;gap:10px!important;padding:10px!important;background:var(--tp-surface)!important;border-radius:18px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-selection-copy{min-width:0!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-selection-copy p{font-size:12px!important;margin:2px 0!important;}
body[data-ui-version="3"] #app .cave-template-v2 details[open]{position:absolute!important;bottom:100%!important;left:0!important;z-index:5!important;width:min(500px,100%)!important;max-height:180px!important;overflow:auto!important;padding:12px!important;background:var(--tp-surface)!important;border:1px solid var(--tp-edge)!important;border-radius:16px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .ex-stage-chips{display:flex!important;flex-wrap:wrap!important;gap:4px!important;margin:0!important;}
body[data-ui-version="3"] #app .cave-template-v2 .ex-stage-chip{min-height:36px!important;padding:4px 8px!important;font-size:12px!important;background:var(--tp-surface)!important;color:var(--tp-ink)!important;border:1px solid var(--tp-edge)!important;border-radius:10px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .ex-stage-chip:is(.is-on,[aria-pressed="true"]){background:var(--tp-blue)!important;color:#10324f!important;border-color:var(--tp-edge)!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-selection>.ex-enter{width:100%!important;min-width:0!important;min-height:48px!important;padding:6px 12px!important;background:var(--tp-primary)!important;color:#10324f!important;border:1px solid var(--tp-edge)!important;border-radius:18px!important;font-size:16px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .ex-enter b{color:var(--tp-ink)!important;}
body[data-ui-version="3"] #app .cave-template-v2 button:disabled{opacity:1!important;color:var(--tp-muted)!important;cursor:not-allowed!important;}
body[data-ui-version="3"] #app .cave-template-v2 .ex-enter:disabled{background:var(--tp-disabled)!important;border-color:var(--tp-edge)!important;color:var(--tp-muted)!important;}
body[data-ui-version="3"] #app .player-sheet:has([data-home-panel="explore"]:not([hidden]) .cave-template-v2) .ex-idle-tabs button[aria-selected="true"]{background:var(--tp-blue)!important;color:#10324f!important;border-color:var(--tp-edge)!important;}
@media(max-height:500px){
body[data-ui-version="3"] #app .player-sheet:has([data-home-panel="explore"]:not([hidden]) .cave-template-v2)>.sheet-head{inset:4px 8px auto!important;height:40px!important;padding:2px 8px!important;}
body[data-ui-version="3"] #app .player-sheet:has([data-home-panel="explore"]:not([hidden]) .cave-template-v2) .sheet-head h2{font-size:17px!important;padding:3px 12px!important;}
body[data-ui-version="3"] #app .player-sheet:has([data-home-panel="explore"]:not([hidden]) .cave-template-v2)>.sheet-scroll{inset:48px 8px 6px!important;}
body[data-ui-version="3"] #app .cave-template-v2{padding:6px!important;gap:4px!important;border-radius:16px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-board-heading h3{font-size:15px!important;padding:2px 12px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-board-badge{width:22px!important;height:22px!important;font-size:16px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-card{gap:2px!important;border-radius:14px!important;padding-bottom:4px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-level{font-size:11px!important;padding:1px 12px!important;margin-top:-11px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-card>strong{font-size:15px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-card>small{font-size:10px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-gain{font-size:10px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-materials .inv-art{width:24px!important;height:24px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-materials>span{padding:2px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-selection{padding:6px!important;gap:6px!important;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr) 126px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-selection-copy{font-size:12px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .cave-selection-copy p{font-size:10px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .ex-stage-chip{font-size:10px!important;min-height:28px!important;padding:3px 5px!important;}
body[data-ui-version="3"] #app .cave-template-v2 .ex-enter{font-size:13px!important;}
}

body[data-ui-version="3"] #app .player-sheet:has([data-home-panel="explore"]:not([hidden]) .cave-template-v2)>.sheet-head{transform:none!important;top:6px!important;bottom:auto!important;overflow:visible!important}
body[data-ui-version="3"] #app .cave-template-v2 .cave-selection>.cave-selection-copy{grid-column:1!important;grid-row:1!important;background:none!important}
body[data-ui-version="3"] #app .cave-template-v2 .cave-selection>.ex-stage-chips{grid-column:2!important;grid-row:1!important}
body[data-ui-version="3"] #app .cave-template-v2 .cave-selection>.ex-enter{grid-column:3!important;grid-row:1!important}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-card>.cave-zone-materials{min-height:50px!important}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-card>:not(.cave-zone-scene){flex-shrink:0!important}
@media(max-height:500px){
body[data-ui-version="3"] #app .player-sheet:has([data-home-panel="explore"]:not([hidden]) .cave-template-v2) .ex-idle-tabs button{min-height:32px!important;height:32px!important;padding:3px!important;font-size:12px!important}
body[data-ui-version="3"] #app .cave-template-v2 .cave-zone-card>.cave-zone-materials{min-height:28px!important}
body[data-ui-version="3"] #app .cave-template-v2 .cave-board-heading>span{max-width:none!important;font-size:10px!important}
}

body[data-ui-version="3"] #app .player-sheet:has([data-home-panel="explore"]:not([hidden]) .cave-template-v2)>.sheet-head{margin:0!important;min-height:0!important;align-items:center!important}

body[data-ui-version="3"] #app .player-sheet:has([data-home-panel="explore"]:not([hidden]) .cave-template-v2) .sheet-head #sheet-title::before{display:none!important}

/* One mine, ten floors. The stage and reward rules remain in exploration.js. */
body[data-ui-version="3"] #app .cave-template-v2.cave-depth-board{background:#fbf6ea!important;color:#2b2118!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-board-heading{display:flex!important;align-items:center!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-board-heading>span{margin-right:auto!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-home-link{flex:none!important;min-height:38px!important;padding:5px 12px!important;border-radius:12px!important;background:#ffd76a!important;color:#3a2a10!important;font-weight:700!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-layout{display:grid!important;grid-template-columns:minmax(0,1.6fr) minmax(300px,.9fr)!important;gap:12px!important;flex:1!important;min-height:0!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-map{min-height:0!important;overflow:auto!important;border:3px solid #aa7c42!important;border-radius:18px!important;background:repeating-linear-gradient(171deg,#f6ead3 0 23px,#efe0c2 23px 49px,#f3e7cf 49px 85px,#ead9b8 85px 115px)!important;scrollbar-width:thin!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-track{position:relative!important;padding:16px 20px!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-track:before{content:""!important;position:absolute!important;top:0!important;bottom:0!important;left:50%!important;width:58px!important;transform:translateX(-50%)!important;border:3px solid #d8a957!important;background:repeating-linear-gradient(90deg,#c9963f 0 6px,#fff4dc 6px 25px,#e8c27a 25px 31px,#fff4dc 31px 52px,#c9963f 52px 58px)!important;box-shadow:0 0 0 6px #ffffffb0!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor{position:relative!important;display:grid!important;grid-template-columns:minmax(0,1fr) 76px minmax(0,1fr)!important;align-items:center!important;min-height:130px!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor:before{content:""!important;position:absolute!important;left:0!important;right:0!important;top:50%!important;border-top:5px solid #a87a40!important;pointer-events:none!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor:nth-child(even) .cave-depth-floor-card{grid-column:3!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor:nth-child(odd) .cave-depth-floor-card{grid-column:1!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor-card,body[data-ui-version="3"] #app .cave-depth-board .cave-depth-landing{grid-row:1!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor-enter{grid-row:1!important;z-index:3!important;justify-self:center!important;min-height:42px!important;max-width:100%!important;padding:6px 12px!important;border:2px solid #a67936!important;border-radius:12px!important;background:#ffd76a!important;color:#3a2a10!important;font-weight:800!important;cursor:pointer!important;box-shadow:0 3px 9px #33200a55!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor:nth-child(odd) .cave-depth-floor-enter{grid-column:3!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor:nth-child(even) .cave-depth-floor-enter{grid-column:1!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor-enter:focus-visible{outline:3px solid #174f8a!important;outline-offset:3px!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor-card{position:relative!important;z-index:1!important;display:block!important;width:100%!important;height:105px!important;min-height:0!important;padding:0!important;overflow:hidden!important;border:3px solid #b58a4c!important;border-radius:15px!important;background:#fff8ea!important;text-align:left!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor-card img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor-card:after{content:""!important;position:absolute!important;inset:0!important;background:none!important;pointer-events:none!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor-card span{position:absolute!important;z-index:2!important;left:12px!important;bottom:8px!important;padding:3px 10px!important;border-radius:10px!important;background:#fffaf0eb!important;box-shadow:0 1px 4px #0003!important;text-align:left!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor-card :is(strong,small){display:block!important;color:#2b2118!important;text-shadow:none!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor-card strong{font-size:17px!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor-card small{font-size:11px!important;color:#7a5a20!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor-card[aria-pressed="true"]{border-color:#ffe39f!important;box-shadow:0 0 0 2px #ffe39f,0 0 18px #ffc662!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor-card.is-locked{filter:grayscale(.8)!important;opacity:.55!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-landing{grid-column:2!important;z-index:2!important;display:block!important;width:70px!important;line-height:40px!important;margin:auto!important;border:3px solid #e7bc70!important;border-radius:7px!important;background:#ffd76a!important;color:#3a2a10!important;font-weight:800!important;text-align:center!important;font-size:15px!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-selection{display:flex!important;flex-direction:column!important;min-height:0!important;max-height:none!important;overflow:auto!important;padding:14px!important;background:#f7f0e2!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-depth-scene{width:100%!important;max-height:38%!important;min-height:100px!important;aspect-ratio:16/9!important;object-fit:cover!important;border:2px solid #c6a46b!important;border-radius:12px!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-selection-copy{width:100%!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-selection-copy>b{font-size:22px!important}
body[data-ui-version="3"] #app .cave-depth-board .ex-stage-chips{overflow:auto!important;max-height:35%!important}
body[data-ui-version="3"] #app .cave-depth-board .cave-selection>.ex-enter{flex:none!important;min-height:44px!important;margin-top:auto!important}
@media(max-width:760px){body[data-ui-version="3"] #app .cave-depth-board .cave-depth-layout{grid-template-columns:1fr!important;grid-template-rows:minmax(220px,1fr) auto!important}body[data-ui-version="3"] #app .cave-depth-board .cave-selection{max-height:35dvh!important}body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor{min-height:100px!important}body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor-card{height:80px!important}body[data-ui-version="3"] #app .cave-depth-board .cave-depth-floor-card strong{font-size:14px!important}body[data-ui-version="3"] #app .cave-depth-board .cave-depth-home-link{font-size:12px!important}}
