/* ==========================================================================
   Guest menu: /qr/{id}, /menu/{id}, /menu/preview/{id} (static SSR, Components/Guest/*).
   Plain CSS, mobile first. Colors, fonts and radii come only from the theme variables in
   guest-themes.css. Class prefix gm- ("guest menu"); state classes is-*.
   Layout variables on .gm: --gm-gutter, --gm-topbar-h, --gm-catnav-h, --gm-max, --gm-sticky-offset.
   ========================================================================== */

/* --- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scrollbar-gutter: stable;
    background: var(--gm-bg);
}
html.gm-locked { overflow: hidden; }            /* a sheet is open (guest-menu.js) */
html[data-embedded] { scrollbar-width: none; scrollbar-gutter: auto; }   /* phone frame of the menu editor */
html[data-embedded]::-webkit-scrollbar { display: none; }

body.gm-body {
    margin: 0;
    background: var(--gm-bg);
    color: var(--gm-text);
    font-family: var(--gm-font-body);
    font-size: var(--gm-body-size);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Resets with zero specificity (:where), so every component class below wins */
:where(.gm) :where(h1, h2, h3, h4, p, ul, figure) { margin: 0; }
:where(.gm) :where(ul) { padding: 0; list-style: none; }
:where(.gm) :where(a) { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
:where(.gm) :where(button, input) { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
:where(.gm) :where(img) { display: block; max-width: 100%; }
:where(.gm) :focus-visible { outline: 2px solid var(--gm-focus); outline-offset: 2px; }
/* Focus targets for scripts only (the section heading after a jump): never a ring — WebKit counts a script focus
   after a tap as :focus-visible. Rings after a tap on interactive elements: see data-gm-quiet at the end. */
:where(.gm) [tabindex="-1"]:focus { outline: none; }

.gm-visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Controls that need JS stay invisible (but keep their place) until guest-menu.js is ready */
html:not([data-guest-ready]) [data-js-only] { visibility: hidden; }

/* --- Page frame ------------------------------------------------------------ */
.gm {
    --gm-gutter: 16px;
    --gm-topbar-h: 56px;
    --gm-catnav-h: 56px;
    --gm-max: 1200px;
    --gm-sticky-offset: calc(var(--gm-topbar-h) + var(--gm-catnav-h));
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--gm-bg);
    color: var(--gm-text);
    font-family: var(--gm-font-body);
    font-size: var(--gm-body-size);
}
@media (min-width: 640px) { .gm { --gm-gutter: 24px; } }
@media (min-width: 1024px) { .gm { --gm-gutter: 32px; } }

.gm-container {
    width: 100%;
    max-width: calc(var(--gm-max) + 2 * var(--gm-gutter));
    margin-inline: auto;
    padding-inline: var(--gm-gutter);
}

.gm-skip {
    position: absolute; left: 8px; top: -80px; z-index: 100;
    padding: 10px 16px; border-radius: 10px;
    background: var(--gm-surface); color: var(--gm-text); box-shadow: var(--gm-shadow-btn);
    font-family: var(--gm-font-ui); font-size: 14px; font-weight: 600;
}
.gm-skip:focus { top: 8px; }

/* --- Live demo note (/demo): Speise-Direkt's own petrol, the same in every theme; scrolls away above the sticky
   top bar (white on #1b3d46 12.6:1, the link #fbbd62 on it 7.6:1) ---------------------------------------------- */
.gm-demo-bar {
    margin: 0;
    padding: 4px 16px;
    background: #1b3d46;
    color: #fff;
    font-family: var(--gm-font-ui);
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
    text-wrap: balance;
}
.gm-demo-bar a {
    display: inline-flex;
    align-items: center;
    min-height: 40px; /* a touch target */
    margin-left: 6px;
    padding: 0 2px;
    color: #fbbd62;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.gm-demo-bar a:focus-visible { outline: 2px solid #fbbd62; outline-offset: 2px; border-radius: 2px; }

/* --- Icon buttons ------------------------------------------------------------ */
.gm-icon { width: 20px; height: 20px; flex: none; }

.gm-iconbtn {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--gm-iconbtn-radius, 999px);
    background: var(--gm-surface-2); color: var(--gm-text);
    cursor: pointer;
    transition: background-color .15s ease, transform .1s ease;
}
@media (hover: hover) {
    .gm-iconbtn:hover { background: color-mix(in srgb, var(--gm-surface-2) 82%, var(--gm-text)); }
}
.gm-iconbtn:active { transform: scale(.94); }

/* --- Top bar ------------------------------------------------------------------ */
.gm-topbar {
    position: sticky; top: 0; z-index: 30;
    height: var(--gm-topbar-h);
    background: var(--gm-bg);
    background: color-mix(in srgb, var(--gm-bg) 90%, transparent);
    -webkit-backdrop-filter: saturate(1.5) blur(14px);
    backdrop-filter: saturate(1.5) blur(14px);
}
.gm-topbar-inner {
    height: 100%;
    display: grid;
    grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr);
    align-items: center;
    gap: 8px;
}
.gm-topbar-slot { display: flex; align-items: center; gap: 8px; min-width: 40px; }
.gm-topbar-end { justify-content: flex-end; }
.gm-topbar-center { min-width: 0; text-align: center; }
.gm-topbar-title {
    display: block;
    font-family: var(--gm-font-ui); font-size: 16px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: opacity .2s ease;
}
/* With JS the title appears once the big heading has scrolled away */
html[data-guest-ready] .gm:not([data-hero-hidden]) .gm-topbar-title { opacity: 0; }

/* --- Hero ------------------------------------------------------------------------ */
.gm-hero { padding: 4px 0 18px; }
.gm-hero-media:empty { display: none; }
.gm-hero-title {
    font-family: var(--gm-font-heading); font-weight: var(--gm-heading-weight);
    font-size: 30px; line-height: var(--gm-heading-line, 1.15); letter-spacing: -0.01em;
    color: var(--gm-hero-title);
    overflow-wrap: anywhere;
}
.gm-hero-desc { margin-top: 8px; max-width: 62ch; color: var(--gm-muted); font-size: 1em; line-height: 1.45; }
@media (min-width: 640px) {
    .gm-hero { padding: 20px 0 28px; }
    .gm-hero-title { font-size: 40px; }
}

/* --- Category chips (sticky) ------------------------------------------------------- */
.gm-catnav {
    position: sticky; top: var(--gm-topbar-h); z-index: 29;
    height: var(--gm-catnav-h);
    background: var(--gm-bg);
    background: color-mix(in srgb, var(--gm-bg) 90%, transparent);
    -webkit-backdrop-filter: saturate(1.5) blur(14px);
    backdrop-filter: saturate(1.5) blur(14px);
    border-bottom: 1px solid var(--gm-border);
}
.gm-catnav-inner {
    position: relative;
    height: 100%;
    display: flex; align-items: center;
    padding-inline: 0;                          /* the scroller carries the gutter so chips can bleed to the edge */
}
.gm-catnav-scroll {
    position: relative;                         /* offsetLeft of the chips is relative to the scroller */
    flex: 1; min-width: 0;
    display: flex; align-items: center; gap: 8px;
    height: 100%;
    padding-inline: var(--gm-gutter) calc(var(--gm-gutter) + 48px);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-padding-inline: var(--gm-gutter);
}
.gm-catnav-scroll::-webkit-scrollbar { display: none; }
/* End of the bar: the "all categories" button over a fade, chips scroll underneath */
.gm-catnav-end {
    position: absolute; top: 0; bottom: 0; right: 0;
    display: flex; align-items: center;
    padding: 0 var(--gm-gutter) 0 36px;
    background: linear-gradient(to right, transparent, var(--gm-bg) 30px);
    pointer-events: none;
}
.gm-catnav-all { pointer-events: auto; }
html:not([data-guest-ready]) .gm-catnav-scroll { padding-right: var(--gm-gutter); }

.gm-chip {
    flex: none;
    display: inline-flex; align-items: center;
    height: 40px; padding: 0 16px;
    border-radius: var(--gm-chip-radius);
    background: var(--gm-surface-2); color: var(--gm-text);
    font-family: var(--gm-font-ui); font-size: 14px; font-weight: 600; line-height: 1;
    white-space: nowrap;
    transition: background-color .2s ease, color .2s ease;
}
@media (hover: hover) {
    .gm-chip:not(.is-active):hover { background: color-mix(in srgb, var(--gm-surface-2) 85%, var(--gm-text)); }
}
.gm-chip.is-active { background: var(--gm-chip-active-bg); color: var(--gm-chip-active-fg); }

.gm-chip-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 8px; }

/* --- Sections ------------------------------------------------------------------------ */
.gm-main { padding-bottom: 64px; }
.gm-section { padding-top: 28px; scroll-margin-top: calc(var(--gm-sticky-offset) - 8px); }
.gm-section-head { margin-bottom: 14px; }
.gm-section-title {
    font-family: var(--gm-font-heading); font-weight: var(--gm-heading-weight);
    font-size: 23px; line-height: var(--gm-heading-line, 1.2); letter-spacing: -0.005em;
}
.gm-section-subtitle { margin-top: 4px; color: var(--gm-muted); font-size: 0.95em; }
@media (min-width: 640px) {
    .gm-section { padding-top: 44px; }
    .gm-section-head { margin-bottom: 18px; }
    .gm-section-title { font-size: 28px; }
}
.gm-empty { padding: 48px 0; text-align: center; color: var(--gm-muted); }

/* --- Shared item bits: price, allergen codes, label chips ---------------------------- */
.gm-price {
    font-family: var(--gm-font-ui); font-size: 15px; font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--gm-price);
    white-space: nowrap;
}
.gm-price--lg { font-size: 22px; font-weight: 700; }

.gm-allergen-codes {
    font-family: var(--gm-font-ui); font-size: 12px; font-weight: 500;
    color: var(--gm-muted); letter-spacing: 0.02em;
}
.gm-allergen-codes--pill {
    padding: 4px 10px; border-radius: 999px; background: var(--gm-surface-2);
}

.gm-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.gm-label {
    display: inline-flex; align-items: center; gap: 4px;
    height: 22px; padding: 0 8px;
    border-radius: 999px;
    background: var(--gm-label-bg); color: var(--gm-label-fg);
    font-family: var(--gm-font-ui); font-size: 12px; font-weight: 600; line-height: 1;
    white-space: nowrap;
}
.gm-label-icon { width: 13px; height: 13px; }
.gm-label--vegan .gm-label-icon, .gm-label--vegetarian .gm-label-icon { color: var(--gm-label-green); }
.gm-label--spicy .gm-label-icon { color: var(--gm-label-red); }
.gm-labels--lg { gap: 6px; }
.gm-labels--lg .gm-label { height: 28px; padding: 0 12px; font-size: 13px; gap: 6px; }
.gm-labels--lg .gm-label-icon { width: 15px; height: 15px; }
/* minimal theme: outlined chips (label background = page) */
.gm[data-theme="minimal"] .gm-label { box-shadow: inset 0 0 0 1px var(--gm-border); }

/* --- Grid of cards (categories with photos) --------------------------------------------- */
.gm-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 12px;
}
@media (min-width: 640px) { .gm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 18px; } }
@media (min-width: 1024px) { .gm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 22px; } }

.gm-card, .gm-row { scroll-margin-top: calc(var(--gm-sticky-offset) + 16px); }
.gm-card { position: relative; display: flex; min-width: 0; }
.gm-card-link { display: flex; flex-direction: column; width: 100%; border-radius: var(--gm-radius); }
.gm-card-media {
    position: relative; overflow: hidden;
    aspect-ratio: 4 / 5;
    border-radius: var(--gm-radius);
    background: var(--gm-media-bg);
}
.gm-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
@media (hover: hover) {
    .gm-card-link:hover .gm-card-media img { transform: scale(1.035); }
    .gm-card-link:hover .gm-card-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
}
.gm-card-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 10px 2px 0; min-width: 0; }
.gm-card-title {
    font-family: var(--gm-font-item); font-weight: var(--gm-item-weight); text-transform: var(--gm-item-transform);
    font-size: 15px; line-height: 1.25;
    overflow-wrap: anywhere;
}
.gm-card-desc {
    color: var(--gm-muted); font-size: 13.5px; line-height: 1.4;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.gm-card-foot {
    display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
    gap: 2px 8px; margin-top: auto; padding-top: 2px;
}
@media (min-width: 640px) {
    .gm-card-title { font-size: 16px; }
    .gm-card-desc { font-size: 14px; }
}

/* Item without a photo inside a photo grid: a tinted text card as tall as its row */
.gm-card--text .gm-card-link { background: var(--gm-card-bg); padding: 16px 14px 14px; }
.gm-card--text .gm-card-body { padding: 0; gap: 8px; }
.gm-card--text .gm-card-title { font-size: 17px; }
.gm-card--text .gm-card-desc { -webkit-line-clamp: 6; line-clamp: 6; }
@media (min-width: 640px) { .gm-card--text .gm-card-link { padding: 20px 18px 18px; } .gm-card--text .gm-card-title { font-size: 19px; } }

/* Reserved for the favourite (heart) button over the photo */
.gm-card-corner { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; gap: 6px; }
.gm-card-corner:empty, .gm-row-corner:empty { display: none; }

/* --- List (categories without photos, e.g. drinks) --------------------------------------- */
.gm-list { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 56px; border-top: 1px solid var(--gm-border); }
@media (min-width: 900px) { .gm-list { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 0; } }
.gm-row { position: relative; display: flex; align-items: stretch; min-width: 0; border-bottom: 1px solid var(--gm-border); }
@media (min-width: 900px) { .gm-row:nth-child(-n + 2) { border-top: 1px solid var(--gm-border); } }
.gm-row-link { flex: 1; min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 0; }
.gm-row-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gm-row-title {
    font-family: var(--gm-font-item); font-weight: var(--gm-item-weight); text-transform: var(--gm-item-transform);
    font-size: 16px; line-height: 1.3; overflow-wrap: anywhere;
}
.gm-row-desc { color: var(--gm-muted); font-size: 14px; line-height: 1.4; }
.gm-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; }
.gm-row-aside { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-top: 1px; text-align: right; }
.gm-row-corner { display: flex; align-items: center; padding-left: 8px; }
@media (hover: hover) {
    .gm-row-link:hover .gm-row-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
}

/* --- Sheets (native <dialog>, guest-menu.js) ----------------------------------------------- */
.gm-sheet {
    position: fixed; inset: auto 0 0 0; z-index: 50;
    width: 100%; max-width: none; height: auto; max-height: 94vh; max-height: 94dvh;
    margin: 0; padding: 0; border: 0;
    background: transparent; color: var(--gm-text);
    overflow: visible;
}
.gm-sheet:not([open]) { display: none; }
/* --gm-drag-fade (0…1): guest-menu.js while the sheet is dragged down (::backdrop inherits it from the dialog) */
.gm-sheet::backdrop {
    background: rgba(0, 0, 0, 0.45); background: var(--gm-backdrop, rgba(0, 0, 0, 0.45));
    opacity: calc(1 - var(--gm-drag-fade, 0));
}
.gm-sheet-panel {
    position: relative;
    display: flex; flex-direction: column;
    max-height: 94vh; max-height: 94dvh;
    background: var(--gm-surface);
    border-radius: var(--gm-radius-sheet) var(--gm-radius-sheet) 0 0;
    box-shadow: var(--gm-shadow-sheet);
    overflow: hidden;
}
.gm-sheet-handle {
    position: relative; flex: none; width: 40px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: var(--gm-border);
}
.gm-sheet-head {
    flex: none;
    display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: 8px;
    padding: 6px 16px 12px;
}
.gm-sheet-head-start { display: flex; }
.gm-sheet-title {
    text-align: center;
    font-family: var(--gm-font-ui); font-size: 18px; font-weight: 700; line-height: 1.3;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gm-sheet-body {
    flex: 1 1 auto; min-height: 0;
    overflow-y: auto; overscroll-behavior: contain;
    padding: 0 16px 24px;
}
.gm-sheet--search .gm-sheet-panel { min-height: 70vh; min-height: 70dvh; }

/* Item sheet: photo on top, floating close button */
.gm-sheet--item .gm-sheet-handle { margin-bottom: 8px; }
.gm-sheet--item .gm-sheet-body { padding: 0; }
.gm-sheet-close--float {
    position: absolute; top: 22px; right: 14px; z-index: 2;
    background: var(--gm-surface);
    background: color-mix(in srgb, var(--gm-surface) 90%, transparent);
    box-shadow: var(--gm-shadow-btn);
}

/* Server-rendered open item sheet (?item=, also without JS): non-modal, with a scrim link behind it */
.gm-scrim { position: fixed; inset: 0; z-index: 45; background: var(--gm-backdrop); }

@media (min-width: 768px) {
    .gm-sheet {
        inset: 0; margin: auto;
        width: min(520px, calc(100% - 48px)); height: fit-content; max-height: 86vh;
    }
    .gm-sheet--item { width: min(620px, calc(100% - 48px)); }
    .gm-sheet-panel { max-height: 86vh; border-radius: var(--gm-radius-sheet); }
    .gm-sheet-handle { display: none; }
    .gm-sheet-head { padding-top: 16px; }
    .gm-sheet-close--float { top: 14px; }
    .gm-sheet--search .gm-sheet-panel { min-height: 420px; }
}

@keyframes gm-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
/* No "from": a sheet dragged down (translate, see below) slides on from where the finger left it, the backdrop
   fades on from its current opacity */
@keyframes gm-sheet-down { to { transform: translateY(100%); } }
@keyframes gm-pop-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes gm-pop-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes gm-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes gm-fade-out { to { opacity: 0; } }

.gm-sheet[open] { animation: gm-sheet-up .3s cubic-bezier(.22, .9, .25, 1); }
.gm-sheet[open]::backdrop { animation: gm-fade-in .25s ease-out; }
.gm-sheet.is-closing { animation: gm-sheet-down .2s ease-in forwards; }
.gm-sheet.is-closing::backdrop { animation: gm-fade-out .2s ease-in forwards; }
@media (min-width: 768px) {
    .gm-sheet[open] { animation-name: gm-pop-in; animation-duration: .22s; }
    .gm-sheet.is-closing { animation-name: gm-pop-out; animation-duration: .16s; }
}
@media (prefers-reduced-motion: reduce) {
    .gm-sheet[open], .gm-sheet.is-closing, .gm-sheet[open]::backdrop, .gm-sheet.is-closing::backdrop { animation: none; }
    .gm-card-media img, .gm-chip, .gm-topbar-title { transition: none; }
}

/* Drag down to close (bottom sheets < 768 px, guest-menu.js): the handle and the header band (.gm-sheet-head, its
   buttons stay taps) follow the finger. The script sets the dialog's translate and --gm-drag-fade; touch-action: none
   keeps iOS from scrolling the page or pulling to refresh. The handle's invisible hit area is 44 px tall (the pill
   stays 40 × 5) and centered, clear of the header's buttons. */
@media (max-width: 767.98px) {
    .gm-sheet-handle, .gm-sheet-head { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
    .gm-sheet-handle { cursor: grab; }
    .gm-sheet-handle::before {
        content: ""; position: absolute; left: 50%; top: -8px;
        width: 160px; height: 44px; transform: translateX(-50%);
    }
    .gm-sheet.is-dragging, .gm-sheet.is-dragging .gm-sheet-handle { cursor: grabbing; }
    /* Fills the gap below the panel when it is pulled up a little (rubber band) */
    .gm-sheet::after {
        content: ""; position: absolute; left: 0; right: 0; top: calc(100% - 1px); height: 24px;
        background: var(--gm-surface);
    }
}
.gm-sheet.is-settling { transition: translate .26s cubic-bezier(.2, .9, .3, 1); }
.gm-sheet.is-settling::backdrop { transition: opacity .26s ease; }
@media (prefers-reduced-motion: reduce) {
    .gm-sheet.is-settling, .gm-sheet.is-settling::backdrop { transition: none; }
}

/* Full-screen sheet on phones (.gm-sheet--full, used by the search sheet; < 768 px only, from 768 px it is the centered
   dialog like every other sheet). The search field takes the focus inside the tap, and iOS opens the keyboard and
   scrolls to reveal whatever has the focus: as a sliding bottom sheet (transform) the panel was still below the screen
   at that moment, and on an iPhone the page's end showed above the keyboard while the panel was off-screen.
   So this panel is anchored to the top, its field is at its final place when it is focused (it fades in, no transform),
   and guest-menu.js sizes it to the visual viewport (--gm-vv-top/--gm-vv-height: the area above the keyboard), keeps
   the page from scrolling behind it and puts the page back where it was on close. No grab handle, no drag to close: a
   panel that fills the screen has no edge to pull; close button, Escape and the back button close it. */
@media (max-width: 767.98px) {
    .gm-sheet--full {
        top: var(--gm-vv-top, 0px); bottom: auto;
        height: var(--gm-vv-height, 100%); max-height: none;
    }
    .gm-sheet--full::after { content: none; }
    /* Wherever the panel does not reach (while the keyboard moves), the panel color instead of the dimmed page */
    .gm-sheet--full::backdrop { background: var(--gm-surface); }
    .gm-sheet--full .gm-sheet-panel {
        height: 100%; max-height: none; min-height: 0;
        padding-top: env(safe-area-inset-top, 0px);
        border-radius: 0; box-shadow: none;
    }
    .gm-sheet--full .gm-sheet-handle { display: none; }
    .gm-sheet--full .gm-sheet-head { padding-top: 12px; }
    .gm-sheet--full .gm-sheet-body { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 767.98px) and (prefers-reduced-motion: no-preference) {
    .gm-sheet--full[open] { animation-name: gm-fade-in; animation-duration: .2s; animation-timing-function: ease-out; }
    .gm-sheet--full.is-closing { animation-name: gm-fade-out; animation-duration: .16s; animation-timing-function: ease-in; }
}

/* --- Item detail (content of the item sheet) ------------------------------------------------- */
/* Wide screens: photo left (sticky), text right */
@media (min-width: 900px) {
    .gm-sheet--item:has(.gm-detail-media) { width: min(940px, calc(100% - 64px)); }
    .gm-detail:not(.gm-detail--noimage) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
    .gm-detail:not(.gm-detail--noimage) .gm-detail-media { position: sticky; top: 0; aspect-ratio: auto; height: min(600px, 86vh); }
    .gm-detail:not(.gm-detail--noimage) .gm-detail-body { padding: 28px 28px 32px; }
    .gm-detail:not(.gm-detail--noimage) .gm-detail-category { padding-right: 48px; }
    .gm-detail--noimage .gm-detail-body { padding: 24px 28px 32px; }
}

.gm-detail-media { aspect-ratio: 4 / 3; background: var(--gm-media-bg); }
.gm-detail-media img { width: 100%; height: 100%; object-fit: cover; }
.gm-detail-body { display: flex; flex-direction: column; gap: 12px; padding: 20px 20px 28px; }
.gm-detail--noimage .gm-detail-body { padding-top: 6px; }
.gm-detail--noimage .gm-detail-category,
.gm-detail--noimage .gm-detail-title { padding-right: 48px; }
.gm-detail--noimage .gm-detail-category + .gm-detail-title { padding-right: 0; }
.gm-detail-category {
    font-family: var(--gm-font-ui); font-size: 12px; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--gm-muted);
    min-height: 36px; display: flex; align-items: center;
}
.gm-detail:not(.gm-detail--noimage) .gm-detail-category { min-height: 0; }
.gm-detail-title {
    font-family: var(--gm-font-item); font-weight: var(--gm-item-weight); text-transform: var(--gm-item-transform);
    font-size: 25px; line-height: 1.2; overflow-wrap: anywhere;
}
.gm-detail-desc { color: var(--gm-muted); font-size: 1.04em; line-height: 1.5; }
.gm-detail-price-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding-top: 2px; }
.gm-detail-section { margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--gm-border); }
.gm-detail-section-title {
    margin-bottom: 8px;
    font-family: var(--gm-font-ui); font-size: 12px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--gm-muted);
}
.gm-legend li { display: flex; gap: 12px; padding: 7px 0; font-size: 0.97em; line-height: 1.35; }
.gm-legend li + li { border-top: 1px solid var(--gm-border); }
.gm-legend-code { flex: none; width: 1.6em; font-family: var(--gm-font-ui); font-weight: 700; }

.gm-combo {
    padding: 14px 16px;
    border: 1px solid var(--gm-accent-border); border-radius: max(6px, calc(var(--gm-radius) - 2px));
    background: var(--gm-accent-soft);
}
.gm-combo + .gm-combo { margin-top: 10px; }
.gm-combo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.gm-combo-name { font-family: var(--gm-font-item); font-weight: var(--gm-item-weight); font-size: 17px; line-height: 1.25; }
.gm-combo-prices { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.gm-combo-price { color: var(--gm-accent); font-weight: 700; font-size: 16px; }
.gm-combo-single { font-family: var(--gm-font-ui); font-size: 12px; color: var(--gm-muted); white-space: nowrap; }
.gm-combo-desc { margin-top: 4px; color: var(--gm-muted); font-size: 0.95em; }
.gm-combo-items { display: grid; gap: 4px; margin-top: 10px; font-size: 0.95em; }
.gm-combo-items li { display: flex; justify-content: space-between; gap: 12px; }
.gm-combo-items li > span:first-child::before { content: "•"; margin-right: 8px; color: var(--gm-muted); }
.gm-combo-items .gm-price { font-size: 13px; font-weight: 500; color: var(--gm-muted); }
.gm-combo-saving {
    display: inline-block; margin-top: 12px; padding: 4px 10px; border-radius: 999px;
    background: var(--gm-accent); color: var(--gm-on-accent);
    font-family: var(--gm-font-ui); font-size: 12px; font-weight: 700;
}

/* --- Search ------------------------------------------------------------------------------------ */
.gm-search-field {
    display: flex; align-items: center; gap: 10px;
    height: 48px; padding: 0 14px;
    border: 1px solid transparent; border-radius: 14px;
    background: var(--gm-surface-2); color: var(--gm-muted);
}
.gm-search-field:focus-within { border-color: var(--gm-focus); }
/* Full-screen search on phones: the field stays at the top while the results scroll under it */
@media (max-width: 767.98px) {
    .gm-sheet--full .gm-search-bar {
        position: sticky; top: 0; z-index: 1;
        padding-bottom: 4px;
        background: var(--gm-surface);
    }
    .gm-sheet--full .gm-search-status { margin-top: 8px; }
}
.gm-search-input {
    flex: 1; min-width: 0; height: 100%;
    border: 0; outline: 0; background: transparent; color: var(--gm-text);
    font-family: var(--gm-font-ui); font-size: 16px;   /* 16 px: iOS does not zoom into the field */
}
.gm-search-input::placeholder { color: var(--gm-muted); opacity: 1; }
.gm-search-input:focus-visible { outline: none; }               /* the field shows the focus */
.gm-search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.gm-search-clear {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 32px; height: 32px; margin-right: -6px; padding: 0; border: 0; border-radius: 999px;
    background: transparent; color: var(--gm-muted); cursor: pointer;
}
.gm-search-clear[hidden] { display: none; }
.gm-search-clear .gm-icon { width: 18px; height: 18px; }
.gm-search-status { min-height: 1.4em; margin: 12px 2px 4px; font-family: var(--gm-font-ui); font-size: 13px; color: var(--gm-muted); }
.gm-search-results li + li { border-top: 1px solid var(--gm-border); }
.gm-search-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; }
.gm-search-text { min-width: 0; }
.gm-search-name { display: block; font-family: var(--gm-font-item); font-weight: var(--gm-item-weight); font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.gm-search-category { display: block; margin-top: 1px; font-family: var(--gm-font-ui); font-size: 12.5px; color: var(--gm-muted); }
@media (hover: hover) { .gm-search-row:hover .gm-search-name { text-decoration: underline; text-underline-offset: 3px; } }

/* --- Notice pages (not found, no menu right now) ------------------------------------------------- */
.gm-notice-page { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.gm-notice { width: 100%; max-width: 420px; text-align: center; }
.gm-notice-icon {
    display: flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 999px;
    background: var(--gm-accent-soft); color: var(--gm-accent);
}
.gm-notice-icon .gm-icon { width: 28px; height: 28px; }
.gm-notice-title { font-family: var(--gm-font-heading); font-weight: var(--gm-heading-weight); font-size: 24px; line-height: 1.25; }
.gm-notice-text { margin-top: 10px; color: var(--gm-muted); line-height: 1.55; }
.gm-button {
    display: inline-flex; align-items: center; justify-content: center;
    height: 44px; margin-top: 24px; padding: 0 22px; border-radius: 999px;
    background: var(--gm-accent); color: var(--gm-on-accent);
    font-family: var(--gm-font-ui); font-size: 15px; font-weight: 600;
}

/* --- AP3: restaurant, item detail --- */
/* Restaurant profile (GuestHero, GuestRestaurantSection/-Info), category subtitles, label chips, item detail
   (variants, extras, share). Colors only from the theme variables. */

/* Hero with a restaurant profile: cover (cropped), logo overlapping its lower edge, restaurant name above the h1 */
.gm-hero { --gm-logo-size: 72px; }
@media (min-width: 640px) { .gm-hero { --gm-logo-size: 96px; } }
.gm-hero-cover-frame {
    position: relative; overflow: hidden;
    width: 100%; aspect-ratio: 2 / 1; max-height: 340px;
    border-radius: var(--gm-radius);
    background: var(--gm-media-bg);
}
.gm-hero-cover-frame img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 640px) { .gm-hero-cover-frame { aspect-ratio: 3 / 1; } }
.gm-hero--cover .gm-hero-text { padding-top: 14px; }
.gm-hero-brand {
    display: flex; align-items: flex-end; gap: 14px;
    min-width: 0; margin-bottom: 10px;
}
.gm-hero--cover.gm-hero--logo .gm-hero-brand {
    margin-top: calc(-14px - var(--gm-logo-size) / 2);   /* half of the logo over the cover */
    padding-left: 12px;
    position: relative;
}
.gm-hero-logo {
    flex: none;
    width: var(--gm-logo-size); height: var(--gm-logo-size);
    border-radius: max(6px, calc(var(--gm-radius) * 1.25));
    object-fit: cover;
    background: var(--gm-surface);
    box-shadow: 0 0 0 3px var(--gm-bg), var(--gm-shadow-btn);
}
.gm-hero-restaurant {
    min-width: 0; padding-bottom: 2px;
    font-family: var(--gm-font-ui); font-size: 13px; font-weight: 700; line-height: 1.3;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--gm-accent);
    overflow-wrap: anywhere;
}
.gm-hero--logo .gm-hero-restaurant { padding-bottom: 6px; }
@media (min-width: 640px) {
    .gm-hero--cover .gm-hero-text { padding-top: 18px; }
    .gm-hero--cover.gm-hero--logo .gm-hero-brand { margin-top: calc(-18px - var(--gm-logo-size) / 2); padding-left: 20px; }
    .gm-hero-restaurant { font-size: 14px; }
}

/* Top bar: logo + menu name once the hero scrolled away (fades in like the plain title) */
.gm-topbar-brand {
    display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
    vertical-align: middle;
    transition: opacity .2s ease;
}
.gm-topbar-logo {
    flex: none; width: 28px; height: 28px;
    border-radius: max(4px, calc(var(--gm-radius) * 0.5));
    object-fit: cover; background: var(--gm-surface);
}
.gm-topbar-brand .gm-topbar-title { min-width: 0; }
html[data-guest-ready] .gm:not([data-hero-hidden]) .gm-topbar-brand { opacity: 0; }

/* Category subtitle: muted, at most two lines */
.gm-section-subtitle {
    max-width: 62ch;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}

/* Label chips: highlights (beliebt, neu) in the accent color, dietary ones neutral; "+n" on compact cards */
.gm .gm-label.gm-label--highlight {
    background: var(--gm-accent-soft); color: var(--gm-accent);
    box-shadow: inset 0 0 0 1px var(--gm-accent-border);
}
.gm-label--highlight .gm-label-icon { color: currentColor; }
.gm-label--alcohol-free .gm-label-icon { color: var(--gm-muted); }
.gm .gm-label.gm-label--more {
    padding: 0 7px;
    background: transparent; color: var(--gm-muted);
    box-shadow: inset 0 0 0 1px var(--gm-border);
}

/* Item detail: variants instead of the single price, price row with the share button, extras */
.gm-variants {
    border: 1px solid var(--gm-border);
    border-radius: max(6px, calc(var(--gm-radius) - 4px));
    overflow: hidden;
}
.gm-variant {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    padding: 11px 14px;
    font-family: var(--gm-font-ui); font-size: 15px;
}
.gm-variant + .gm-variant { border-top: 1px solid var(--gm-border); }
.gm-variant-name { min-width: 0; overflow-wrap: anywhere; }
.gm-variant .gm-price { font-size: 16px; font-weight: 700; }

.gm-detail-price-start { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.gm-share-button {
    display: inline-flex; align-items: center; gap: 8px; flex: none;
    height: 40px; margin-left: auto; padding: 0 16px;
    border: 1px solid var(--gm-border); border-radius: var(--gm-chip-radius);
    background: var(--gm-surface); color: var(--gm-text);
    font-family: var(--gm-font-ui); font-size: 14px; font-weight: 600; line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease, transform .1s ease;
}
.gm-share-button .gm-icon { width: 18px; height: 18px; }
@media (hover: hover) { .gm-share-button:hover { background: var(--gm-surface-2); } }
.gm-share-button:active { transform: scale(.97); }
.gm-share-status { min-height: 0; font-family: var(--gm-font-ui); font-size: 13px; font-weight: 600; color: var(--gm-accent); }
.gm-share-status:empty { display: none; }
.gm-share-fallback { display: grid; gap: 6px; }
.gm-share-fallback[hidden] { display: none; }
.gm-share-fallback-label { font-family: var(--gm-font-ui); font-size: 13px; color: var(--gm-muted); }
.gm-share-fallback-input {
    display: block; width: 100%; padding: 10px 12px;
    border: 1px solid var(--gm-border); border-radius: 10px;
    background: var(--gm-surface-2); color: var(--gm-text);
    font-family: var(--gm-font-ui); font-size: 16px; line-height: 1.4;   /* 16 px: iOS does not zoom into the field */
    word-break: break-all; resize: none;
}

.gm-extra { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 8px 0; line-height: 1.35; }
.gm-extra + .gm-extra { border-top: 1px solid var(--gm-border); }
.gm-extra-name { min-width: 0; overflow-wrap: anywhere; }
.gm-extra-price { font-size: 14px; font-weight: 600; color: var(--gm-muted); }

/* Restaurant info: footer band (#gm-info) and info sheet */
.gm-info-footer {
    padding: 36px 0 44px;
    border-top: 1px solid var(--gm-border);
    background: var(--gm-card-bg);
    scroll-margin-top: var(--gm-sticky-offset);   /* #gm-info without JS: below the sticky bars */
}
.gm-info { display: grid; gap: 22px; }
.gm-info-about, .gm-info-contact { display: grid; gap: 16px; align-content: start; min-width: 0; }
@media (min-width: 768px) {
    .gm-info-footer { padding: 48px 0 56px; }
    .gm-info-footer .gm-info { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 56px; }
}
.gm-info-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.gm-info-logo {
    flex: none; width: 56px; height: 56px;
    border-radius: max(6px, calc(var(--gm-radius) * 1.25));
    object-fit: cover; background: var(--gm-surface);
    box-shadow: var(--gm-shadow-btn);
}
.gm-info-name {
    min-width: 0;
    font-family: var(--gm-font-heading); font-weight: var(--gm-heading-weight);
    font-size: 22px; line-height: var(--gm-heading-line, 1.2);
    overflow-wrap: anywhere;
}
.gm-info-desc { color: var(--gm-muted); line-height: 1.5; }
.gm-info-hours { white-space: pre-line; line-height: 1.6; }
.gm-info-block .gm-detail-section-title { margin-bottom: 6px; }

.gm-info-links { display: grid; }
.gm-info-links li + li { border-top: 1px solid var(--gm-border); }
.gm-info-link {
    display: flex; align-items: center; gap: 12px;
    min-height: 56px; padding: 8px 2px;
}
.gm-info-link-icon {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--gm-iconbtn-radius, 999px);
    background: var(--gm-surface-2); color: var(--gm-text);
}
.gm-info-link-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gm-info-link-main { overflow-wrap: anywhere; line-height: 1.35; }
.gm-info-link-main--lines { white-space: pre-line; }
.gm-info-link-hint { font-family: var(--gm-font-ui); font-size: 12.5px; color: var(--gm-muted); overflow-wrap: anywhere; }
.gm-info-link-end { width: 18px; height: 18px; color: var(--gm-muted); }
@media (hover: hover) { .gm-info-link:hover .gm-info-link-main { text-decoration: underline; text-underline-offset: 3px; } }
.gm-info-review { gap: 8px; margin-top: 4px; justify-self: start; }
.gm-info-review .gm-icon { width: 18px; height: 18px; }

/* Info sheet: the same content, a bit tighter */
.gm-sheet--info .gm-info { gap: 18px; padding-top: 2px; }
.gm-sheet--info .gm-info-name { font-size: 20px; }

@media (prefers-reduced-motion: reduce) {
    .gm-topbar-brand, .gm-share-button { transition: none; }
}

/* --- AP4: search, filter, favourites ---------------------------------------------------------------------- */
/* js/guest-search-filter.js, js/guest-favorites.js; Components/Guest: GuestSearchSheet, GuestFilterSheet,
   GuestFilterNotice, GuestFilterButton, GuestFavoriteButton, GuestFavoritesSheet. */

/* Hidden by the filter (the hidden attribute must win over the display of these classes) */
.gm-card[hidden], .gm-row[hidden], .gm-section[hidden], .gm-chip[hidden] { display: none; }
/* Two-column drink lists: the first two *visible* rows carry the top border */
@media (min-width: 900px) {
    .gm-list:has(> .gm-row[hidden]) .gm-row { border-top: 0; }
    .gm-list:has(> .gm-row[hidden]) .gm-row:nth-child(-n + 2 of :not([hidden])) { border-top: 1px solid var(--gm-border); }
}

/* Buttons */
button.gm-button { border: 0; cursor: pointer; }
.gm-button--quiet { background: var(--gm-surface-2); color: var(--gm-text); }
.gm-button--danger { background: var(--gm-label-red); color: var(--gm-on-accent); }
.gm-textbtn {
    display: inline-flex; align-items: center; gap: 6px; flex: none;
    min-height: 40px; padding: 0 10px; border: 0; border-radius: 999px;
    background: transparent; color: var(--gm-accent);
    font-family: var(--gm-font-ui); font-size: 14px; font-weight: 700; line-height: 1.2;
    cursor: pointer;
}
.gm-textbtn .gm-icon { width: 18px; height: 18px; }
.gm-textbtn--danger { color: var(--gm-label-red); }
@media (hover: hover) { .gm-textbtn:hover { text-decoration: underline; text-underline-offset: 3px; } }
.gm-iconbtn--plain { background: transparent; color: var(--gm-muted); }

/* Sheet footer (GuestSheet Footer slot): pinned below the scrolling body */
.gm-sheet-foot {
    flex: none;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--gm-border);
    background: var(--gm-surface);
}
.gm-sheet-foot .gm-button { margin-top: 0; border-radius: var(--gm-chip-radius); }
.gm-sheet-foot:has(> [hidden]:only-child) { display: none; }
@media (min-width: 768px) { .gm-sheet-foot { padding: 14px 20px 16px; } }

/* Top bar: filter button with the number of active filters */
.gm-filter-button { position: relative; }
.gm-badge {
    position: absolute; top: -3px; right: -3px;
    min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
    background: var(--gm-accent); color: var(--gm-on-accent);
    box-shadow: 0 0 0 2px var(--gm-bg);
    font-family: var(--gm-font-ui); font-size: 11px; font-weight: 700; line-height: 19px; text-align: center;
}
.gm-badge[hidden] { display: none; }

/* Filter sheet */
.gm-filter { padding-top: 2px; }
.gm-filter-group { min-width: 0; margin: 0 0 22px; padding: 0; border: 0; }
.gm-filter-group:last-child { margin-bottom: 4px; }
.gm-filter-title {
    float: none; width: 100%; margin: 0 0 10px; padding: 0;
    font-family: var(--gm-font-ui); font-size: 12px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--gm-muted);
}
.gm-filter-hint { margin: -4px 0 6px; color: var(--gm-muted); font-size: 0.92em; line-height: 1.4; }
.gm-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gm-filter-chip { gap: 6px; border: 0; cursor: pointer; }
.gm-filter-chip[aria-pressed="true"] { background: var(--gm-chip-active-bg); color: var(--gm-chip-active-fg); }
.gm-filter-chip-icon { width: 16px; height: 16px; }
.gm-filter-allergen-list { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 24px; }
@media (min-width: 768px) { .gm-filter-allergen-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gm-check {
    display: flex; align-items: center; gap: 12px;
    min-height: 46px; padding: 4px 2px;
    border-bottom: 1px solid var(--gm-border);
    cursor: pointer; line-height: 1.3;
}
.gm-check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--gm-accent); cursor: pointer; }
.gm-check-code { flex: none; width: 1.7em; font-family: var(--gm-font-ui); font-weight: 700; }
.gm-check-name { min-width: 0; overflow-wrap: anywhere; }
.gm-filter-footer { display: flex; gap: 10px; }
.gm-filter-footer [data-filter-apply] { flex: 1; min-width: 0; }

/* Notice at the top of the filtered menu + empty state */
.gm-filter-notice {
    display: flex; align-items: center; justify-content: space-between; gap: 8px 12px;
    margin-top: 16px; padding: 6px 6px 6px 14px;
    border: 1px solid var(--gm-accent-border); border-radius: min(var(--gm-radius), 14px);
    background: var(--gm-accent-soft);
    font-family: var(--gm-font-ui); font-size: 14px; font-weight: 600;
}
.gm-filter-notice[hidden], .gm-filter-empty[hidden] { display: none; }
.gm-filter-notice-text { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.gm-filter-notice-text .gm-icon { width: 18px; height: 18px; color: var(--gm-accent); }
.gm-filter-empty { padding: 48px 8px 24px; text-align: center; }
.gm-filter-empty-title { font-family: var(--gm-font-heading); font-weight: var(--gm-heading-weight); font-size: 21px; line-height: 1.3; }
.gm-filter-empty-hint { margin-top: 8px; color: var(--gm-muted); }
.gm-filter-empty .gm-button { border-radius: var(--gm-chip-radius); }

/* Search: thumbnails, highlighted words, description, note when a filter is active, empty state */
.gm-search-thumb {
    flex: none; width: 48px; height: 48px; overflow: hidden;
    border-radius: max(3px, calc(var(--gm-radius) - 6px));
    background: var(--gm-media-bg);
}
.gm-search-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gm-search-text { flex: 1; }
.gm-search-desc {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
    margin-top: 2px; color: var(--gm-muted); font-size: 13.5px; line-height: 1.4;
}
.gm-mark {
    padding: 0 1px; margin: 0 -1px; border-radius: 3px;
    background: color-mix(in srgb, var(--gm-accent) 24%, transparent); color: inherit;
}
.gm-search-filter-note {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
    margin: 0 0 8px; padding: 4px 4px 4px 12px; border-radius: 12px;
    background: var(--gm-accent-soft);
    font-family: var(--gm-font-ui); font-size: 13px; font-weight: 600;
}
.gm-search-filter-note[hidden], .gm-search-empty[hidden] { display: none; }
.gm-search-filter-note > .gm-icon { width: 16px; height: 16px; color: var(--gm-accent); }
.gm-search-filter-note .gm-textbtn { margin-left: auto; font-size: 13px; }
.gm-search-empty { padding: 36px 12px 12px; text-align: center; color: var(--gm-muted); }
.gm-search-empty > .gm-icon { width: 32px; height: 32px; margin: 0 auto 12px; display: block; }
.gm-search-empty-title { color: var(--gm-text); font-family: var(--gm-font-ui); font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.gm-search-empty-hint { margin-top: 6px; font-size: 14px; }

/* Heart buttons: over the photo of a card, at the end of a list row, next to the close button of the item sheet */
.gm-fav {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--gm-iconbtn-radius, 999px);
    background: var(--gm-surface);
    background: color-mix(in srgb, var(--gm-surface) 90%, transparent);
    color: var(--gm-text); box-shadow: var(--gm-shadow-btn);
    cursor: pointer;
    transition: transform .12s ease, color .15s ease;
}
.gm-fav .gm-icon { width: 20px; height: 20px; transition: fill .15s ease; }
.gm-fav[aria-pressed="true"] { color: var(--gm-accent); }
.gm-fav[aria-pressed="true"] .gm-icon { fill: currentColor; }
.gm-fav:active { transform: scale(.9); }
.gm-card-corner { top: 6px; right: 6px; }
.gm-card--text .gm-card-title { padding-right: 34px; }
.gm-row-corner { align-items: flex-start; padding: 5px 0 0 2px; margin-right: -9px; }
.gm-row-corner .gm-fav { background: transparent; box-shadow: none; color: var(--gm-muted); }
.gm-row-corner .gm-fav[aria-pressed="true"] { color: var(--gm-accent); }
.gm-sheet-fav { position: absolute; top: 22px; right: 62px; z-index: 2; }
.gm-sheet--item .gm-detail--noimage .gm-detail-category,
.gm-sheet--item .gm-detail--noimage .gm-detail-title { padding-right: 104px; }
.gm-sheet--item .gm-detail--noimage .gm-detail-category + .gm-detail-title { padding-right: 0; }
@media (min-width: 768px) { .gm-sheet-fav { top: 14px; } }
@media (min-width: 900px) {
    .gm-sheet--item .gm-detail:not(.gm-detail--noimage) .gm-detail-category { padding-right: 104px; }
}

/* Floating button of the favourites list; the menu gets room below its last card */
.gm-fav-fab {
    position: fixed; z-index: 40;
    right: max(var(--gm-gutter), env(safe-area-inset-right, 0px));
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    display: inline-flex; align-items: center; gap: 8px;
    height: 52px; padding: 0 12px 0 16px; border: 0; border-radius: 999px;
    background: var(--gm-chip-active-bg); color: var(--gm-chip-active-fg);
    box-shadow: 0 6px 22px color-mix(in srgb, var(--gm-backdrop) 85%, transparent);
    font-family: var(--gm-font-ui); font-size: 15px; font-weight: 700;
    cursor: pointer;
    animation: gm-fade-in .2s ease-out;
}
.gm-fav-fab[hidden] { display: none; }
.gm-fav-fab .gm-icon { fill: currentColor; }
.gm-fav-fab-count {
    min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px;
    background: color-mix(in srgb, var(--gm-chip-active-fg) 22%, transparent);
    font-size: 13px; line-height: 26px; text-align: center; font-variant-numeric: tabular-nums;
}
.gm[data-fav-active] .gm-main { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }

/* Favourites sheet */
.gm-favlist-empty { padding: 28px 8px; text-align: center; color: var(--gm-muted); }
.gm-favlist-empty[hidden] { display: none; }
.gm-favrow { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--gm-border); }
.gm-favrow[hidden] { display: none; }
.gm-favrow-thumb {
    flex: none; width: 48px; height: 48px; overflow: hidden;
    border-radius: max(3px, calc(var(--gm-radius) - 6px));
    background: var(--gm-media-bg);
}
.gm-favrow-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gm-favrow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.gm-favrow-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.gm-favrow-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gm-favrow-name {
    font-family: var(--gm-font-item); font-weight: var(--gm-item-weight); text-transform: var(--gm-item-transform);
    font-size: 16px; line-height: 1.3; overflow-wrap: anywhere;
}
@media (hover: hover) { .gm-favrow-name:hover { text-decoration: underline; text-underline-offset: 3px; } }
.gm-favrow-category { font-family: var(--gm-font-ui); font-size: 12.5px; color: var(--gm-muted); }
.gm-favrow-prices { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; padding-top: 1px; }
.gm-favrow-unit { font-family: var(--gm-font-ui); font-size: 12.5px; color: var(--gm-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gm-favrow-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gm-favrow-remove { margin-left: auto; margin-right: -8px; }
.gm-select-wrap { position: relative; flex: 1 1 130px; min-width: 0; max-width: 260px; }
.gm-select {
    width: 100%; height: 40px; padding: 0 34px 0 12px;
    border: 1px solid var(--gm-border); border-radius: min(var(--gm-radius), 12px);
    background: var(--gm-surface-2); color: var(--gm-text);
    font-family: var(--gm-font-ui); font-size: 14px; font-weight: 500;
    -webkit-appearance: none; appearance: none; cursor: pointer;
    text-overflow: ellipsis;
}
.gm-select:focus-visible { outline: 2px solid var(--gm-focus); outline-offset: 1px; }
.gm-select-wrap > .gm-icon {
    position: absolute; right: 10px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
    color: var(--gm-muted); pointer-events: none;
}
.gm-stepper { display: inline-flex; align-items: center; flex: none; border-radius: 999px; background: var(--gm-surface-2); }
.gm-stepper-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; padding: 0; border: 0; border-radius: 999px;
    background: transparent; color: var(--gm-text); cursor: pointer;
}
.gm-stepper-btn .gm-icon { width: 18px; height: 18px; }
.gm-stepper-btn[aria-disabled="true"] { opacity: .35; cursor: default; }
.gm-stepper-value { min-width: 22px; text-align: center; font-family: var(--gm-font-ui); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gm-favlist-sum {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    font-family: var(--gm-font-ui); font-size: 16px; font-weight: 700;
}
.gm-favlist-note { margin-top: 4px; color: var(--gm-muted); font-size: 13px; line-height: 1.45; }
.gm-favlist-actions { display: flex; margin: 6px 0 -6px -10px; }
.gm-favlist-actions[hidden], .gm-favlist-confirm[hidden] { display: none; }
.gm-favlist-confirm { margin-top: 10px; padding: 12px; border-radius: min(var(--gm-radius), 12px); background: var(--gm-surface-2); }
.gm-favlist-confirm-text { font-family: var(--gm-font-ui); font-size: 14px; font-weight: 600; }
.gm-favlist-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.gm-favlist-confirm .gm-button { height: 40px; padding: 0 18px; font-size: 14px; }
.gm-sheet--favorites .gm-favlist-confirm .gm-button--quiet { background: var(--gm-surface); }

@media (prefers-reduced-motion: reduce) {
    .gm-fav, .gm-fav .gm-icon { transition: none; }
    .gm-fav-fab { animation: none; }
}

/* --- AP5: language versions, live draft in the editor's preview --------------------------------------------------- */
/* Components/Guest: GuestLanguageButton, GuestLanguageSection, GuestLanguageList; js/guest-preview.js */

/* Owner preview: hero parts the editor's draft can show or hide (the class display would win over [hidden]) */
.gm-hero-brand[hidden] { display: none; }

/* Language button in the top bar: globe + language code, a pill as tall as the icon buttons */
.gm-langbtn { width: auto; min-width: 40px; gap: 5px; padding: 0 12px 0 10px; }
.gm-langbtn .gm-icon { width: 18px; height: 18px; }
.gm-langbtn-code {
    font-family: var(--gm-font-ui); font-size: 13px; font-weight: 700; line-height: 1;
    letter-spacing: 0.04em;
}

/* Language list: in the language sheet and in the band at the end of the page (#gm-languages, works without JS) */
.gm-langlist { display: grid; }
.gm-langlist li + li { border-top: 1px solid var(--gm-border); }
.gm-langlist-link { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 2px; }
.gm-langlist-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gm-langlist-name {
    font-family: var(--gm-font-ui); font-size: 16px; font-weight: 600; line-height: 1.3;
    overflow-wrap: anywhere;
}
.gm-langlist-hint { font-family: var(--gm-font-ui); font-size: 12.5px; color: var(--gm-muted); }
.gm-langlist-link.is-current .gm-langlist-name { color: var(--gm-accent); font-weight: 700; }
.gm-langlist-check { width: 20px; height: 20px; color: var(--gm-accent); }
@media (hover: hover) {
    .gm-langlist-link:not(.is-current):hover .gm-langlist-name { text-decoration: underline; text-underline-offset: 3px; }
}

.gm-lang-footer {
    padding: 24px 0 32px;
    border-top: 1px solid var(--gm-border);
    background: var(--gm-card-bg);
    scroll-margin-top: var(--gm-sticky-offset);   /* #gm-languages without JS: below the sticky bars */
}
.gm-lang-footer-title {
    display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
    font-family: var(--gm-font-ui); font-size: 13px; font-weight: 700; line-height: 1.3;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--gm-muted);
}
.gm-lang-footer-title .gm-icon { width: 18px; height: 18px; }
/* The floating favourites button must not cover the last row */
.gm[data-fav-active] .gm-lang-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 640px) {
    .gm-lang-footer .gm-langlist { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); column-gap: 32px; }
    .gm-lang-footer .gm-langlist li { border-top: 1px solid var(--gm-border); }
}

/* --- AP16b: imprint and privacy policy, the last line of every guest page (GuestLegalLinks) ----------------------------
   Quiet: small muted text on the page background, the theme's own variables (dark: #a8a8a8 on #121212 8.9:1; the
   lightest muted of the light themes, fancy #8a5a6e on #fffdfc, 5.9:1); a dot between the links is drawn, not text. */
.gm-legal { padding: 12px 0 20px; background: var(--gm-bg); }
.gm-legal-list {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    font-family: var(--gm-font-ui); font-size: 13px; line-height: 1.3;
}
.gm-legal-list li { display: flex; align-items: center; }
.gm-legal-list li + li::before {
    content: ""; width: 3px; height: 3px; margin: 0 10px; border-radius: 999px;
    background: var(--gm-muted); opacity: .7;
}
.gm-legal a {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 4px;   /* a touch target */
    color: var(--gm-muted);
    text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--gm-muted) 45%, transparent);
    text-underline-offset: 3px;
}
@media (hover: hover) { .gm-legal a:hover { color: var(--gm-text); text-decoration-color: currentColor; } }
/* The floating favourites button must not cover the links: the extra space moves from the language list to this line */
.gm[data-fav-active] .gm-legal { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.gm[data-fav-active] .gm-lang-footer:has(~ .gm-legal) { padding-bottom: 32px; }
/* Notice pages: the notice in the middle, the line at the bottom */
.gm-notice-page { flex-direction: column; }
.gm-notice-page .gm-notice { margin-block: auto; }
.gm-notice-page .gm-legal { width: 100%; margin-top: 32px; padding-bottom: 0; background: none; }

/* --- AP6: focus rings only for keyboard use ------------------------------------------------------------------------ */
/* guest-menu.js marks an element that got the focus after a tap or click — or by script before any key press (a
   sheet's first control, the active chip in the categories sheet, the opener after a close) — with data-gm-quiet; the
   first key press removes the mark, so keyboard users see the ring again. */
.gm [data-gm-quiet]:focus-visible { outline: none; }
