/* Ref15/52: separate frame states, material, item art and live comparison. */
html body.pc-redesign[data-layout=sidebar]:has(.r130-shop) #app{grid-template-rows:62px minmax(0,1fr) 0!important;height:100dvh!important;max-height:100dvh!important;overflow:hidden!important}
html body.pc-redesign[data-layout=sidebar]:has(.r130-shop) .layout-footer{display:none!important}
html body.pc-redesign #app .view-content:has(>.r130-shop){grid-template-rows:auto minmax(0,1fr)!important;height:100%!important;min-height:0!important;overflow:hidden!important}
html body.pc-redesign #app .r130-shop{display:flex!important;flex-direction:column;gap:8px;padding:6px!important;width:100%;height:100%!important;max-height:100%!important;min-height:0!important;box-sizing:border-box;overflow:hidden!important;color:#f3dfb1;font:14px Georgia,serif}
html body.pc-redesign #app .r130-shop *{min-width:0;box-sizing:border-box}
html body.pc-redesign #app .r130-shop button{border:1px solid transparent!important;border-image:url('assets/round2-crafting/frames/button-normal.png') 80 110/10px 13.75px/0 stretch!important;border-radius:0!important;background:#302012 url('assets/round2-crafting/73-craft-leather-tile-v1.png') center/180px!important;box-shadow:none!important;color:#ffe9b5!important;font:14px/1.15 Georgia!important;min-height:36px!important;padding:5px 8px!important;cursor:pointer}
html body.pc-redesign #app .r130-shop button:is(:hover,:focus-visible,[aria-pressed=true]){border-image-source:url('assets/round2-crafting/frames/button-hover.png')!important;background-color:#67451e!important}
html body.pc-redesign #app .r130-shop button:active{border-image-source:url('assets/round2-crafting/frames/button-pressed.png')!important}
html body.pc-redesign #app .r130-shop button:disabled{border-image-source:url('assets/round2-crafting/frames/button-disabled.png')!important;opacity:.65;cursor:default}
html body.pc-redesign #app .r130-shop .smith-button-skin{display:none!important}
html body.pc-redesign #app .r130-shop .smith-button-label{font:inherit!important;display:contents!important}
html body.pc-redesign #app .r130-shop :is(h1,h2,h3,p,figure){margin:0}
html body.pc-redesign #app .r130-shop h1{font:700 30px/1.05 Georgia;color:#f3d38a}
html body.pc-redesign #app .r130-shop h2{font:700 22px/1.1 Georgia;color:#f3d38a}
html body.pc-redesign #app .r130-shop h3{font:700 14px/1.1 Georgia;color:#e6c783}
html body.pc-redesign #app .r130-shop small{font:11px/1.25 Georgia;color:#d9c59c}
html body.pc-redesign #app .r130-shop .icon{width:23px;height:23px;flex:none;object-fit:contain;color:#e4c570}
.r130-shop-header{display:flex;justify-content:space-between;align-items:center;gap:12px;flex:none;padding:6px 10px;background:linear-gradient(#18140baa,#18140baa),url('assets/pc-v124/ui/hall-header.webp') center/cover;border-bottom:1px solid #ac8847}
.r130-shop-wallet{display:flex;align-items:center;gap:15px}.r130-shop-money{display:flex;gap:6px;align-items:center;justify-content:center}.r130-shop-money b{font-variant-numeric:tabular-nums}
.r130-shop-panes{display:none}
.r130-shop-layout{display:grid;grid-template-columns:minmax(0,2.2fr) minmax(0,1fr);gap:10px;flex:1;min-height:0;overflow:hidden}
html body.pc-redesign #app .r130-shop-layout>:is(section,aside){border:1px solid transparent!important;border-image:url('assets/round2-crafting/frames/city-card.png') 120/10px/0 stretch!important;padding:10px;min-height:0;overflow:hidden;background:linear-gradient(#13130f99,#13130f99),url('assets/round2-crafting/73-craft-leather-tile-v1.png') center/220px}
.r130-shop-catalog{display:flex;flex-direction:column;gap:8px}
.r130-shop-merchants{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;flex:none}
.r130-shop-stock-header{display:flex;justify-content:space-between;align-items:center;gap:7px;flex:none}.r130-shop-stock-header>div{display:flex;flex-direction:column;gap:5px;flex:1}.r130-shop-stock-header>button{font-size:12px!important}
.r130-shop-filters{display:flex;gap:4px}.r130-shop-filters select{width:100%;min-height:30px;padding:4px;color:#efdfb6;background:#151910;border:1px solid #9b7e44;font:11px Georgia}
.r130-shop-stock{flex:1;min-height:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:7px;overflow:hidden}
.r130-shop-offer{display:flex;flex-direction:column;min-height:0;padding:5px;gap:4px;overflow:hidden;border:1px solid var(--item-rarity);background:#0f150f;box-shadow:inset 0 0 10px color-mix(in srgb,var(--item-rarity) 15%,transparent)}
.r130-shop-offer.selected{outline:1px solid #f0c675;outline-offset:-3px}
html body.pc-redesign #app .r130-shop .r130-shop-inspect{display:flex;flex-direction:column;align-items:stretch;gap:4px;flex:1;min-height:0!important;padding:2px!important;border:0!important;border-image:none!important;background:transparent!important;overflow:hidden;text-align:center}
.r130-shop-offer-art{position:relative;flex:1;min-height:25px;overflow:hidden;display:block}.r130-shop-offer-art>:is(svg,img){position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.r130-shop-inspect>strong{font:700 14px/1.1 Georgia;color:var(--item-rarity);flex:none;overflow-wrap:anywhere}
.r130-shop-card-values{display:flex;justify-content:center;align-items:center;gap:4px;font-size:12px;flex:none}.r130-shop-card-values .icon{width:17px!important;height:17px!important}
.r130-shop-offer>.r130-shop-buy{flex:none;width:100%}
.r130-shop-catalog>footer{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none}.r130-shop-catalog>footer>small{max-width:60%}
.r130-shop-pager{display:flex;gap:6px;align-items:center}.r130-shop-pager span{font-size:12px;flex:none}
.r130-shop-detail{display:flex;flex-direction:column;gap:7px}
.r130-shop-detail>header{display:flex;flex-direction:column;gap:4px;flex:none;padding-bottom:6px;border-bottom:1px solid #9b7e44}
.r130-shop-info-tabs{display:flex;gap:4px;flex:none}.r130-shop-info-tabs>button{flex:1;font-size:12px!important;min-height:30px!important}
.r130-shop-pictures{display:flex;gap:6px;flex:1;min-height:55px;overflow:hidden}
.r130-shop-pictures figure{display:flex;flex-direction:column;flex:1;min-height:0;gap:4px;padding:5px;border:1px solid #9e7b3e;background:#0d130d;text-align:center}
.r130-shop-pictures figcaption{font-size:12px;color:#e5c98b;flex:none}
.r130-shop-pictures figure>div{position:relative;min-height:0;flex:1;display:grid;place-items:center}
.r130-shop-pictures figure>div>:is(svg,img){position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.r130-shop-pictures figure>div>span{font-size:12px;max-width:100%;overflow-wrap:anywhere}
.r130-shop-information{flex:none;min-height:0;padding:6px;border:1px solid #9e7b3e;background:#0d130dcc}
.r130-shop-information>section{display:none}.r130-shop-information[data-info=stats]>.r130-shop-info-stats,.r130-shop-information[data-info=description]>.r130-shop-info-description,.r130-shop-information[data-info=effects]>.r130-shop-info-effects{display:block}
.r130-shop-information table{width:100%;border-collapse:collapse;font-size:12px}.r130-shop-information caption{text-align:left;color:#e5c98b;margin-bottom:4px}.r130-shop-information :is(th,td){padding:5px 2px;border-bottom:1px solid #6b5830;text-align:right}.r130-shop-information th:first-child{text-align:left}.r130-shop-information :is(.positive){color:#a6d58b}.r130-shop-information .negative{color:#eb9a86}
.r130-shop-information p{font:12px/1.3 Georgia;margin:3px 0!important;overflow-wrap:anywhere}
.r130-shop-detail-actions{display:flex;gap:5px;flex:none}.r130-shop-detail-actions>button{flex:1}
.r130-shop-replaces{flex:none}.r130-shop-warning,.r130-shop-buy-status{font:11px/1.2 Georgia!important;flex:none;color:#e4c893}
.r130-shop-footer{display:flex;justify-content:space-between;gap:7px;flex:none}.r130-shop-footer button{font-size:12px!important}
@media(max-width:1199px){
 .r130-shop-layout{grid-template-columns:1fr}
 .r130-shop-panes{display:flex;gap:5px;flex:none}.r130-shop-panes button{flex:1}
 html body.pc-redesign #app .r130-shop[data-pane=catalog] .r130-shop-detail,html body.pc-redesign #app .r130-shop[data-pane=detail] .r130-shop-catalog{display:none!important}
 .r130-shop-stock{grid-template-columns:repeat(5,minmax(0,1fr))}
 .r130-shop-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto auto auto;gap:8px}
 .r130-shop-detail>header{grid-column:1/-1}.r130-shop-info-tabs{grid-column:2;grid-row:2}
 .r130-shop-pictures{grid-column:1;grid-row:2/7;min-height:0}
 .r130-shop-information{grid-column:2;grid-row:3}.r130-shop-replaces{grid-column:2;grid-row:4}.r130-shop-warning{grid-column:2;grid-row:5}.r130-shop-detail-actions{grid-column:2;grid-row:6}
 .r130-shop-detail>.r130-shop-buy-status,.r130-shop-detail>small:last-of-type,.r130-shop-inventory-link{grid-column:2}
}
@media(max-width:900px){
 html body.pc-redesign #app .r130-shop{gap:5px!important;padding:4px!important}
 .r130-shop-header{padding:5px}.r130-shop-header h1{font-size:23px!important}.r130-shop-header>div>small{font-size:8px!important}.r130-shop-wallet{gap:6px}.r130-shop-wallet .icon{width:16px!important;height:16px!important}.r130-shop-wallet b{font-size:12px}
 .r130-shop-stock{grid-template-columns:repeat(2,minmax(0,1fr))}
 .r130-shop-catalog{gap:6px}.r130-shop-stock-header h2{font-size:18px!important}.r130-shop-stock-header>button{max-width:36%;font-size:11px!important}
 .r130-shop-merchants button{font-size:12px!important;padding:4px!important}
 .r130-shop-stock-header{gap:5px}.r130-shop-stock-header>div>small{font-size:10px!important}
 .r130-shop-catalog>footer{gap:5px}.r130-shop-catalog>footer>small{font-size:10px!important;max-width:47%}
 .r130-shop-pager{gap:3px}.r130-shop-pager button{font-size:11px!important;padding:3px 5px!important}
 .r130-shop-filters{flex-wrap:wrap}.r130-shop-filters select{flex:1;min-width:60px;padding:3px;font-size:10px}
 .r130-shop-footer>button{font-size:11px!important;min-height:32px!important}
 .r130-shop-detail{display:flex;gap:6px}
 .r130-shop-detail h2{font-size:20px!important}
 .r130-shop-pictures{min-height:60px}.r130-shop-info-tabs>button{font-size:11px!important}
 .r130-shop-information table{font-size:11px}.r130-shop-information :is(th,td){padding:4px 2px}
 .r130-shop-detail>.r130-shop-inventory-link{min-height:31px!important;font-size:11px!important}
}
@media(max-width:600px) and (max-height:700px){
 .r130-shop-header{height:37px;min-height:37px;gap:4px}.r130-shop-header h1{font-size:20px!important}.r130-shop-wallet .icon{width:13px!important;height:13px!important}.r130-shop-wallet{gap:4px}.r130-shop-money{gap:2px}.r130-shop-wallet b{font-size:10px}
 html body.pc-redesign #app .r130-shop button{min-height:31px!important;font-size:11px!important;padding:4px!important}
 html body.pc-redesign #app .r130-shop-layout>:is(section,aside){padding:6px}
 .r130-shop-catalog{gap:4px}.r130-shop-merchants button{font-size:10px!important}.r130-shop-stock-header h2{font-size:16px!important}.r130-shop-stock-header>button{font-size:10px!important}
 .r130-shop-offer{padding:4px;gap:3px}.r130-shop-inspect>strong{font-size:12px}.r130-shop-inspect>small{font-size:9px!important}.r130-shop-card-values{font-size:10px}.r130-shop-card-values small{font-size:9px!important}.r130-shop-offer .r130-shop-money .icon{width:17px!important;height:17px!important}
 .r130-shop-detail{gap:4px}.r130-shop-detail h2{font-size:18px!important}.r130-shop-detail>header{gap:2px;padding-bottom:3px}.r130-shop-detail>header>small{font-size:10px!important}
 .r130-shop-information table{font-size:10px}.r130-shop-information :is(th,td){padding:3px 1px}.r130-shop-information{padding:4px}
 .r130-shop-information p{font-size:10px;line-height:1.2}.r130-shop-pictures{min-height:35px}.r130-shop-pictures figure{padding:3px}.r130-shop-pictures figcaption{font-size:10px}.r130-shop-pictures small{font-size:9px!important}
 .r130-shop-footer button{font-size:10px!important}
}
@media(max-width:1199px) and (max-height:500px){
 html body.pc-redesign[data-layout=sidebar]:has(.r130-shop) #app{grid-template-rows:46px minmax(0,1fr) 0!important}
 html body.pc-redesign #app .r130-shop{gap:4px!important;padding:3px!important}
 .r130-shop-header{min-height:28px;height:28px;padding:3px 5px}.r130-shop-header h1{font-size:18px!important}.r130-shop-header>div>small{display:none}.r130-shop-wallet .icon{width:14px!important;height:14px!important}.r130-shop-wallet b{font-size:11px}
 html body.pc-redesign #app .r130-shop button{min-height:28px!important;font-size:11px!important;padding:3px 5px!important}
 .r130-shop-panes>button{font-size:10px!important}
 .r130-shop-catalog{display:grid;grid-template-columns:190px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) 30px;gap:5px}
 .r130-shop-merchants{grid-column:1;grid-row:1/3;display:flex;flex-direction:column;gap:3px}.r130-shop-merchants>button{flex:1}
 .r130-shop-stock-header{grid-column:2;grid-row:1}.r130-shop-stock-header h2{font-size:15px!important}.r130-shop-stock-header>div>small{font-size:9px!important}
 .r130-shop-stock{grid-column:2;grid-row:2;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
 .r130-shop-catalog>footer{grid-column:1/-1;grid-row:3}.r130-shop-offer{display:grid;grid-template-columns:1fr 80px;gap:3px;padding:3px}
 html body.pc-redesign #app .r130-shop .r130-shop-inspect{display:grid;grid-template-columns:65px minmax(0,1fr);grid-template-rows:auto auto auto auto;gap:2px;grid-column:1}
 .r130-shop-offer-art{grid-column:1;grid-row:1/5;height:100%;min-height:0}.r130-shop-inspect>:not(.r130-shop-offer-art){grid-column:2}.r130-shop-inspect>strong{font-size:11px}.r130-shop-inspect>small{font-size:9px!important}.r130-shop-card-values{font-size:10px}.r130-shop-offer>.r130-shop-buy{grid-column:2;align-self:center}
 .r130-shop-stock-header .r130-shop-filters{flex-wrap:nowrap}.r130-shop-stock-header .r130-shop-filters select{min-height:25px;font-size:9px}
 .r130-shop-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr) minmax(0,1fr);grid-template-rows:24px minmax(0,1fr) auto auto;gap:4px 8px}
 .r130-shop-detail>header{grid-column:1;grid-row:1/3}.r130-shop-detail h2{font-size:17px!important}
 .r130-shop-info-tabs{grid-column:2;grid-row:1}.r130-shop-pictures{grid-column:1;grid-row:2/5;min-height:0;margin-top:36px}
 .r130-shop-information{grid-column:2;grid-row:2/5}.r130-shop-replaces{grid-column:3;grid-row:1}.r130-shop-warning{grid-column:3;grid-row:2}
 .r130-shop-detail-actions{grid-column:3;grid-row:2;flex-direction:column;justify-content:center}.r130-shop-detail>.r130-shop-buy-status{grid-column:3;grid-row:3}.r130-shop-detail>small:last-of-type{grid-column:3;grid-row:4}.r130-shop-inventory-link{grid-column:1;grid-row:4;align-self:end;z-index:1}
 .r130-shop-pictures figure{padding:2px}.r130-shop-pictures figcaption{font-size:9px}.r130-shop-pictures small{font-size:9px!important}.r130-shop-information table{font-size:10px}.r130-shop-information :is(th,td){padding:4px 1px}.r130-shop-information p{font-size:10px!important}.r130-shop-detail small{font-size:9px!important}
}
html body.pc-redesign #app .r130-shop{height:var(--r2-town-height,100%)!important;max-height:var(--r2-town-height,100%)!important}
@media(max-width:1199px){
 html body.pc-redesign #app .r130-shop[data-pane=info] .r130-shop-catalog{display:none!important}
 html body.pc-redesign #app .r130-shop[data-pane=info] .r130-shop-detail{display:flex!important;flex-direction:column}
 html body.pc-redesign #app .r130-shop[data-pane=info] .r130-shop-detail :is(.r130-shop-pictures,.r130-shop-detail-actions,.r130-shop-buy-status,.r130-shop-inventory-link){display:none!important}
 html body.pc-redesign #app .r130-shop[data-pane=info] .r130-shop-information{flex:1;display:flex;flex-direction:column;justify-content:center}
}
@media(max-width:900px){
 html body.pc-redesign #app .r130-shop[data-pane=detail] .r130-shop-detail :is(.r130-shop-information,.r130-shop-info-tabs){display:none!important}
 html body.pc-redesign #app .r130-shop[data-pane=detail] .r130-shop-pictures{flex:1;min-height:30px}
}
@media(max-width:1199px) and (max-height:500px){
 html body.pc-redesign #app .r130-shop[data-pane=detail] .r130-shop-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:30px minmax(0,1fr) auto auto}
 html body.pc-redesign #app .r130-shop[data-pane=detail] .r130-shop-detail>header{grid-column:1;grid-row:1}
 html body.pc-redesign #app .r130-shop[data-pane=detail] .r130-shop-pictures{grid-column:1;grid-row:2/5;margin:0}
 html body.pc-redesign #app .r130-shop[data-pane=detail] .r130-shop-replaces{grid-column:2;grid-row:1}
 html body.pc-redesign #app .r130-shop[data-pane=detail] .r130-shop-detail-actions{grid-column:2;grid-row:2;align-self:center;flex-direction:row}
 html body.pc-redesign #app .r130-shop[data-pane=detail] .r130-shop-buy-status{grid-column:2;grid-row:3}
 html body.pc-redesign #app .r130-shop[data-pane=detail] .r130-shop-detail>small:last-of-type{grid-column:2;grid-row:4}
 html body.pc-redesign #app .r130-shop[data-pane=detail] .r130-shop-inventory-link{display:none}
 html body.pc-redesign #app .r130-shop[data-pane=detail] .r130-shop-warning{grid-column:2;grid-row:2;align-self:start}
 html body.pc-redesign #app .r130-shop[data-pane=info] .r130-shop-detail{display:grid!important;grid-template-columns:1fr 1.7fr;grid-template-rows:32px minmax(0,1fr) auto}
 html body.pc-redesign #app .r130-shop[data-pane=info] .r130-shop-detail>header{grid-column:1;grid-row:1/3}
 html body.pc-redesign #app .r130-shop[data-pane=info] .r130-shop-info-tabs{grid-column:2;grid-row:1}
 html body.pc-redesign #app .r130-shop[data-pane=info] .r130-shop-information{grid-column:2;grid-row:2/4}
 html body.pc-redesign #app .r130-shop[data-pane=info] .r130-shop-replaces{grid-column:1;grid-row:3}
 html body.pc-redesign #app .r130-shop[data-pane=info] .r130-shop-warning{grid-column:1;grid-row:2;align-self:end}
 html body.pc-redesign #app .r130-shop[data-pane=info] .r130-shop-detail>small:last-of-type{display:none}
}
html body.pc-redesign #app .r130-shop{height:var(--r130-shop-height,var(--r2-town-height,100%))!important;max-height:var(--r130-shop-height,var(--r2-town-height,100%))!important}
@media(max-width:1199px) and (max-height:500px){
 html body.pc-redesign #app .r130-shop-information :is(th,td){padding:2px 1px!important;font-size:10px!important}
 html body.pc-redesign #app .r130-shop-information caption{margin-bottom:2px;font-size:11px}
}

/* v131: one merchant selector on compact screens and room for actual item art. */
.r131-merchant-select{display:none}
html body.pc-redesign #app .r130-shop button::before,html body.pc-redesign #app .r130-shop button::after{content:none!important;display:none!important}
html body.pc-redesign #app .r130-shop .r130-shop-inspect{border:0!important;border-image:none!important;background:transparent!important}
html body.pc-redesign #app .r130-shop .r130-shop-inspect .r130-shop-offer-art>svg{inset:0!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important}
@media(max-width:900px) and (min-height:501px){
 html body.pc-redesign #app .r130-shop{gap:5px!important;padding:3px!important}
 html body.pc-redesign #app .r130-shop-header{min-height:32px;height:32px;padding:3px 5px!important}
 html body.pc-redesign #app .r130-shop-header h1{font-size:22px!important}
 html body.pc-redesign #app .r130-shop-header>div>small{display:none!important}
 html body.pc-redesign #app .r130-shop-wallet{gap:5px}.r130-shop-wallet b{font-size:12px}
 html body.pc-redesign #app .r130-shop-panes button{height:44px!important;min-height:44px!important;font-size:14px!important}
 html body.pc-redesign #app .r130-shop-merchants{display:none!important}
 html body.pc-redesign #app .r130-shop-stock-header{display:grid!important;grid-template-columns:minmax(0,1fr) 92px;align-items:end;gap:5px}
 html body.pc-redesign #app .r131-merchant-select{display:flex!important;flex-direction:column;gap:2px;font:12px Georgia;grid-column:1;grid-row:1}
 html body.pc-redesign #app .r131-merchant-select select{width:100%;min-height:44px;padding:6px;background:#111a1b;color:#f5e5bc;border:1px solid #b18b4c;font:14px Georgia}
 html body.pc-redesign #app .r130-shop-stock-header>div{display:none!important}
 html body.pc-redesign #app .r130-shop-stock-header:has(.r130-shop-filters)>div{display:flex!important;grid-column:1/-1;grid-row:2}
 html body.pc-redesign #app .r130-shop-stock-header>div>h2{display:none!important}
 html body.pc-redesign #app .r130-shop-stock-header>button{max-width:none!important;width:100%;height:44px!important;min-height:44px!important;font-size:12px!important}
 html body.pc-redesign #app .r130-shop-offer{padding:3px!important;gap:3px!important}
 html body.pc-redesign #app .r130-shop-inspect{gap:3px!important}
 html body.pc-redesign #app .r130-shop-offer-art{min-height:80px!important}
 html body.pc-redesign #app .r130-shop-inspect>strong{font-size:13px!important;line-height:1.1!important}
 html body.pc-redesign #app .r130-shop-inspect>small,html body.pc-redesign #app .r130-shop-card-values{font-size:12px!important}
 html body.pc-redesign #app .r130-shop-offer>.r130-shop-buy{height:44px!important;min-height:44px!important;font-size:14px!important}
 html body.pc-redesign #app .r130-shop-catalog>footer>small{font-size:12px!important;max-width:49%;line-height:1.15}
 html body.pc-redesign #app .r130-shop-pager button{min-height:40px!important;font-size:12px!important;padding:5px!important}
 html body.pc-redesign #app .r130-shop-footer button{min-height:40px!important;font-size:12px!important}
}

html body.pc-redesign #app .r130-shop-pager[hidden]{display:none!important}@media(max-width:900px) and (min-height:501px){html body.pc-redesign #app .r130-shop-card-values small{font-size:12px!important;line-height:1.15}}
