/* Shared light palette and responsive layout. */
:root{color-scheme:light;--theme-bg:#fff;--theme-surface:#fff;--theme-raised:#f7f5ef;--theme-text:#30352f;--theme-muted:#62665e;--theme-border:#dfd7c7;--theme-gold:#896a30}

/* Language bar stays in the normal page layout. */
.ft-appearance{display:flex;align-items:center;justify-content:flex-end;gap:14px;padding:8px max(20px,calc((100vw - 1240px)/2));background:var(--theme-surface);color:var(--theme-muted);border-bottom:1px solid var(--theme-border);font:500 15px/1.5 Arial,sans-serif;min-height:62px}
@media(max-width:1100px){
 .admin-header{height:auto;min-height:100px;flex-wrap:wrap;gap:14px}
 .management-tabs{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 18px;order:3;width:100%;min-width:0}
 .management-tabs a{white-space:normal;min-height:44px;display:flex;align-items:center;font-size:15px!important}
 .market-compare-bar{position:static;margin-top:24px}
}
@media(max-width:900px){
 .market-filters form>details{max-height:none;overflow:visible}
 .market-filters form>details[open]{padding-right:0}
 .market-toolbar{align-items:stretch}
 .market-toolbar label{flex-wrap:wrap;min-width:0}
 .market-toolbar select{max-width:100%!important}
}
@media(max-width:700px){
 .save-bar{position:static}
 .ft-appearance{padding:8px 16px;gap:12px}
 .market-detail-actions{display:flex;flex-wrap:wrap}
 .market-detail-actions>*{min-width:0;overflow-wrap:anywhere}
}
@media print{.ft-appearance{display:none!important}}

/* Keep listing actions readable at narrow and foldable widths. */
html[data-theme] .market-card-actions.market-detail-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:stretch;margin:20px 0}
html[data-theme] .market-card-actions.market-detail-actions>button,
html[data-theme] .market-card-actions.market-detail-actions>a{box-sizing:border-box;min-width:0;width:100%;min-height:50px;padding:12px 16px;font-size:16px;line-height:1.5;word-break:normal;overflow-wrap:normal;white-space:normal;text-align:center;display:flex;align-items:center;justify-content:center;border:1px solid var(--theme-border,#d8cfba);border-radius:6px}
html[data-theme] .market-card-actions.market-detail-actions>a{grid-column:1/-1;color:var(--theme-text,#35372e);background:var(--theme-raised,#f6f5f0);text-decoration:none;font-weight:600}
@media(max-width:900px){html[data-theme] .market-card-actions.market-detail-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:360px){html[data-theme] .market-card-actions.market-detail-actions{grid-template-columns:minmax(0,1fr)}}

/* Allow the page to reflow between a foldable cover and inner display. */
.intro-heading,.intro-copy,.market-card-body{min-width:0}
.footer-bottom{flex-wrap:wrap;align-items:center}
.footer-bottom>*{min-width:0;max-width:100%;overflow-wrap:anywhere}
.market-card-body h3 button,.market-card-body strong{max-width:100%;overflow-wrap:anywhere}
.market-card-actions>button{min-width:0;overflow-wrap:anywhere}
@media(min-width:701px) and (max-width:1000px){
 .intro{grid-template-columns:minmax(0,1fr);gap:24px}
 .intro-copy{max-width:70ch}
 .footer-bottom{justify-content:center;gap:14px 24px}
 .footer-bottom>span:first-child{flex-basis:100%}
}
@media(max-width:700px){
 .marketplace .listing-grid{grid-template-columns:minmax(0,1fr)}
}
