/*
  Responsive stabilization layer.
  Loaded after style.css so mobile and tablet layouts stay consistent
  across Safari iOS, Chrome Android and desktop browsers.
*/

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  min-width: 320px;
  max-width: 100%;
}

svg { display: block; }

.inline-icon,
.notice-icon,
.ingredient-chip__icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.inline-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--forest);
  background: #dff7e9;
}

.inline-icon svg,
.notice-icon svg,
.ingredient-svg,
.compose-arrows svg,
.rail-controls svg,
.back-to-top svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.inline-icon svg { width: 14px; height: 14px; }
.notice-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--orange);
  background: rgba(255, 107, 26, .12);
}
.notice-icon svg { width: 23px; height: 23px; }

.marquee-separator {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--orange);
  transform: rotate(45deg);
}

.ingredient-chip__icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: var(--forest);
  background: rgba(7, 63, 43, .08);
}
.ingredient-svg { width: 18px; height: 18px; }

.compose-arrows button,
.rail-controls button,
.back-to-top {
  display: inline-grid;
  place-items: center;
}
.compose-arrows svg,
.rail-controls svg,
.back-to-top svg { width: 20px; height: 20px; }

/* Prevent a single child from widening the whole page. */
main,
section,
.shell,
.hero-grid,
.compose-layout,
.compose-explorer,
.compose-panel,
.signature-grid,
.product-rail,
.drink-shelf,
.contact-grid,
.footer-grid {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 1020px) {
  .shell {
    width: 100%;
    max-width: var(--shell);
    padding-inline: 28px;
  }

  .section { padding-block: 92px; }

  .section-dock {
    width: min(calc(100% - 32px), 720px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
  }

  .section-dock a {
    min-width: 0;
    white-space: nowrap;
  }

  .compose-layout { grid-template-columns: 1fr; }
  .compose-intro { max-width: 720px; }

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

  .drinks-heading { gap: 26px; }
  .drink-shelf {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    overflow: visible;
  }
  .rail-controls { display: none; }

  .product-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    overflow: visible;
  }
}

@media (max-width: 720px) {
  :root { --mobile-edge: 16px; }

  html { scroll-padding-top: 132px; }
  body {
    overflow-x: hidden !important;
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .shell {
    width: 100% !important;
    max-width: 100% !important;
    padding-inline: var(--mobile-edge) !important;
    margin-inline: 0 !important;
  }

  .section { padding-block: 72px; }
  h1 { font-size: clamp(3.2rem, 15vw, 4.35rem); line-height: .91; }
  h2 { font-size: clamp(2.75rem, 12.5vw, 3.85rem); line-height: .94; }
  h3 { line-height: 1.04; }

  .top-strip {
    min-height: 34px;
    padding: 5px 12px;
    gap: 8px;
    justify-content: space-between;
  }
  .top-strip__track { min-width: 0; gap: 8px; }
  .top-strip__track span { white-space: nowrap; }
  .top-strip__track span:nth-of-type(n+2),
  .top-strip__track i { display: none; }
  .opening-status { max-width: 54%; overflow: hidden; text-overflow: ellipsis; font-size: .62rem; }

  .site-header,
  body.scroll-down:not(.near-top) .site-header,
  body.scroll-up .site-header,
  body.near-top .site-header {
    transform: none !important;
  }

  .header-shell {
    min-height: 68px;
    height: 68px;
    padding-inline: var(--mobile-edge) !important;
  }
  .brand img { width: 92px; height: auto; }
  .uber-button--header { display: none; }
  .menu-toggle { width: 46px; height: 46px; }

  .mobile-menu {
    position: fixed;
    inset: calc(68px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom));
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 24px;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
    overflow: hidden;
  }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-copy { min-width: 0; }
  .hero-copy h1 { max-width: 100%; }
  .hero-lead { max-width: 42rem; font-size: .98rem; }
  .hero-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero-actions .button { width: 100%; }
  .hero-delivery-note { display: grid; grid-template-columns: 22px 1fr; align-items: start; gap: 10px; }
  .hero-art { width: 100%; min-height: 430px; margin: 0; }
  .hero-frame--main { width: min(88%, 390px); }
  .hero-frame--mini { left: 0; }
  .hero-stamp { right: 2px; }
  .scroll-cue { display: none; }

  .marquee { margin-block: 2px; }
  .marquee__track { gap: 18px; }

  .section-dock,
  body.scroll-down:not(.near-top) .section-dock,
  body.scroll-up .section-dock,
  body.near-top .section-dock {
    position: sticky;
    z-index: 65;
    top: 68px !important;
    width: calc(100% - 12px) !important;
    max-width: none;
    margin: 8px 6px 0 !important;
    padding: 5px !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    overflow: hidden !important;
    border-radius: 18px;
    background: rgba(255, 253, 248, .96);
    backdrop-filter: blur(14px);
  }
  .section-dock a {
    min-width: 0 !important;
    width: 100%;
    padding: 10px 3px !important;
    gap: 0;
    overflow: hidden;
    font-size: .68rem !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .section-dock a span { display: none !important; }

  .section-head,
  .drinks-heading,
  .contact-grid,
  .story-grid,
  .order-banner__inner,
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 30px;
  }
  .section-head { align-items: start; }
  .section-head__aside { max-width: none; }

  .signature-grid,
  .signature-grid:nth-child(n) {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
  }
  .signature-card:nth-child(n) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 450px;
    flex: none !important;
  }
  .signature-card__content { padding-right: 58px; }

  .compose-section { overflow: hidden; }
  .compose-layout { width: 100%; gap: 36px; }
  .compose-intro,
  .compose-explorer,
  .compose-panel { width: 100%; min-width: 0; }
  .compose-intro > p:not(.kicker) { max-width: none; }
  .compose-intro .button { width: 100%; }
  .compose-explorer {
    padding: 10px !important;
    overflow: hidden !important;
    border-radius: 24px;
    backdrop-filter: none;
  }
  .compose-mobile-guide {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 5px 4px 9px;
  }
  .compose-mobile-guide span { font-size: .63rem; }
  .compose-tabs {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  .compose-tab {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 58px !important;
    padding: 7px 3px !important;
    border-radius: 13px;
  }
  .compose-tab span { font-size: .59rem; }
  .compose-tab strong {
    max-width: 100%;
    font-size: .61rem;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }
  .compose-tab.is-active { transform: none; }
  .compose-panel {
    min-height: 0 !important;
    margin-top: 10px;
    padding: 20px 14px !important;
    overflow: hidden !important;
    border-radius: 18px;
  }
  .compose-panel__head {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 10px;
  }
  .compose-panel__head > div { min-width: 0; }
  .compose-panel__number { grid-column: 2; grid-row: 1; font-size: 2.3rem; }
  .compose-panel h3 {
    max-width: 100%;
    margin-right: 0;
    font-size: clamp(1.75rem, 8.7vw, 2.35rem) !important;
    overflow-wrap: anywhere;
  }
  .compose-panel__description {
    max-width: 100%;
    font-size: .8rem !important;
    line-height: 1.48;
    overflow-wrap: anywhere;
  }
  .ingredient-chips {
    width: 100%;
    margin-top: 20px;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .ingredient-chip {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 50px;
    padding: 9px 11px !important;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    justify-content: start;
    border-radius: 15px !important;
    white-space: normal !important;
    overflow: hidden;
    font-size: .78rem !important;
    line-height: 1.25;
  }
  .ingredient-chip > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
  }
  .compose-panel__included {
    width: 100%;
    margin-top: 20px;
    padding-top: 16px;
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 6px !important;
    font-size: .75rem !important;
    line-height: 1.45;
  }
  .compose-panel__included span { min-width: 0; overflow-wrap: anywhere; }
  .compose-foot {
    width: 100%;
    padding: 12px 2px 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .compose-foot > span { max-width: none; line-height: 1.45; }
  .compose-arrows {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .compose-arrows button {
    width: 100%;
    height: 48px;
    border-radius: 14px;
  }

  .brunch-availability,
  .brunch-notice { width: 100%; max-width: none; }
  .brunch-notice { display: grid; grid-template-columns: 42px 1fr; }
  .brunch-bento { grid-template-columns: 1fr !important; }
  .brunch-feature,
  .brunch-mini,
  .brunch-quote { grid-column: auto !important; grid-row: auto !important; }
  .brunch-feature { min-height: 460px; }
  .formula-strip {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible !important;
  }
  .formula-strip > span { grid-column: 1 / -1; }
  .formula-strip > i { display: none; }
  .formula-strip > div { min-width: 0; }
  .category-switcher {
    position: static !important;
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    border-radius: 18px;
  }
  .category-switcher button { min-width: 0; padding: 10px 6px; font-size: .72rem; }
  .product-rail {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
  }
  .menu-product {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;
  }

  .drink-toggle { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .drink-toggle button { min-width: 0; padding-inline: 8px; font-size: .72rem; }
  .drink-shelf {
    width: 100% !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row !important;
    grid-auto-columns: auto !important;
    gap: 12px !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
  }
  .drink-card { min-width: 0 !important; width: 100%; }
  .drink-card__image { height: 210px; }
  .drink-card__body { padding: 13px 12px 15px; }
  .drink-card__top { display: grid; grid-template-columns: 1fr; gap: 4px; }
  .drink-card__top h3 { font-size: 1.08rem; }

  .story-collage { width: 100%; min-height: 470px; }
  .story-collage__large { width: 86%; }
  .story-collage__small { width: 48%; }

  .uber-order-card { width: 100%; }
  .contact-links a { min-width: 0; }
  .contact-links strong { min-width: 0; overflow-wrap: anywhere; }

  .footer-grid { display: grid !important; }
  .footer-bottom { gap: 8px; text-align: center; }

  .mobile-uber-bar {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    min-height: 58px;
  }
  body.scroll-down .mobile-uber-bar.is-visible,
  body.scroll-up .mobile-uber-bar.is-visible,
  .mobile-uber-bar.is-visible {
    opacity: 1;
    transform: none !important;
    pointer-events: auto;
  }
  .mobile-uber-bar strong { font-size: .88rem; }
  .back-to-top { bottom: calc(78px + env(safe-area-inset-bottom)); }

  .product-dialog,
  .menu-dialog {
    width: calc(100% - 16px) !important;
    max-width: calc(100% - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    margin: auto;
    border-radius: 22px;
  }
  .product-dialog__grid { grid-template-columns: 1fr !important; }
  .product-dialog__image { min-height: 240px; height: 270px; }
  .product-dialog__copy { padding: 24px 17px calc(24px + env(safe-area-inset-bottom)); }
  .product-dialog__copy h2 { font-size: 2.45rem; overflow-wrap: anywhere; }
  .menu-dialog__images { grid-template-columns: 1fr !important; }
}

@media (max-width: 430px) {
  :root { --mobile-edge: 12px; }

  .hero-copy h1 { font-size: clamp(3rem, 15.5vw, 3.85rem); }
  .hero-art { min-height: 400px; }
  .hero-frame--main { height: 340px; }
  .hero-frame--mini { width: 112px; height: 112px; }

  .section-dock a { font-size: .63rem !important; }
  .compose-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .compose-panel__head { grid-template-columns: 1fr; }
  .compose-panel__number { grid-column: 1; grid-row: 1; font-size: 2.1rem; }
  .compose-panel__head > div { grid-row: 2; }

  .drink-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drink-card__image { height: 220px; }

  .formula-strip { grid-template-columns: 1fr; }
  .formula-strip > span { grid-column: auto; }

  .brunch-feature { min-height: 430px; }
  .brunch-feature__overlay h3 { font-size: 2.45rem; }
}

@media (max-width: 350px) {
  :root { --mobile-edge: 10px; }
  .section-dock { width: calc(100% - 8px) !important; margin-inline: 4px !important; }
  .section-dock a { padding-inline: 1px !important; font-size: .58rem !important; }
  .compose-tab strong { font-size: .57rem; }
  .drink-shelf { grid-template-columns: 1fr; }
  .drink-card__image { height: 250px; }
  .mobile-uber-bar strong { font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .section-dock,
  .mobile-uber-bar { transition: none !important; }
}
