:root {
  --customer-on-light: #8b1320;
  --customer-ink: var(--customer-on-light);
  --customer-muted: #91404b;
  --customer-panel: #fff;
  --home-red: #cb0715;
  --home-ink: var(--customer-ink);
  --header-height: calc(112px + var(--app-safe-top));
}

:root[data-theme="dark"] {
  --customer-ink: #fff;
  --customer-muted: #eee5e7;
  --customer-panel: #1c1d23;
}

#app #main { color: var(--customer-ink); }
:where(#app #main) a { color: inherit; }
:where(#app) :is(input, textarea, select) { color: var(--customer-ink); }

.app-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  min-height: var(--header-height);
  padding: 12px clamp(10px, 3vw, 28px);
  gap: 8px;
  color: #fff;
  background: radial-gradient(ellipse at 65% 38%, #950008, transparent 76%), #db0010;
}

.app-header:has(+ #main > .home-hero) {
  padding-bottom: 25px;
  border-radius: 0 0 49% 11% / 0 0 17% 13%;
  background: radial-gradient(ellipse at 67% 25%, #8c0007, transparent 76%), linear-gradient(#bc000a, #ed0817);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: clamp(8px, 4vw, 32px);
}

.icon-button,
.brand-button {
  display: grid;
  place-items: center;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  color: inherit;
  background: transparent;
}

.icon-button[hidden] {
  display: none;
}

.icon-button svg,
.app-nav svg,
.available-food-button svg {
  width: 23px;
  height: 23px;
  flex: none;
}

.brand-button img {
  display: block;
  width: clamp(76px, 17vw, 106px);
  height: auto;
  object-fit: contain;
}

.app-header:has(+ #main > .home-hero) .brand-button img {
  width: clamp(106px, 32vw, 182px);
  filter: drop-shadow(0 5px 4px #68000788);
}

.membership-badge {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  margin-top: clamp(8px, 4vw, 32px);
  padding: 4px clamp(5px, 1.4vw, 14px);
  border: 1px solid #ffc7c8;
  border-radius: 999px;
  color: #fff;
  background: #b4000b;
  text-align: left;
  font-size: clamp(10px, 2.5vw, 15px);
  font-weight: 750;
  line-height: 1.15;
}

.membership-badge svg {
  width: clamp(16px, 4vw, 25px);
  height: auto;
  flex: none;
  color: #ffcb39;
}

.cart-button {
  position: relative;
}

.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 18px;
  padding: 2px 4px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: var(--home-red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.header-panel {
  margin: 0;
  padding: 16px 20px;
  border: 1px solid #f3d7da;
  border-radius: 16px;
  color: var(--home-ink);
  box-shadow: 0 12px 28px #38000624;
}

.notification-panel {
  inset: var(--header-height) max(12px, calc((100vw - 995px) / 2)) auto auto;
}
.notification-panel[hidden] { display: none; }
.notification-panel[data-legacy-popover] {
  position: absolute;
  z-index: 2;
  top: 100%;
  right: 12px;
  bottom: auto;
  left: auto;
  width: min(360px, calc(100% - 24px));
  max-height: 62vh;
  overflow: auto;
  background: #fff;
}
html[data-theme="dark"] .notification-panel[data-legacy-popover] { background: #211a20; }

.info-page details {
  max-width: 580px;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid #f1e9e9;
  border-radius: 14px;
}

.info-page summary {
  font-weight: 700;
}

.notification-panel p {
  margin: 8px 0 0;
}

#main:has(> .home-hero) {
  padding-top: 0;
  padding-inline: 0;
}

.home-hero {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  background: #fff;
}

.home-banners {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  padding: clamp(9px, 2vw, 22px);
  padding-bottom: 0;
}

.home-banner-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: clamp(14px, 3vw, 28px);
  isolation: isolate;
}

[data-home-banners][hidden] { display: none; }

.home-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.home-banner {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: #710e19;
  overflow: hidden;
  opacity: 0;
  transition: opacity 600ms ease;
}

.home-banner.is-current { opacity: 1; }

.home-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

@media (min-width: 768px), (orientation: landscape) {
  .home-banner-stage { min-height: clamp(260px, 39vw, 410px); }
}

.home-order {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  padding: 16px 18px 28px;
  border-radius: 0 0 23% 29% / 0 0 36% 30%;
  background: var(--home-design-accent, linear-gradient(155deg, #f00a17, #b70008 74%, #e3000d));
}

.available-food-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 4vw, 26px);
  width: min(100%, 430px);
  min-height: 53px;
  padding: 10px 16px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: var(--home-design-accent, #bc000c);
  font-size: clamp(17px, 4.8vw, 26px);
  font-weight: 800;
}

.food-carousel {
  padding: 0 clamp(12px, 3vw, 25px) 10px;
  background: #fff;
}

.food-carousel-viewport {
  display: grid;
  max-width: 750px;
  margin: 0 auto;
  padding: 14px 0 10px;
  overflow: clip;
  overflow-clip-margin: 8px;
}

.food-pair {
  display: grid;
  grid-area: 1 / 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(9px, 3vw, 22px);
  margin: 0;
  padding: 0;
  min-width: 0;
  list-style: none;
}

.food-pair[hidden] {
  display: none;
}

.food-card {
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 4px;
  padding: 6px 8px 13px;
  border: 1px solid #f1e9e9;
  border-radius: clamp(15px, 5vw, 28px);
  background: #fff;
  box-shadow: 0 6px 18px #26101912;
  color: var(--home-ink);
  text-align: center;
  font-size: clamp(14px, 4vw, 22px);
  font-weight: 800;
}

.food-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
}

.app-nav {
  position: fixed;
  inset: auto 0 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  width: min(100%, 640px);
  margin-inline: auto;
  padding: 7px calc(8px + var(--app-safe-right)) calc(7px + var(--app-safe-bottom)) calc(8px + var(--app-safe-left));
  border-top: 1px solid #f0e3e3;
  background: #fff;
  box-shadow: 0 -5px 24px #36000a12;
}

.app-nav button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 5px 2px;
  color: var(--home-ink);
  background: transparent;
  border-radius: 14px;
  font-size: clamp(12px, 3vw, 15px);
  font-weight: 700;
}

.app-nav span {
  font-size: inherit;
}

.app-nav button.active {
  color: var(--home-red);
  background: transparent;
}

.app-header button:focus-visible,
.home-hero button:focus-visible,
.app-nav button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.home-hero button:focus-visible {
  outline-color: #fff;
}

@media (max-width: 600px) {
  .food-card img {
    max-height: 120px;
  }
}

.meal-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  padding: 5px;
  border-radius: 12px;
  background: #fff4f4;
}

.meal-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
}

body:has(.profile-page) {
  background: #fcf7f7;
}

.app-header:has(+ #main > .profile-page) {
  border-radius: 0 0 50% 50% / 0 0 13% 13%;
}

.profile-page {
  max-width: 580px;
  margin-inline: auto;
  color: var(--customer-ink);
  font-family: Arial, Helvetica, sans-serif;
}

.profile-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 8px;
}

.profile-page h1 {
  margin: 0;
  font-size: clamp(28px, 7vw, 38px);
  letter-spacing: -.035em;
}

.profile-tier:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--tier-border, #e9c9b1);
  border-radius: 999px;
  background: var(--tier-background, #f9eadf);
  color: var(--tier-ink, #753914);
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
}

.profile-tier svg {
  width: 16px;
  height: 16px;
}

.profile-tier[data-tier="silver"] {
  --tier-border: #d0d6df;
  --tier-background: #eff2f6;
  --tier-ink: #414d5d;
}

.profile-tier[data-tier="gold"] {
  --tier-border: #eed284;
  --tier-background: #fff3ca;
  --tier-ink: #714b04;
}

.profile-tier[data-tier="platinum"] {
  --tier-border: #c7daef;
  --tier-background: #edf5ff;
  --tier-ink: #2e4d74;
}

.profile-tier[data-tier="vip"] {
  --tier-border: #edb9c2;
  --tier-background: #ffedf0;
  --tier-ink: #941327;
}

.profile-page h2 {
  margin: 22px 0 10px;
  font-size: clamp(18px, 4.8vw, 24px);
}

.profile-group {
  padding-inline: 10px;
  overflow: hidden;
  border: 1px solid #e9dede;
  border-radius: 15px;
  background: #fff;
}

.profile-details {
  margin: 0;
  padding-inline: 14px;
}

.profile-details > div {
  display: grid;
  gap: 4px;
  padding-block: 10px;
}

.profile-details > div + div {
  border-top: 1px solid #f0e6e6;
}

.profile-details dt {
  color: #655454;
  font-size: .83rem;
}

.profile-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.profile-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 51px;
  padding: 7px 4px;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font-weight: 700;
}

.profile-row + .profile-row {
  border-top: 1px solid #f0e6e6;
}

button.profile-row:focus-visible {
  outline: 2px solid var(--home-red);
  outline-offset: -2px;
}

.profile-row small {
  color: #655454;
  font-size: .83rem;
  font-weight: 400;
}

.profile-icon {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 10px;
  background: #ffeded;
  color: #bb0712;
}

.profile-icon svg {
  width: 21px;
  height: 21px;
}

.profile-chevron {
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-top: 2px solid #655454;
  border-right: 2px solid #655454;
  transform: rotate(45deg);
}

.profile-signout {
  min-height: 44px;
  margin-top: 16px;
  background: #ffeded;
  color: #a30710;
  font-weight: 700;
}

#app:has(.profile-page) .app-nav button.active {
  background: #ffeded;
}

@media (max-width: 767px) and (orientation: portrait) {
  body.customer-home {
    margin: 0;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
  }

  .customer-home #app {
    --mobile-home-header-height: calc(clamp(68px, 11vh, 84px) + var(--app-safe-top));
    box-sizing: border-box;
    display: grid;
    grid-template-rows: var(--mobile-home-header-height) minmax(0, 1fr) auto;
    height: 100vh;
    height: 100dvh;
  }

  .customer-home #app .app-header {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: center;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 4px 10px 7px;
  }

  .customer-home #app .app-header .brand-button {
    height: 100%;
    min-height: 0;
  }

  .customer-home #app .app-header .brand-button img {
    width: clamp(54px, 17vw, 74px);
    height: 100%;
    min-height: 0;
  }

  .customer-home #app .app-header .membership-badge,
  .customer-home #app .app-header .header-actions {
    margin-top: 0;
    padding-block: 0;
  }

  .customer-home #app .app-header .notification-panel:not([data-legacy-popover]) {
    inset-block-start: var(--mobile-home-header-height);
  }

  .customer-home #main {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
  }

  .home-order {
    margin: 0;
    padding: 4px 16px 7px;
  }

  .available-food-button {
    min-height: 44px;
    padding-block: 6px;
  }

  .food-carousel {
    padding: 0 8px;
  }

  .food-carousel-viewport {
    padding: 6px 0;
  }

  .food-card {
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    gap: 2px;
    padding: 3px 6px 5px;
    font-size: clamp(12px, 3.6vw, 16px);
  }

  .food-card img {
    height: 100%;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
  }

  .customer-home #app .app-nav {
    position: relative;
    inset: auto;
    width: 100%;
    padding-block-start: 3px;
    padding-block-end: calc(4px + var(--app-safe-bottom));
  }

  .customer-home #app .app-nav button {
    min-height: 45px;
    gap: 2px;
  }
}

@supports (height: 100dvh) {
  @media (max-width: 767px) and (orientation: portrait) {
    .customer-home #app { --mobile-home-header-height: calc(clamp(68px, 11dvh, 84px) + var(--app-safe-top)); }
  }
}

.profile-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  padding: 16px;
  border: 1px solid #f0dedf;
  border-radius: 16px;
  background: #fff0f1;
}

.profile-avatar {
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  border-radius: 50%;
  color: #970913;
  background: #f9dadd;
  font-weight: 750;
}

.profile-name-block { min-width: 0; overflow-wrap: anywhere; }
.profile-name-block h2 { margin: 0 0 3px; }
.profile-name-block span { color: #655454; font-size: .9rem; }

.profile-details .profile-phone-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
}
.profile-phone-row dt { grid-column: 1 / -1; }
.profile-phone-row dd { align-self: center; }
.profile-edit { min-height: 44px; padding: 7px 12px; background: #ffeded; color: #970913; font-weight: 700; }
.profile-edit:disabled { opacity: .55; }
.profile-phone-editor {
  width: min(440px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 18px;
  color: inherit;
  overflow: auto;
}
.profile-phone-editor:not([open]) { display: none; }
.profile-phone-editor::backdrop { background: rgb(31 15 17 / 45%); }
.profile-phone-editor h2 { margin: 0 0 12px; }
.profile-phone-editor label { display: grid; gap: 5px; font-weight: 650; }
.profile-phone-editor button { margin: 8px 5px 0 0; min-height: 44px; }
[data-phone-status]:empty, [data-profile-status]:empty { display: none; }

@media (max-width: 425px) {
  .profile-identity { grid-template-columns: auto minmax(0, 1fr); }
  .profile-identity .profile-tier { grid-column: 2; justify-self: start; }
}


/* Desktop customer experience: keep the compact bottom navigation for phones. */
.desktop-menu-button { display: none; }
.desktop-drawer[hidden] { display: none; }
.desktop-drawer:not([hidden]) { display: none; }

@media (min-width: 768px) {
  .app-header {
    width: min(100% - 48px, 1320px);
    max-width: 1320px;
    min-height: 132px;
    margin: 0 auto;
    padding: 18px 30px;
    align-items: center;
    border-radius: 0 0 34px 34px;
  }

  .app-header:has(+ #main > .home-hero) {
    padding-bottom: 26px;
  }

  .app-header .brand-button img {
    width: 112px;
  }

  .app-header:has(+ #main > :is(.membership-page, .profile-page, .referral-page)) {
    min-height: 120px;
    padding-block: 12px;
  }

  .app-header:has(+ #main > :is(.membership-page, .profile-page, .referral-page)) .brand-button img {
    width: 98px;
  }

  .app-header:has(+ #main > .home-hero) .brand-button img {
    width: 148px;
  }

  .app-header .membership-badge,
  .app-header .header-actions {
    margin-top: 0;
    padding-top: 0;
  }

  .app-header .membership-badge {
    min-height: 48px;
    padding-inline: 16px;
    font-size: 15px;
  }

  .app-header .header-actions {
    align-items: center;
    gap: 12px;
  }

  .app-header .icon-button {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    transition: background .18s ease, transform .18s ease;
  }

  .app-header .icon-button:hover {
    background: #ffffff20;
    transform: translateY(-1px);
  }

  .desktop-menu-button { display: grid; }
  .desktop-menu-button svg { width: 25px; height: 25px; }

  #main {
    width: min(100% - 48px, 1320px);
    max-width: 1320px;
    margin: 0 auto;
    padding: 26px 0 64px;
  }

  #main:has(> .home-hero) {
    padding: 24px 0 20px;
  }

  .home-hero {
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0;
    overflow: visible;
    border-radius: 26px;
  }

  .home-banners {
    padding: 0;
  }

  .home-banner-stage {
    min-height: 0;
    height: clamp(360px, 37vw, 520px);
    border-radius: 24px;
    background: radial-gradient(ellipse at center, #235b24, #102b16);
  }

  /* Portrait campaign artwork remains fully visible until desktop banners are prepared. */
  .home-banner img {
    object-fit: contain;
  }

  .home-order {
    margin-top: 18px;
    padding: 20px 24px 24px;
    border-radius: 22px;
  }

  .available-food-button {
    width: min(100%, 460px);
    min-height: 58px;
    font-size: 23px;
  }

  .food-carousel {
    padding: 8px 0 20px;
  }

  .food-carousel-viewport {
    max-width: 1120px;
    padding: 18px 0;
  }

  .food-pair { gap: 24px; }
  .food-card {
    padding: 12px 14px 18px;
    font-size: 21px;
  }
  .food-card img {
    max-height: 260px;
    object-fit: cover;
    border-radius: 16px;
  }

  .app-nav { display: none; }

  .notification-panel {
    inset: 112px max(24px, calc((100vw - 1280px) / 2)) auto auto;
  }

  .desktop-drawer:not([hidden]) { display: block; }

  .desktop-drawer {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: block;
  }

  .drawer-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border-radius: 0;
    background: rgb(24 10 12 / 42%);
    animation: drawer-fade-in .18s ease both;
  }

  .drawer-content {
    position: absolute;
    inset: 0 0 0 auto;
    display: flex;
    flex-direction: column;
    width: min(410px, 92vw);
    min-height: 100%;
    padding: calc(30px + var(--app-safe-top)) calc(26px + var(--app-safe-right))
      calc(30px + var(--app-safe-bottom)) 26px;
    background: #fff;
    box-shadow: -18px 0 48px rgb(45 0 8 / 18%);
    animation: drawer-slide-in .24s ease both;
  }

  .drawer-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 22px;
    border-bottom: 1px solid #f1e3e4;
  }

  .drawer-eyebrow {
    color: #c80716;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
  }

  .drawer-heading h2 {
    margin: 5px 0 0;
    color: var(--customer-on-light);
    font-size: 25px;
  }

  .drawer-close {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    background: #fff0f1;
    color: #b90010;
    font-size: 28px;
    line-height: 1;
  }

  .desktop-nav {
    display: grid;
    gap: 7px;
    padding-top: 20px;
  }

  .desktop-nav button {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 54px;
    padding: 10px 13px;
    border-radius: 13px;
    background: transparent;
    color: var(--customer-on-light);
    text-align: left;
    font-weight: 700;
    transition: background .16s ease, color .16s ease;
  }

  .desktop-nav button:hover,
  .desktop-nav button.active {
    background: #fff0f1;
    color: #c80716;
  }

  .desktop-nav button svg {
    width: 22px;
    height: 22px;
    flex: none;
  }

  .drawer-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #f1e3e4;
    color: var(--customer-on-light);
    font-size: 13px;
  }

  .desktop-drawer button:focus-visible,
  .desktop-menu-button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
  }

  .desktop-nav button:focus-visible,
  .drawer-close:focus-visible {
    outline: 2px solid #c80716;
    outline-offset: 2px;
  }
}

@keyframes drawer-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes drawer-slide-in {
  from { transform: translateX(28px); opacity: .75; }
  to { transform: translateX(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer-backdrop, .drawer-content { animation: none !important; }
}


/* Dedicated desktop customer homepage. Mobile continues to use the original templates. */
@media (min-width: 768px) {
  .app-header:has(+ #main > .desktop-home) {
    width: 100%;
    max-width: none;
    min-height: 132px;
    padding: 12px max(32px, calc((100vw - 1450px) / 2));
    border-radius: 0 0 34px 34px;
    background: radial-gradient(ellipse at 52% 0%, #a9000a, transparent 70%), linear-gradient(110deg, #e60012, #b5000a 58%, #d90010);
  }

  .app-header:has(+ #main > .desktop-home) .brand-button img {
    width: 126px;
  }

  .app-header:has(+ #main > .desktop-home) .membership-badge,
  .app-header:has(+ #main > .desktop-home) .header-actions {
    margin-top: 0;
    padding-top: 0;
  }

  #main:has(> .desktop-home) {
    width: min(100% - clamp(24px, 4vw, 64px), 1450px);
    max-width: 1450px;
    margin: 0 auto;
    padding: 22px 0 20px;
  }

  .desktop-home {
    display: grid;
    gap: clamp(14px, 2vh, 22px);
  }

  .desktop-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    min-height: 0;
    overflow: hidden;
    border-radius: 26px;
    isolation: isolate;
    background: linear-gradient(115deg, #fffaf6 0%, #fff4e9 54%, #fce8dc 100%);
    box-shadow: 0 10px 34px rgb(72 16 16 / 8%);
  }

  .desktop-hero-copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(24px, 3.2vw, 54px);
  }

  .desktop-kicker {
    color: #c40717;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .17em;
  }

  .desktop-hero-copy h1 {
    max-width: 620px;
    margin: 13px 0 14px;
    color: var(--customer-on-light);
    font-size: clamp(34px, 3.7vw, 58px);
    line-height: 1.02;
    letter-spacing: -.045em;
  }

  .desktop-hero-copy h1 [data-home-copy="headlineAccent"] { color: #d50013; }
  .desktop-hero:has([data-home-banners][hidden]) { grid-template-columns: minmax(0, 1fr); }

  .desktop-hero-copy p {
    max-width: 440px;
    margin: 0;
    color: var(--customer-on-light);
    font-size: clamp(14px, 1.15vw, 18px);
    line-height: 1.55;
  }

  .desktop-order-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    min-width: 240px;
    min-height: 54px;
    margin-top: clamp(18px, 2.8vh, 30px);
    padding: 12px 24px;
    border: 1px solid #ff8a91;
    border-radius: 999px;
    background: var(--home-design-accent, linear-gradient(110deg, #ed0014, #b9000b));
    box-shadow: 0 9px 20px rgb(191 0 16 / 19%);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    transition: transform .18s ease, box-shadow .18s ease;
  }

  .desktop-order-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgb(191 0 16 / 25%);
  }

  .desktop-order-button svg { width: 22px; height: 22px; }

  .desktop-hero-note {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 17px;
    color: var(--customer-on-light);
    font-size: 12px;
    font-weight: 650;
  }

  .desktop-hero-note span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1e9a58;
    box-shadow: 0 0 0 4px #1e9a581c;
  }

  .desktop-hero-visual {
    position: relative;
    min-width: 0;
    min-height: clamp(180px, 23vw, 340px);
    background: #fff4e9;
  }

  .desktop-hero-visual::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, #fff4e9 0%, transparent 25%), linear-gradient(0deg, rgb(70 14 9 / 18%), transparent 45%);
    content: "";
    pointer-events: none;
  }

  .desktop-hero-visual img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .desktop-food-stamp {
    position: absolute;
    right: clamp(18px, 3vw, 42px);
    bottom: clamp(18px, 3vh, 34px);
    z-index: 2;
    display: grid;
    width: clamp(70px, 7vw, 100px);
    height: clamp(70px, 7vw, 100px);
    place-content: center;
    border: 2px solid #ffe4a0;
    border-radius: 50%;
    background: #b9000be8;
    box-shadow: 0 8px 22px #3a0b0b4d;
    color: #fff4d8;
    font-size: clamp(10px, .9vw, 13px);
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    letter-spacing: .08em;
    transform: rotate(9deg);
  }

  .desktop-hero-pattern {
    position: absolute;
    top: -70px;
    left: -65px;
    z-index: 1;
    width: 210px;
    height: 210px;
    border: 24px solid rgb(198 7 21 / 4%);
    border-radius: 50%;
    pointer-events: none;
  }

  .desktop-featured {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    gap: 12px;
  }

  .desktop-featured-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
  }

  .desktop-featured-heading h2 {
    margin: 3px 0 0;
    color: #401719;
    font-size: clamp(22px, 2vw, 29px);
    letter-spacing: -.035em;
  }

  #app:has(#main > .desktop-home) .app-nav { display: none; }
}

@media (min-width: 768px) {
  .desktop-hero-visual img {
    opacity: 1;
    transition: opacity 320ms ease;
  }
  .desktop-hero-visual img.banner-image-changing { opacity: .12; }
}
@media (prefers-reduced-motion: reduce) {
  .desktop-hero-visual img { transition: none !important; }
}


/* Refined desktop homepage: compact chrome, balanced hero and fully visible dishes.
   These rules are desktop-only; the phone experience keeps its existing layout. */
@media (min-width: 768px) {
  .app-header:has(+ #main > .desktop-home) {
    min-height: 96px;
    padding: 8px max(28px, calc((100vw - 1450px) / 2));
    border-radius: 0 0 26px 26px;
  }

  .app-header:has(+ #main > .desktop-home) .brand-button img {
    width: 104px;
  }

  .app-header:has(+ #main > .desktop-home) .membership-badge {
    min-height: 44px;
    padding-inline: 14px;
    font-size: 14px;
  }

  .app-header:has(+ #main > .desktop-home) .icon-button {
    width: 42px;
    height: 42px;
  }

  #main:has(> .desktop-home) {
    padding: 16px 0 18px;
  }

  .desktop-hero {
    border-radius: 22px;
  }

  .desktop-hero-copy {
    padding: clamp(22px, 2.6vw, 40px);
  }

  .desktop-hero-copy h1 {
    margin: 8px 0 10px;
    font-size: clamp(30px, 3.1vw, 46px);
    line-height: 1.04;
  }

  .desktop-hero-copy p {
    max-width: 400px;
    font-size: clamp(13px, 1vw, 16px);
  }

  .desktop-order-button {
    min-width: 210px;
    min-height: 48px;
    margin-top: 16px;
    font-size: 16px;
  }

  .desktop-hero-note {
    margin-top: 11px;
  }

  .desktop-food-stamp {
    right: 24px;
    bottom: 20px;
    width: 76px;
    height: 76px;
    font-size: 10px;
  }

  .desktop-featured {
    gap: 9px;
  }

  .desktop-featured-heading h2 {
    font-size: clamp(21px, 1.8vw, 26px);
  }

}

/* Use tighter header and hero spacing in short desktop windows. */
@media (min-width: 768px) and (max-height: 760px) {
  .app-header:has(+ #main > .desktop-home) {
    min-height: 88px;
    padding-block: 6px;
  }

  .app-header:has(+ #main > .desktop-home) .brand-button img {
    width: 92px;
  }

  #main:has(> .desktop-home) {
    padding: 10px 0 14px;
  }

  .desktop-home {
    gap: 10px;
  }

  .desktop-hero-copy {
    padding: 18px 24px;
  }

  .desktop-hero-copy h1 {
    margin: 6px 0 8px;
    font-size: clamp(28px, 3vw, 40px);
  }

  .desktop-order-button {
    min-height: 44px;
    margin-top: 12px;
  }

  .desktop-hero-note {
    margin-top: 8px;
    font-size: 11px;
  }

  .desktop-featured {
    gap: 6px;
  }

  .desktop-featured-heading h2 {
    font-size: 21px;
  }

}

.desktop-featured[hidden], .food-carousel[hidden] { display: none; }

.food-carousel-viewport,
.desktop-food-viewport {
  --food-tile-gap: 8px;
  --food-price-height: 30px;
  --food-tile-width: calc((100cqw - 2 * var(--food-tile-gap)) / 3);
  container-type: inline-size;
  width: 100%;
}

.food-carousel-viewport .food-pair {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: var(--food-tile-width);
  justify-content: center;
  align-items: start;
  gap: var(--food-tile-gap);
}

@media (min-width: 768px) {
  .desktop-food-viewport {
    --food-tile-gap: clamp(5px, .85vw, 12px);
    --food-price-height: 34px;
    --food-tile-width: calc((100cqw - 8 * var(--food-tile-gap)) / 9);
    overflow: clip;
    padding-block: 2px 8px;
  }

  .home-food-ticker {
    display: flex;
    width: max-content;
    animation: home-food-ticker var(--ticker-duration) linear infinite;
  }

  .home-food-ticker-group {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--food-tile-width);
    gap: var(--food-tile-gap);
    margin: 0;
    padding: 0 var(--food-tile-gap) 0 0;
    list-style: none;
  }

  .desktop-food-viewport:is(:hover, :focus-within) .home-food-ticker {
    animation-play-state: paused;
  }

  @keyframes home-food-ticker {
    to { transform: translateX(-50%); }
  }
}

@media (min-width: 768px) and (prefers-reduced-motion: reduce) {
  .desktop-food-viewport {
    overflow-x: auto;
  }

  .home-food-ticker-group[aria-hidden="true"],
  .home-food-ticker-group > [aria-hidden="true"] {
    display: none;
  }
}

.home-food-card {
  overflow: hidden;
  padding: 4px;
  grid-template-rows: auto var(--food-price-height);
  gap: 0;
  align-items: center;
  justify-items: center;
  border: 1px solid #f2dfe0;
  border-radius: 16px;
  box-shadow: none;
}

.home-food-card .home-food-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border-radius: 11px 11px 5px 5px;
}

.home-food-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  padding: 0;
  object-fit: contain;
  object-position: center;
  background: #fff;
}
/* Preloaded thumbnails have built-in margins around the food. */
.home-food-card img[src*="/menu-photos/preloaded/"] {
  transform: scale(1.48);
}
.home-food-card .home-food-price {
  max-width: 100%;
  margin: 0;
  border-radius: 999px;
  padding: 3px clamp(3px, calc(var(--food-tile-width) / 22), 6px);
  background: #c40013;
  color: #fff;
  overflow: hidden;
  font-size: clamp(9px, calc(var(--food-tile-width) / 10), 14px);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (768px <= width < 900px) {
  .desktop-food-viewport .home-food-card .home-food-price {
    max-width: calc(100% + 4px);
    padding-inline: 2px;
    letter-spacing: -.2px;
  }
}

.home-food-status { margin: 0; color: var(--customer-muted); font-size: .9rem; }


/* Profile appearance preference */
.profile-theme-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(145px, 190px);
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 18px;
  padding: 14px;
}
.profile-theme-copy { display: grid; gap: 4px; }
.profile-theme-copy strong { font-size: .98rem; }
.profile-theme-copy small { color: var(--customer-muted); font-size: .82rem; line-height: 1.4; }
.profile-theme-select-label { grid-column: 2; grid-row: 1; color: var(--customer-muted); font-size: .78rem; }
.profile-theme-card select {
  grid-column: 2;
  width: 100%;
  min-height: 44px;
  border: 1px solid #e5cfd1;
  border-radius: 10px;
  padding: 9px 11px;
  background: #fff;
  color: #28191b;
}
@media (max-width: 480px) {
  .profile-theme-card { grid-template-columns: 1fr; }
  .profile-theme-select-label, .profile-theme-card select { grid-column: 1; grid-row: auto; }
}

/* Dark appearance applies across the customer app, including ordering and profile. */
html[data-theme="dark"] body {
  background: #111216;
  color: #f5eff0;
}
html[data-theme="dark"] .profile-page,
html[data-theme="dark"] .info-page {
  color: var(--customer-ink);
}
html[data-theme="dark"] body:has(.profile-page) { background: #111216; }
html[data-theme="dark"] .profile-group,
html[data-theme="dark"] .profile-review-card,
html[data-theme="dark"] .meal,
html[data-theme="dark"] .food-card,
html[data-theme="dark"] .portion-row,
html[data-theme="dark"] .plate-review-card,
html[data-theme="dark"] .plate-food-card,
html[data-theme="dark"] .plate-soup-card,
html[data-theme="dark"] .plate-selected-main,
html[data-theme="dark"] .order-card,
html[data-theme="dark"] .cart-card,
html[data-theme="dark"] .menu-card {
  background: #1c1d23;
  color: #f5eff0;
  border-color: #38343a;
}
html[data-theme="dark"] .profile-identity,
html[data-theme="dark"] .plate-progress,
html[data-theme="dark"] .plate-live-total,
html[data-theme="dark"] .plate-count-option,
html[data-theme="dark"] .plate-add-another {
  background: #2b1b20;
  color: #fff0f1;
  border-color: #593039;
}
html[data-theme="dark"] .profile-details dt,
html[data-theme="dark"] .profile-row small,
html[data-theme="dark"] .profile-theme-copy small,
html[data-theme="dark"] .profile-theme-select-label,
html[data-theme="dark"] .plate-review-card p,
html[data-theme="dark"] .order-intro,
html[data-theme="dark"] .portion-row small,
html[data-theme="dark"] .plate-food-card small,
html[data-theme="dark"] .plate-soup-card small,
html[data-theme="dark"] .muted {
  color: var(--customer-muted);
}
html[data-theme="dark"] .profile-row + .profile-row,
html[data-theme="dark"] .profile-details > div + div {
  border-color: #38343a;
}
html[data-theme="dark"] .profile-theme-card select,
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background: #24252c;
  color: var(--customer-ink);
  border-color: #51484c;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #a99da0; }
html[data-theme="dark"] .profile-icon {
  background: #3a2026;
  color: #ff9ca5;
}
html[data-theme="dark"] #nav {
  background: #191a20;
  border-color: #38343a;
}
html[data-theme="dark"] #nav button { color: var(--customer-ink); }
html[data-theme="dark"] #nav button.active {
  color: #ff7b86;
  background: #3a2026;
}
html[data-theme="dark"] .app-header { color: #fff; }
html[data-theme="dark"] .profile-phone-editor {
  background: #1c1d23;
  color: #f5eff0;
  border-color: #494047;
}
html[data-theme="dark"] .profile-phone-editor::backdrop { background: #000b; }
html[data-theme="dark"] .plate-food-card.selected,
html[data-theme="dark"] .plate-soup-card.selected {
  background: #40232a;
  border-color: #e34a58;
}
html[data-theme="dark"] .plate-review-actions button {
  background: #3a2026;
  color: #ffdfe2;
  border-color: #70404a;
}
html[data-theme="dark"] .preloaded-photo-picker { background: #24252c; }


/* Desktop-only Profile layout. Mobile/tablet styling above remains unchanged. */
@media (min-width: 1024px) {
  #main:has(> .profile-page) {
    width: min(100% - 64px, 1240px);
    max-width: 1240px;
    margin-inline: auto;
    padding: 30px 0 56px;
  }

  .profile-page {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
    column-gap: 34px;
    row-gap: 0;
    max-width: 1120px;
    margin-inline: auto;
    align-items: start;
  }

  .profile-page > h1 {
    grid-column: 1 / -1;
    margin: 0 0 22px;
    font-size: 36px;
    line-height: 1.15;
  }

  .profile-page > [data-profile-details] {
    grid-column: 1;
    grid-row: 2 / span 5;
    min-width: 0;
  }

  .profile-identity {
    min-height: 112px;
    margin: 0 0 18px;
    padding: 22px;
    gap: 16px;
  }

  .profile-avatar {
    width: 58px;
    height: 58px;
    font-size: 1.05rem;
  }

  .profile-name-block h2 {
    font-size: 1.35rem;
  }

  .profile-details {
    padding: 8px 20px;
  }

  .profile-details > div {
    padding-block: 17px;
  }

  .profile-page > #appearance-title {
    grid-column: 2;
    grid-row: 2;
    margin: 0 0 10px;
    font-size: 23px;
  }

  .profile-page > .profile-theme-card {
    grid-column: 2;
    grid-row: 3;
    margin: 0 0 24px;
    min-height: 116px;
    padding: 18px;
  }

  .profile-page > #help-title {
    grid-column: 2;
    grid-row: 4;
    margin: 0 0 10px;
    font-size: 23px;
  }

  .profile-page > #help-title + .profile-group {
    grid-column: 2;
    grid-row: 5;
    padding: 5px 16px;
  }

  .profile-page > .profile-signout {
    grid-column: 2;
    grid-row: 6;
    justify-self: start;
    min-width: 112px;
    min-height: 46px;
    margin-top: 16px;
  }

  .profile-page > [data-profile-status] {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1440px) {
  #main:has(> .profile-page) {
    width: min(100% - 96px, 1360px);
    max-width: 1360px;
  }

  .profile-page {
    max-width: 1200px;
    grid-template-columns: minmax(0, 1.1fr) minmax(400px, .9fr);
    column-gap: 48px;
  }
}


/* Improve homepage section heading contrast in dark theme. */
.desktop-featured-heading :is(h2, .desktop-kicker) { color: var(--customer-ink); }

.membership-page {
  --membership-card: #fff;
  --membership-border: #eddde0;
  --membership-progress: #fff1f3;
  --membership-accent: #a90714;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: clamp(14px, 2vw, 26px);
}

html[data-theme="dark"] .membership-page {
  --membership-card: #1e1e24;
  --membership-border: #443338;
  --membership-progress: #2d2026;
  --membership-accent: #ff929d;
}

.membership-page h1 { margin-block: 0 16px; }
.membership-page h2 { margin: 0 0 8px; }
.membership-page h3 { margin: 0; }
.membership-progress {
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid var(--membership-border);
  border-radius: 18px;
  background: var(--membership-progress);
}
.membership-progress p { margin: 8px 0; }
.membership-progress progress {
  width: 100%;
  max-width: 520px;
  height: 12px;
  accent-color: var(--membership-accent);
}
.membership-progress a { color: var(--membership-accent); font-weight: 700; }
.membership-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
  gap: 12px;
  margin-top: 16px;
}
.membership-card {
  padding: 16px;
  border: 1px solid var(--membership-border);
  border-radius: 16px;
  background: var(--membership-card);
}
.membership-card[aria-current="true"] { border-color: var(--membership-accent); }
.membership-card p { margin: 8px 0; font-size: .9rem; }
.membership-card .membership-rate { color: var(--membership-accent); font-size: 1.05rem; font-weight: 750; }
.membership-card ul { padding-inline-start: 18px; font-size: .88rem; line-height: 1.5; }
.membership-note { margin-top: 16px; font-size: .9rem; line-height: 1.5; }

.profile-rider-link { margin-top: 14px; }
.profile-rider-link .profile-row { grid-template-columns: minmax(0, 1fr) auto; }
#app:has(.rider-page) #nav button.active { font-weight: 700; }
.rider-page { padding-top: 16px; }
.rider-page h1 { margin: 12px 0 16px; }
.rider-back { min-height: 44px; }
.rider-page [data-rider-feedback]:empty { display: none; }
.rider-form, .rider-submitted { padding: clamp(16px, 3vw, 28px); }
.rider-form:not([hidden]), .rider-submitted dl { display: grid; gap: 16px; }
.rider-form label { display: grid; min-width: 0; gap: 6px; font-weight: 600; }
.rider-form :is(input, select) {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 8px 12px;
  color: inherit;
  background: var(--membership-card);
  border: 1px solid var(--membership-border);
  border-radius: 9px;
  font: inherit;
}
.rider-form .primary { min-height: 46px; }
.rider-submitted h2 { margin: 0; color: var(--membership-accent); }
.rider-submitted dt { font-size: .9rem; }
.rider-submitted dd { margin: 4px 0 0; font-weight: 600; overflow-wrap: anywhere; }

@media (min-width: 768px) {
  .rider-page { max-width: 900px; }
  .rider-form, .rider-submitted dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rider-form .primary { grid-column: 1 / -1; justify-self: start; }
}

.rider-verification { margin-top: 20px; }
.rider-check { margin-bottom: 12px; padding: clamp(16px, 3vw, 24px); }
.rider-check h3 { margin: 0; }
.rider-check [data-check] { color: var(--membership-accent); font-weight: 700; }
.rider-check-form:not([hidden]) { display: grid; gap: 10px; }
.rider-check-form p { margin: 0; }
.rider-check-form p:empty { display: none; }
.rider-check-form label { display: grid; gap: 6px; font-weight: 600; }
.rider-check-form :is(input, select) {
  width: 100%;
  min-height: 44px;
  color: inherit;
  background: var(--membership-card);
  border: 1px solid var(--membership-border);
  border-radius: 9px;
  padding: 8px 10px;
  font: inherit;
}
.rider-check-form button { min-height: 44px; }
.rider-check-form button:disabled { opacity: .55; cursor: default; }

@media (min-width: 768px) {
  .rider-check-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rider-check-form p { grid-column: 1 / -1; }
  .rider-check-form button { grid-column: 1 / -1; justify-self: start; }
}


/* Approved rider mode entry on the customer profile. */
.profile-rider-switch:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 14px 0;
  padding: 16px;
  border: 1px solid #edc5c9;
  border-radius: 15px;
  background: #fff5f5;
}
.profile-rider-switch > div { display: grid; gap: 4px; }
.profile-rider-switch small { color: #725b5e; line-height: 1.4; }
.profile-rider-switch button { flex: 0 0 auto; min-height: 44px; }
html[data-theme="dark"] .profile-rider-switch {
  color: #fff0f1;
  background: #2b1b20;
  border-color: #593039;
}
html[data-theme="dark"] .profile-rider-switch small { color: #d2bfc2; }
@media (max-width: 480px) {
  .profile-rider-switch { align-items: stretch; }
  .profile-rider-switch button { width: 100%; }
}
.promotion-popup {
  box-sizing: border-box;
  width: min(100% - 36px, 410px);
  max-height: calc(100dvh - 36px - var(--app-safe-top) - var(--app-safe-bottom));
  padding: 20px;
  border: 0;
  border-radius: 20px;
  background: var(--customer-panel);
  color: var(--customer-ink);
  box-shadow: 0 20px 60px #0005;
  overflow: auto;
}
.promotion-popup::backdrop { background: #17090bb3; }
.promotion-popup .promotion-close {
  display: block;
  margin: 0 0 10px auto;
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}
.promotion-popup [data-promotion-artwork]:not([hidden]) {
  display: block;
  width: 100%;
  max-height: 45dvh;
  border-radius: 12px;
  object-fit: contain;
}
.promotion-popup h2 { margin: 14px 0 8px; }
.promotion-popup p { margin: 0 0 16px; white-space: pre-line; overflow-wrap: anywhere; }
.promotion-popup [data-promotion-action] { width: 100%; color: white; font-weight: 700; }


/* Customer profile: local, responsive restaurant-themed presentation. */
.profile-page {
  --pf-card: #fff; --pf-ink: var(--customer-ink); --pf-muted: var(--customer-muted);
  --pf-line: #ead9da; --pf-soft: #ffeded; --pf-accent: #ad0714;
  --pf-gradient: linear-gradient(135deg,#e51128,#a7000d);
  color: var(--pf-ink);
}
.profile-page [hidden] { display: none !important; }
.profile-page .profile-heading { justify-content: flex-start; flex-wrap: nowrap; gap: 14px; margin: 0 0 20px; grid-column: 1 / -1; }
.profile-heading > div { min-width: 0; }
.profile-heading p { margin: 5px 0 0; color: var(--pf-muted); line-height: 1.4; }
.profile-heading-icon, .profile-voucher-icon, .profile-role-icon, .profile-contact-icon {
  display: grid; place-items: center; flex: none; color: var(--pf-accent);
  background: var(--pf-soft); border-radius: 16px;
}
.profile-heading-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--pf-gradient); color: white; }
.profile-heading-icon svg { width: 29px; height: 29px; }
.profile-page .profile-group { border-color: var(--pf-line); border-radius: 18px; }
.profile-page .profile-voucher-card {
  display: grid; grid-template-columns: 76px minmax(0,1fr); align-items: center;
  gap: 4px 16px; padding: 18px; margin: 0 0 14px;
  background: linear-gradient(120deg,#fff0d5,#fffaf5 55%,#ffd9c4);
  border: 1px solid #f3ceb5; color: var(--customer-on-light);
}
.profile-voucher-icon { grid-column: 1; grid-row: 1 / span 2; width: 72px; height: 62px; background: var(--pf-gradient); color: white; transform: rotate(-9deg); box-shadow: 0 5px 12px #a7000d28; border: 2px dashed #ffd8a0; }
.profile-voucher-icon svg { width: 35px; height: 35px; }
.profile-page .profile-voucher-card h2 { grid-column: 2; margin: 0; font-size: clamp(16px,4vw,21px); }
.profile-voucher-card p { grid-column: 2; margin: 0; font-size: .87rem; line-height: 1.45; }
.profile-voucher-card [data-voucher-balance] { color: #a7000d; font-weight: 800; font-size: clamp(24px,6vw,34px); overflow-wrap: anywhere; }
.profile-voucher-history { margin: 0 0 14px; }
.profile-page .profile-identity { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 6px 16px; align-items: center; padding: 18px; margin: 0 0 14px; border-radius: 18px; background: linear-gradient(120deg,#ffe5e7,#fff0f0); }
.profile-page .profile-avatar { grid-row: 1 / span 2; width: 76px; height: 76px; border: 2px solid #e73747; outline: 3px solid #fff; color: #b20717; background: #ffd5d9; font-size: 1.6rem; }
.profile-page .profile-name-block h2 { margin: 0 0 4px; font-size: clamp(19px,5vw,25px); }
.profile-page .profile-name-block span { color: var(--pf-muted); }
.profile-page .profile-tier { grid-column: 2; justify-self: start; max-width: 100%; white-space: normal; }
.profile-page .profile-rider-switch:not([hidden]) { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 8px 14px; padding: 14px; margin: 0 0 12px; border-color: #efc9b6; border-radius: 18px; background: var(--pf-card); }
.profile-page .profile-role-icon { grid-row: 1 / span 2; width: 64px; height: 72px; align-self: center; background: linear-gradient(145deg,#ffe6e7,#ffc9cd); color: #a7000d; }
.profile-role-icon svg { width: 37px; height: 37px; }
.profile-page .profile-rider-switch > div { grid-column: 2; min-width: 0; }
.profile-page .profile-rider-switch strong { font-size: 1.12rem; }
.profile-page .profile-rider-switch small { color: var(--pf-muted); font-size: .85rem; }
.profile-page .profile-rider-switch button { grid-column: 2; width: 100%; background: var(--pf-gradient); color: #fff; font-weight: 700; }
.profile-page .profile-details { padding: 5px 14px; box-shadow: 0 5px 15px #50151a08; }
.profile-page .profile-details > div { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 3px 12px; align-items: center; padding: 12px 0; }
.profile-contact-icon { grid-column: 1; grid-row: 1 / span 2; width: 42px; height: 42px; }
.profile-contact-icon svg { width: 22px; height: 22px; }
.profile-page .profile-details dt { grid-column: 2; color: var(--pf-muted); }
.profile-page .profile-details dd { grid-column: 2; min-width: 0; }
.profile-page .profile-phone-row dd:last-child { grid-column: 3; grid-row: 1 / span 2; }
.profile-page .profile-edit { border: 1px solid var(--pf-accent); background: transparent; color: var(--pf-accent); }
.profile-page .profile-theme-card { padding: 14px; border-color: #e8b968; }
.profile-page .profile-theme-card select { min-height: 48px; font-weight: 700; }
.profile-page .profile-row { min-height: 56px; }
.profile-page .profile-icon { width: 42px; height: 42px; border-radius: 13px; }
.profile-page .profile-signout { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; background: var(--pf-soft); color: var(--pf-accent); font-size: 1rem; }
.profile-signout svg { width: 23px; height: 23px; }
#app:has(.profile-page) .app-nav button.active { background: linear-gradient(135deg,#e51128,#a7000d); color: white; }
html[data-theme="dark"] .profile-page { --pf-card:#212127; --pf-line:#49353c; --pf-soft:#41242c; --pf-accent:#ff9ca7; }
html[data-theme="dark"] .profile-page .profile-voucher-card { background: linear-gradient(120deg,#483120,#382426); border-color:#725040; color:var(--customer-ink); }
html[data-theme="dark"] .profile-voucher-card [data-voucher-balance] { color:var(--customer-ink); }
html[data-theme="dark"] .profile-page .profile-identity { background:linear-gradient(120deg,#43242b,#2c2229); }
html[data-theme="dark"] .profile-page .profile-avatar { background:#5e2937; color:#ffd9df; outline-color:#39252c; }
html[data-theme="dark"] .profile-page .profile-rider-switch:not([hidden]) { border-color:#593039; }
@media (max-width: 420px) {
  .profile-page .profile-voucher-card { grid-template-columns: 60px minmax(0,1fr); padding: 13px; gap: 4px 12px; }
  .profile-voucher-icon { width: 58px; height: 52px; }
  .profile-page .profile-rider-switch:not([hidden]) { grid-template-columns: 50px minmax(0,1fr); gap: 8px 10px; padding: 12px; }
  .profile-page .profile-role-icon { width: 50px; height: 60px; }
  .profile-page .profile-avatar { width: 62px; height: 62px; }
  .profile-page .profile-details > div { grid-template-columns: 36px minmax(0,1fr) auto; gap: 3px 8px; }
  .profile-contact-icon { width: 36px; height: 36px; }
}
@media (min-width: 768px) {
  .profile-page .profile-heading { grid-column: 1 / -1; }
}


/* Web notification inbox: keep permission controls separate from message content. */
.web-notification-ui .notification-panel {
  box-sizing: border-box;
  width: min(420px, calc(100vw - 24px));
  max-height: 65vh;
  overflow-y: auto;
}
.web-notification-ui .notification-panel > strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 8px;
}
.web-notification-ui .notification-panel [data-enable-push] {
  margin-bottom: 8px;
}
.web-notification-ui .notification-panel [data-customer-notifications] {
  margin-top: 12px;
}
.web-notification-ui .notification-panel article {
  display: block;
  padding: 12px 0;
  border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  overflow-wrap: anywhere;
}
.web-notification-ui .notification-panel article > strong {
  display: block;
  font-size: .9rem;
  line-height: 1.4;
}
.web-notification-ui .notification-panel article p {
  margin: 5px 0 8px;
  font-size: .875rem;
  line-height: 1.45;
}
.web-notification-ui .notification-panel article time {
  display: inline-block;
  opacity: .72;
  font-size: .75rem;
}
.web-notification-ui .notification-panel article a {
  display: inline-block;
  margin-inline-start: .65rem;
  font-size: .8rem;
}
