:root {
  --accent: #ff8a1f;
  --accent-text: #17100a;
  --bg: #0f1115;
  --bg-elevated: #171a21;
  --border: #2a2e37;
  --text: #e6e8eb;
  --text-muted: #9aa1ac;
  --danger: #ef4444;
  --success: #22c55e;
  --radius: 8px;
}

[data-theme="light"] {
  --bg: #fffaf5;
  --bg-elevated: #ffffff;
  --border: #dfe3e8;
  --text: #14161a;
  --text-muted: #625b55;
  --accent: #c2410c;
  --accent-text: #ffffff;
}

[data-theme="high-contrast"] {
  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --border: #ffffff;
  --text: #ffffff;
  --text-muted: #ffffff;
  --accent: #ffdd00;
  --accent-text: #000000;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }

header.site-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

header.site-header img.logo {
  height: 34px;
  cursor: pointer;
  transform-origin: 50% 65%;
  user-select: none;
  -webkit-user-drag: none;
}
header.site-header img.logo:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius);
}
.nav-back {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  font-size: 1.25rem;
  line-height: 1;
}
header.site-header .brand { font-weight: 600; font-size: 1.1rem; }

nav.site-nav { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
nav.site-nav a { color: var(--text-muted); font-size: 0.92rem; }
nav.site-nav a:hover, nav.site-nav a.active { color: var(--text); }

.header-right { display: flex; gap: 14px; align-items: center; }

main { max-width: 1100px; margin: 0 auto; padding: 24px; }

input, select, button {
  font-family: inherit;
  font-size: 0.95rem;
}

input[type="text"], input[type="password"], input[type="search"],
input[type="tel"], input[type="email"], input[type="number"], select, textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 10px 12px;
  width: 100%;
}


input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

input[type="text"]:focus, input[type="password"]:focus, input[type="search"]:focus,
input[type="tel"]:focus, input[type="email"]:focus, input[type="number"]:focus,
select:focus, textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

input:disabled, select:disabled, textarea:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

select option {
  background: var(--bg-elevated);
  color: var(--text);
}

input[type="checkbox"], input[type="radio"] {
  accent-color: var(--accent);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  box-shadow: 0 0 0 1000px var(--bg-elevated) inset;
  transition: background-color 9999s ease-out 0s;
}

button {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: var(--radius);
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
}
button:hover { filter: brightness(1.08); }
button.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
button:disabled { opacity: 0.5; cursor: not-allowed; }

.search-bar { margin-bottom: 20px; max-width: 420px; }

.category-tabs {
  display: flex;
  gap: 8px;
  margin: -6px 0 20px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.category-tab {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 8px 14px;
}
.category-tab:hover { color: var(--text); }
.category-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #000;
}

.product-card .body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .name { font-weight: 600; }
.product-card .desc { font-size: 0.85rem; color: var(--text-muted); flex: 1; }

.tag {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 4px;
  width: fit-content;
}
.tag.special { background: #7c3aed; color: #fff; }
.tag.limited { background: #f59e0b; color: #1a1300; }
.tag.oos { background: var(--danger); color: #fff; }
.tag.low { color: var(--danger); font-size: 0.78rem; }

.price-row { display: flex; align-items: baseline; gap: 8px; }
.price { font-weight: 700; }
.price.strike { text-decoration: line-through; color: var(--text-muted); font-weight: 400; font-size: 0.85rem; }

.qty-controls { display: flex; align-items: center; gap: 10px; }
.qty-controls button { padding: 4px 12px; }

.floating-cart {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  z-index: 30;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
  z-index: 40;
}
.cart-overlay.open { display: flex; }
.cart-panel {
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  width: min(400px, 100%);
  height: 100%;
  padding: 20px;
  overflow-y: auto;
}
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.form-narrow { max-width: 380px; margin: 40px auto; display: flex; flex-direction: column; gap: 14px; }

.status-badge { padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.status-pending { background: #f59e0b33; color: #f59e0b; }
.status-approved { background: #22c55e33; color: #22c55e; }
.status-cancelled { background: #ef444433; color: #ef4444; }

.error-msg { color: var(--danger); font-size: 0.88rem; }
.success-msg { color: var(--success); font-size: 0.88rem; }

.toolbar { margin-bottom: 18px; }
.toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.toolbar-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar-actions input,
.toolbar-actions select { min-width: 180px; }

.admin-order-card { display: flex; flex-direction: column; gap: 12px; }
.admin-order-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.admin-order-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.muted { color: var(--text-muted); font-size: 0.8rem; }
.inline-list { display: flex; flex-wrap: wrap; gap: 8px; }
.link-button { background: transparent; border: none; color: var(--accent); padding: 0; font-weight: 600; cursor: pointer; }
.admin-order-actions { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.admin-order-actions label { display: flex; flex-direction: column; gap: 6px; min-width: 160px; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal.hidden { display: none; }
.modal-card {
  width: min(560px, 100%);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.modal-card.narrow { width: min(420px, 100%); }
.modal-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.stack-form { display: flex; flex-direction: column; gap: 12px; }
.stack-form label { display: flex; flex-direction: column; gap: 6px; }
.inline-row { display: flex; gap: 8px; align-items: center; }
.inline-row input { flex: 1; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid var(--border);
}
.removable-tag { padding-right: 6px; }
.remove-tag-btn {
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 4px;
}
.muted-text { color: var(--text-muted); }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 16px 0; }
.theme-option { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; cursor: pointer; text-align: center; }
.theme-option.active { border-color: var(--accent); }


/* ---------- Phone and small-tablet layout ---------- */
@media (max-width: 700px) {
  header.site-header {
    gap: 10px;
    padding: 10px 14px;
    padding-top: max(10px, env(safe-area-inset-top));
    flex-wrap: wrap;
  }

  header.site-header img.logo { height: 30px; }
  header.site-header .brand {
    font-size: 1rem;
    white-space: nowrap;
  }

  header.site-header.subpage-header img.logo,
  header.site-header.subpage-header .brand {
    display: none;
  }

  .header-right {
    margin-left: auto;
    gap: 8px;
  }
  .header-right > span { display: none; }
  .header-right button { padding: 9px 12px; }

  nav.site-nav {
    order: 3;
    flex: 0 0 100%;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 3px 0 2px;
    scrollbar-width: thin;
  }
  nav.site-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 7px 9px;
    border-radius: 999px;
    border: 1px solid transparent;
  }
  nav.site-nav a.active {
    border-color: var(--border);
    background: var(--bg);
  }

  main { padding: 16px 14px 88px; }
  h2 { margin-top: 8px; }

  input, select, textarea { min-height: 44px; }
  button { min-height: 42px; }
  .link-button, .remove-tag-btn { min-height: auto; }

  .search-bar {
    max-width: none;
    margin-bottom: 16px;
  }
  .category-tabs {
    margin-top: -4px;
    margin-right: -14px;
    padding-right: 14px;
  }

  .product-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .product-card img { height: 165px; }

  .card { padding: 15px; }
  .form-narrow {
    width: 100%;
    max-width: none;
    margin: 18px auto;
  }

  .floating-cart {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    padding: 13px 18px;
  }
  .cart-panel {
    width: 100%;
    border-left: none;
    padding: 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .cart-item {
    gap: 12px;
    flex-wrap: wrap;
  }
  .qty-controls button {
    min-width: 42px;
    min-height: 42px;
    padding: 6px 12px;
  }

  .toolbar-row { align-items: stretch; }
  .toolbar-row > *, .toolbar-actions { width: 100%; }
  .toolbar-actions input,
  .toolbar-actions select {
    min-width: 0;
    flex: 1 1 100%;
  }

  .admin-order-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-order-actions { align-items: stretch; }
  .admin-order-actions label,
  .admin-order-actions > button {
    width: 100%;
    min-width: 0;
  }

  .modal {
    align-items: flex-start;
    padding: 10px;
    padding-top: max(10px, env(safe-area-inset-top));
    overflow-y: auto;
  }
  .modal-card {
    width: 100%;
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    padding: 15px;
  }
  .modal-header {
    position: sticky;
    top: -15px;
    z-index: 2;
    background: var(--bg-elevated);
    padding: 15px 0 10px;
    margin-top: -15px;
  }

  .inline-row { flex-wrap: wrap; }
  .inline-row input { flex: 1 1 180px; }
  .inline-row button { flex: 1 1 auto; }

  .theme-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 380px) {
  header.site-header .brand { display: none; }
  .header-right button { padding-inline: 10px; }
  .price-row { flex-wrap: wrap; }
}


/* ---------- Lightweight motion ---------- */
:root { --motion-ease: cubic-bezier(0.16, 1, 0.3, 1); }

button, .theme-option, .category-tab, .product-card {
  transition: transform 240ms var(--motion-ease),
              filter 240ms ease,
              border-color 240ms ease,
              background-color 240ms ease,
              color 240ms ease,
              box-shadow 280ms ease;
}
button:active, .theme-option:active, .category-tab:active { transform: scale(0.965); }

main { animation: pageSettle 360ms var(--motion-ease) both; }
.cart-overlay.open, .modal:not(.hidden), #flagged-modal {
  animation: overlayFade 260ms ease-out both;
}
.cart-overlay.open .cart-panel { animation: cartGlide 420ms var(--motion-ease) both; }
.modal:not(.hidden) .modal-card, #flagged-modal > div {
  animation: modalFloat 380ms var(--motion-ease) both;
}
.success-msg { animation: successBloom 760ms var(--motion-ease) both; }

@media (hover: hover) {
  .product-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
    box-shadow: 0 10px 28px rgba(0,0,0,0.2);
  }
}

@keyframes campusNeonWarp {
  0% {
    transform: perspective(220px) rotateY(0) rotateZ(0) scale(1);
    filter: drop-shadow(0 0 0 transparent) brightness(1);
  }
  22% {
    transform: perspective(220px) rotateY(-22deg) rotateZ(-4deg) scale(1.06);
    filter: drop-shadow(0 0 5px var(--accent)) brightness(1.12);
  }
  52% {
    transform: perspective(220px) rotateY(190deg) rotateZ(3deg) scale(0.94);
    filter: drop-shadow(0 0 13px var(--accent)) brightness(1.35);
  }
  78% {
    transform: perspective(220px) rotateY(330deg) rotateZ(-2deg) scale(1.04);
    filter: drop-shadow(0 0 7px var(--accent)) brightness(1.16);
  }
  100% {
    transform: perspective(220px) rotateY(360deg) rotateZ(0) scale(1);
    filter: drop-shadow(0 0 0 transparent) brightness(1);
  }
}
.logo-goofy {
  animation: campusNeonWarp 980ms var(--motion-ease) both;
  will-change: transform, filter;
}

@keyframes pageSettle {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes overlayFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes cartGlide {
  from { opacity: 0; transform: translateX(22px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes modalFloat {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes successBloom {
  0% { opacity: 0; transform: translateY(5px) scale(0.98); }
  55% { text-shadow: 0 0 18px color-mix(in srgb, var(--success) 65%, transparent); }
  100% { opacity: 1; transform: translateY(0) scale(1); text-shadow: none; }
}

/* ---------- Stable, low-overhead motion ---------- */
.product-card, .category-tab { animation: none; }

.motion-setting {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border);
}
.setting-note { margin-top: 4px; color: var(--text-muted); font-size: .85rem; }
.switch { position: relative; flex: 0 0 auto; width: 54px; height: 32px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track {
  position: absolute; inset: 0; border-radius: 999px; background: var(--border);
  transition: background 360ms var(--motion-ease), box-shadow 360ms ease;
}
.switch-track::after {
  content: ""; position: absolute; width: 24px; height: 24px; left: 4px; top: 4px;
  border-radius: 50%; background: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.28);
  transition: transform 460ms var(--motion-ease), background 320ms ease;
}
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(22px); background: var(--accent-text); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--accent); outline-offset: 3px; }

html.motion-disabled *, html.motion-disabled *::before, html.motion-disabled *::after {
  animation: none !important; scroll-behavior: auto !important; transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    scroll-behavior: auto !important; transition-duration: 0.01ms !important;
  }
}


/* ---------- Final phone polish ---------- */
html { overflow-x: hidden; }
body { min-width: 0; overflow-x: clip; }
button, a, .theme-option, .category-tab, .floating-cart {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.category-tabs, nav.site-nav {
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.category-tab, nav.site-nav a { scroll-snap-align: start; }

@media (max-width: 700px) {
  body { min-height: 100dvh; }

  header.site-header {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
    box-shadow: 0 6px 22px rgba(0,0,0,.12);
  }

  nav.site-nav {
    margin-inline: -2px;
    padding-bottom: 5px;
    scrollbar-width: none;
  }
  nav.site-nav::-webkit-scrollbar,
  .category-tabs::-webkit-scrollbar { display: none; }

  nav.site-nav a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding-inline: 12px;
  }

  input, select, textarea {
    font-size: 16px;
  }

  .category-tabs {
    gap: 9px;
    padding-top: 2px;
    padding-bottom: 7px;
    scrollbar-width: none;
  }
  .category-tab {
    min-height: 42px;
    padding: 9px 16px;
  }

  .product-card {
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(0,0,0,.1);
  }
  .product-card .body { padding: 14px; gap: 8px; }
  .card { border-radius: 12px; }

  .floating-cart {
    min-height: 48px;
    display: flex;
    align-items: center;
    box-shadow: 0 8px 26px rgba(0,0,0,.38);
  }

  .cart-overlay { align-items: flex-end; }
  .cart-panel {
    height: auto;
    max-height: min(92vh, 92dvh);
    border-top: 1px solid var(--border);
    border-radius: 18px 18px 0 0;
    padding-top: 20px;
    overscroll-behavior: contain;
    box-shadow: 0 -12px 36px rgba(0,0,0,.28);
  }
  .cart-panel::before {
    content: "";
    display: block;
    width: 42px;
    height: 4px;
    margin: -10px auto 14px;
    border-radius: 999px;
    background: var(--border);
  }

  .modal-card {
    border-radius: 14px;
    overscroll-behavior: contain;
  }

  .motion-setting { min-height: 58px; }
}

@media (max-width: 380px) {
  main {
    padding-left: 12px;
    padding-right: 12px;
  }
  .category-tabs {
    margin-right: -12px;
    padding-right: 12px;
  }
  .floating-cart {
    left: 12px;
    right: 12px;
    justify-content: center;
  }
}


/* ---------- Landing page and customer guidance ---------- */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.home-main { max-width: 1180px; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  min-height: 500px;
  padding: clamp(42px, 8vw, 92px) 0;
}
.hero h1, .member-welcome h1, .about-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  line-height: .98;
  letter-spacing: -.055em;
}
.hero-lead, .about-hero > p:last-child {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.65;
}
.hero-actions, .empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.button-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 17px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-text);
  font-size: .95rem;
  font-weight: 700;
}
.button-link.secondary {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}
.hero-note {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: .84rem;
}
.hero-card {
  position: relative;
  padding: clamp(24px, 4vw, 38px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 42%),
    var(--bg-elevated);
  box-shadow: 0 24px 70px rgba(0,0,0,.22);
}
.hero-card-label {
  display: block;
  margin-bottom: 34px;
  color: var(--text-muted);
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero-card strong { display: block; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.15; }
.hero-card p { margin: 18px 0 0; color: var(--text-muted); line-height: 1.65; }

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 76px;
}
.value-card {
  padding: 25px;
  border-top: 1px solid var(--border);
}
.value-number { color: var(--accent); font-size: .75rem; font-weight: 800; }
.value-card h2 { margin: 24px 0 10px; font-size: 1.15rem; }
.value-card p { margin: 0; color: var(--text-muted); line-height: 1.6; }

.how-section {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
  gap: clamp(24px, 6vw, 80px);
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-elevated);
}
.how-section h2 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.7rem); }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.steps li:first-child { padding-top: 0; }
.steps li:last-child { padding-bottom: 0; border-bottom: 0; }
.steps li > span {
  width: 30px; height: 30px; flex: 0 0 30px;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 800;
}
.steps strong { display: block; margin: 4px 0 5px; }
.steps p { margin: 0; color: var(--text-muted); line-height: 1.5; }

.member-welcome {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding: 54px 0 46px;
  border-bottom: 1px solid var(--border);
}
.member-welcome h1 { max-width: 700px; font-size: clamp(2.2rem, 6vw, 4.5rem); }
.member-welcome p:last-child { color: var(--text-muted); font-size: 1.05rem; }
.menu-section { padding: 76px 0 30px; scroll-margin-top: 130px; }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  margin-bottom: 24px;
}
.section-heading h2 { max-width: 700px; margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.035em; }
.section-heading > p { max-width: 300px; margin: 0; color: var(--text-muted); line-height: 1.55; }

.menu-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1.7fr) minmax(150px, .65fr) minmax(150px, .65fr);
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
}
.menu-tools label { display: flex; flex-direction: column; gap: 6px; }
.menu-tools label > span:not(.sr-only) {
  color: var(--text-muted);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.menu-tools input, .menu-tools select { height: 44px; }
.search-field { align-self: end; }
.menu-notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  background: var(--bg-elevated);
  line-height: 1.5;
}
.menu-notice.warning {
  border-color: color-mix(in srgb, #f59e0b 50%, var(--border));
  color: var(--text);
}
.menu-loading, .menu-empty {
  grid-column: 1 / -1;
  min-height: 170px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
}
.menu-empty h3 { margin: 0 0 8px; color: var(--text); }
.menu-empty p { max-width: 500px; margin: 0; line-height: 1.6; }
.loading-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 70%, transparent);
  animation: loadingPulse 1.4s ease-in-out infinite;
}
@keyframes loadingPulse { 50% { opacity: .35; transform: scale(.72); } }
.cart-total-row { display: flex; justify-content: space-between; margin: 16px 0; font-weight: 700; }
.full-button { width: 100%; }
.cart-close-button { margin-top: 8px; }

.about-hero { max-width: 900px; padding: clamp(48px, 9vw, 110px) 0 55px; }
.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.about-grid .card h2 { margin-top: 0; font-size: 1.15rem; }
.about-grid .card p, .policy-page p { color: var(--text-muted); line-height: 1.7; }
.about-cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 18px; }
.about-cta h2 { margin: 0; }
.policy-page { max-width: 760px; margin: 38px auto; padding: clamp(22px, 5vw, 48px); }
.policy-page h1 { margin-top: 0; font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.04em; }
.policy-page h2 { margin-top: 32px; font-size: 1.1rem; }

.site-footer {
  max-width: 1180px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 34px auto 0;
  padding: 26px 24px max(26px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .86rem;
}
.site-footer > div { display: flex; gap: 18px; }
.site-footer strong { color: var(--text); }

.field-label { display: flex; flex-direction: column; gap: 7px; color: var(--text-muted); font-size: .86rem; }
.form-intro { margin: -4px 0 5px; color: var(--text-muted); line-height: 1.55; }
.form-footer { margin: 2px 0 0; color: var(--text-muted); font-size: .9rem; }

@media (max-width: 700px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 48px 0 36px; }
  .hero h1, .about-hero h1 { font-size: clamp(2.55rem, 14vw, 4.1rem); }
  .hero-card { border-radius: 16px; }
  .value-grid, .about-grid { grid-template-columns: 1fr; gap: 0; margin-bottom: 42px; }
  .value-card { padding-inline: 4px; }
  .how-section { grid-template-columns: 1fr; padding: 22px 18px; border-radius: 16px; }
  .member-welcome, .section-heading, .about-cta { align-items: stretch; flex-direction: column; }
  .member-welcome { padding: 38px 0 32px; }
  .menu-section { padding-top: 48px; }
  .section-heading > p { max-width: none; }
  .menu-tools { grid-template-columns: 1fr 1fr; }
  .menu-tools .search-field { grid-column: 1 / -1; }
  .site-footer, .site-footer > div { flex-direction: column; }
  .site-footer { padding-inline: 14px; }
  .about-hero { padding-top: 48px; }
  .about-cta .button-link { width: 100%; }
}

@media (max-width: 420px) {
  .hero-actions .button-link { width: 100%; }
  .menu-tools { grid-template-columns: 1fr; }
  .menu-tools .search-field { grid-column: auto; }
}


/* ---------- Warm visual energy ---------- */
.landing-shell { position: relative; isolation: isolate; }
.landing-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(620px, 72vw);
  aspect-ratio: 1;
  top: -170px;
  right: -210px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 68%);
  pointer-events: none;
}
.hero-copy { position: relative; }
.hero-copy::after {
  content: "";
  display: block;
  width: 82px;
  height: 6px;
  margin-top: 30px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 15%, transparent));
}
.hero-card::before {
  content: "";
  position: absolute;
  width: 155px;
  height: 155px;
  right: -58px;
  bottom: -68px;
  border: 24px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 50%;
  pointer-events: none;
}
.hero-card > * { position: relative; z-index: 1; }
.value-card {
  transition: transform 320ms var(--motion-ease), border-color 320ms ease, background-color 320ms ease;
}
.product-card img {
  transition: transform 480ms var(--motion-ease), filter 420ms ease;
}
@media (hover: hover) {
  .value-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--accent) 58%, var(--border));
    background: color-mix(in srgb, var(--accent) 4%, transparent);
  }
  .product-card:hover img {
    transform: scale(1.035);
    filter: saturate(1.08);
  }
}
.member-welcome {
  position: relative;
  overflow: hidden;
}
.member-welcome::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 280px;
  height: 280px;
  right: -90px;
  bottom: -190px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
::selection {
  background: var(--accent);
  color: var(--accent-text);
}


/* Header action links */
.header-action {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-text);
  font-size: .9rem;
  font-weight: 700;
}
.header-action.secondary { border-color: var(--border); background: transparent; color: var(--text); }
.theme-option { width: 100%; background: transparent; color: var(--text); font-weight: 600; }
.floating-cart { border: 0; }
@media (max-width: 700px) {
  .header-action { min-height: 42px; padding-inline: 12px; }
}


/* ---------- Settings colour studio ---------- */
.setting-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.setting-section h3 { margin: 0 0 6px; }
.accent-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin: 16px 0;
}
.accent-preset {
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 5px;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 3px var(--bg-elevated), 0 3px 10px rgba(0,0,0,.16);
}
.accent-preset.active {
  border-color: var(--text);
  transform: scale(1.08);
}
.custom-colour-row {
  display: grid;
  grid-template-columns: minmax(130px, .65fr) minmax(150px, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.colour-picker-control, .hex-control {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 600;
}
input[type="color"] {
  width: 100%;
  min-height: 50px;
  padding: 4px;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 8px;
}
input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 8px;
}
.contrast-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 14px 0 12px;
}
.accent-preview {
  width: 100%;
  min-height: 48px;
  cursor: default;
}

/* ---------- Phone navigation dock ---------- */
@media (max-width: 700px) {
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }

  header.site-header {
    flex-wrap: nowrap;
    min-height: 60px;
  }

  nav.site-nav {
    position: fixed;
    z-index: 60;
    left: 0;
    right: 0;
    bottom: 0;
    order: initial;
    width: 100%;
    max-width: none;
    min-height: 62px;
    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 6px max(8px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    overflow-x: auto;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-elevated) 94%, transparent);
    box-shadow: 0 -8px 28px rgba(0,0,0,.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  nav.site-nav a {
    flex: 1 0 max-content;
    min-width: 68px;
    min-height: 48px;
    display: grid;
    place-items: center;
    padding: 7px 10px;
    border: 0;
    border-radius: 12px;
    font-size: .76rem;
    font-weight: 700;
    text-align: center;
  }

  nav.site-nav a.active {
    border: 0;
    background: color-mix(in srgb, var(--accent) 16%, var(--bg));
    color: var(--accent);
  }

  main { padding-bottom: 24px; }
  .site-footer { margin-bottom: 12px; }

  .floating-cart {
    bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .cart-overlay {
    z-index: 80;
  }

  .custom-colour-row { grid-template-columns: 1fr; }
  .contrast-row { grid-template-columns: 72px minmax(0, 1fr); }
  .accent-preset {
    width: 50px;
    min-width: 50px;
    height: 50px;
  }
}

@media (max-width: 380px) {
  nav.site-nav a {
    min-width: 64px;
    padding-inline: 8px;
    font-size: .72rem;
  }
  .floating-cart {
    bottom: calc(78px + env(safe-area-inset-bottom));
  }
}


/* Quantity guidance */
.cart-limit-note { margin: -8px 0 14px; color: var(--text-muted); font-size: .82rem; }
.card-action { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.quantity-limit-note { color: var(--text-muted); font-size: .72rem; line-height: 1.35; }


/* ---------- Editorial food hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 640px;
  display: flex;
  align-items: center;
  padding: clamp(38px, 6vw, 76px);
  overflow: hidden;
  border: 1px solid #292421;
  border-radius: 24px;
  background: #050606;
  color: #ffffff;
  box-shadow: 0 30px 90px rgba(0,0,0,.3);
}
.hero-media {
  position: absolute;
  z-index: -3;
  inset: 0;
  display: block;
}
.hero-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: right center;
}
.hero-shade {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3,4,4,.99) 0%, rgba(3,4,4,.94) 34%, rgba(3,4,4,.52) 62%, rgba(3,4,4,.08) 100%),
    linear-gradient(0deg, rgba(3,4,4,.42), transparent 42%);
  pointer-events: none;
}
.hero-copy {
  z-index: 1;
  width: min(610px, 58%);
}
.hero h1 {
  color: #ffffff;
  text-wrap: balance;
  text-shadow: 0 4px 34px rgba(0,0,0,.36);
}
.accent-word {
  color: color-mix(in srgb, var(--accent) 86%, #ffffff);
}
.hero .hero-lead {
  color: rgba(255,255,255,.76);
}
.hero .button-link.secondary {
  border-color: rgba(255,255,255,.4);
  background: rgba(5,6,6,.34);
  color: #ffffff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero .button-link.secondary:hover {
  border-color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.1);
}
.hero-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 25px;
}
.hero-signals span {
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(7,8,8,.48);
  color: rgba(255,255,255,.82);
  font-size: .73rem;
  font-weight: 650;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero .hero-note { color: rgba(255,255,255,.58); }
.hero-copy::after {
  width: 110px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.value-card .accent-word {
  display: inline;
}
.section-heading .accent-word,
.member-welcome .accent-word {
  color: var(--accent);
}

@media (max-width: 900px) {
  .hero {
    min-height: 680px;
    align-items: flex-start;
    padding: 46px 34px;
  }
  .hero-copy { width: min(620px, 76%); }
  .hero-image {
    object-position: right bottom;
    opacity: .92;
  }
  .hero-shade {
    background:
      linear-gradient(180deg, rgba(3,4,4,.98) 0%, rgba(3,4,4,.87) 42%, rgba(3,4,4,.32) 70%, rgba(3,4,4,.15) 100%),
      linear-gradient(90deg, rgba(3,4,4,.6), transparent 80%);
  }
}

@media (max-width: 700px) {
  .hero {
    min-height: 720px;
    padding: 38px 22px;
    border-radius: 18px;
  }
  .hero-copy { width: 100%; }
  .hero h1 {
    max-width: 520px;
    font-size: clamp(2.55rem, 13vw, 4rem);
  }
  .hero .hero-lead {
    max-width: 520px;
    font-size: 1rem;
    line-height: 1.58;
  }
  .hero-image {
    object-position: center bottom;
  }
  .hero-actions { max-width: 460px; }
  .hero-signals { max-width: 480px; }
}

@media (max-width: 420px) {
  .hero {
    min-height: 760px;
    padding-inline: 18px;
  }
  .hero-signals span { font-size: .69rem; }
}


/* ---------- Theme-aware depth and vibrancy ---------- */
:root {
  --surface-soft: #1c1816;
  --shadow-colour: rgba(0, 0, 0, .28);
  --page-glow-strength: 10%;
}

[data-theme="light"] {
  --border: #eadfd5;
  --danger: #b91c1c;
  --success: #16723a;
  --surface-soft: #fff3e7;
  --shadow-colour: rgba(87, 48, 22, .1);
  --page-glow-strength: 9%;
}

body {
  background:
    radial-gradient(circle at 8% 5%, color-mix(in srgb, var(--accent) var(--page-glow-strength), transparent), transparent 30rem),
    radial-gradient(circle at 94% 35%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 28rem),
    var(--bg);
  background-attachment: fixed;
}

header.site-header {
  background: color-mix(in srgb, var(--bg-elevated) 90%, transparent);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--shadow-colour) 55%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

.card,
.product-card,
.how-section,
.menu-notice,
.modal-card,
.cart-panel {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 4%, transparent), transparent 42%),
    var(--bg-elevated);
  box-shadow: 0 16px 44px var(--shadow-colour);
}

.product-card,
.about-grid .card,
.policy-page,
.about-cta,
.menu-tools {
  border-color: color-mix(in srgb, var(--accent) 13%, var(--border));
}

.product-card { transition: transform 320ms var(--motion-ease), border-color 320ms ease, box-shadow 320ms ease; }
.about-grid .card { border-top: 3px solid color-mix(in srgb, var(--accent) 72%, var(--border)); }
.about-cta { border-left: 3px solid var(--accent); }

input[type="text"], input[type="password"], input[type="search"],
input[type="tel"], input[type="email"], input[type="number"], select, textarea {
  background: color-mix(in srgb, var(--bg-elevated) 94%, var(--surface-soft));
}

[data-theme="light"] .status-pending { background: #fef3c7; color: #854d0e; }
[data-theme="light"] .status-approved { background: #dcfce7; color: #166534; }
[data-theme="light"] .status-cancelled { background: #fee2e2; color: #991b1b; }

.auth-page main {
  position: relative;
  min-height: calc(100dvh - 72px);
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
}

.auth-page main::before,
.auth-page main::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
}

.auth-page main::before {
  width: min(520px, 72vw);
  aspect-ratio: 1;
  top: -24%;
  right: -15%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 20%, transparent), transparent 68%);
}

.auth-page main::after {
  width: min(420px, 66vw);
  aspect-ratio: 1;
  left: -16%;
  bottom: -30%;
  border: clamp(28px, 6vw, 70px) solid color-mix(in srgb, var(--accent) 8%, transparent);
}

.auth-page .form-narrow {
  position: relative;
  width: min(430px, 100%);
  max-width: 430px;
  margin: 32px auto;
  padding: clamp(24px, 5vw, 36px);
  overflow: hidden;
  border-color: color-mix(in srgb, var(--accent) 26%, var(--border));
  border-top: 4px solid var(--accent);
  box-shadow: 0 28px 80px var(--shadow-colour);
}

.auth-page .form-narrow::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  top: -72px;
  right: -58px;
  border: 18px solid color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: 50%;
  pointer-events: none;
}

.auth-page .form-narrow h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  letter-spacing: -.035em;
}

.auth-page .form-narrow > button {
  min-height: 46px;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 26%, transparent);
}

@media (hover: hover) {
  .product-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--accent) 48%, var(--border));
    box-shadow: 0 22px 54px color-mix(in srgb, var(--accent) 10%, var(--shadow-colour));
  }
}

[data-theme="high-contrast"] body,
body[data-theme="high-contrast"] {
  background: #000000;
}

[data-theme="high-contrast"] header.site-header,
[data-theme="high-contrast"] .card,
[data-theme="high-contrast"] .product-card,
[data-theme="high-contrast"] .how-section,
[data-theme="high-contrast"] .menu-notice,
[data-theme="high-contrast"] .modal-card,
[data-theme="high-contrast"] .cart-panel {
  background: var(--bg-elevated);
  box-shadow: none;
}

@media (max-width: 700px) {
  .auth-page main {
    min-height: calc(100dvh - 60px - 70px);
    padding-top: 18px;
  }

  .auth-page .form-narrow {
    width: 100%;
    margin: 0 auto;
    padding: 24px 18px;
  }
}


/* ---------- Focused signed-in mobile navigation ---------- */
.member-shortcut {
  min-height: auto;
  align-items: center;
  padding: 28px 0 24px;
}
.member-shortcut .eyebrow { margin-bottom: 6px; }
.member-shortcut-title {
  max-width: 650px;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.05rem, 2.4vw, 1.3rem) !important;
  font-weight: 650;
  line-height: 1.45;
}
.member-shortcut + .menu-section { padding-top: 42px; }

@media (max-width: 700px) {
  nav.site-nav a.mobile-secondary { display: none; }

  nav.site-nav {
    justify-content: space-around;
    overflow-x: visible;
  }

  nav.site-nav a {
    flex: 1 1 0;
    min-width: 0;
    max-width: 150px;
  }

  .member-shortcut {
    align-items: stretch;
    gap: 16px;
    padding: 24px 0 20px;
  }

  .member-shortcut .button-link { width: 100%; }
  .member-shortcut + .menu-section { padding-top: 30px; }

  .floating-cart {
    left: auto;
    right: max(14px, env(safe-area-inset-right));
    width: auto;
    max-width: calc(100vw - 28px);
    min-height: 46px;
    padding: 11px 17px;
    justify-content: center;
  }
}


/* ---------- Authoritative phone shell ---------- */
@media screen and (max-width: 700px) {
  header.site-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    min-height: 60px;
  }

  header.site-header .brand {
    display: none;
  }

  header.site-header .header-right {
    display: flex;
    visibility: visible;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }

  header.site-header .header-action {
    display: inline-flex;
    visibility: visible;
    flex: 0 0 auto;
    min-height: 42px;
    padding: 9px 11px;
  }

  header.site-header nav.site-nav {
    position: fixed !important;
    z-index: 60;
    top: auto !important;
    right: 0;
    bottom: 0 !important;
    left: 0;
    width: 100%;
    min-height: 62px;
    margin: 0;
    padding: 6px max(8px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    display: flex;
    flex: none;
    justify-content: space-around;
    align-items: stretch;
    gap: 2px;
    overflow: visible;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-elevated) 94%, transparent);
    box-shadow: 0 -8px 28px rgba(0,0,0,.18);
  }
}


/* ---------- Touch-device navigation guarantee ---------- */
@media screen and (max-width: 700px), screen and (hover: none) and (pointer: coarse) {
  body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }

  header.site-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    min-height: 60px;
    padding: 10px max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
  }

  header.site-header .brand {
    display: none;
  }

  header.site-header.subpage-header img.logo {
    display: none;
  }

  header.site-header .header-right {
    display: flex;
    visibility: visible;
    align-items: center;
    gap: 8px;
    margin-left: auto;
  }

  header.site-header .header-action {
    display: inline-flex;
    visibility: visible;
    flex: 0 0 auto;
    min-height: 42px;
    padding: 9px 11px;
  }

  header.site-header nav.site-nav {
    position: fixed !important;
    z-index: 60;
    top: auto !important;
    right: 0;
    bottom: 0 !important;
    left: 0;
    width: 100%;
    min-height: 62px;
    margin: 0;
    padding: 6px max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    display: flex;
    flex: none;
    justify-content: flex-start;
    align-items: stretch;
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg-elevated) 96%, transparent);
    box-shadow: 0 -8px 28px rgba(0,0,0,.18);
    scrollbar-width: none;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  header.site-header nav.site-nav::-webkit-scrollbar {
    display: none;
  }

  header.site-header nav.site-nav a,
  header.site-header nav.site-nav a.mobile-secondary {
    min-width: 62px;
    min-height: 48px;
    display: grid;
    flex: 1 0 62px;
    place-items: center;
    padding: 7px 6px;
    border: 0;
    border-radius: 12px;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
  }

  header.site-header nav.site-nav a.active {
    background: color-mix(in srgb, var(--accent) 16%, var(--bg));
    color: var(--accent);
  }

  .floating-cart {
    bottom: calc(78px + env(safe-area-inset-bottom));
  }
}


/* ---------- Explicit phone shell class ---------- */
html.phone-ui body {
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
}

html.phone-ui header.site-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 10px max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
}

html.phone-ui header.site-header .brand {
  display: none;
}

html.phone-ui header.site-header.subpage-header img.logo {
  display: none;
}

html.phone-ui header.site-header .header-right > span {
  display: none;
}

html.phone-ui header.site-header .header-right {
  display: flex;
  visibility: visible;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

html.phone-ui header.site-header .header-action,
html.phone-ui header.site-header .header-right button {
  display: inline-flex;
  visibility: visible;
  flex: 0 0 auto;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 11px;
}

html.phone-ui nav.site-nav {
  position: fixed !important;
  z-index: 60;
  top: auto !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  max-width: none;
  min-height: 62px;
  margin: 0 !important;
  padding: 6px max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  display: flex !important;
  flex: none;
  justify-content: flex-start;
  align-items: stretch;
  gap: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elevated) 96%, transparent);
  box-shadow: 0 -8px 28px rgba(0,0,0,.18);
  scrollbar-width: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html.phone-ui nav.site-nav::-webkit-scrollbar {
  display: none;
}

html.phone-ui nav.site-nav a {
  min-width: 56px;
  min-height: 48px;
  display: grid;
  flex: 1 0 56px;
  place-items: center;
  padding: 7px 5px;
  border: 0;
  border-radius: 12px;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

html.phone-ui nav.site-nav a.active {
  background: color-mix(in srgb, var(--accent) 16%, var(--bg));
  color: var(--accent);
}

html.phone-ui .floating-cart {
  bottom: calc(78px + env(safe-area-inset-bottom));
}


/* ---------- Fixed-navigation containing-block repair ---------- */
html.phone-ui header.site-header {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  transform: none !important;
  perspective: none !important;
  contain: none !important;
  background: var(--bg-elevated);
}
