/* Responsive repair, 2026-11-05. Desktop styles above 1000px unchanged. */
@media (max-width: 900px) {
  /* Use normal flow and explicit gutters. Older logo sizing overrides made
     the phone logo too narrow for its non-wrapping tagline. */
  #home > section.hero .hero-content {
    position: relative !important;
    inset: auto !important;
    width: 100%;
    max-width: 650px;
    padding: 26px 6% 112px;
  }
  #home > section.hero .hero-main-brand {
    width: min(340px, 78vw);
    max-width: 100%;
    margin-bottom: 22px;
  }
  #home > section.hero .hero-brand-tagline {
    white-space: normal;
    letter-spacing: clamp(1px, .5vw, 3px);
    font-size: 11px;
    line-height: 1.5;
    gap: 10px;
    text-align: center;
  }
  #home > section.hero .hero-brand-tagline span {
    flex: 0 1 24px;
    min-width: 0;
  }
  #home > section.hero .hero-content > p:not(.eyebrow) {
    max-width: 44ch;
  }
}
@media (min-width: 601px) and (max-width: 1000px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .footer-grid > * { grid-column: auto; min-width: 0; }
  .footer-grid > .newsletter { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  #home > section.hero .hero-main-brand { width: min(270px, 78vw); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 18px; }
  .footer-grid > * { min-width: 0; grid-column: auto; }
  .footer-grid > .footer-brand, .footer-grid > .newsletter { grid-column: 1 / -1; }
}
@media (max-width: 360px) {
  /* Separate the scroll cue and story control on narrow phones. */
  #home > section.hero .scroll-hint { bottom: 78px; }
}
@media (max-width: 600px) {
  /* Allow a two-line game title and description above the action. */
  .whats-on-launch-card { min-height: 230px; }
}
@media (max-width: 600px) {
  .whats-on-launch-grid { min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .whats-on-launch-card { width: 100%; min-width: 0; aspect-ratio: auto; }
}
@media (max-width: 600px) {
  /* Reserve space for close control and two-line titles in the games view. */
  .whats-on-overlay-title { right: 74px; }
  .whats-on-overlay-title h2 { font-size: 26px; line-height: 1.15; overflow-wrap: break-word; }
  .events-view-switch { top: 132px; }
  .whats-on-overlay { padding-top: 198px; }
}

/* Service-tab dialogs: fluid content, compact popup branding and one scroll area.
   Leave the original desktop presentation and the hero logo alone. */
@media (max-width: 820px) {
  dialog.restaurant-dialog {
    box-sizing: border-box;
    width: min(690px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px) !important;
    margin: auto;
    overflow: hidden !important;
  }
  .restaurant-dialog .restaurant-card {
    display: flex !important;
    flex-direction: column;
    height: auto !important;
    max-height: calc(100dvh - 26px);
    min-height: 0 !important;
    width: 100%;
  }
  .restaurant-dialog .restaurant-visual {
    flex: 0 0 clamp(140px, 25dvh, 230px);
    height: clamp(140px, 25dvh, 230px) !important;
    min-height: 0 !important;
    width: 100%;
  }
  .restaurant-dialog .restaurant-copy {
    display: flex !important;
    flex: 0 1 auto;
    flex-direction: column;
    gap: 18px;
    height: auto !important;
    min-height: 0 !important;
    min-width: 0;
    padding: 20px 24px 24px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    contain: none !important;
  }
  .restaurant-dialog .restaurant-brand {
    position: relative !important;
    inset: auto !important;
    flex: 0 0 auto;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .restaurant-dialog .restaurant-brand img {
    width: clamp(96px, 25vw, 140px) !important;
    max-width: 100% !important;
    max-height: 92px !important;
    height: auto !important;
  }
  .restaurant-dialog .restaurant-info,
  .restaurant-dialog .next-restaurant-info {
    position: relative !important;
    inset: auto !important;
    flex: 0 0 auto;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .restaurant-dialog .restaurant-copy-eyebrow,
  .restaurant-dialog .next-copy-eyebrow { margin-bottom: 10px !important; }
  .restaurant-dialog .restaurant-letter-title,
  .restaurant-dialog .next-restaurant-title {
    white-space: normal !important;
    text-wrap: wrap !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 0 12px !important;
    font-size: clamp(30px, 7vw, 42px) !important;
    line-height: 1.08 !important;
    overflow: visible !important;
  }
  .restaurant-dialog .restaurant-detail-reveal,
  .restaurant-dialog .next-restaurant-detail {
    max-width: none !important;
    min-height: 0 !important;
    font-size: 13px !important;
    line-height: 1.65 !important;
    overflow-wrap: anywhere;
  }
  .restaurant-dialog .restaurant-actions,
  .restaurant-dialog .restaurant-dots {
    position: relative !important;
    inset: auto !important;
    flex: 0 0 auto;
    margin: 0 !important;
    min-height: 0 !important;
  }
  .restaurant-dialog .restaurant-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
  }
  .restaurant-dialog .restaurant-next {
    min-width: 0;
    width: 100%;
    padding: 14px 10px;
    font-size: 10px;
    gap: 8px;
  }
  .restaurant-dialog .restaurant-nav-button { font-size: 10px; }
  .restaurant-dialog .restaurant-dots { flex-wrap: wrap; }
  .restaurant-dialog .dialog-close {
    z-index: 20;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
  }
  .restaurant-dialog .next-restaurant-copy-underlay {
    padding: 20px 24px 24px;
    justify-content: flex-start;
    padding-top: 130px;
  }
}
@media (max-width: 600px) {
  .restaurant-dialog .restaurant-copy { padding: 18px 18px 20px !important; gap: 16px; }
  .restaurant-dialog .restaurant-counter { bottom: 14px; left: 18px; }
}
@media (max-width: 820px) and (max-height: 550px) and (min-width: 601px) {
  dialog.restaurant-dialog { width: min(1000px, calc(100vw - 24px)) !important; }
  .restaurant-dialog .restaurant-card { flex-direction: row; }
  .restaurant-dialog .restaurant-visual {
    flex: 0 0 38%;
    width: 38%;
    height: auto !important;
    align-self: stretch;
  }
  .restaurant-dialog .restaurant-copy {
    flex: 1 1 0;
    max-height: calc(100dvh - 26px);
    padding: 18px 64px 20px 22px !important;
    gap: 12px;
  }
  .restaurant-dialog .restaurant-brand img { width: 96px !important; max-height: 64px !important; }
  .restaurant-dialog .restaurant-letter-title,
  .restaurant-dialog .next-restaurant-title { font-size: 30px !important; }
}

/* Native rail reaches every service and supports finger scrolling. */
.category-rail-shell .categories,
.category-rail-shell .categories.show-flash {
  transform: none !important;
  transition: none !important;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  scroll-snap-type: x proximity;
}
.category-rail-shell .categories::-webkit-scrollbar { display: none; }
.category-rail-shell .category-tile { scroll-snap-align: start; }
@media (max-width: 820px) {
  /* Keep only the glass/photo animation. Text remains one stable layer until
     the next photo and restaurant commit together. */
  .restaurant-dialog .next-restaurant-copy-underlay { display: none !important; }
  .restaurant-dialog .restaurant-card.is-shattering .restaurant-info,
  .restaurant-dialog .restaurant-card.is-shattering .restaurant-copy-eyebrow,
  .restaurant-dialog .restaurant-card.is-shattering .restaurant-letter,
  .restaurant-dialog .restaurant-card.is-shattering .restaurant-word {
    animation: none !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}
@media (max-width: 820px) {
  .restaurant-dialog .restaurant-card.is-shattering .restaurant-detail-reveal,
  .restaurant-dialog .restaurant-card.is-shattering .restaurant-actions.restaurant-actions-reveal,
  .restaurant-dialog .restaurant-card.is-shattering .restaurant-dots.restaurant-dots-reveal {
    animation: none !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}

/* Watch Our Story CMS / media. */
.gp-story-editor{border:1px solid #d7c9a5;padding:16px;border-radius:10px;display:grid;gap:12px;min-width:0;margin-bottom:20px}.gp-story-editor legend{font-weight:600;padding:0 8px}.gp-story-toggle{display:flex;align-items:center;gap:10px}.gp-story-toggle input{width:18px;height:18px}.gp-story-editor select{width:100%;padding:10px}.gp-story-editor input[type=file]{max-width:100%}.gp-story-editor p{overflow-wrap:anywhere}.gp-story-editor [role=alert]{color:#b42318}.gp-story-video,.gp-story-embed{display:block;width:100%;aspect-ratio:16/9;background:#000;border:0;object-fit:contain}.detail-dialog:has(.gp-story-video),.detail-dialog:has(.gp-story-embed){display:block;max-width:900px}.detail-dialog:not([open]){display:none}.detail-dialog .gp-story-video,.detail-dialog .gp-story-embed{max-height:65dvh}.detail-dialog:has(.gp-story-video) .dialog-close,.detail-dialog:has(.gp-story-embed) .dialog-close{z-index:4}.detail-dialog:has(.gp-story-video) .dialog-content,.detail-dialog:has(.gp-story-embed) .dialog-content{padding-top:22px}

/* Service popup photos, 2026-11-06: on phones and tablets show the whole
   photo at its natural proportions instead of cropping it into the short
   fixed strip. The popup image is an absolutely positioned fill image, so
   it is put back into normal flow and the panel wraps it. The copy below
   keeps its own scroll area and the close button stays reachable. Desktop
   (>=821px) and the short-landscape row layout keep the original panel. */
@media (max-width: 820px) {
  .restaurant-dialog .restaurant-visual {
    flex: 0 0 auto;
    height: auto !important;
    max-height: 52dvh;
  }
  .restaurant-dialog .restaurant-visual > .photo.cms-fitted-photo {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    max-height: 52dvh;
    object-fit: cover !important;
    object-position: var(--fit-x,50%) var(--fit-y,50%) !important;
    transform: scale(var(--fit-zoom,1)) rotate(var(--fit-rotation,0deg)) !important;
    transform-origin: var(--fit-origin-x,50%) var(--fit-origin-y,50%) !important;
  }
}
@media (max-width: 820px) and (max-height: 550px) and (min-width: 601px) {
  /* Short landscape keeps the side-by-side row but also shows the whole
     photo, letterboxed inside the tall narrow panel (dark bars on the dark
     panel are effectively invisible). */
  .restaurant-dialog .restaurant-visual {
    flex: 0 0 38%;
    max-height: none;
  }
  .restaurant-dialog .restaurant-visual > .photo.cms-fitted-photo {
    position: absolute !important;
    height: 100% !important;
    max-height: none;
    object-fit: cover !important;
    object-position: var(--fit-x,50%) var(--fit-y,50%) !important;
    transform: scale(var(--fit-zoom,1)) rotate(var(--fit-rotation,0deg)) !important;
    transform-origin: var(--fit-origin-x,50%) var(--fit-origin-y,50%) !important;
  }
}

/* v8 2026-11-06: supplied per-brand logos inside service popups.
   Only applies when a mapped brand logo replaced the default Galla mark
   (img.gp-brand-img); the fallback Galla logo keeps its exact v7 sizing. */
.restaurant-dialog .restaurant-brand img.gp-brand-img {
  width: min(190px, 70%) !important;
  max-height: 120px !important;
}
@media (max-width: 820px) {
  .restaurant-dialog .restaurant-brand img.gp-brand-img {
    width: clamp(110px, 28vw, 150px) !important;
    max-height: 120px !important;
  }
}
@media (max-width: 480px) {
  .restaurant-dialog .restaurant-brand img.gp-brand-img {
    width: 106px !important;
    max-height: 106px !important;
  }
}


/* v14 2026-11-06: user-approved - the two new service logos (Rodental,
   Stayfit Gym) render at the SAME WIDTH (shape preserved, so Rodental is
   naturally taller), centered, and nudged slightly upward. Widths track the
   restaurant badge tier at each breakpoint. Shapes are the user-supplied art
   itself - no circle crop or background. All other mapped brands keep exact
   v13 sizing and placement. */
.restaurant-dialog .restaurant-brand img.gp-brand-img[src*="rodental.png"],
.restaurant-dialog .next-restaurant-brand img.gp-brand-img[src*="rodental.png"] {
  width: min(237px, 80%) !important;
  height: auto !important;
  max-height: 140px !important;
  transform: translateY(-8px) !important;  /* user: nudge both logos a little upward */
}
.restaurant-dialog .restaurant-brand img.gp-brand-img[src*="stayfit-gym.png"],
.restaurant-dialog .next-restaurant-brand img.gp-brand-img[src*="stayfit-gym.png"] {
  width: min(237px, 80%) !important;
  height: auto !important;
  max-height: 140px !important;
  transform: translateY(-8px) !important;  /* user: nudge Stayfit logo a little upward */
}
@media (max-width: 820px) {
  .restaurant-dialog .restaurant-brand img.gp-brand-img[src*="rodental.png"],
  .restaurant-dialog .next-restaurant-brand img.gp-brand-img[src*="rodental.png"] {
    width: min(clamp(210px, 56vw, 277px), 80%) !important;
    transform: translateY(-8px) !important;
  }
  .restaurant-dialog .restaurant-brand img.gp-brand-img[src*="stayfit-gym.png"],
  .restaurant-dialog .next-restaurant-brand img.gp-brand-img[src*="stayfit-gym.png"] {
    width: min(clamp(210px, 56vw, 277px), 80%) !important;
    transform: translateY(-8px) !important;
  }
}
@media (max-width: 480px) {
  .restaurant-dialog .restaurant-brand img.gp-brand-img[src*="rodental.png"],
  .restaurant-dialog .next-restaurant-brand img.gp-brand-img[src*="rodental.png"] {
    width: min(210px, 80%) !important;
    transform: translateY(-8px) !important;
  }
  .restaurant-dialog .restaurant-brand img.gp-brand-img[src*="stayfit-gym.png"],
  .restaurant-dialog .next-restaurant-brand img.gp-brand-img[src*="stayfit-gym.png"] {
    width: min(210px, 80%) !important;
    transform: translateY(-8px) !important;
  }
}

/* Same-size popup between restaurants, 2026-11-06: on phones the dialog used
   to grow and shrink with each photo's natural height. The photo panel now
   keeps one constant height and the whole photo letterboxes inside it (the
   panel is the same dark navy as the card, so the bars are invisible). The
   copy keeps its natural height - no stretched empty space - and the dialog
   wraps to the same total size for every restaurant. Desktop is untouched. */
@media (max-width: 820px) {
  .restaurant-dialog .restaurant-visual {
    flex: 0 0 min(52dvh, 320px) !important;
    height: min(52dvh, 320px) !important;
    max-height: none !important;
  }
  .restaurant-dialog .restaurant-visual > .photo.cms-fitted-photo {
    position: absolute !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: var(--fit-x,50%) var(--fit-y,50%) !important;
    transform: scale(var(--fit-zoom,1)) rotate(var(--fit-rotation,0deg)) !important;
    transform-origin: var(--fit-origin-x,50%) var(--fit-origin-y,50%) !important;
  }
}
@media (max-width: 820px) and (max-height: 550px) and (min-width: 601px) {
  .restaurant-dialog .restaurant-visual {
    flex: 0 0 38% !important;
    height: auto !important;
  }
}

/* Desktop shatter: the incoming restaurant's brand logo joins the next-copy
   underlay so the logo changes together with the photo and name instead of
   waiting for the effect to finish. The outgoing logo hides while the
   underlay is up. Phones already swap the logo at the start of the effect. */
@media (min-width: 821px) {
  .restaurant-card.is-shattering .restaurant-copy > .restaurant-brand {
    opacity: 0 !important;
  }
  .next-restaurant-brand {
    animation: restaurant-info-in-v14 1.42s linear forwards !important;
  }
}

/* Desktop shatter pacing, 2026-11-06: the outgoing name/text used to linger
   ~1.3s and the incoming copy faded in over 1.42s, so the old text sat under
   the new photo. The copy now cross-fades quickly at the start of the
   effect, matching how phones behave. The glass-shatter itself is unchanged. */
@keyframes gp-copy-out { to { opacity: 0; } }
@keyframes gp-copy-in { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 821px) {
  .restaurant-card.is-shattering .restaurant-info,
  .restaurant-card.is-shattering .restaurant-copy-eyebrow,
  .restaurant-card.is-shattering .restaurant-detail-reveal,
  .restaurant-card.is-shattering .restaurant-actions,
  .restaurant-card.is-shattering .restaurant-dots,
  .restaurant-card.is-shattering .restaurant-letter,
  .restaurant-card.is-shattering .restaurant-word {
    animation: gp-copy-out .28s ease forwards !important;
    animation-delay: 0s !important;
  }
  .restaurant-card.is-shattering .next-restaurant-info,
  .restaurant-card.is-shattering .next-restaurant-brand,
  .restaurant-card.is-shattering .next-copy-eyebrow,
  .restaurant-card.is-shattering .next-restaurant-detail,
  .restaurant-card.is-shattering .next-restaurant-letter,
  .restaurant-card.is-shattering .next-restaurant-word {
    animation: gp-copy-in .32s ease .06s forwards !important;
    animation-delay: .06s !important;
  }
}

/* Transition zoom fix + service popup sizing, 2026-11-06 (v13):
   1. The photo now fills the whole photo panel on phones too (cover fit
      with the CMS crop position/zoom, same as desktop) - the user asked to
      drop the top/bottom letterbox bands and accepts side cropping. The
      shatter canvas and the incoming underlay draw with the identical
      cover crop, so the photo keeps one size through the whole switch.
   2. Service popups (Dentist, Stayfit, Game On, City Hall, Fashion House,
      Flash Delivery, Contact) open at one constant box size, matching the
      restaurant popup. Copy scrolls inside if a text is longer. */
@media (max-width: 820px) {
  .restaurant-dialog .next-restaurant-underlay > .photo.cms-fitted-photo,
  .restaurant-dialog .next-restaurant-underlay > .photo {
    object-fit: cover !important;
    object-position: var(--fit-x,50%) var(--fit-y,50%) !important;
    transform: scale(var(--fit-zoom,1)) rotate(var(--fit-rotation,0deg)) !important;
    transform-origin: var(--fit-origin-x,50%) var(--fit-origin-y,50%) !important;
  }
  dialog.restaurant-dialog.category-feature-dialog {
    height: min(677px, calc(100dvh - 24px)) !important;
  }
  .category-feature-dialog .restaurant-card {
    height: 100% !important;
  }
  .category-feature-dialog .restaurant-copy {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }
}

/* Service popups: with the box now one constant size, shorter texts are
   centered in the available space instead of hugging the top and leaving a
   dead band at the bottom. */
@media (max-width: 820px) {
  .category-feature-dialog .restaurant-copy {
    justify-content: center !important;
  }
}

/* Specificity guard: keep the incoming underlay photo on the same cover
   crop as the settled view while .restaurant-card.is-shattering rules are
   active, so the photo scale stays constant through the shatter. */
@media (max-width: 820px) {
  .restaurant-card.is-shattering .next-restaurant-underlay > .photo.cms-fitted-photo,
  .restaurant-card.is-shattering .next-restaurant-underlay > .photo,
  .restaurant-card .next-restaurant-underlay > .photo.cms-fitted-photo {
    object-fit: cover !important;
    object-position: var(--fit-x,50%) var(--fit-y,50%) !important;
    transform: scale(var(--fit-zoom,1)) rotate(var(--fit-rotation,0deg)) !important;
    transform-origin: var(--fit-origin-x,50%) var(--fit-origin-y,50%) !important;
    transition: none !important;
    animation: none !important;
  }
}

/* v15: phone logo placement, balanced between photo and first text line. */
@media (max-width: 480px) {
  .restaurant-dialog .restaurant-brand img.gp-brand-img[src*="stayfit-gym.png"],
  .restaurant-dialog .next-restaurant-brand img.gp-brand-img[src*="stayfit-gym.png"] {
    transform: translateY(-29px) !important;
  }
  .restaurant-dialog .restaurant-brand img.gp-brand-img[src*="game-on.png"],
  .restaurant-dialog .next-restaurant-brand img.gp-brand-img[src*="game-on.png"] {
    transform: translateY(-17px) !important;
  }
}

/* v16: keep Flash Delivery's badge centered between photo and text on phones. */
@media (max-width: 480px) {
  .restaurant-dialog .restaurant-brand img.gp-brand-img[src*="flash-delivery.png"],
  .restaurant-dialog .next-restaurant-brand img.gp-brand-img[src*="flash-delivery.png"] {
    transform: translateY(-16px) !important;
  }
}
