/* References24/54/55: independent scene, portrait, frame, progress and native controls. */
html body.pc-redesign .r130-cave-selection{display:grid!important;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)!important;gap:12px!important;min-height:0;overflow:hidden;color:#f2dfb1;font:14px Georgia,serif}
html body.pc-redesign .r130-cave-selection *{box-sizing:border-box;min-width:0}
html body.pc-redesign .r130-cave-selection>section{border:1px solid transparent!important;border-image:url('assets/round2-crafting/frames/city-card.png') 120 / 11px / 0 stretch!important;padding:10px!important;background:#141811!important;border-radius:0;min-height:0;overflow:hidden}
html body.pc-redesign .r130-cave-selection button{border:1px solid transparent!important;border-image:url('assets/round2-crafting/frames/button-normal.png') 80 110 / 9px 12.375px / 0 stretch!important;background:#342211 url('assets/round2-crafting/73-craft-leather-tile-v1.png') center/180px!important;border-radius:0;box-shadow:none!important;color:#f6dfa8;font:14px/1.15 Georgia!important;min-height:36px;padding:6px;cursor:pointer}
html body.pc-redesign .r130-cave-selection button:is(:hover,:focus-visible,[aria-pressed=true]){border-image-source:url('assets/round2-crafting/frames/button-hover.png')!important;background-color:#65411c!important}
html body.pc-redesign .r130-cave-selection button:active{border-image-source:url('assets/round2-crafting/frames/button-pressed.png')!important}
html body.pc-redesign .r130-cave-selection button:disabled{border-image-source:url('assets/round2-crafting/frames/button-disabled.png')!important;opacity:.65}
html body.pc-redesign .r130-cave-selection .smith-button-skin{display:none!important}
html body.pc-redesign .r130-cave-selection .smith-button-label{font:inherit!important;display:contents!important}
html body.pc-redesign .r130-cave-selection :is(h2,h3,p,small){margin:0;line-height:1.2}
html body.pc-redesign .r130-cave-selection h2{font:700 25px/1.1 Georgia;color:#f2d38b}
html body.pc-redesign .r130-cave-selection h3{font:700 18px/1.1 Georgia;color:#edce87}
html body.pc-redesign .r130-cave-selection small{font:11px/1.2 Georgia;color:#dac8a0}
html body.pc-redesign .r130-cave-selection .icon{width:24px;height:24px;flex:none;color:#e4c46f}
html body.pc-redesign .r130-cave-selection progress{appearance:none;width:100%;height:10px;border:1px solid #ad8b46;background:#0d110c;border-radius:4px;accent-color:#dbaf51}
html body.pc-redesign .r130-cave-selection progress::-webkit-progress-bar{background:#0d110c}
html body.pc-redesign .r130-cave-selection progress::-webkit-progress-value{background:linear-gradient(#ffe4a4,#c07c12)}
.r130-cave-catalog{display:flex!important;flex-direction:column;gap:8px}
.r130-cave-modes,.r130-cave-pass{display:flex;gap:6px;flex:none}.r130-cave-modes button,.r130-cave-pass button{flex:1;display:flex;align-items:center;justify-content:center;gap:7px}
.r130-cave-progress-summary{display:grid;grid-template-columns:1fr 1fr;gap:8px;flex:none}.r130-cave-progress-summary>div{display:flex;flex-direction:column;gap:4px;border:1px solid #8e723f;padding:7px;background:#201c12}.r130-cave-progress-summary strong{font-size:13px}
.r130-cave-regions{flex:1;min-height:0;display:flex;flex-direction:column;gap:8px}
.r130-cave-region{display:flex;flex:1;flex-direction:column;min-height:0;border:1px solid #876c3d;background:#131a13;overflow:hidden}
.r130-cave-region.selected{outline:1px solid #f4ca74;outline-offset:-2px}
html body.pc-redesign .r130-cave-selection .r130-cave-region-open{display:flex;flex:1;min-height:0!important;gap:10px;padding:5px!important;border:0!important;background:transparent!important;text-align:left;overflow:hidden}
.r130-cave-region-open>img{width:42%;height:100%;min-height:0;object-fit:cover;align-self:stretch}
.r130-cave-region-open>span{display:flex;flex:1;flex-direction:column;justify-content:center;gap:7px}.r130-cave-region-open strong{font-size:24px;color:#f2d38b}.r130-cave-region-open b{font-size:12px}
.r130-cave-card-difficulties,.r130-cave-difficulties{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;flex:none}.r130-cave-card-difficulties{padding:4px}
html body.pc-redesign .r130-cave-selection .r130-cave-difficulty{display:flex;align-items:center;justify-content:center;gap:7px;padding:5px;min-height:43px}
.r130-cave-difficulty>span{display:flex;flex-direction:column;gap:4px}.r130-cave-difficulty strong{font-size:13px}.r130-cave-difficulty.difficulty-hard .icon{color:#c2cfdf}.r130-cave-difficulty.difficulty-nightmare .icon{color:#df9b86}
.r130-cave-description{display:flex!important;flex-direction:column;gap:7px;justify-content:flex-start!important}
.r130-cave-description>header{flex:none;padding:3px 4px 7px;border-bottom:1px solid #987a40;display:flex;flex-direction:column;gap:4px}
.r130-cave-detail-pages{display:none}.r130-cave-opponent{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1fr);gap:9px;flex:1;min-height:75px}
.r130-cave-enemy-art{position:relative;min-height:0;overflow:hidden;background:#090f0b;border:1px solid #987a40}.r130-cave-enemy-art>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.r130-cave-enemy-info{display:flex;flex-direction:column;justify-content:center;gap:7px}.r130-cave-enemy-info dl{display:flex;flex-direction:column;gap:4px;margin:0}.r130-cave-enemy-info dl>div{display:flex;justify-content:space-between;gap:8px;align-items:center;border-bottom:1px solid #66532e;padding:3px}.r130-cave-enemy-info dt{display:flex;align-items:center;gap:7px;font-size:13px}.r130-cave-enemy-info dd{margin:0;color:#f4d797;font-variant-numeric:tabular-nums}
.r130-cave-preparation{flex:none}.r130-cave-preparation>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin-top:4px}.r130-cave-preparation article{display:flex;flex-direction:column;align-items:center;gap:3px;padding:4px;border:1px solid #92733b;text-align:center;background:#10150f}.r130-cave-preparation img{width:100%;height:40px;object-fit:contain}.r130-cave-preparation strong{font-size:12px}
.r130-cave-setup{display:flex;flex-direction:column;gap:6px;flex:none}.r130-cave-floor{display:flex;gap:8px;align-items:center}.r130-cave-floor label{display:flex!important;align-items:center;gap:6px;margin:0!important;font-size:12px;flex:1}.r130-cave-floor select{min-height:32px!important;width:145px!important;padding:3px!important;font-size:11px}.r130-cave-floor>small{flex:1}
.r130-cave-power{display:flex;justify-content:space-between;gap:8px;padding:6px;border:1px solid #876d3d;flex:none;background:#0d140e}.r130-cave-power span{display:flex;flex-direction:column;gap:3px;font-size:11px}.r130-cave-power b{font-size:14px;color:#f1ce86}
.r130-cave-loot{flex:none;border:1px solid #876d3d;padding:5px}.r130-cave-loot>strong{font-size:12px}.r130-cave-loot>div{display:flex;align-items:center;gap:9px;margin:3px 0}.r130-cave-loot>div>span{font-size:11px}
.r130-cave-description>footer{display:flex;flex-direction:column;gap:5px;flex:none;text-align:center}.r130-cave-description>footer>button{width:100%}
html body.pc-redesign .r130-cave-selection>.r130-cave-history{display:none}
.r130-cave-history-list{flex:1;min-height:0;display:grid;grid-template-rows:repeat(4,minmax(0,1fr));gap:7px}.r130-cave-history-list button{display:flex;flex-direction:column;justify-content:center;gap:5px;text-align:left}.r130-cave-history>nav{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none}
@media(min-width:1000px){
 html body.pc-redesign .pc-caves-screen[data-pane="2"]>.r130-cave-selection{grid-template-columns:minmax(0,1fr)!important}
 html body.pc-redesign .pc-caves-screen[data-pane="2"]>.r130-cave-selection>:not(.r130-cave-history){display:none!important}
 html body.pc-redesign .pc-caves-screen[data-pane="2"]>.r130-cave-selection>.r130-cave-history{display:flex!important;flex-direction:column;gap:9px}
}
@media(max-width:999px){
 html body.pc-redesign .r130-cave-selection{display:block!important}
 html body.pc-redesign .r130-cave-selection>section{display:none!important;height:100%;padding:7px!important}
 html body.pc-redesign .pc-caves-screen[data-pane="0"]>.r130-cave-selection>.r130-cave-catalog,
 html body.pc-redesign .pc-caves-screen[data-pane="1"]>.r130-cave-selection>.r130-cave-description,
 html body.pc-redesign .pc-caves-screen[data-pane="2"]>.r130-cave-selection>.r130-cave-history{display:flex!important;flex-direction:column}
 html body.pc-redesign .r130-cave-selection h2{font-size:21px}.r130-cave-region-open strong{font-size:20px}
 .r130-cave-detail-pages{display:flex;flex:none;gap:5px}.r130-cave-detail-pages>button{flex:1}
 html body.pc-redesign .r130-cave-selection .r130-cave-description[data-detail-pane="setup"]>:is(.r130-cave-opponent,.r130-cave-preparation){display:none}
 html body.pc-redesign .r130-cave-selection .r130-cave-description[data-detail-pane="preview"]>:is(.r130-cave-setup,.r130-cave-loot){display:none}
 .r130-cave-description[data-detail-pane="setup"] .r130-cave-setup{flex:1;justify-content:center}
 .r130-cave-opponent{min-height:70px}.r130-cave-regions{gap:6px}.r130-cave-catalog{gap:6px}.r130-cave-region-open>img{width:36%}
 .r130-cave-card-difficulties .icon{width:18px!important;height:18px!important}.r130-cave-card-difficulties strong{font-size:11px}.r130-cave-card-difficulties small{font-size:10px!important}.r130-cave-card-difficulties{gap:3px}
 html body.pc-redesign .r130-cave-selection .r130-cave-difficulty{gap:3px}.r130-cave-progress-summary{gap:5px}.r130-cave-progress-summary>div{padding:5px}.r130-cave-progress-summary strong{font-size:12px}
}
@media(max-height:720px){
 .r130-cave-description{gap:5px}.r130-cave-preparation img{height:30px}.r130-cave-preparation article{padding:3px}.r130-cave-description>header{padding:1px 3px 4px}.r130-cave-enemy-info{gap:4px}
 html body.pc-redesign .r130-cave-selection h3{font-size:15px}html body.pc-redesign .r130-cave-selection small{font-size:10px}.r130-cave-difficulty strong{font-size:12px}
}
@media(max-width:999px) and (max-height:500px){
 html body.pc-redesign .r130-cave-selection>section{padding:5px!important;gap:4px}
 .r130-cave-regions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .r130-cave-region-open{flex-direction:column}.r130-cave-region-open>img{width:100%;height:45%;flex:1}.r130-cave-region-open>span{width:100%;gap:3px;flex:none}.r130-cave-region-open strong{font-size:14px}.r130-cave-region-open small{font-size:9px!important}.r130-cave-region-open b{display:none}
 html body.pc-redesign .r130-cave-selection button{min-height:29px!important;font-size:11px!important;padding:3px}
 html body.pc-redesign .r130-cave-selection .r130-cave-card-difficulties .icon{display:none}.r130-cave-card-difficulties strong{font-size:9px}.r130-cave-card-difficulties small{font-size:8px!important}.r130-cave-card-difficulties{padding:2px;gap:2px}
 .r130-cave-modes{gap:4px}.r130-cave-modes .icon{width:17px!important;height:17px!important}.r130-cave-progress-summary>div{padding:3px;flex-direction:row;align-items:center;gap:7px}.r130-cave-progress-summary progress{flex:1}.r130-cave-progress-summary strong{font-size:10px;flex:none}.r130-cave-catalog>small{display:none}
 html body.pc-redesign .pc-caves-screen[data-pane="1"]>.r130-cave-selection>.r130-cave-description{display:grid!important;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);grid-template-rows:33px 30px minmax(0,1fr) 42px;gap:4px 8px}
 .r130-cave-description>header{grid-column:1;grid-row:1;display:block;padding:0}.r130-cave-description>header h2{font-size:17px!important}.r130-cave-description>header>small{font-size:9px!important}
 .r130-cave-detail-pages{grid-column:2;grid-row:1}.r130-cave-description>.r130-cave-opponent{grid-column:1;grid-row:2/5;min-height:0}.r130-cave-enemy-info h3{font-size:13px!important}.r130-cave-enemy-info dl>div{padding:1px}.r130-cave-enemy-info dt{font-size:11px}.r130-cave-enemy-info .icon{width:16px!important;height:16px!important}
 .r130-cave-preparation{grid-column:2;grid-row:3;min-height:0}.r130-cave-preparation h3{font-size:12px!important}.r130-cave-preparation img{height:24px}.r130-cave-preparation strong{font-size:10px}.r130-cave-preparation small{font-size:9px!important}
 .r130-cave-description>.r130-cave-power{grid-column:2;grid-row:2;padding:2px}.r130-cave-power span{font-size:9px}.r130-cave-power b{font-size:10px}
 .r130-cave-description>footer{grid-column:2;grid-row:4;gap:2px}.r130-cave-description>footer small{font-size:9px!important}
 .r130-cave-description[data-detail-pane="setup"]>.r130-cave-setup{grid-column:1;grid-row:2/5;justify-content:space-between;gap:4px}.r130-cave-difficulties button{flex-direction:column;gap:2px!important}.r130-cave-difficulties .icon{width:17px!important;height:17px!important}.r130-cave-difficulties strong{font-size:11px}.r130-cave-difficulties small{font-size:9px!important}.r130-cave-floor label{font-size:10px;flex-direction:column;align-items:stretch;gap:2px}.r130-cave-floor select{width:100%!important;min-height:28px!important}.r130-cave-floor>small{font-size:9px!important}
 .r130-cave-description[data-detail-pane="setup"]>.r130-cave-loot{grid-column:2;grid-row:3;display:flex;flex-direction:column;justify-content:center;gap:2px}.r130-cave-loot>div{margin:0}.r130-cave-loot .icon{width:18px!important;height:18px!important}.r130-cave-loot small{font-size:9px!important}
 .r130-cave-history-list{grid-template-columns:1fr 1fr;grid-template-rows:repeat(2,minmax(0,1fr))}.r130-cave-history h2{font-size:18px!important}
}
@media(max-width:999px){
 html body.pc-redesign .r130-cave-selection button{padding:4px!important;font-size:12px!important}
 html body.pc-redesign .r130-cave-selection .r130-cave-region-open{background:transparent!important;border:0!important}
}
@media(max-width:500px) and (max-height:720px){
 html body.pc-redesign .r130-cave-selection .r130-cave-region-open>span{gap:3px}
 html body.pc-redesign .r130-cave-selection .r130-cave-region-open strong{font-size:16px;line-height:1.05}
 html body.pc-redesign .r130-cave-selection .r130-cave-region-open :is(small,b){display:none}
 html body.pc-redesign .r130-cave-selection .r130-cave-region-open progress{height:7px}
 html body.pc-redesign .r130-cave-selection .r130-cave-card-difficulties button{min-height:38px!important;padding:3px!important}
 html body.pc-redesign .r130-cave-selection .r130-cave-card-difficulties .icon{width:15px!important;height:15px!important}
 html body.pc-redesign .r130-cave-selection .r130-cave-card-difficulties strong{font-size:10px}
 html body.pc-redesign .r130-cave-selection .r130-cave-description{gap:4px}
 html body.pc-redesign .r130-cave-selection .r130-cave-loot{display:grid;grid-template-columns:1fr 1.4fr;gap:3px;padding:4px}
 html body.pc-redesign .r130-cave-selection .r130-cave-loot>small{grid-column:1/-1}
 html body.pc-redesign .r130-cave-selection .r130-cave-loot>div{margin:0;gap:4px}
 html body.pc-redesign .r130-cave-selection .r130-cave-loot .icon{width:17px;height:17px}
 html body.pc-redesign .r130-cave-selection .r130-cave-difficulties .icon{width:18px;height:18px}
 .r130-cave-difficulty>span{gap:2px}
}
@media(min-width:1000px) and (max-width:1100px){
 .r130-cave-detail-pages{display:flex;gap:5px;flex:none}.r130-cave-detail-pages>button{flex:1}
 html body.pc-redesign .r130-cave-selection .r130-cave-description[data-detail-pane="setup"]>:is(.r130-cave-opponent,.r130-cave-preparation){display:none}
 html body.pc-redesign .r130-cave-selection .r130-cave-description[data-detail-pane="preview"]>:is(.r130-cave-setup,.r130-cave-loot){display:none}
 .r130-cave-description[data-detail-pane="setup"] .r130-cave-setup{flex:1;justify-content:center}
}
@media(min-width:501px) and (max-width:1100px) and (max-height:850px){
 html body.pc-redesign .r130-cave-selection .r130-cave-region-open>span{gap:4px}
 html body.pc-redesign .r130-cave-selection .r130-cave-region-open strong{font-size:17px;line-height:1.05}
 html body.pc-redesign .r130-cave-selection .r130-cave-region-open :is(small,b){display:none}
 html body.pc-redesign .r130-cave-selection .r130-cave-region-open progress{height:8px}
 html body.pc-redesign .r130-cave-selection .r130-cave-card-difficulties button{min-height:39px!important;padding:4px!important}
 html body.pc-redesign .r130-cave-selection .r130-cave-card-difficulties .icon{width:17px!important;height:17px!important}
 html body.pc-redesign .r130-cave-selection .r130-cave-card-difficulties strong{font-size:11px}
}

/* v131: two region cards per local page, independent progression across five caves. */
html body.pc-redesign .r130-cave-selection .r131-cave-region-pages{display:flex;justify-content:space-between;align-items:center;gap:5px;flex:none;min-height:40px}
html body.pc-redesign .r130-cave-selection .r131-cave-region-pages button{min-height:40px!important;font-size:12px!important}
html body.pc-redesign .r130-cave-selection .r131-cave-region-pages span{font-size:12px;color:#f2dfb1}
html body.pc-redesign .r130-cave-history>nav[hidden]{display:none!important}
