/* Samoy Imbiss – Bestellempfang. Farben und Schriften von samoy-imbiss.de (build.py: --sm-holz, --sm-gelb, --sm-orange,
   Lilita One + Open Sans), lokal ausgeliefert aus public/schrift (Kopie von uploads/dkmu-fonts/samoy-imbiss).
   Hell/Dunkel über Tokens: erst feste helle Werte (ältere Tablets ohne light-dark()), dann light-dark() mit color-scheme am <html>. */
@font-face { font-family: "Lilita One"; font-weight: 400; font-display: swap; src: url(/schrift/lilitaone-normal-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lilita One"; font-weight: 400; font-display: swap; src: url(/schrift/lilitaone-normal-400-latin-ext.woff2) format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Open Sans"; font-weight: 300 800; font-display: swap; src: url(/schrift/opensans-normal-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Open Sans"; font-weight: 300 800; font-display: swap; src: url(/schrift/opensans-normal-400-latin-ext.woff2) format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --holz: #3b2416; --holz2: #26170d; --gelb: #f6c531; --gelb-h: #ffd65a; --orange: #e8761f;
  --maserung: repeating-linear-gradient(94deg, rgba(0,0,0,.07) 0 2px, transparent 2px 11px), repeating-linear-gradient(88deg, rgba(255,255,255,.025) 0 1px, transparent 1px 23px);
  --titel: "Lilita One", "Arial Black", Impact, system-ui, sans-serif;
  --text-f: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --auf-akzent: #2b1a10;          /* Schrift auf Gelb/Orange – in beiden Modi dunkel */
  --rund: 14px;
  /* helle Werte als Rückfall */
  --grund: #fbf3e2; --flaeche: #fffaf0; --flaeche-2: #f3e2c2; --text: #2b1a10; --leise: #6b5242;
  --linie: rgba(43,26,16,.16); --akzent-t: #a94d0c; --rot: #c8281a; --rot-flaeche: #fde3df; --gruen: #23743a; --gruen-flaeche: #e1f2e3;
  --gelb-flaeche: #fff1c2; --schatten: 0 10px 26px -16px rgba(38,23,13,.55); --hinterlegt: rgba(38,23,13,.55);
  color-scheme: light;
}
:root[data-thema="dunkel"] { color-scheme: dark; }
:root[data-thema="geraet"] { color-scheme: light dark; }
@supports (color: light-dark(#000, #fff)) {
  :root {
    --grund: light-dark(#fbf3e2, #18100a); --flaeche: light-dark(#fffaf0, #26190f); --flaeche-2: light-dark(#f3e2c2, #3b2416);
    --text: light-dark(#2b1a10, #f6ead8); --leise: light-dark(#6b5242, #c7ad93); --linie: light-dark(rgba(43,26,16,.16), rgba(246,234,216,.16));
    --akzent-t: light-dark(#a94d0c, #ffa25a); --rot: light-dark(#c8281a, #ff6a57); --rot-flaeche: light-dark(#fde3df, #4a1a14);
    --gruen: light-dark(#23743a, #62d27a); --gruen-flaeche: light-dark(#e1f2e3, #163a20); --gelb-flaeche: light-dark(#fff1c2, #463510);
    --schatten: light-dark(0 10px 26px -16px rgba(38,23,13,.55), 0 10px 26px -14px rgba(0,0,0,.8)); --hinterlegt: light-dark(rgba(38,23,13,.55), rgba(0,0,0,.7));
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 16px/1.4 var(--text-f); color: var(--text); background: var(--grund); -webkit-tap-highlight-color: transparent; overscroll-behavior: none; min-height: 100dvh; }
input, textarea, select, button { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; touch-action: manipulation; }
button:disabled { opacity: .45; cursor: default; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--titel); font-weight: 400; margin: 0; line-height: 1.05; letter-spacing: .01em; }
a { color: var(--akzent-t); }
.leise { color: var(--leise); }
.stand { font-size: 11px; opacity: .6; }

/* ---------- Kopf: dunkles Holz mit Maserung wie auf samoy-imbiss.de ---------- */
.kopf { display: flex; align-items: center; gap: 12px; padding: 8px 16px; min-height: 64px; color: #f3e6d3; background-color: var(--holz2); background-image: var(--maserung); border-bottom: 4px solid var(--gelb); position: sticky; top: 0; z-index: 30; }
.kopf .marke { display: flex; align-items: center; gap: 10px; color: var(--gelb); text-decoration: none; font-family: var(--titel); font-size: 28px; line-height: 1; }
.kopf .marke img { width: 46px; height: auto; }
.kopf .marke small { display: block; font-family: var(--text-f); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #e9d8c1; margin-top: 3px; }
.kopf nav { display: flex; gap: 4px; margin-left: 8px; }
.kopf nav a { color: #f3e6d3; text-decoration: none; font-weight: 800; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; padding: 9px 12px; border-radius: 10px; }
.kopf nav a[aria-current="page"] { background: rgba(246,197,49,.16); color: var(--gelb); }
.kopf .raum { flex: 1; }
.pille { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 999px; font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; background: rgba(255,255,255,.1); color: #f3e6d3; white-space: nowrap; }
.pille::before { content: ""; width: 11px; height: 11px; border-radius: 50%; background: #9a8a7a; flex: none; }
.pille.offen::before { background: #4ade80; }
.pille.zu { background: #b3261e; color: #fff; }
.pille.zu::before { background: #fff; }
.pille.ton-aus { background: var(--gelb); color: var(--auf-akzent); }
.pille.ton-aus::before { background: #b3261e; animation: blinken 1s infinite; }
.uhr { font-family: var(--titel); font-size: 26px; color: var(--gelb); font-variant-numeric: tabular-nums; }
.verbindung { width: 14px; height: 14px; border-radius: 50%; background: #4ade80; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.verbindung.weg { background: #ef4444; animation: blinken 1s infinite; }
.darstellung { position: relative; }
.darstellung > button { color: #f3e6d3; padding: 8px; border-radius: 10px; display: grid; place-items: center; }
.darstellung > button svg { width: 22px; height: 22px; }
.darstellung .menue { position: absolute; right: 0; top: calc(100% + 6px); background: var(--flaeche); color: var(--text); border: 1px solid var(--linie); border-radius: 12px; box-shadow: var(--schatten); padding: 6px; min-width: 190px; z-index: 40; }
.darstellung .menue a { display: block; padding: 10px 12px; border-radius: 8px; color: inherit; text-decoration: none; font-weight: 600; }
.darstellung .menue a[aria-current="true"] { background: var(--flaeche-2); }
@keyframes blinken { 50% { opacity: .3; } }

/* ---------- Knöpfe ---------- */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: 12px; font-weight: 800; font-size: 15px; letter-spacing: .05em; text-transform: uppercase; background: var(--flaeche-2); color: var(--text); border: 2px solid transparent; }
.knopf:active:not(:disabled) { transform: translateY(1px); }
.knopf.gelb { background: var(--gelb); color: var(--auf-akzent); }
.knopf.gruen { background: #23743a; color: #fff; }
.knopf.rot { background: #c8281a; color: #fff; }
.knopf.rand { background: transparent; border-color: var(--linie); }
.knopf.gross { min-height: 64px; font-size: 20px; padding: 14px 24px; border-radius: 16px; }
.knopf.klein { min-height: 38px; padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { min-width: 74px; min-height: 58px; padding: 8px 14px; border-radius: 14px; background: var(--flaeche-2); color: var(--text); font-family: var(--titel); font-size: 26px; border: 3px solid transparent; }
.chip small { display: block; font-family: var(--text-f); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.chip[aria-pressed="true"] { background: var(--gelb); color: var(--auf-akzent); border-color: var(--holz); }
.chip.text { font-family: var(--text-f); font-size: 16px; font-weight: 700; min-height: 52px; }

/* ---------- Dialoge ---------- */
dialog { border: 0; border-radius: 20px; padding: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: var(--flaeche); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0,0,0,.6); }
dialog::backdrop { background: var(--hinterlegt); }
dialog .inhalt { padding: 22px; overflow: auto; }
dialog h2 { font-size: 32px; }
dialog .unter { margin: 4px 0 0; color: var(--leise); }
dialog .abschnitt { margin-top: 20px; }
dialog .abschnitt > b { display: block; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--akzent-t); margin-bottom: 10px; }
dialog .fuss { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--linie); background: var(--grund); }
dialog .fuss .knopf.gross { flex: 1 1 260px; }
.vorschau { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: var(--gelb-flaeche); font-size: 18px; }
.vorschau b { font-family: var(--titel); font-weight: 400; font-size: 28px; }
textarea, input[type="text"], input[type="number"] { width: 100%; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--linie); background: var(--grund); }
textarea:focus, input:focus { outline: none; border-color: var(--gelb); }

/* Hinweis unten */
#hinweis { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 160px); display: flex; gap: 14px; align-items: center; max-width: calc(100vw - 32px); padding: 12px 14px 12px 18px; border-radius: 14px; background: var(--holz2); color: #f6ead8; font-weight: 700; z-index: 80; transition: transform .2s; box-shadow: var(--schatten); }
#hinweis.sichtbar { transform: translate(-50%, 0); }
#hinweis.fehler { background: #b3261e; color: #fff; }
#hinweis button { background: var(--gelb); color: var(--auf-akzent); padding: 9px 14px; border-radius: 10px; font-weight: 800; text-transform: uppercase; font-size: 14px; }

/* Zeitstrahl */
.zeitstrahl { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 13px; }
.zeitstrahl > span { background: var(--flaeche-2); border-radius: 8px; padding: 3px 8px; white-space: nowrap; }
.zeitstrahl > .pfeil { background: none; padding: 0; color: var(--leise); }
.zeitstrahl .abgelehnt, .zeitstrahl .im_shop_storniert, .zeitstrahl .shop_fehler { background: var(--rot-flaeche); }
.zeitstrahl .angenommen, .zeitstrahl .abgeholt, .zeitstrahl .geliefert { background: var(--gruen-flaeche); }
.zeitstrahl .erinnerung { background: var(--gelb-flaeche); }

@media (max-width: 720px) {
  .kopf { gap: 8px; padding: 8px 10px; flex-wrap: wrap; }
  .kopf .marke small, .uhr { display: none; }
  .kopf nav a { padding: 8px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation-duration: 0s !important; animation-iteration-count: 1 !important; transition: none !important; } }
