:root {
  --hc-shell-header: 68px;
  --hc-shell-sidebar: 252px;
  --hc-shell-bg: #000;
  --hc-shell-panel: #090909;
  --hc-shell-panel-2: #10100f;
  --hc-shell-gold: #d3ad50;
  --hc-shell-gold-light: #f0d687;
  --hc-shell-cream: #f4eee3;
  --hc-shell-muted: #9e968a;
  --hc-shell-line: rgba(211, 173, 80, .2);
}

body.hc-app-shell-ready {
  box-sizing: border-box !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding-top: var(--hc-shell-header) !important;
  padding-left: var(--hc-shell-sidebar) !important;
  overflow-x: hidden !important;
  background: var(--hc-shell-bg) !important;
}

body.hc-app-shell-ready *,
body.hc-app-shell-ready *::before,
body.hc-app-shell-ready *::after { box-sizing: border-box; }

body.hc-app-shell-ready #nav,
body.hc-app-shell-ready nav#nav,
body.hc-app-shell-ready .gnav,
body.hc-app-shell-ready .dsh-hdr,
body.hc-app-shell-ready .de-header,
body.hc-app-shell-ready .mi-auth-header,
body.hc-app-shell-ready .pd-topbar,
body.hc-app-shell-ready .ps-topbar,
body.hc-app-shell-ready .ab-topbar,
body.hc-app-shell-ready .sub-header,
body.hc-app-shell-ready .ps-header,
body.hc-app-shell-ready .pi-hdr,
body.hc-app-shell-ready .ps-hdr,
body.hc-app-shell-ready .sl-hdr,
body.hc-app-shell-ready .pp-hdr,
body.hc-app-shell-ready .mm-auth-header,
body.hc-app-shell-ready .mob-panel,
body.hc-app-shell-ready .mob-overlay,
body.hc-app-shell-ready .hc-burger,
body.hc-app-shell-ready .hc-hdr,
body.hc-app-shell-ready > #hc-header-bar,
body.hc-app-shell-ready > #hcSb,
body.hc-app-shell-ready > #hcSbOv,
body.hc-app-shell-ready > #hcProviderSidebar,
body.hc-app-shell-ready > #hcClientSidebar,
body.hc-app-shell-ready > .hc-ps-toggle,
body.hc-app-shell-ready > .hc-cs-toggle,
body.hc-app-shell-ready > .hc-ps-overlay,
body.hc-app-shell-ready > .hc-cs-overlay,
body.hc-app-shell-ready .dsh-side,
body.hc-app-shell-ready footer,
body.hc-app-shell-ready .footer,
body.hc-app-shell-ready .hc-btmnav,
body.hc-app-shell-ready .dsh-fab,
body.hc-app-shell-ready .cat-bar,
body.hc-app-shell-ready .fab-post,
body.hc-app-shell-ready #dshNotifBadge { display: none !important; }

/* The centralized shell is the only top-level header once authenticated. */
body.hc-app-shell-ready > header:not(.hc-app-header) { display: none !important; }

/* Remove the space that legacy pages reserved for their former fixed header. */
body.hc-app-shell-ready > main { padding-top: 28px !important; }
body.hc-app-shell-ready .feed-wrap { margin-top: 28px !important; }
body.hc-app-shell-ready .cb-hero { padding-top: 28px !important; }
body.hc-app-shell-ready .msg-primary-tabs {
  top: var(--hc-shell-header) !important;
  left: var(--hc-shell-sidebar) !important;
}
body.hc-app-shell-ready .msg-layout {
  height: calc(100vh - var(--hc-shell-header) - var(--msg-tabs-h)) !important;
  height: calc(100dvh - var(--hc-shell-header) - var(--msg-tabs-h)) !important;
  margin-top: var(--msg-tabs-h) !important;
}

body.hc-app-shell-ready .dsh-main,
body.hc-app-shell-ready .de-main,
body.hc-app-shell-ready .dc-wrap {
  width: min(1180px, 100%) !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding-top: 28px !important;
}

.hc-app-header {
  position: fixed;
  z-index: 11000;
  inset: 0 0 auto 0;
  height: var(--hc-shell-header);
  display: grid;
  grid-template-columns: var(--hc-shell-sidebar) minmax(0, 1fr) var(--hc-shell-sidebar);
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 12px;
  border-bottom: 1px solid var(--hc-shell-line);
  background: rgba(0, 0, 0, .97);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .34);
}

.hc-brand {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--hc-shell-cream);
  text-decoration: none;
}

.hc-brand-mark {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  overflow: hidden;
  background: transparent;
}

.hc-brand-mark img {
  position: absolute;
  width: 90px !important;
  height: 90px !important;
  max-width: none !important;
  left: 50%;
  top: -14px;
  transform: translateX(-50%);
  object-fit: contain;
}

.hc-brand-copy { display: flex; align-items: center; line-height: 1; }
.hc-brand-name {
  color: var(--hc-shell-cream);
  font: 650 18px/1.1 "Cormorant Garamond", Georgia, serif;
  letter-spacing: .01em;
}

.hc-app-primary {
  justify-self: center;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 23px;
  border: 1px solid #e1bd60;
  border-radius: 999px;
  background: linear-gradient(135deg, #b78c28, #efd77e);
  color: #080705;
  font: 800 13px/1 system-ui, sans-serif;
  text-decoration: none;
  box-shadow: 0 7px 22px rgba(183, 140, 40, .18);
}

.hc-app-account {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.hc-app-account-menu {
  position: absolute;
  top: 50px;
  right: 0;
  width: 190px;
  overflow: hidden;
  padding: 6px;
  border: 1px solid rgba(211, 173, 80, .28);
  border-radius: 12px;
  background: #090909;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .7);
}
.hc-app-account-menu[hidden] { display: none; }
.hc-app-account-menu a,
.hc-app-account-menu button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 8px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #d6cfc3;
  font: 650 12px/1.2 system-ui, sans-serif;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.hc-app-account-menu a:hover,
.hc-app-account-menu button:hover,
.hc-app-account-menu a:focus-visible,
.hc-app-account-menu button:focus-visible { background: rgba(211, 173, 80, .09); color: var(--hc-shell-gold-light); outline: none; }
.hc-app-account-menu .hc-app-account-logout { color: #d5a59d; }

.hc-app-notifications,
.hc-app-menu {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(211, 173, 80, .26);
  border-radius: 50%;
  background: #0b0b0b;
  color: var(--hc-shell-gold-light);
  text-decoration: none;
  cursor: pointer;
}
.hc-app-notifications svg,
.hc-app-menu svg { width: 20px; height: 20px; }
.hc-app-notification-count {
  position: absolute;
  top: -4px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid #000;
  border-radius: 999px;
  background: var(--hc-shell-gold);
  color: #050505;
  font: 900 9px/1 system-ui, sans-serif;
}
.hc-app-notification-count[hidden] { display: none; }
.hc-app-firstname {
  max-width: 150px;
  overflow: hidden;
  color: var(--hc-shell-cream);
  font: 700 13px/1 system-ui, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hc-app-sidebar {
  position: fixed;
  z-index: 10900;
  inset: var(--hc-shell-header) auto 0 0;
  width: var(--hc-shell-sidebar);
  height: calc(100dvh - var(--hc-shell-header));
  display: flex;
  flex-direction: column;
  padding: 15px 11px 12px;
  border-right: 1px solid var(--hc-shell-line);
  background: #050505;
}

.hc-app-sidebar-brand { display: none; }
.hc-app-nav {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: auto;
  scrollbar-color: rgba(211, 173, 80, .72) #111;
}
.hc-app-nav::-webkit-scrollbar { width: 9px; }
.hc-app-nav::-webkit-scrollbar-track { background: #111; border-radius: 10px; }
.hc-app-nav::-webkit-scrollbar-thumb { background: #9b7430; border: 2px solid #111; border-radius: 10px; }
.hc-app-nav-group { flex: 0 0 auto; margin-top: 9px; }
.hc-app-nav-group:first-child { margin-top: 0; }
.hc-app-nav-label {
  margin: 0 12px 5px;
  color: #6f695f;
  font: 800 9px/1.2 system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hc-app-nav-link,
.hc-app-logout {
  position: relative;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 1px 0;
  padding: 8px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c5beb3;
  font: 650 12.5px/1.2 system-ui, sans-serif;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.hc-app-nav-link::before {
  content: "";
  position: absolute;
  inset: 7px auto 7px 0;
  width: 2px;
  border-radius: 2px;
  background: transparent;
}
.hc-app-nav-link:hover,
.hc-app-nav-link:focus-visible { color: #fff; background: rgba(211, 173, 80, .07); }
.hc-app-nav-link[aria-current="page"] {
  color: var(--hc-shell-gold-light);
  background: rgba(107, 72, 36, .22);
}
.hc-app-nav-link[aria-current="page"]::before { background: var(--hc-shell-gold); }
.hc-app-nav-icon { width: 19px; height: 19px; flex: 0 0 19px; color: var(--hc-shell-gold); }
.hc-app-nav-icon svg { display: block; width: 19px; height: 19px; }
.hc-app-nav-text { flex: 1 1 auto; min-width: 0; }
.hc-app-nav-count {
  min-width: 21px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--hc-shell-gold);
  color: #050505;
  font: 900 9px/1 system-ui, sans-serif;
}
.hc-app-nav-count[hidden] { display: none; }
.hc-app-logout {
  flex: 0 0 auto;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(211, 173, 80, .12);
  border-radius: 0;
  color: #d5a59d;
}
.hc-app-overlay { display: none; }
.hc-app-close { display: none; }

.hc-app-menu:focus-visible,
.hc-app-notifications:focus-visible,
.hc-app-primary:focus-visible,
.hc-app-nav-link:focus-visible,
.hc-app-logout:focus-visible,
.hc-brand:focus-visible {
  outline: 2px solid var(--hc-shell-gold-light);
  outline-offset: 2px;
}

body.hc-app-shell-ready #hc-email-banner { left: var(--hc-shell-sidebar) !important; top: var(--hc-shell-header) !important; }

@media (max-width: 1100px) and (min-width: 1024px) {
  .hc-app-header { grid-template-columns: var(--hc-shell-sidebar) minmax(0, 1fr) 220px; gap: 8px; }
  .hc-app-primary { padding-inline: 16px; }
}

@media (max-width: 1023px) {
  :root { --hc-shell-header: calc(62px + env(safe-area-inset-top)); }
  body.hc-app-shell-ready { padding-left: 0 !important; }
  body.hc-app-shell-ready > main { padding-top: 14px !important; }
  body.hc-app-shell-ready .feed-wrap { margin-top: 14px !important; }
  body.hc-app-shell-ready .cb-hero { padding-top: 20px !important; }
  body.hc-app-shell-ready .msg-primary-tabs { left: 0 !important; }
  body.hc-app-shell-ready .dsh-main,
  body.hc-app-shell-ready .de-main,
  body.hc-app-shell-ready .dc-wrap { padding-top: 18px !important; }
  .hc-app-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: env(safe-area-inset-top) 10px 0 12px;
  }
  .hc-brand { gap: 7px; }
  .hc-brand-mark { width: 40px; height: 40px; flex-basis: 40px; }
  .hc-brand-mark img { width: 78px !important; height: 78px !important; top: -12px; }
  .hc-brand-name { font-size: 16px; }
  .hc-app-primary { display: none; }
  .hc-app-account { gap: 6px; }
  .hc-app-firstname { max-width: 88px; font-size: 12px; }
  .hc-app-notifications,
  .hc-app-menu { width: 44px; height: 44px; }
  .hc-app-account-menu { display: none !important; }
  .hc-app-sidebar {
    z-index: 11100;
    inset: 0 auto 0 0;
    width: min(320px, calc(100vw - 42px));
    height: 100dvh;
    /* Keep the drawer controls below the iOS status-bar hit area. */
    padding-top: env(safe-area-inset-top);
    border-right-color: rgba(211, 173, 80, .42);
    box-shadow: 20px 0 55px rgba(0, 0, 0, .75);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }
  body.hc-app-drawer-open .hc-app-sidebar { transform: translateX(0); }
  .hc-app-sidebar-brand {
    min-height: 63px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 -1px 10px;
    padding: 0 9px 0 3px;
    border-bottom: 1px solid var(--hc-shell-line);
  }
  .hc-app-close {
    position: relative;
    z-index: 2;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(211, 173, 80, .25);
    border-radius: 50%;
    background: #0b0b0b;
    color: var(--hc-shell-gold-light);
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .hc-app-overlay {
    position: fixed;
    z-index: 11050;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, .74);
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease, visibility 180ms ease;
  }
  body.hc-app-drawer-open .hc-app-overlay { opacity: 1; visibility: visible; }
  body.hc-app-drawer-open { overflow: hidden !important; }
  body.hc-app-shell-ready #hc-email-banner { left: 0 !important; }
}

@media (max-width: 480px) {
  .hc-brand-copy { display: none; }
  .hc-app-firstname { max-width: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  .hc-app-sidebar,
  .hc-app-overlay { transition: none !important; }
}

/* v224 — keep legacy page chrome out of the first authenticated paint. */
html.hc-shell-pending,
html.hc-shell-pending body {
  background: #050504 !important;
}

html.hc-shell-pending body {
  visibility: hidden !important;
}

html.hc-shell-pending::after {
  content: "";
  position: fixed;
  z-index: 2147483647;
  top: 0;
  left: 0;
  width: 38%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--hc-shell-gold-light), transparent);
  transform: translateX(-100%);
  animation: hcShellProgress 900ms ease-in-out infinite;
}

body.hc-app-shell-ready {
  animation: hcShellReveal 120ms ease-out both;
}

@keyframes hcShellProgress {
  to { transform: translateX(365%); }
}

@keyframes hcShellReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html.hc-shell-pending::after { animation: none !important; }
  body.hc-app-shell-ready { animation: none !important; }
}
