/* Approved deep navy palette shared by public, account and staff pages. */
:root,:root[data-theme="dark"]{--bg:#06111d;--card:#061a38;--surface-raised:#061a38;--field:#0a2445;--ink:#fff;--muted:#cfdaea;--line:#25456b;--blue:#a5d3ff;--button-blue:#082c58;--button-green:#073d2b;--button-red:#641b29;color-scheme:dark}
@layer cm-low-glare-surfaces{
 :root[data-theme] body{background:var(--bg)!important;color:var(--ink)!important}
 :root[data-theme] :is(.card,.panel,.sheet,.modal,fieldset,.notice,.error,.success,.titlebar,.hero,.forum-hero,.discussion-hero,.forum-board,.forum-thread,.forum-post,.forum-reply-box,.account-choice,.review-field,.review-item,.support-panel,.animal-card,.transport-card,.transport-stat,.transport-company,.transport-menu-dropdown,.mobile-menu nav,.site-right-links,.right,.market-welcome,.market-results>.empty){background:var(--card)!important;color:var(--ink)!important;border-color:var(--line)!important;box-shadow:none!important}
 :root[data-theme] :is(.top,.site-top,.desktop-sections,.community-mobile-explore,.community-mobile-explore nav,.mobilebar){background:var(--card)!important;color:var(--ink)!important;border-color:var(--line)!important}
 :root[data-theme] :is(.forum-hero,.hero,.titlebar,.discussion-hero) :is(h1,h2,p){color:var(--ink)!important;opacity:1}
 :root[data-theme] :is(.right,.site-right-links) .nav{background:transparent!important;box-shadow:none!important;border:0!important}
 :root[data-theme] :is(.right,.site-right-links) .nav a{background:transparent!important;color:var(--ink)!important}
 :root[data-theme] .desktop-sections a:is(:hover,.active){background:var(--button-blue)!important;color:#fff!important}
}
:root[data-theme] :is(.market-home,.market-welcome,.market-results){--button-blue:#082c58;--button-green:#073d2b;--button-red:#641b29}
:root[data-theme] :is(.site-content,.layout) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea){background:var(--field)!important;color:#fff!important;border-color:#52739a!important}
:root[data-theme] :is(input,textarea)::placeholder{color:#dce7f5!important;opacity:1}
:root[data-theme] :is(.muted,.meta,.health-help,small,legend){color:var(--muted)!important}
:root[data-theme] body.site-page{display:grid;grid-template-columns:320px minmax(0,1fr);gap:26px;max-width:1600px;width:100%;margin:0 auto;padding:0 28px 32px}
:root[data-theme] #site-shell{grid-column:1/-1;margin:0 -28px;min-width:0}
:root[data-theme] body.site-page .site-content{grid-column:2;grid-row:2;max-width:none!important;min-width:0;margin:0;padding:0}
:root[data-theme] body.site-page .site-right{grid-column:1;grid-row:2;position:sticky;top:16px;align-self:start;width:auto;max-height:calc(100vh - 32px);overflow-y:auto;margin:0;padding:0;border:0;background:transparent}
:root[data-theme] .desktop-sections{display:flex;max-width:1600px;margin:0 auto;border-bottom:1px solid var(--line)}
:root[data-theme] .desktop-sections a{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:12px 10px;line-height:1.25;border-radius:0;border-right:1px solid var(--line);font-size:clamp(13px,1.15vw,17px);font-weight:700;text-align:center;text-decoration:none;color:#fff}
:root[data-theme] .desktop-sections .i{font-size:30px;line-height:1.2;width:auto}
:root[data-theme] .desktop-sections a.active{box-shadow:inset 0 -5px #42bde4}
:root[data-theme] :is(.right,.site-right-links) .nav a{display:flex;align-items:center;gap:13px;padding:18px 4px;margin:0;border:0;border-top:1px solid var(--line);border-radius:0;font-size:16px;font-weight:600;min-height:48px;text-decoration:none}
:root[data-theme] :is(.right,.site-right-links) .nav .i{width:36px;flex:0 0 36px;text-align:center;font-size:30px;color:#80c5ec}
:root[data-theme] :is(.top,.site-top) .logo,:root[data-theme] .site-logo{color:#fff}
:root[data-theme] :is(.side,.site-side){display:none!important}
:root[data-theme] :is(.card,.panel,.review-field,.row,.site-content){overflow-wrap:anywhere}
.site-content :is(.two,.three,.health-grid,.cards)>*{min-width:0}
:root[data-theme] .site-content>header{margin-bottom:24px}
:root[data-theme] .site-content>section:not([class]){background:var(--card)!important;border:1px solid var(--line);border-radius:16px;padding:24px;margin:20px 0}
@media(min-width:761px) and (max-width:1100px){:root[data-theme] body.site-page{grid-template-columns:260px minmax(0,1fr);padding:0 18px 24px;gap:18px}:root[data-theme] #site-shell{margin:0 -18px}.site-right-links{padding:20px}}
@media(max-width:760px){
 :root[data-theme] body.site-page{display:block;padding:0;margin:0;max-width:none}
 :root[data-theme] #site-shell{margin:0}
 :root[data-theme] .desktop-sections{display:none}
 :root[data-theme] body.site-page .site-content{margin:0;padding:18px 12px 32px}
 :root[data-theme] body.site-page .site-right,:root[data-theme] .layout>.right{display:block;position:static;max-height:none;width:auto;height:auto;margin:0;padding:12px;border:0;background:transparent!important}
 .site-right-links{padding:20px}.layout>.right{margin-top:20px!important}
 :root[data-theme] .site-content :is(.two,.three,.health-grid){grid-template-columns:minmax(0,1fr)}
}
:root[data-theme] body.site-page .site-right{min-height:0}
:root[data-theme] :is(.pill,.review-fields dd,.health-help){background-color:transparent;color:var(--muted)}

:root[data-theme] .site-top .site-logo{font-size:clamp(20px,2.5vw,36px)}
:root[data-theme] .site-top .site-logo strong{font-size:inherit;color:#fff}
@media(max-width:760px){:root[data-theme] .site-top .site-logo{font-size:18px}}

/* Quick links follow the complete page content on every screen size. */
:root[data-theme] .layout,:root[data-theme] .forum-mode .layout,:root[data-theme] body.site-page{grid-template-columns:minmax(0,1fr)}
:root[data-theme] .layout>main{grid-column:1;grid-row:1}
:root[data-theme] .layout>.right{grid-column:1;grid-row:2;display:block;position:static;top:auto;height:auto;max-height:none;width:auto;overflow:visible;align-self:stretch;margin:0}
:root[data-theme] body.site-page .site-content{grid-column:1;grid-row:2}
:root[data-theme] body.site-page .site-right{grid-column:1;grid-row:3;display:block;position:static;top:auto;max-height:none;min-height:0;width:auto;overflow:visible;align-self:stretch}
:root[data-theme] :is(.right,.site-right-links) .nav{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));gap:0 24px}
@media(max-width:760px){:root[data-theme] :is(.right,.site-right-links) .nav{grid-template-columns:minmax(0,1fr)}}

/* Use the full available page width now that Quick links is below content. */
:root[data-theme] .layout,:root[data-theme] .forum-mode .layout,:root[data-theme] body.site-page,:root[data-theme] .desktop-sections{width:100%;max-width:none}
:root[data-theme] .layout>main,:root[data-theme] body.site-page .site-content{width:100%;max-width:none!important;min-width:0}
:root[data-theme] :is(.market-home,.forum-page,.site-page .support-panel){width:100%;max-width:none}

/* Left desktop Quick links; remaining content fills the available column. */
@media(min-width:761px){
 :root[data-theme] .layout,:root[data-theme] .forum-mode .layout,:root[data-theme] body.site-page{grid-template-columns:320px minmax(0,1fr)}
 :root[data-theme] .layout>main{grid-column:2;grid-row:1}
 :root[data-theme] .layout>.right{grid-column:1;grid-row:1;position:sticky;top:16px;align-self:start;max-height:calc(100vh - 32px);overflow-y:auto;min-width:0}
 :root[data-theme] body.site-page .site-content{grid-column:2;grid-row:2}
 :root[data-theme] body.site-page .site-right{grid-column:1;grid-row:2;position:sticky;top:16px;align-self:start;max-height:calc(100vh - 32px);overflow-y:auto;min-width:0}
 :root[data-theme] :is(.right,.site-right-links) .nav{grid-template-columns:minmax(0,1fr);gap:0}
}
@media(min-width:761px) and (max-width:1100px){:root[data-theme] .layout,:root[data-theme] .forum-mode .layout,:root[data-theme] body.site-page{grid-template-columns:260px minmax(0,1fr)}}

/* Equal search/filter actions and compact Local places search row. */
:root[data-theme] .market-welcome form[data-form="filters"]{grid-template-columns:minmax(0,1fr) 100px;align-items:end}
:root[data-theme] .market-welcome .compact-search>.btn,:root[data-theme] .market-welcome .search-filters>summary{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:100px;height:48px;min-height:48px;padding:11px 12px;font-size:16px;line-height:1.4;margin:0;border-radius:10px}
:root[data-theme] .market-welcome .search-filters{align-self:end}
:root[data-theme] form[data-form="local-search"] .local-search-controls{display:flex;align-items:end;justify-content:flex-start;gap:8px}
:root[data-theme] form[data-form="local-search"] .local-search-controls .btn{flex:0 0 100px;width:100px;min-width:0;height:48px;padding:11px 12px;font-size:16px;white-space:nowrap}
@media(min-width:761px){
 :root[data-theme] form[data-form="local-search"]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end}
 :root[data-theme] form[data-form="local-search"] .compact-search{min-width:0}
 :root[data-theme] form[data-form="local-search"] .compact-search label{margin:0;width:100%}
 :root[data-theme] form[data-form="local-search"] :is(#local-suggestions,#local-advanced,.form-feedback){grid-column:1/-1}
}
@media(max-width:760px){:root[data-theme] .market-welcome form[data-form="filters"]{grid-template-columns:minmax(0,1fr)}:root[data-theme] form[data-form="local-search"] .local-search-controls .btn{flex:1 1 0;width:auto}}

/* Compact search controls across Marketplace and pet category pages. */
:root[data-theme] .market-welcome form[data-form="filters"]{display:block}
.market-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end}
.market-search-actions{display:flex;gap:8px;align-items:end}
:root[data-theme] .market-search-actions>.btn{width:100px;height:48px;min-height:48px;padding:10px 12px;font-size:16px;line-height:1.4}
:root[data-theme] .market-search-row .compact-search input{height:48px;min-height:48px}
:root[data-theme] #browse-search.pet-search{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:24px 0}
:root[data-theme] #browse-search.pet-search label{display:flex;flex-direction:column;gap:6px;flex:1 1 160px;min-width:0;margin:0}
:root[data-theme] #browse-search.pet-search input{height:48px;min-height:48px;font-size:16px;margin:0}
:root[data-theme] #browse-search.pet-search>button{flex:0 0 100px;align-self:end;width:100px;height:48px;min-height:48px;padding:10px 12px;font-size:16px}
.category-actions{display:flex;flex-wrap:wrap;gap:12px;margin:24px 0 0}.category-sign-in{margin:16px 0}.category-actions>.button,.category-sign-in>.button{margin:0;min-height:48px}
:root[data-theme] details.community-mobile-explore>summary{background:var(--button-blue)!important;color:#fff!important;border:1px solid #375d88}
.mobilebar{display:none}
@media(max-width:760px){
 :root[data-theme] .market-search-row{grid-template-columns:minmax(0,1fr);gap:12px}
 :root[data-theme] .market-search-actions{justify-content:flex-start}
 :root[data-theme] .market-welcome .titlebar{margin-bottom:20px;gap:12px}
 :root[data-theme] .market-welcome .titlebar .header-actions{margin-top:0}
 :root[data-theme] #browse-search.pet-search{flex-direction:column;align-items:stretch}
 :root[data-theme] #browse-search.pet-search label{flex:none;width:100%}
 :root[data-theme] #browse-search.pet-search>button{flex:none;align-self:flex-start;width:100px;height:48px}
 :root[data-theme] .category-actions{flex-direction:column;align-items:stretch}
 :root[data-theme] .category-actions>.button{width:100%}
 :root[data-theme] #install-market-app{display:none!important}
 :root[data-theme] .top{flex-wrap:nowrap!important;gap:8px}
 :root[data-theme] .top .logo{min-width:0;flex:1;line-height:1.2}
 :root[data-theme] .top-actions{flex:0 0 auto}
 :root[data-theme] .top .logo,:root[data-theme] .site-top .site-logo{font-size:18px}
 :root[data-theme] .mobilebar{display:flex;position:fixed;z-index:50;bottom:0;left:0;right:0;justify-content:space-around;align-items:center;gap:4px;height:calc(72px + env(safe-area-inset-bottom));padding:4px 8px calc(4px + env(safe-area-inset-bottom));border-top:1px solid var(--line)}
 :root[data-theme] .mobilebar a{display:flex;flex:1;min-width:0;min-height:56px;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:#fff!important;font-size:12px;font-weight:700;text-decoration:none;line-height:1.2;text-transform:uppercase;text-align:center;padding:6px 0}
 :root[data-theme] .mobilebar a.active{background:#082c58;border-radius:12px}
 .mobilebar .forum-icon{display:block;width:25px;height:25px}
 :root[data-theme] body.site-page{padding-bottom:calc(88px + env(safe-area-inset-bottom))}
 :root[data-theme] .layout{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
 .market-home .header-actions{gap:12px!important}
}
