/* =========================================================
   CAFE 501 — Stylesheet
   Aufbau: 1 Schriften · 2 Grundwerte · 3 Basis · 4 Layout
           5 Kopf & Navigation · 6 Startbild · 7 Inhalte
           8 Speisekarte · 9 Dialoge · 10 Fuss · 11 Grossbild
   Reihenfolge: zuerst Handy, danach die Erweiterungen für
   grössere Bildschirme (min-width).
   ========================================================= */

/* ---------- 1 SCHRIFTEN ---------- */
@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/fraunces-latin-600-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/instrument-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/instrument-sans-latin-500-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Instrument Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/instrument-sans-latin-600-normal.woff2') format('woff2');
}

/* ---------- 2 GRUNDWERTE ---------- */
:root {
    /* Markenfarben */
    --red: #8c1f2e;
    --red-bright: #b32a3c;
    --red-glow: rgba(140, 31, 46, 0.32);

    /* Helles Erscheinungsbild: warmes Papier statt reinem Weiss */
    --bg: #f7f4f1;
    --bg-raised: #ffffff;
    --bg-sunken: #efeae5;
    --ink: #17130f;
    --ink-soft: #56504a;
    --ink-faint: #8b8279;
    --line: rgba(23, 19, 15, 0.12);
    --line-strong: rgba(23, 19, 15, 0.22);
    --accent: var(--red);
    --accent-ink: #ffffff;
    --shadow-soft: 0 1px 2px rgba(23, 19, 15, .05), 0 8px 24px -12px rgba(23, 19, 15, .18);
    --shadow-lift: 0 2px 4px rgba(23, 19, 15, .06), 0 18px 40px -20px rgba(23, 19, 15, .3);

    /* Schrift */
    --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
    --font-text: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Typografische Stufen */
    --t-display: clamp(2.6rem, 11vw, 4.6rem);
    --t-h2: clamp(1.75rem, 6.2vw, 2.6rem);
    --t-h3: clamp(1.12rem, 3.6vw, 1.35rem);
    --t-body: clamp(0.975rem, 2.9vw, 1.06rem);
    --t-small: 0.875rem;
    --t-label: 0.688rem;

    /* Raster */
    --pad-x: 1.375rem;
    --gap: 1rem;
    --section-y: clamp(3.5rem, 11vw, 6.5rem);
    --radius: 4px;
    --radius-lg: 6px;
    --max: 1180px;

    --ease: cubic-bezier(.22, .61, .36, 1);

    color-scheme: light;
}

body.dark-mode {
    /* Dunkles Erscheinungsbild: Nacht-Anthrazit, kein reines Schwarz */
    --bg: #121011;
    --bg-raised: #1a1718;
    --bg-sunken: #0d0b0c;
    --ink: #f4f0ec;
    --ink-soft: #a9a19b;
    --ink-faint: #6f6763;
    --line: rgba(244, 240, 236, 0.13);
    --line-strong: rgba(244, 240, 236, 0.26);
    --accent: #bf3143;
    --accent-ink: #ffffff;
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -14px rgba(0, 0, 0, .7);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, .5), 0 24px 50px -24px rgba(0, 0, 0, .85);

    color-scheme: dark;
}

/* ---------- 3 BASIS ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-text);
    font-size: var(--t-body);
    line-height: 1.65;
    font-feature-settings: "kern" 1, "liga" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color .5s var(--ease), color .5s var(--ease);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.015em;
    margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

.hidden { display: none !important; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 4 LAYOUT ---------- */
.container {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: var(--pad-x);
}

section.container { padding-block: var(--section-y); }

/* Abschnitts-Kopf: kleines Label, Linie, Überschrift */
.section-head { margin-bottom: clamp(1.75rem, 5vw, 2.75rem); }

.section-label {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: var(--t-label);
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .875rem;
}

.section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.section-head h2 { font-size: var(--t-h2); }

.section-head .lead {
    margin-top: .875rem;
    max-width: 46ch;
    color: var(--ink-soft);
}

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- 5 KOPF & NAVIGATION ---------- */
.main-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem var(--pad-x);
    background: transparent;
    transition: background-color .35s var(--ease), border-color .35s var(--ease), padding .35s var(--ease);
    border-bottom: 1px solid transparent;
}

.main-header.scrolled {
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    border-bottom-color: var(--line);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    backdrop-filter: saturate(140%) blur(10px);
}

.header-logo {
    height: 40px;
    width: auto;
    transition: height .35s var(--ease);
}

.main-header.scrolled .header-logo { height: 32px; }

.logo-container { display: flex; align-items: center; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: color-mix(in srgb, var(--bg-raised) 72%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}

.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 19px; height: 19px; }

/* Über dem Startbild sind die Bedienelemente hell */
.main-header:not(.scrolled) .icon-btn {
    color: #fff;
    border-color: rgba(255, 255, 255, .3);
    background: rgba(0, 0, 0, .22);
}

.header-actions { display: flex; align-items: center; gap: .625rem; }

.theme-toggle .icon-moon { display: none; }
body.dark-mode .theme-toggle .icon-sun { display: none; }
body.dark-mode .theme-toggle .icon-moon { display: inline-flex; }

.burger-icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    align-items: center;
}

.burger-icon .bar {
    display: block;
    width: 17px;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
}

/* Seitliche Navigation */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 9, .5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s var(--ease);
    z-index: 950;
}
.menu-overlay.active { opacity: 1; pointer-events: auto; }

.fullscreen-menu {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(88vw, 380px);
    background: var(--bg-raised);
    border-left: 1px solid var(--line);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .45s var(--ease);
    padding: 1rem var(--pad-x) calc(1.5rem + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.fullscreen-menu.active { transform: translateX(0); }

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: .5rem 2rem;
}

.menu-logo { height: 42px; width: auto; }

.close-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 50%;
    font-size: 1rem;
    color: var(--ink-soft);
    cursor: pointer;
}

.menu-content { flex: 1; }

.nav-links { list-style: none; margin: 0; padding: 0; }
.nav-links li { border-bottom: 1px solid var(--line); }
.nav-links li:first-child { border-top: 1px solid var(--line); }

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.05rem .25rem;
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--ink);
    transition: color .2s var(--ease), padding-left .25s var(--ease);
}

.nav-link svg { width: 18px; height: 18px; color: var(--ink-faint); transition: color .2s var(--ease); }
.nav-link:hover, .nav-link.active { color: var(--accent); padding-left: .625rem; }
.nav-link:hover svg, .nav-link.active svg { color: var(--accent); }

.menu-footer {
    display: flex;
    gap: 1.5rem;
    padding-top: 1.5rem;
    font-size: var(--t-small);
    color: var(--ink-faint);
}
.menu-footer a:hover { color: var(--accent); }

/* Laufband für Ankündigungen */
.announcement-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 920;
    background: var(--red);
    color: #fff;
    height: 34px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.marquee-container { width: 100%; overflow: hidden; }

.marquee-content {
    display: flex;
    width: max-content;
    animation: marquee 40s linear infinite;
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: .625rem;
    padding-right: 1.25rem;
    font-size: .75rem;
    letter-spacing: .02em;
    white-space: nowrap;
}

.announcement-tag {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .16em;
    font-size: .625rem;
    padding: .1rem .45rem;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 2px;
}

.marquee-spacer { opacity: .5; padding-left: .625rem; }

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Läuft das Band, rutscht der Kopf darunter */
body.has-announcement .main-header { top: 34px; }

/* Fortschrittsbalken */
.scroll-progress-container {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 2px;
    z-index: 999;
    pointer-events: none;
}

.scroll-progress-bar { height: 100%; width: 0; background: var(--accent); }

/* ---------- 6 STARTBILD ---------- */
.hero-section {
    position: relative;
    min-height: 45svh;
    display: flex;
    align-items: flex-end;
    padding: 6rem var(--pad-x) calc(7rem + env(safe-area-inset-bottom));
    background-image:
        linear-gradient(180deg, rgba(12, 10, 11, .62) 0%, rgba(12, 10, 11, .34) 30%, rgba(12, 10, 11, .82) 62%, rgba(12, 10, 11, .96) 100%),
        url('bilder/hero_1778797791.webp');
    background-size: cover;
    background-position: center center;
    color: #fff;
    isolation: isolate;
}

/* Feines Korn — nimmt dem Foto das Digitale, kostet keine Extra-Datei */
.hero-section::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: .5;
    pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 3px 3px;
    mix-blend-mode: overlay;
}

/* Weicher Übergang in die Seitenfarbe – nur im Dunkelmodus, sonst würde ein
   heller Streifen unter dem weissen Text liegen. */
body.dark-mode .hero-section::before {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 120px;
    z-index: 2;
    background: linear-gradient(180deg, transparent, var(--bg));
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
}

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: .625rem;
    font-size: var(--t-label);
    font-weight: 600;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .82);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    row-gap: .25rem;
}

.hero-eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--red-bright);
}

.hero-content h1 {
    font-size: var(--t-display);
    letter-spacing: -0.03em;
    text-wrap: balance;
    margin-bottom: 1rem;
    text-shadow: 0 2px 40px rgba(0, 0, 0, .35);
}

.hero-content .subtitle {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, .8);
    max-width: 34ch;
    margin-bottom: 2rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem 1.25rem;
    margin-top: 2.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .18);
    font-size: var(--t-small);
    color: rgba(255, 255, 255, .72);
}

.hero-meta .meta-item { display: inline-flex; align-items: center; gap: .5rem; }
.hero-meta svg { width: 15px; height: 15px; opacity: .7; }

/* ---------- 7 INHALTE ---------- */
.btn,
.call-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    padding: .9375rem 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--accent-ink);
    font-size: .9375rem;
    font-weight: 500;
    letter-spacing: .01em;
    cursor: pointer;
    transition: transform .2s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease);
}

.btn:active, .call-btn:active { transform: translateY(1px); }
.btn:hover, .call-btn:hover { background: var(--red-bright); }
.btn svg, .call-btn svg { width: 17px; height: 17px; }

.btn-ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, .35);
    color: #fff;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }

.btn-outline {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--ink);
}
.btn-outline:hover { background: var(--bg-sunken); border-color: var(--ink-faint); }

.intro-section .intro-grid { display: grid; gap: 2rem; }

.intro-text p { color: var(--ink-soft); }
.intro-text p:first-child { color: var(--ink); font-size: 1.0625rem; }

.signature {
    margin-top: 1.5rem;
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--ink);
}

/* Hinweiskästen */
.note {
    border: 1px solid var(--line);
    border-left: 2px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--bg-raised);
    padding: 1.25rem 1.375rem;
}

.note h3 {
    font-family: var(--font-text);
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .625rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.note h3 svg { width: 15px; height: 15px; }
.note p { font-size: .9375rem; color: var(--ink-soft); }

.note-divider {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

/* Angebots-Kacheln */
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
}

.nav-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-sunken);
    isolation: isolate;
}

.nav-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform .7s var(--ease), filter .7s var(--ease);
    filter: saturate(.85) contrast(1.05);
}

.nav-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 10, 11, 0) 35%, rgba(12, 10, 11, .82) 100%);
    z-index: 1;
}

.nav-card h3 {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .875rem;
    font-size: 1rem;
    letter-spacing: -0.01em;
    color: #fff;
}

.tile-arrow {
    flex: none;
    width: 15px;
    height: 15px;
    opacity: .65;
    transition: transform .35s var(--ease);
}

.nav-card-logo img {
    object-fit: contain;
    padding: 16% 14%;
    background: var(--bg-sunken);
    filter: none;
}

.nav-card-logo::after { background: linear-gradient(180deg, rgba(12, 10, 11, 0) 55%, rgba(12, 10, 11, .75) 100%); }

.nav-card:hover img { transform: scale(1.05); filter: saturate(1) contrast(1); }
.nav-card:hover .tile-arrow { transform: translateX(3px); }

/* Öffnungszeiten & Kontakt */
.info-grid { display: grid; gap: 1rem; }

.info-box {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-raised);
    padding: 1.5rem 1.375rem;
}

.info-box h3 {
    font-family: var(--font-text);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 1.125rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.info-box h3 svg { width: 15px; height: 15px; }

/* Öffnungszeiten mit gleichbreiten Ziffern */
.hours { display: grid; gap: 0; margin: 0; }

.hours-row {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    padding: .5rem 0;
    border-bottom: 1px dotted var(--line);
    font-size: .9375rem;
}

.hours-row:last-child { border-bottom: 0; }
.hours-row dt { color: var(--ink-soft); min-width: 5.5rem; }

.hours-row dd {
    margin: 0;
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
}

.hours-row.is-closed dd { color: var(--ink-faint); }
.hours-row.is-today dt { color: var(--accent); font-weight: 500; }

/* Status-Anzeige */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .375rem .75rem .375rem .625rem;
    border: 1px solid var(--line);
    border-radius: 100px;
    background: var(--bg-sunken);
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .01em;
    margin-bottom: 1.25rem;
}

.status-badge .dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }

.green-dot { background: #34a853; box-shadow: 0 0 0 3px rgba(52, 168, 83, .18); }
.red-dot { background: #b0392c; box-shadow: 0 0 0 3px rgba(176, 57, 44, .16); }

.status-badge.open { border-color: rgba(52, 168, 83, .35); }

.hero-content .status-badge {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .22);
    color: #fff;
    margin-bottom: 0;
}

.contact-list { display: grid; gap: 1.125rem; }

.contact-row {
    display: flex;
    gap: .875rem;
    align-items: flex-start;
    font-size: .9375rem;
}

.contact-row svg { width: 16px; height: 16px; margin-top: .25rem; color: var(--ink-faint); flex: none; }
.contact-row .label { display: block; font-size: .75rem; color: var(--ink-faint); margin-bottom: .125rem; }
.contact-row a:hover { color: var(--accent); }

/* Billard / Sport / Poker */
.feature-block { display: grid; gap: 1rem; }

.highlight-box {
    position: relative;
    border-radius: var(--radius);
    background: linear-gradient(140deg, #24191b 0%, #17100f 100%);
    color: #fff;
    padding: 1.75rem 1.5rem;
    overflow: hidden;
}

body:not(.dark-mode) .highlight-box { background: linear-gradient(140deg, var(--red) 0%, #6d1622 100%); }

.highlight-box::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--red-glow), transparent 70%);
}

.highlight-box h3 { font-size: 1.375rem; margin-bottom: .5rem; color: #fff; position: relative; }
.highlight-box p { color: rgba(255, 255, 255, .82); font-size: .9375rem; position: relative; }

.price-tag { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .5rem; }

.price-tag .amount {
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 9vw, 3rem);
    line-height: 1;
    letter-spacing: -0.03em;
}

.price-tag .unit { color: var(--ink-faint); font-size: .875rem; }

.poker-logo { width: min(200px, 60%); margin: 0 0 1.5rem; }

/* Social Media */
.social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .875rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-raised);
    font-size: .875rem;
    font-weight: 500;
    transition: border-color .25s var(--ease), transform .25s var(--ease);
}

.social-btn svg { width: 18px; height: 18px; flex: none; }
.social-btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.insta-btn:hover { color: #c13584; }
.fb-btn:hover { color: #1877f2; }
.google-btn:hover { color: #4285f4; }

/* Einblenden beim Scrollen */
.fade-in-element {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.fade-in-element.is-visible { opacity: 1; transform: none; }

/* ---------- 8 SPEISEKARTE ---------- */
section[id] { scroll-margin-top: 76px; }

.speisekarte-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.speisekarte-header:has(.back-btn:not(.hidden)) { flex-wrap: wrap; }
.speisekarte-header:has(.back-btn:not(.hidden)) .menu-title-area { order: 3; flex-basis: 100%; }

.menu-title-area { flex: 1; min-width: 0; }
#menu-title { font-size: var(--t-h2); }

.back-btn,
.search-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    height: 40px;
    padding-inline: .875rem;
    border: 1px solid var(--line);
    border-radius: 100px;
    background: var(--bg-raised);
    font-size: .8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .25s var(--ease), color .25s var(--ease);
    flex: none;
}

.back-btn svg { width: 15px; height: 15px; }
.search-toggle-btn { width: 40px; padding: 0; }
.search-toggle-btn svg { width: 17px; height: 17px; }
.back-btn:hover, .search-toggle-btn:hover { border-color: var(--line-strong); }
.search-toggle-btn.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.search-container {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .4s var(--ease), opacity .3s var(--ease), margin .4s var(--ease);
}

.search-container.active-search { max-height: 90px; opacity: 1; margin-bottom: 1.25rem; }

.search-wrapper { position: relative; }

#menu-search-input {
    width: 100%;
    padding: .875rem 2.5rem .875rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-raised);
    color: var(--ink);
    font-family: inherit;
    font-size: 1rem;
}

#menu-search-input:focus { outline: none; border-color: var(--accent); }
#menu-search-input::placeholder { color: var(--ink-faint); }

/* Eigenes Löschsymbol – das eingebaute des Browsers würde doppelt erscheinen */
#menu-search-input::-webkit-search-cancel-button,
#menu-search-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }

.search-clear-btn {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-sunken);
    color: var(--ink-soft);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.search-clear-btn.active { display: flex; }

/* Kategorie-Reiter */
.category-tabs-container {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: .25rem;
    margin-bottom: 1.5rem;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 24px), transparent);
    padding-inline: 2px;
}

.category-tabs-container::-webkit-scrollbar { display: none; }

.tab-btn {
    flex: none;
    padding: .5rem 1rem;
    border: 1px solid var(--line);
    border-radius: 100px;
    background: transparent;
    color: var(--ink-soft);
    font-size: .8125rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: color .25s var(--ease), border-color .25s var(--ease), background-color .25s var(--ease);
}

.tab-btn:hover { color: var(--ink); border-color: var(--line-strong); }

.tab-btn.active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--bg);
}

/* Kacheln der Kategorien */
.menu-content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
    width: 100%;
}

.menu-tile {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-sunken);
    cursor: pointer;
    isolation: isolate;
}

.menu-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.85) contrast(1.05);
    transition: transform .7s var(--ease);
}

.menu-tile .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(12, 10, 11, 0) 40%, rgba(12, 10, 11, .85) 100%);
    z-index: 1;
}

.menu-tile h3 {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 2;
    padding: .8125rem;
    font-size: .9375rem;
    line-height: 1.2;
    color: #fff;
    text-wrap: balance;
}

.menu-tile:hover img { transform: scale(1.05); }

.no-image-tile {
    display: flex;
    align-items: flex-end;
    border: 1px solid var(--line);
    background:
        radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
        var(--bg-raised);
}

.no-image-tile h3 { position: static; color: var(--ink); padding: .875rem; }

.menu-tile-info {
    aspect-ratio: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    grid-column: 1 / -1;
    padding: .875rem 1rem;
    border: 1px dashed var(--line-strong);
    background: transparent;
}

.menu-tile-info h3 {
    position: static;
    color: var(--ink-soft);
    padding: 0;
    font-family: var(--font-text);
    font-size: .8125rem;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.menu-tile-info::after { content: "→"; color: var(--ink-faint); font-size: .875rem; }

.brand-logo { width: min(160px, 45%); margin: 0 auto 1.5rem; }

/* Produktliste — Aufbau wie eine gedruckte Karte */
.product-list { display: block; width: 100%; }

.product-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
}

.product-item:first-child { padding-top: 0; }
.product-item:last-child { border-bottom: 0; }

.product-line {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    width: 100%;
}

.product-name {
    font-family: var(--font-text);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.35;
    color: var(--ink);
}

/* Punktlinie zwischen Name und Preis */
.product-leader {
    flex: 1;
    min-width: 1.5rem;
    height: 1px;
    margin-bottom: .28em;
    background-image: radial-gradient(circle, var(--line-strong) .8px, transparent .8px);
    background-size: 5px 1px;
    background-repeat: repeat-x;
    background-position: bottom;
}

.product-price {
    font-size: .9375rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--ink);
}

.product-desc {
    margin: .3125rem 0 0;
    padding-right: 3.5rem;
    font-size: .875rem;
    line-height: 1.5;
    color: var(--ink-soft);
}

/* Mehrere Grössen */
.product-details { margin-top: .5rem; display: grid; gap: .25rem; }

.product-variant {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    font-size: .875rem;
    color: var(--ink-soft);
}

.product-variant::before {
    content: "";
    order: 2;
    flex: 1;
    height: 1px;
    margin-bottom: .28em;
    background-image: radial-gradient(circle, var(--line) .8px, transparent .8px);
    background-size: 5px 1px;
    background-repeat: repeat-x;
}

.variant-size { order: 1; color: var(--ink-faint); }

.variant-price {
    order: 3;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    white-space: nowrap;
}

/* Info-Punkt für Zutaten & Allergene */
.info-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: .6875rem;
    line-height: 1;
    color: var(--ink-faint);
    cursor: pointer;
    transition: border-color .2s var(--ease), color .2s var(--ease);
    align-self: center;
    background: transparent;
}

.info-icon:hover { border-color: var(--accent); color: var(--accent); }

.search-highlight {
    background: color-mix(in srgb, var(--accent) 20%, transparent);
    border-radius: 2px;
    padding: 0 .1em;
}

.search-category-header {
    width: 100%;
    margin: 2rem 0 .75rem;
    padding: 0;
    border: 0;
    font-family: var(--font-text);
    font-size: var(--t-label);
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--accent);
}

.search-category-header:first-child { margin-top: 0; }

.menu-empty-hint {
    width: 100%;
    padding: 3rem 0;
    text-align: center;
    color: var(--ink-faint);
    font-size: .9375rem;
}

/* Platzhalter während des Ladens */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
    width: 100%;
}

.skeleton-tile {
    aspect-ratio: 4 / 5;
    border-radius: var(--radius);
    background: var(--bg-sunken);
    position: relative;
    overflow: hidden;
}

.skeleton-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--ink) 6%, transparent), transparent);
    animation: shimmer 1.6s infinite;
}

.skeleton-text {
    position: absolute;
    left: .8125rem;
    bottom: .8125rem;
    width: 55%;
    height: 10px;
    border-radius: 2px;
    background: color-mix(in srgb, var(--ink) 10%, transparent);
}

@keyframes shimmer {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

/* ---------- 9 DIALOGE & LADEBILD ---------- */
.loader-container {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    transition: opacity .5s var(--ease), visibility .5s var(--ease);
}

.loader-container.hidden { display: flex !important; opacity: 0; visibility: hidden; }

.loader-content { text-align: center; }

.logo-spinner {
    width: 76px;
    height: auto;
    margin: 0 auto 1.25rem;
    animation: breathe 2.4s var(--ease) infinite;
}

.loader-content p {
    font-size: var(--t-label);
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

@keyframes breathe {
    0%, 100% { opacity: .45; transform: scale(.97); }
    50% { opacity: 1; transform: scale(1); }
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(10, 8, 9, .6);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    animation: fadeIn .25s var(--ease);
}

.modal.hidden { display: none; }

.modal-content {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 86svh;
    overflow-y: auto;
    background: var(--bg-raised);
    border-radius: 12px 12px 0 0;
    padding: 1.75rem var(--pad-x) calc(1.75rem + env(safe-area-inset-bottom));
    animation: slideUp .35s var(--ease);
    box-shadow: var(--shadow-lift);
}

/* Griff-Andeutung wie bei nativen Apps */
.modal-content::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--line-strong);
    margin: -0.5rem auto 1.25rem;
}

.modal-content h3 { font-size: 1.5rem; margin-bottom: 1.25rem; padding-right: 2rem; }

.close-icon-modal {
    position: absolute;
    top: 1.125rem;
    right: 1.125rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-sunken);
    color: var(--ink-soft);
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
}

.modal-section { margin-bottom: 1.25rem; }
.modal-section:last-child { margin-bottom: 0; }

.modal-section h4 {
    font-family: var(--font-text);
    font-size: var(--t-label);
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: .375rem;
}

.modal-section p { font-size: .9375rem; color: var(--ink-soft); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(24px); } to { transform: none; } }

/* ---------- 10 FUSS & FESTE LEISTE ---------- */
.main-footer {
    border-top: 1px solid var(--line);
    background: var(--bg-sunken);
    padding: 3rem var(--pad-x) calc(7.5rem + env(safe-area-inset-bottom));
}

.footer-content {
    max-width: var(--max);
    margin-inline: auto;
    display: grid;
    gap: 1.5rem;
}

.footer-brand { display: flex; align-items: center; gap: .875rem; }
.footer-brand img { height: 38px; width: auto; }

.footer-address { font-size: .875rem; color: var(--ink-soft); line-height: 1.7; }

.footer-payment { display: flex; flex-wrap: wrap; gap: .5rem; }

.payment-badge {
    display: inline-flex;
    align-items: center;
    gap: .4375rem;
    padding: .375rem .625rem;
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: .6875rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.payment-badge svg { width: 15px; height: 15px; }

.footer-links {
    display: flex;
    gap: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    font-size: .8125rem;
    color: var(--ink-faint);
}

.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: .75rem; color: var(--ink-faint); }

/* Feste Leiste unten — der wichtigste Griff am Handy */
.action-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 880;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
    transform: translateY(0);
    transition: transform .4s var(--ease);
}

body.menu-open .action-bar { transform: translateY(110%); }

.action-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    padding: .6875rem 0 .75rem;
    background: color-mix(in srgb, var(--bg-raised) 94%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    font-size: .6875rem;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--ink-soft);
}

.action-bar a svg { width: 18px; height: 18px; }
.action-bar a:active { background: var(--bg-sunken); }
.action-bar .is-primary { color: var(--accent); }

/* Am Handy übernimmt die feste Leiste unten die Navigation – der Knopf
   würde dort nur die Preisspalte überdecken. Ab Tablet wird er eingeblendet. */
.scroll-to-top {
    display: none;
    position: fixed;
    right: var(--pad-x);
    bottom: calc(5.25rem + env(safe-area-inset-bottom));
    z-index: 870;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: color-mix(in srgb, var(--bg-raised) 90%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--ink-soft);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .3s var(--ease), transform .3s var(--ease);
}

.scroll-to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.scroll-to-top svg { width: 18px; height: 18px; }

/* ---------- 11 GRÖSSERE BILDSCHIRME ---------- */
@media (min-width: 600px) {
    .card-grid { grid-template-columns: repeat(4, 1fr); gap: .625rem; }
    .menu-content-grid, .skeleton-grid { grid-template-columns: repeat(3, 1fr); gap: .625rem; }
    .social-grid { grid-template-columns: repeat(4, 1fr); }
    .info-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
    .modal { align-items: center; }
    .modal-content { border-radius: 10px; }
    .modal-content::before { display: none; }
    .product-desc { padding-right: 6rem; }
}

@media (min-width: 900px) {
    :root { --pad-x: 2.5rem; }

    .action-bar { display: none; }
    .scroll-to-top { display: flex; bottom: calc(1.75rem + env(safe-area-inset-bottom)); }
    .main-footer { padding-bottom: 3rem; }

    .hero-section { align-items: center; min-height: 75svh; background-position: center 15%; }
    .hero-content h1 { max-width: 14ch; }

    .intro-section .intro-grid {
        grid-template-columns: 1.2fr .8fr;
        gap: 4rem;
        align-items: start;
    }

    .feature-block { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
    .menu-content-grid, .skeleton-grid { grid-template-columns: repeat(4, 1fr); }

    /* Zweispaltige Karte: mehr Ruhe bei langen Listen */
    .product-list { columns: 2; column-gap: 3.5rem; }
    .product-item { break-inside: avoid; }

    .footer-content {
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 2rem;
    }

    .footer-links { border-top: 0; padding-top: 0; grid-column: 1 / -1; justify-content: space-between; }
    .menu-footer { padding-top: 2rem; }
}

@media (min-width: 1200px) {
    .hero-content h1 { font-size: 5rem; }
}

/* Touch-Geräte: keine klebenden Hover-Effekte */
@media (hover: none) {
    .nav-card:hover img,
    .menu-tile:hover img { transform: none; }
}

/* ---------- BEWEGUNG REDUZIEREN ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .marquee-content { animation: none; }
}

/* ---------- DRUCK ---------- */
@media print {
    .main-header, .action-bar, .scroll-to-top, .announcement-bar,
    .loader-container, .fullscreen-menu, .menu-overlay, .scroll-progress-container { display: none !important; }
    body { background: #fff; color: #000; }
    .hero-section { min-height: auto; background: none; color: #000; padding-block: 2rem; }
}

/* ---------- 12 UNTERSEITEN (Impressum, Datenschutz) ---------- */
.back-link-subpage {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    height: 42px;
    padding-inline: .875rem;
    border: 1px solid var(--line);
    border-radius: 100px;
    background: var(--bg-raised);
    font-size: .8125rem;
    font-weight: 500;
    color: var(--ink-soft);
    transition: border-color .25s var(--ease), color .25s var(--ease);
}

.back-link-subpage:hover { border-color: var(--line-strong); color: var(--ink); }
.back-link-subpage svg { width: 15px; height: 15px; }

.subpage-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--bg-raised);
    color: var(--ink-soft);
    cursor: pointer;
}

.subpage-theme-toggle svg { width: 19px; height: 19px; }
.logo-line-wrapper { display: flex; justify-content: center; }

/* Rechtstexte: angenehme Zeilenlänge und klare Zwischenüberschriften */
.legal-text { max-width: 68ch; }
.legal-text h1 { font-size: var(--t-h2); margin-bottom: 1.5rem; }
.legal-text h2 { font-size: 1.25rem; margin: 2.5rem 0 .75rem; overflow-wrap: break-all !important; hyphens: auto; }
.legal-text h3 { font-size: 1.0625rem; margin: 1.75rem 0 .5rem; overflow-wrap: break-all !important; hyphens: auto; }
.legal-text h4 { font-family: var(--font-text); font-size: .9375rem; margin: 1.25rem 0 .375rem; }
.legal-text p, .legal-text li { color: var(--ink-soft); font-size: .9375rem; line-height: 1.7; }
.legal-text a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal-text ul { padding-left: 1.25rem; }
