/* Shared floating header. Legacy page styles remain scoped to their own content. */
.site-header:has(>.site-masthead) {
  position:relative; z-index:20; display:flex; align-items:center; flex-wrap:nowrap;
  gap:10px; width:min(1260px,calc(100% - 32px)); max-width:none; min-height:74px;
  margin:15px auto 0; padding:11px 15px; border:1px solid #e4d7c5;
  border-radius:24px; background:var(--paper); box-shadow:0 6px 18px #5e3d2010;
}
.site-masthead,.site-navigation-panel { display:contents; }
.site-header:has(>.site-masthead) .brand {
  display:flex; align-items:center; order:0; flex:none; width:auto; min-width:0;
  min-height:44px; gap:9px; margin:0; color:var(--ink); font:500 25px/1 var(--serif);
  letter-spacing:-1.2px; text-decoration:none;
}
.site-header:has(>.site-masthead) .brand-mark {
  flex:none; width:34px; height:36px; padding:0; border:0; border-radius:0; background:transparent;
}
.site-header:has(>.site-masthead) .brand-mark img { display:block; width:100%; height:100%; object-fit:contain; }
.site-header:has(>.site-masthead) .brand-name { display:block; white-space:nowrap; }
.site-header:has(>.site-masthead) .brand-caption {
  display:flex; align-items:center; gap:7px; margin-top:6px;
  font:500 9px/1.2 var(--sans); letter-spacing:1.4px; color:var(--muted);
}
.site-header:has(>.site-masthead) .brand-caption-mobile { display:none; }
.site-header:has(>.site-masthead) .brand-beta {
  display:inline-flex; flex:none; padding:2px 5px; border:1px solid #cba277;
  border-radius:10px; background:transparent; color:var(--accent);
  font:600 8px/1 var(--sans); letter-spacing:.6px; text-transform:uppercase;
}
.site-header:has(>.site-masthead) nav.explore-nav {
  display:flex; align-items:center; align-self:center; justify-content:center;
  order:1; flex:1 1 auto; flex-wrap:nowrap; gap:1px; width:auto; height:auto; margin:0; min-width:0;
}
.site-header:has(>.site-masthead) .nav-category { position:relative; flex:none; }
.site-header:has(>.site-masthead) :is(.nav-home,summary) {
  display:flex; align-items:center; justify-content:center; gap:5px;
  min-height:44px; min-width:44px; padding:9px; border:0; border-radius:22px;
  background:transparent; box-shadow:none; color:var(--ink);
  font:500 .875rem/1.3 var(--sans); text-decoration:none; white-space:nowrap;
  cursor:pointer; list-style:none;
}
.site-header:has(>.site-masthead) summary::-webkit-details-marker { display:none; }
.site-header:has(>.site-masthead) summary>span[aria-hidden] { font-size:1rem; transition:transform .15s; }
.site-header:has(>.site-masthead) .nav-home small { display:none; }
.site-header:has(>.site-masthead) details[open]>summary>span[aria-hidden] { transform:rotate(180deg); }
.site-header:has(>.site-masthead) :is(.nav-home,summary,.site-search-link,.site-menu-toggle):hover { background:#f3e8d7; color:var(--accent); }
.site-header:has(>.site-masthead) :is(.nav-home.active,.nav-home[aria-current="page"],.site-search-link[aria-current="page"],.nav-category.active>summary,details[open]>summary) { background:#efe2cf; color:var(--accent); }
.site-header:has(>.site-masthead) .explore-dropdown {
  position:absolute; top:calc(100% + 13px); left:0; right:auto; z-index:2;
  width:min(304px,calc(100vw - 32px)); max-height:calc(100dvh - 130px);
  overflow:auto; overscroll-behavior:contain; padding:8px; border:1px solid #e4d7c5;
  border-radius:14px; background:var(--paper); box-shadow:0 12px 32px #3d2c231b;
}
.site-header:has(>.site-masthead) .explore-dropdown a {
  display:block; width:100%; min-height:44px; padding:11px 12px; border-radius:8px;
  color:var(--ink); font:500 .875rem/1.35 var(--sans); text-align:left; text-decoration:none;
}
.site-header:has(>.site-masthead) .explore-dropdown a:is(:hover,[aria-current="page"]) { background:#f0e5d5; }
.site-header:has(>.site-masthead) .explore-dropdown small { display:block; margin-top:3px; color:#68584c; font-size:.8125rem; line-height:1.4; }
.site-header:has(>.site-masthead) .nav-divider { height:1px; margin:5px 10px; background:var(--line); }
.site-header:has(>.site-masthead) .site-search-link {
  display:inline-flex; align-items:center; justify-content:center; order:2; flex:none;
  gap:6px; min-height:44px; padding:9px; border-radius:22px; color:var(--ink);
  font:500 .875rem/1.3 var(--sans); text-decoration:none; white-space:nowrap;
}
.site-header:has(>.site-masthead) :is(.site-search-link,.site-menu-toggle) svg {
  flex:none; width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round;
}
.site-header:has(>.site-masthead) #account-controls {
  display:flex; flex-direction:column; align-items:flex-end; order:3; flex:none;
  min-width:0; max-width:260px; margin:0; gap:3px;
}
.site-header:has(>.site-masthead) #account-controls[hidden] { display:none; }
.site-header:has(>.site-masthead) .account-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px; min-height:44px; }
.site-header:has(>.site-masthead) .account-button { min-height:44px; padding:9px 10px; font-size:.8125rem; }
.site-header:has(>.site-masthead) .account-button-primary { border-radius:22px; }
.site-header:has(>.site-masthead) .account-note { max-width:260px; text-align:right; }
.site-header:has(>.site-masthead) #account-controls[data-account-notice="routine"] .account-note { display:none; }
.site-header:has(>.site-masthead) .site-menu-toggle { display:none; }
.site-header:has(>.site-masthead) :is(a,button,summary):focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
@media (max-width:1190px) {
  .site-header:has(>.site-masthead) { display:block; width:auto; margin:12px 10px 0; padding:0; min-height:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
  .site-header:has(>.site-masthead) .site-masthead { display:flex; align-items:center; gap:10px; min-height:73px; padding:10px; border:1px solid #e4d7c5; border-radius:20px; background:var(--paper); box-shadow:0 6px 18px #5e3d2010; }
  .site-header:has(>.site-masthead) .brand { order:0; font-size:23px; }
  .site-header:has(>.site-masthead) .brand-mark { width:32px; height:34px; }
  .site-header:has(>.site-masthead) .brand-caption-desktop { display:none; }
  .site-header:has(>.site-masthead) .brand-caption-mobile { display:flex; }
  .site-header:has(>.site-masthead) .site-search-link {
    display:inline-flex; order:1; flex:none; width:auto; min-width:44px; min-height:44px;
    margin-left:auto; padding:9px; border-radius:13px;
  }
  .site-header:has(>.site-masthead)[data-navigation-ready] .site-menu-toggle {
    display:inline-flex; align-items:center; justify-content:center; order:2; flex:none;
    gap:6px; min-width:72px; min-height:44px; margin-left:0; padding:9px;
    border:0; border-radius:13px; background:transparent; color:var(--ink); font:500 .875rem/1.3 var(--sans);
  }
  .site-header:has(>.site-masthead) .site-navigation-panel { display:block; margin-top:10px; padding:8px 14px 12px; border:1px solid #e4d7c5; border-radius:20px; background:var(--paper); box-shadow:0 12px 28px #3d2c2317; }
  .site-header:has(>.site-masthead) nav.explore-nav { display:block; width:100%; height:auto; margin:0; }
  .site-header:has(>.site-masthead) .nav-category { position:static; width:100%; }
  .site-header:has(>.site-masthead) :is(.nav-home,summary) { justify-content:flex-start; width:100%; min-height:46px; padding:11px 4px; border-radius:0; border-bottom:1px solid #eadfce; font-size:.9375rem; }
  .site-header:has(>.site-masthead) .nav-home:has(small) { flex-direction:column; align-items:flex-start; gap:2px; }
  .site-header:has(>.site-masthead) .nav-home small { display:block; color:#68584c; font-size:.8125rem; font-weight:400; line-height:1.35; }
  .site-header:has(>.site-masthead) summary>span[aria-hidden] { margin-left:auto; }
  .site-header:has(>.site-masthead) .explore-dropdown { position:static; width:auto; max-height:none; padding:0 0 7px; border:0; border-radius:0; box-shadow:none; }
  .site-header:has(>.site-masthead) .explore-dropdown a { padding:11px 16px; }
  .site-header:has(>.site-masthead) #account-controls { align-items:flex-start; width:100%; max-width:none; margin:0; padding-top:8px; }
  .site-header:has(>.site-masthead) .account-actions { justify-content:flex-start; gap:14px; }
  .site-header:has(>.site-masthead) .account-note { max-width:none; text-align:left; }
  .site-header:has(>.site-masthead)[data-navigation-ready]:not([data-navigation-open]) .site-navigation-panel { display:none; }
  /* Saving and sign-in problems remain visible without opening the menu. */
  .site-header:has(>.site-masthead)[data-navigation-ready]:not([data-navigation-open]):has(#account-controls:not([hidden]):is([data-account-state="error"],[data-account-notice="actionable"])) .site-navigation-panel { display:block; }
  .site-header:has(>.site-masthead)[data-navigation-ready]:not([data-navigation-open]) .site-navigation-panel nav { display:none; }
}
@media(max-width:520px) {
  .site-header:has(>.site-masthead) .site-search-link { width:44px; padding-inline:9px; gap:0; }
  .site-header:has(>.site-masthead) .site-search-link .nav-control-label { display:none; }
}
@media(max-width:360px) {
  .site-header:has(>.site-masthead) { margin-inline:8px; }
  .site-header:has(>.site-masthead) .site-masthead { padding-inline:9px; gap:5px; }
  .site-header:has(>.site-masthead) .brand { font-size:21px; gap:7px; }
  .site-header:has(>.site-masthead)[data-navigation-ready] .site-menu-toggle { min-width:44px; padding-inline:9px; gap:0; }
  .site-header:has(>.site-masthead) .site-menu-toggle .nav-control-label { display:none; }
  .site-header:has(>.site-masthead) .site-navigation-panel { padding-inline:12px; }
}
@media(prefers-reduced-motion:reduce) { .site-header:has(>.site-masthead) summary>span[aria-hidden] { transition:none; } }
