/* Shared page layout: comfortable desktop width, fluid content and mobile tables. */
#main-content{display:flex;flex-direction:column;gap:24px}
#main-content>section,#main-content>.refresh-carousel{margin-top:0;margin-bottom:0}
.refresh-sidebar{row-gap:24px}
@media(min-width:768px){.refresh-sidebar{display:flex;flex-direction:column;gap:24px}.refresh-sidebar>.panel{width:100%;margin:0}}
#container.refresh-layout{gap:24px;padding-top:24px}
#main-content>*,#content>*{min-width:0;max-width:100%}
#content .row{margin-left:0;margin-right:0}
#content .form-control{min-height:40px;height:auto;font-size:14px}
#content textarea.form-control{min-height:110px}
#content .btn{white-space:normal}
#content .table-responsive{max-width:100%;overflow-x:auto}
#content>table,#content>.panel>table{display:block;max-width:100%;overflow-x:auto}
#content .panel-body{padding:22px}
.refresh-market-home{background:#fff;border:1px solid #e3e7e6;border-radius:10px;margin-bottom:24px;overflow:visible}
.refresh-market-home .market-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;padding:12px}
.refresh-market-home .market-card{position:relative;display:flex;flex-direction:column;gap:6px;min-width:0;padding:8px}
.refresh-market-home .market-card h3{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:13px;line-height:17px;margin:0;height:34px;flex:none;overflow-wrap:anywhere}
.refresh-market-home .market-cards>p{grid-column:1/-1}
.market-home-image{position:relative;display:flex;align-items:center;justify-content:center;flex:none;height:96px;border:1px solid #e1e8d7;border-radius:6px;background:repeating-linear-gradient(135deg,#f3f6ed,#f3f6ed 8px,#fafbf8 8px,#fafbf8 16px)}
.refresh-market-home .market-card:hover,.refresh-market-home .market-card:focus-within{z-index:60}
.market-home-image>.refresh-equipment-tooltip,
.market-home-kit-slot>.refresh-equipment-tooltip,
.refresh-market .market-kit-detail-item .refresh-equipment-tooltip {
    width:max-content;
    min-width:min(220px,calc(100vw - 64px));
    max-width:calc(100vw - 64px);
    white-space:normal;
    text-align:center;
}
.market-home-image img{max-width:100%;max-height:86px;object-fit:contain}
.market-home-image.market-home-kit{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:40px;align-content:center;gap:4px;padding:4px}
.market-home-image .market-home-kit-slot{position:relative;display:grid;place-items:center;height:100%;min-width:0;border:1px solid #e1e8d7;border-radius:4px;background:#fafbf8;color:#58702a;font-size:11px;overflow-wrap:anywhere}
.market-home-kit-slot img{width:100%;height:34px;padding:2px}
.market-home-kit-slot .market-stack-count{right:1px;padding:0 2px;font-size:9px;line-height:12px}
.market-home-image[data-mu-preview-size="small"]>img,.market-item-preview[data-mu-preview-size="small"]>img{width:auto;height:auto;max-width:70px;max-height:70px}
.market-item-badges{display:flex;flex-wrap:wrap;gap:4px;align-items:center;justify-content:safe center;min-height:24px}
.market-item-badges span{display:inline-flex;align-items:center;border:1px solid #d5deca;background:#f5f8ef;color:#435b21;font-size:11px;font-weight:600;line-height:1.4;padding:3px 5px;border-radius:4px;white-space:nowrap}
.refresh-market-home .market-item-badges{flex-wrap:nowrap;gap:2px;min-width:0;overflow-x:auto}
.refresh-market-home .market-item-badges span{flex:none;font-size:9px;letter-spacing:-.15px;padding:2px 1px}
.market-home-image[data-mu-preview-size="small"]>img{max-width:48px;max-height:48px}
.refresh-market-home .market-price{margin:0;font-size:14px;overflow-wrap:anywhere}
.refresh-market-home .market-card>small{overflow-wrap:anywhere}
.refresh-market-home .market-card>.btn{margin-top:auto;padding:5px 8px}
.refresh-market .market-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.refresh-market .market-card{padding:14px;gap:10px}
.refresh-market .market-card:not(.market-kit-card) .market-kit-items{min-height:130px}
.refresh-market .market-card:not(.market-kit-card) .market-item-preview{width:100%;height:130px}
.refresh-market .market-kit-detail .market-kit-detail-items{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,180px),1fr));gap:10px;margin-bottom:18px}
.refresh-market .market-kit-fee{width:fit-content;max-width:100%;margin:4px 0;padding:2px 6px;border:1px solid #e7d39b;border-radius:4px;background:#fff6dd;color:#694900;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.refresh-market .auction-cover{display:block;max-width:100%;max-height:340px;object-fit:contain;border-radius:6px;margin-bottom:14px}
.refresh-market .auction-bid{display:flex;flex-wrap:wrap;align-items:end;gap:8px;margin:12px 0 0}
.refresh-market .auction-bid label{margin:0}
.refresh-market .raffle-progress{width:100%;height:8px;accent-color:#789b2b}
.workshop-layout{display:grid;grid-template-columns:minmax(135px,1fr) minmax(220px,1.35fr) minmax(150px,1.1fr);gap:12px;align-items:start}
.workshop-layout .market-chest-panel{min-width:0;padding:9px;background:#f8faf4;border-color:#d5dfc8;color:#2d392a;box-shadow:inset 0 0 0 2px #435b28}
.workshop-layout h3{margin:0 0 10px;padding:5px;border:1px solid #d3dfc3;border-radius:12px;background:linear-gradient(#f1f5e8,#e9efdc);color:#435b28}
.workshop-layout h4{margin:10px 0 5px;font-size:12px;color:#47593a}
.workshop-layout .market-help,.workshop-layout h4 small,.workshop-option-note{color:#59684e}
.workshop-choices small{display:block}
.workshop-characters{display:grid;gap:6px;margin-bottom:14px}
.workshop-characters a{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:3px 8px;padding:8px;border:1px solid transparent;background:#eef3e4;color:#364a27;overflow-wrap:anywhere}
.workshop-characters a[aria-current],.workshop-characters a:hover,.workshop-characters a:focus-visible{border-color:#849f40;background:#e6efd4;color:#fff;text-decoration:none}
.workshop-characters small{color:#566949;font-style:italic}
.workshop-equipment{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(7,minmax(0,1fr));aspect-ratio:8/7;gap:3px;margin-bottom:14px;padding:5px;background:#e5eadb;border:1px solid #cbd6bf;border-radius:5px}
.workshop-position-0{grid-area:3/1/6/3}
.workshop-position-1{grid-area:3/7/6/9}
.workshop-position-2{grid-area:1/4/3/6}
.workshop-position-3{grid-area:3/4/5/6}
.workshop-position-4{grid-area:5/4/8/6}
.workshop-position-5{grid-area:6/1/8/3}
.workshop-position-6{grid-area:6/7/8/9}
.workshop-position-7{grid-area:1/6/3/9}
.workshop-position-8{grid-area:1/1/3/3}
.workshop-position-9{grid-area:3/3/4/4}
.workshop-position-10{grid-area:6/3/7/4}
.workshop-position-11{grid-area:6/6/7/7}
.workshop-inventory{width:100%;max-width:360px;justify-self:center}
.workshop-slot{position:relative;display:grid;place-items:center;min-width:0;border:1px solid #d6dfcd;border-radius:3px;background:#f1f5e8;font-size:10px;text-align:center}
.workshop-slot img{width:100%;height:100%;min-height:0;object-fit:contain}
.workshop-slot.is-selected,.workshop-slot:hover{border-color:#809f24;background:#ebf1d7}
.workshop-slot-empty,.workshop-slot-empty:hover{background:#e9eee0;border-color:#d6dfcd}
.workshop-inventory .workshop-equipment,.workshop-inventory .market-chest-grid{background-color:#e7ecde;border-color:#d5dfc8}
.workshop-inventory .workshop-slot{border-color:#c5d1b7;background:#f5f8ee;color:#2d392a}
.workshop-inventory .workshop-slot-empty,.workshop-inventory .workshop-slot-empty:hover{background:#e9eee0}
.workshop-inventory a.workshop-slot.is-selected,.workshop-inventory a.workshop-slot:hover{border-color:#829f32;background:#e4efcf}
.workshop-inventory .market-chest-grid{background-image:linear-gradient(to right,#bbc8ab 1px,transparent 1px),linear-gradient(to bottom,#bbc8ab 1px,transparent 1px)}
.workshop-choices{display:grid;gap:5px}
.workshop-option-row{display:flex;align-items:center;gap:3px;min-width:0;padding-inline-start:7px;background:#edf3e4;font-size:12px}
.workshop-option-row strong{flex:1;min-width:0;overflow-wrap:anywhere;padding-block:4px}
.workshop-option-row>span{max-width:45%;padding:2px 3px;color:#36482f;text-align:right;overflow-wrap:anywhere}
.workshop-option-row.is-applied{color:#315e2a}
.workshop-option-row a.workshop-option-action,.workshop-option-row button.workshop-option-action{display:grid;place-items:center;flex:0 0 26px;min-height:26px;padding:0;border:0;background:#52751f;color:#fff;font-size:17px;font-weight:700;line-height:1;text-decoration:none}
.workshop-option-row a.is-remove{background:#596348}
.workshop-option-row a.workshop-option-action:hover,.workshop-option-row a.workshop-option-action:focus-visible{background:#3f5e19;outline:1px solid #435b28}
.workshop-option-row button.workshop-option-action:disabled{background:#dce3d4;color:#586251;cursor:default}
.workshop-layout .market-price{color:#56751e}
.workshop-item-panel{min-height:160px}
@media(max-width:1050px){.workshop-layout{grid-template-columns:minmax(0,1fr)}}
.refresh-market .market-kit-detail .market-kit-detail-item{position:relative;min-width:0;min-height:0;padding:8px;gap:6px}
.refresh-market .market-kit-detail .market-kit-detail-item>h3{height:34px;margin:0;line-height:17px;overflow-wrap:anywhere}
.refresh-market .market-kit-detail .market-kit-detail-item .market-kit-items{min-height:96px}
.refresh-market .market-kit-detail .market-kit-detail-item .market-item-preview{height:96px}
.refresh-market .market-kit-detail-item .market-item-badges{flex-wrap:nowrap;gap:2px;min-width:0;overflow-x:auto}
.refresh-market .market-kit-detail-item .market-item-badges span{flex:none;font-size:9px;letter-spacing:-.15px;padding:2px 1px}
@media(max-width:767px){
    .refresh-market .market-kit-detail .market-kit-detail-items{grid-template-columns:repeat(2,minmax(0,1fr))}
    .refresh-market-home .market-card:nth-child(odd) .refresh-equipment-tooltip,
    .market-kit-detail-item:nth-child(odd) .refresh-equipment-tooltip{left:0;right:auto;transform:none}
    .refresh-market-home .market-card:nth-child(even) .refresh-equipment-tooltip,
    .market-kit-detail-item:nth-child(even) .refresh-equipment-tooltip{left:auto;right:0;transform:none}
}
.refresh-market .market-kit-detail-item:hover,.refresh-market .market-kit-detail-item:focus-within{z-index:60}
@media(min-width:1100px){#content .refresh-info-panel,#content .refresh-download-card{padding:24px}}
@media(max-width:1180px){.refresh-market-home .market-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1000px){.refresh-market .market-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:767px){#container.refresh-layout{gap:20px}.refresh-market-home .market-cards{grid-template-columns:repeat(2,minmax(0,1fr))}#content .panel-body{padding:16px}}
@media(max-width:420px){.refresh-market .market-cards{grid-template-columns:minmax(0,1fr)}}
@media(max-width:350px){.refresh-market-home .market-cards{grid-template-columns:minmax(0,1fr)}}
