/* Host themes: five layouts and ten accessible dark palettes. */
body[data-palette="ruby"]{--accent:#ee5a6f;--accent-action:#b52542;--accent-hover:#951b34;--accent-ink:#ff9aaa;--accent-soft:#301b22;--bg:#100e10;--surface:#1b1519}
body[data-palette="amber"]{--accent:#f0b54b;--accent-action:#875300;--accent-hover:#6b4000;--accent-ink:#ffd288;--accent-soft:#30271b;--bg:#100f0c;--surface:#1c1913}
body[data-palette="mint"]{--accent:#69d7b0;--accent-action:#14674c;--accent-hover:#0d503a;--accent-ink:#a2ebd1;--accent-soft:#193029;--bg:#0d1110;--surface:#141e1a}
body[data-palette="sky"]{--accent:#69b9ed;--accent-action:#1c5d91;--accent-hover:#164b75;--accent-ink:#a1d6ff;--accent-soft:#182b3a;--bg:#0d1013;--surface:#151c22}
body[data-palette="iris"]{--accent:#a796f5;--accent-action:#5b439f;--accent-hover:#49347f;--accent-ink:#c5b8ff;--accent-soft:#272038;--bg:#100e14;--surface:#1a1722}
body[data-palette="coral"]{--accent:#f68c75;--accent-action:#a43e2a;--accent-hover:#86301f;--accent-ink:#ffbba9;--accent-soft:#35221c;--bg:#140f0d;--surface:#231916}
body[data-palette="teal"]{--accent:#5bcecb;--accent-action:#0c6667;--accent-hover:#095252;--accent-ink:#9de5e2;--accent-soft:#163031;--bg:#0c1111;--surface:#132020}
body[data-palette="rose"]{--accent:#ef91c0;--accent-action:#923260;--accent-hover:#76254d;--accent-ink:#ffb4d7;--accent-soft:#321e2a;--bg:#130e12;--surface:#211720}
body[data-palette="lime"]{--accent:#b3d66d;--accent-action:#526c20;--accent-hover:#405417;--accent-ink:#d2eaa5;--accent-soft:#29311b;--bg:#10120d;--surface:#1a2014}
body[data-palette="azure"]{--accent:#8ea7ff;--accent-action:#3856ad;--accent-hover:#2d448c;--accent-ink:#b9c8ff;--accent-soft:#1d2740;--bg:#0e1015;--surface:#171d2b}
body[data-palette] .site-header,body[data-palette] .mobile-nav{background:var(--bg);border-color:var(--accent-soft)}
body[data-palette] .header-search input{background:var(--surface)}
body[data-palette] .search-submit,body[data-palette] .chip,body[data-palette] .content-tile,body[data-palette] .category-tile{background:var(--surface)}
body[data-palette] .nav-link.is-current{background:var(--accent-soft)}
body[data-palette] .nav-link.is-current .icon,body[data-palette] .mobile-nav a[aria-current="page"]{color:var(--accent-ink)}
body[data-palette] .chip[aria-current="page"],body[data-palette] .chip.is-selected{background:var(--accent-ink);border-color:var(--accent-ink);color:#111}
body[data-palette] .chip:hover:not([aria-current="page"]):not(.is-selected),body[data-palette] .search-submit:hover{background:var(--accent-soft)}
body[data-palette] .button-primary:hover{background:var(--accent-hover)}
body[data-palette] .age-check input{accent-color:var(--accent)}
body[data-palette] .age-dialog{background:var(--surface)}
@media(min-width:768px){
  body[data-layout="rail-right"] .sidebar{border-right:0;border-left:1px solid var(--line)}
  body[data-layout="rail-right"] .header-search{max-width:580px;margin-right:auto;margin-left:0}
  body[data-layout="search-row"]{--header-height:120px}
  body[data-layout="search-row"] .site-header{height:120px;display:flex;flex-direction:column;align-items:stretch;gap:4px;padding-top:6px;padding-bottom:12px}
  body[data-layout="search-row"] .header-upper{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:44px}
  body[data-layout="search-row"] .header-brand-row{flex:0 1 auto}
  body[data-layout="search-row"] .header-search{flex:none;align-self:center;width:min(100%,880px);max-width:none;margin:0}
  body[data-layout="search-row"] .header-search input{border-radius:8px 0 0 8px}
  body[data-layout="search-row"] .search-submit{border-radius:0 8px 8px 0}
  body[data-layout="top-menu"] .app-layout{display:block}
  body[data-layout="top-menu"] .app-layout>.sidebar{width:100%;height:auto;max-height:150px;padding:8px 28px;position:sticky;top:var(--header-height);z-index:50;border-right:0;border-bottom:1px solid var(--line);background:var(--bg)}
  body[data-layout="top-menu"] .sidebar>nav{display:flex;gap:8px;overflow-x:auto}
  body[data-layout="top-menu"] .nav-link{gap:8px;white-space:nowrap;flex:0 0 auto;min-height:44px;margin:0;padding:9px 14px}
  body[data-layout="top-menu"] .sidebar-subnav,body[data-layout="top-menu"] .sidebar-brand{display:none}
  body[data-layout="top-menu"] .main-content{padding-top:24px}
  body[data-layout="compact"]{--sidebar-width:104px}
  body[data-layout="compact"] .header-brand-row{flex-basis:290px}
  body[data-layout="compact"] .header-search{max-width:520px;margin-left:0;margin-right:auto}
  body[data-layout="compact"] .header-search input{border-radius:8px 0 0 8px}
  body[data-layout="compact"] .search-submit{min-width:48px;border-radius:0 8px 8px 0}
  body[data-layout="compact"] .sidebar{padding:12px 6px}
  body[data-layout="compact"] .nav-link{flex-direction:column;justify-content:center;gap:5px;min-height:76px;padding:10px 4px;font-size:11px;text-align:center}
  body[data-layout="compact"] .sidebar-subnav,body[data-layout="compact"] .sidebar-brand{display:none}
}
@media(max-width:767px){
  body[data-palette] .sidebar{background:var(--surface)}
  body[data-layout="search-row"] .header-upper{height:44px;min-width:0}
  body[data-layout="search-row"] .header-brand-row{width:100%}
  body[data-layout="rail-right"] .sidebar{left:auto;right:0;transform:translateX(105%);border-right:0;border-left:1px solid var(--line)}
  body[data-layout="rail-right"].menu-open .sidebar{transform:translateX(0)}
  body[data-layout="top-menu"] .mobile-nav{position:sticky;top:var(--header-height);bottom:auto;min-height:48px;padding:0 8px;border-top:0;border-bottom:1px solid var(--accent-soft)}
  body[data-layout="top-menu"] .mobile-nav a{flex-direction:row;gap:6px;min-height:48px}
  body[data-layout="top-menu"] .mobile-nav .icon{width:17px;height:17px}
  body[data-layout="top-menu"] .site-footer{padding-bottom:32px}
  body[data-layout="compact"]{--header-height:96px}
  body[data-layout="compact"] .site-header{height:var(--header-height);padding-top:2px;padding-bottom:5px}
  body[data-layout="compact"] .header-brand-row .brand-wordmark{font-size:17px}
  body[data-layout="compact"] .header-search input{border-radius:22px 0 0 22px}
  body[data-layout="compact"] .search-submit{border-radius:0 22px 22px 0}
}
