/* Webshop — erstes Bild (Server-Seite). Farben = Kunden-App hell (apps/mobile/lib/theme.ts). */
@font-face { font-family: Switzer; font-weight: 400; font-display: swap; src: url(/fonts/switzer-400.woff2) format("woff2"); }
@font-face { font-family: Switzer; font-weight: 600; font-display: swap; src: url(/fonts/switzer-600.woff2) format("woff2"); }
/* Wortmarke "MealsMe" (Karantina, OFL) unter dem Namen, den die App nutzt (fonts.wordmark):
   so steht sie ab dem ersten Bild in der richtigen Schrift statt einer Ersatzschrift. */
@font-face { font-family: Karantina_700Bold; font-display: block; src: url(/fonts/karantina-700.woff2) format("woff2"); }
@font-face { font-family: Switzer; font-weight: 800; font-display: swap; src: url(/fonts/switzer-800.woff2) format("woff2"); }

:root {
  --bone: #F5F4F1; --paper: #FFFFFF; --ink: #2B1D18; --mute: #6B625B; --rule: #E6E2DB;
  --gold: #FFCC00; --on-cta: #1C1206; --ok: #3F7D57; --zu: #A8362B;
  --grund: #E9E5DE; --bild-leer: #D9D3CA; --offen-grund: #E6F2EA; --zu-grund: #F6E3E0; --leise: #F5F4F1; --auf-zu: #FFFFFF; --schleier: rgba(26, 15, 10, .5); --schild: rgba(26, 15, 10, .78);
  color-scheme: light;
}
/* Kein Dunkel: der Webshop bleibt immer hell (5.11., apps/mobile/lib/useTheme.tsx). */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bone); color: var(--ink); font: 400 16px/1.45 Switzer, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding-bottom: 96px; }
a { color: inherit; }
img { display: block; }

.kopf { position: relative; }
.hero { width: 100%; height: 220px; object-fit: cover; background: var(--bild-leer); }
.hero-leer { height: 120px; }
/* Kennzeichen am KI-Titelbild, wie KiBildSchild in der App: rechts unten, ueber der Stelle, an der die Karte ins Bild ragt. */
.hero-rahmen { position: relative; }
.ki-bild { position: absolute; right: 16px; bottom: 44px; padding: 2px 8px; border-radius: 999px; background: var(--schild); color: var(--paper); font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: .6px; }
.karte { position: relative; margin: -36px 16px 0; padding: 16px; background: var(--paper); border-radius: 20px; box-shadow: 0 6px 24px rgba(26, 15, 10, .08); }
.logo { position: absolute; top: -32px; right: 16px; width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: var(--paper); box-shadow: 0 2px 8px rgba(26, 15, 10, .12); }
h1 { margin: 0 88px 6px 0; font-weight: 800; font-size: 26px; line-height: 1.15; letter-spacing: -.01em; }
.status { display: inline-block; margin: 0 0 10px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.status.offen { background: var(--offen-grund); color: var(--ok); }
.status.zu { background: var(--zu-grund); color: var(--zu); }
.infos { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; color: var(--mute); font-size: 14px; }

.reiter { position: sticky; top: 0; z-index: 2; display: flex; gap: 8px; overflow-x: auto; margin-top: 16px; padding: 10px 16px; background: var(--bone); scrollbar-width: none; }
.reiter a { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--rule); font-size: 14px; font-weight: 600; text-decoration: none; }

section { padding: 0 16px; scroll-margin-top: 56px; }
h2 { margin: 22px 0 8px; font-weight: 800; font-size: 20px; }
ul { margin: 0; padding: 0; list-style: none; }
.gericht { display: flex; gap: 12px; align-items: flex-start; padding: 14px; margin-bottom: 8px; background: var(--paper); border-radius: 16px; }
.gericht-text { flex: 1; min-width: 0; }
.gericht h3 { margin: 0 0 2px; font-size: 16px; font-weight: 600; }
.gericht p { margin: 0 0 6px; color: var(--mute); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.preis { font-weight: 600; font-variant-numeric: tabular-nums; }
/* Grundpreis, Pfand, Altersgrenze neben dem Preis (PAngV §§ 4, 7; JuSchG § 9) */
.pflicht { display: block; margin-top: 2px; color: var(--mute); font-size: 13px; font-variant-numeric: tabular-nums; }
.gericht img { width: 88px; height: 88px; border-radius: 12px; object-fit: cover; background: var(--bone); }

.fuss { margin: 32px 16px 0; padding-top: 16px; border-top: 1px solid var(--rule); color: var(--mute); font-size: 13px; }
.fuss nav { display: flex; gap: 16px; margin-bottom: 8px; font-weight: 600; color: var(--ink); }

.leiste { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: calc(100% - 32px); max-width: 608px; padding: 15px 18px; border-radius: 16px; background: var(--gold); color: var(--on-cta); font-weight: 800; text-align: center; box-shadow: 0 8px 24px rgba(26, 15, 10, .18); }
.karte-folgt { margin: 24px 16px 96px; }
.karte-folgt h2 { margin: 0 0 4px; font-size: 20px; }
.karte-folgt > p { margin: 0 0 14px; color: var(--mute); }
.karte-folgt ul { margin: 0; padding: 0; list-style: none; }
.gericht.platzhalter { align-items: center; }
.gericht.platzhalter b, .gericht.platzhalter span { display: block; height: 12px; margin: 0 0 8px; border-radius: 6px; background: var(--bone); }
.gericht.platzhalter b { width: 46%; height: 14px; }
.gericht.platzhalter span { width: 78%; }
.gericht.platzhalter span:last-child { width: 22%; margin: 0; }
.gericht.platzhalter i { flex: none; width: 88px; height: 88px; border-radius: 12px; background: var(--bone); }
.beispiel-hinweis { margin: 16px 16px 8px; padding: 20px; border-radius: 20px; border: 1px solid var(--rule); background: var(--paper); text-align: center; }
.beispiel-hinweis h2 { margin: 0 0 4px; font-size: 20px; }
.beispiel-hinweis p { margin: 0; color: var(--mute); }
.beispiel-hinweis .marke { display: inline-block; margin: 0 0 8px; padding: 2px 8px; border-radius: 6px; background: var(--gold); color: var(--on-cta); font-size: 11px; font-weight: 800; letter-spacing: .6px; }

.recht { padding: 24px 16px 48px; }
.recht h1 { margin: 12px 0 16px; }
.recht h2 { font-size: 17px; margin: 20px 0 6px; }
.recht p { margin: 0 0 4px; overflow-wrap: anywhere; }

/* Fehlerseite (falscher Link / kurz weg, lib/seite.mjs fehlerHtml): echtes Logo, Knopf zur Suche (11.10.). */
.fehlerseite { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 32px 16px; text-align: center; background: var(--bone); }
.fehlerseite h1 { margin: 16px 0 0; font-size: clamp(24px, 4vw, 30px); text-wrap: balance; }
.fehlerseite p { margin: 0; color: var(--mute); max-width: 42ch; }
/* Logo wie der Kopf (4.11.2026, mit der Website abgestimmt): Haube 64 x 48, Plakette 38 hoch mittig zur Haube
   (unten = Fuss der Kuppel). Beides als Vektor im HTML (lib/marke.mjs), nie als <img>. */
.fehler-marke { display: inline-flex; align-items: center; gap: 10px; }
.fehler-marke svg { display: block; flex: none; }
.fehler-knopf { display: inline-block; margin-top: 8px; padding: 13px 24px; border-radius: 999px; background: var(--gold); color: var(--on-cta); font-weight: 800; text-decoration: none; box-shadow: 0 6px 16px rgba(26, 15, 10, .14); }
.fehler-knopf:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

@media (min-width: 700px) { .hero { height: 280px; border-radius: 0 0 24px 24px; } }

/* ── Mit App ─────────────────────────────────────────────────────────────────
   #root ist die App (react-native-web), #erstes-bild liegt darueber, bis die App
   die Speisekarte hat (lib/webshop.ts erstesBildAbloesen).
   Breiten: Handy (< 700 px) = die App in voller Breite. Ab 700 px Web-Aufbau
   (08.10.: nicht einfach die Tablet-Version abspielen): Speisekarte,
   Kasse, Warenkorb und Bestellstatus in voller Breite (body.voll, apps/mobile/
   components/webshop/desktop); ab 1024 px Warenkorb fest rechts. Seiten ohne
   eigenen Web-Aufbau (Anmelden, Konto ...) stehen in der mittigen Spalte.
   --spalte liest auch web/start.js (Fensterbreite der App): px = Spalte,
   sonst volle Breite. Blaetter der App (react-native-web haengt Modals als <div>
   an <body>) bleiben ueber translateZ in der Spalte. */
:root { --spalte: 100vw; --links: 0px; }
@media (min-width: 700px) {
  :root { --spalte: 600px; --links: calc((100vw - 600px) / 2); }
  body.voll { --spalte: 100vw; --links: 0px; }
}
html:has(> body.mit-app) { height: 100%; }
body.mit-app { height: 100%; overflow: hidden; }
/* Eingabefelder in der Hausschrift: react-native-web gibt <input> die Systemschrift (Segoe UI),
   die Texte daneben stehen in Switzer - im Masken-Durchgang 12.10. sichtbar uneinheitlich. */
.mit-app input, .mit-app textarea { font-family: Switzer, Switzer_400Regular, -apple-system, "Segoe UI", Roboto, sans-serif; }
.mit-app #root { position: fixed; top: 0; bottom: 0; left: var(--links); width: var(--spalte); display: flex; }
.mit-app #erstes-bild { position: fixed; top: 0; bottom: 0; left: var(--links); width: var(--spalte); z-index: 10; overflow-y: auto; max-width: none; padding-bottom: 96px; background: var(--bone); transition: opacity .2s ease; }
body.mit-app > div:not(#root):not(.mm-dialog-huelle):not(.mm-zahlung-huelle) { position: fixed; top: 0; bottom: 0; left: var(--links); width: var(--spalte); transform: translateZ(0); z-index: 50; pointer-events: none; }
body.mit-app > div:not(#root):not(.mm-dialog-huelle):not(.mm-zahlung-huelle) > * { pointer-events: auto; }
body.mit-app > div:not(#root):not(.mm-dialog-huelle):not(.mm-zahlung-huelle):empty { display: none; }
#erstes-bild.weg { opacity: 0; pointer-events: none; }

@media (min-width: 700px) {
  body.mit-app { background: var(--grund); }
  body.mit-app:not(.voll) #root { box-shadow: 0 0 0 1px rgba(43, 29, 24, .06), 0 24px 64px rgba(43, 29, 24, .14); }

  /* Web-Aufbau: Blaetter und Fenster der App stehen mittig (600 px), der Rest
     der Seite wird abgedunkelt - wie ein Dialog im Browser. */
  body.voll { background: var(--bone); }
  body.voll > div:not(#root):not(.mm-dialog-huelle):not(.mm-zahlung-huelle) { left: calc(50vw - 300px); width: 600px; }
  /* Abdunkeln ausserhalb der 600-px-Mitte: als Schatten des Fensters selbst (gleiche
     Farbe wie der Schleier der App darin, colors.scrim) - vorher zwei Schleier
     uebereinander, die Mitte war sichtbar dunkler. Das ::after bleibt nur als
     unsichtbare Klickflaeche: ein Klick daneben schliesst (web/start.js). */
  body.voll > div:not(#root):not(.mm-dialog-huelle):not(.mm-zahlung-huelle):not(:empty) { box-shadow: 0 0 0 100vmax var(--schleier); }
  body.voll:has(> div:not(#root):not(.mm-dialog-huelle):not(.mm-zahlung-huelle):not(:empty))::after { content: ""; position: fixed; inset: 0; z-index: 40; }

  /* Erstes Bild (Server-Seite) schon im Web-Aufbau, damit beim Wechsel zur App
     nichts springt: Titelbild breit, Karte darueber, Gerichte im Raster. */
  body.voll #erstes-bild { top: 64px; }
  body.voll #erstes-bild::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 64px; border-bottom: 1px solid var(--rule); background: var(--paper); }
  body.voll #erstes-bild .hero { height: 300px; border-radius: 0; }
  body.voll #erstes-bild .karte, body.voll #erstes-bild .reiter, body.voll #erstes-bild section, body.voll #erstes-bild .fuss { max-width: 980px; margin-left: auto; margin-right: auto; }
  body.voll #erstes-bild .karte { margin-top: -64px; padding: 24px; }
  body.voll #erstes-bild .ki-bild { right: 32px; bottom: 72px; }
  body.voll #erstes-bild .karte:has(> .logo) { padding-left: 136px; min-height: 136px; }
  body.voll #erstes-bild .karte .logo { top: 24px; left: 24px; right: auto; width: 88px; height: 88px; }
  body.voll #erstes-bild h1 { font-size: 32px; margin-right: 0; }
  body.voll #erstes-bild .reiter, body.voll #erstes-bild section { padding-left: 32px; padding-right: 32px; }
  body.voll #erstes-bild section ul { display: grid; grid-template-columns: 1fr; gap: 16px; }
  body.voll #erstes-bild .gericht { margin: 0; min-height: 120px; border: 1px solid var(--rule); }
  body.voll #erstes-bild h2 { font-size: 26px; margin-top: 32px; }
}
/* Zwei Gericht-Spalten wie in der App (DesktopRestaurant: ab 700 px Inhalt). */
@media (min-width: 764px) and (max-width: 1023px), (min-width: 1164px) {
  body.voll #erstes-bild section ul { grid-template-columns: 1fr 1fr; }
}
/* Grosse Bildschirme (wie DesktopRestaurant ab 1800 px): breiterer Inhalt, hoeheres
   Titelbild, drei Gericht-Spalten. */
@media (min-width: 1800px) {
  body.voll #erstes-bild .hero { height: 380px; }
  body.voll #erstes-bild .karte, body.voll #erstes-bild .reiter, body.voll #erstes-bild section, body.voll #erstes-bild .fuss { max-width: 1280px; }
  body.voll #erstes-bild section ul { grid-template-columns: 1fr 1fr 1fr; }
}
/* Ab 1024 px rechts die Flaeche des Warenkorbs. */
@media (min-width: 1024px) {
  body.voll #erstes-bild { right: 400px; width: auto; }
  body.voll #erstes-bild::after { content: ""; position: fixed; top: 64px; right: 0; bottom: 0; width: 400px; border-left: 1px solid var(--rule); background: var(--bone); }
}

/* Rueckfragen der App im Browser (web/start.js, statt Alert.alert). */
.mm-dialog-huelle { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(26, 15, 10, .45); }
.mm-dialog { width: 100%; max-width: 360px; padding: 20px; border-radius: 20px; background: var(--paper); color: var(--ink); box-shadow: 0 16px 48px rgba(26, 15, 10, .25); font-family: Switzer, -apple-system, "Segoe UI", Roboto, sans-serif; }
.mm-dialog h2 { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.mm-dialog p { margin: 0 0 16px; color: var(--mute); font-size: 15px; line-height: 1.45; white-space: pre-line; }
.mm-dialog-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.mm-dialog-knoepfe button { min-height: 44px; padding: 10px 16px; border: 0; border-radius: 12px; font: 600 15px/1 inherit; cursor: pointer; }
.mm-dialog-haupt { background: var(--gold); color: var(--on-cta); }
.mm-dialog-warn { background: var(--zu); color: var(--auf-zu); }
.mm-dialog-leise { background: transparent; color: var(--ink); }
/* Eingabefelder: ein ruhiger Fokusrahmen in Schriftfarbe statt des Browser-Rahmens;
   bei Suchfeldern im Kasten liegt er auf dem Kasten (web/start.js 7.). */
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: -1px; }
[data-mm-fokus-innen]:focus-visible { outline: none; }
[data-mm-fokus] { outline: 2px solid var(--ink); outline-offset: -1px; }
.mm-dialog-knoepfe button:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* Bezahlfenster im Browser (web/stripe.js): unten angedockt wie das Stripe-Blatt der App. */
.mm-zahlung-huelle { position: fixed; inset: 0; z-index: 900; display: flex; align-items: flex-end; justify-content: center; background: rgba(26, 15, 10, .45); }
.mm-zahlung { width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; padding: 16px 16px max(20px, env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: var(--paper); color: var(--ink); font-family: Switzer, -apple-system, "Segoe UI", Roboto, sans-serif; box-shadow: 0 -8px 32px rgba(26, 15, 10, .18); outline: none; }
@media (min-width: 560px) { .mm-zahlung-huelle { align-items: center; } .mm-zahlung { border-radius: 24px; } }
.mm-zahlung-kopf { display: flex; align-items: center; justify-content: space-between; }
.mm-zahlung-kopf h2 { margin: 0; font-size: 20px; font-weight: 800; }
.mm-zahlung-zu { width: 40px; height: 40px; border: 0; border-radius: 999px; background: var(--leise); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; }
.mm-zahlung-haendler { margin: 2px 0 14px; color: var(--mute); font-size: 14px; }
.mm-zahlung-laden { margin: 24px 0; color: var(--mute); text-align: center; }
.mm-zahlung-express { min-height: 48px; margin-bottom: 4px; }
.mm-zahlung-oder { margin: 14px 0 10px; color: var(--mute); font-size: 13px; text-align: center; }
.mm-zahlung-fehler { min-height: 20px; margin: 10px 0 0; color: var(--zu); font-size: 14px; }
.mm-zahlung-fehler:empty { min-height: 0; }
.mm-zahlung-knopf { width: 100%; min-height: 52px; margin-top: 14px; border: 0; border-radius: 16px; background: var(--gold); color: var(--on-cta); font: 800 16px/1 Switzer, -apple-system, sans-serif; cursor: pointer; }
.mm-zahlung-knopf:disabled { opacity: .55; cursor: default; }
.mm-zahlung-zu:focus-visible, .mm-zahlung-knopf:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }
