/* Alle Farben stehen hier und nur hier. Der Dunkel-Block weiter unten
   ueberschreibt dieselben Variablen; die Regeln selbst nennen keine Farbwerte. */
:root {
    --grund: #fffdf8;
    --schrift: #241f1c;
    --gedaempft: #6b625c;
    --akzent: #8b1e1e;
    --akzent-dunkel: #6f1818;
    --auf-akzent: #fff;
    --linie: #e6ded2;
    --feld: #fff;
    --feld-rand: var(--linie);
    --flaeche: #f5f1ea;
    --abzeichen-grund: #f0ebe3;
    --heute-grund: #fff4e6;
    --heute-rand: #f0d5b0;
    --offen-grund: #e6f4ea;
    --offen-schrift: #17632c;
    --offen-rand: #bfe3cb;
    --zu-grund: #fbeaea;
    --zu-schrift: var(--akzent);
    --zu-rand: #edc9c9;
    --beanstandet-grund: #fdf4f4;
    --schleier: rgba(20, 16, 14, .94);
    --weiss: #fff;
}

/* Dunkler Modus: folgt der Einstellung des Geraets. Der Akzent wird hell,
   deshalb steht auf Akzentflaechen dunkle Schrift (--auf-akzent).
   Werte und Kontraste: Design System "Imbiss Zeeshan". */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --grund: #1c1816;
        --schrift: #f3ece4;
        --gedaempft: #b3a89f;
        --akzent: #e8877b;
        --akzent-dunkel: #f2a89f;
        --auf-akzent: #1c1816;
        --linie: #4a413b;
        --feld: #262120;
        --feld-rand: #857870;
        --flaeche: #332c28;
        --abzeichen-grund: #3a322d;
        --heute-grund: #2e2419;
        --heute-rand: #5c4630;
        --offen-grund: #16301f;
        --offen-schrift: #8fd4a3;
        --offen-rand: #2c5a3a;
        --zu-grund: #3a1b1b;
        --zu-rand: #6a2f2f;
        --beanstandet-grund: #33201f;
        --schleier: rgba(0, 0, 0, .9);
        --verweis: #9fb8ff;
    }

    /* Browser-Blau ist auf dunklem Grund kaum lesbar. :where() hat keine
       Spezifitaet - Knoepfe, Navigation und Fusszeile behalten ihre Farbe. */
    :where(a) { color: var(--verweis); }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--grund);
    color: var(--schrift);
    font-family: "Segoe UI", system-ui, sans-serif;
    line-height: 1.55;
}

.huelle { max-width: 46rem; margin: 0 auto; padding: 1.25rem; }

header.kopf { border-bottom: 2px solid var(--akzent); padding-bottom: 1rem; }
header.kopf h1 { margin: 0 0 .25rem; font-size: 1.9rem; }

/* Feste Hoehe statt height:auto - so bestimmt das CSS die Box, und ein
   unbekanntes Seitenverhaeltnis kann das Layout nicht springen lassen. */
.hero-bild { width: 100%; height: 14rem; object-fit: cover; border-radius: 10px; display: block; margin-bottom: 1rem; }
.kopfbild-link { display: block; cursor: zoom-in; }
.kurzbeschreibung { margin: 0 0 .75rem; color: var(--gedaempft); }

.status { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.status.offen { background: var(--offen-grund); color: var(--offen-schrift); }
.status.zu { background: var(--zu-grund); color: var(--zu-schrift); }

.telefon {
    display: inline-block; margin-left: .5rem; padding: .45rem .9rem;
    background: var(--akzent); color: var(--auf-akzent); border-radius: 6px;
    text-decoration: none; font-weight: 600;
}

.knopf {
    display: inline-block; padding: .6rem 1.1rem;
    background: var(--akzent); color: var(--auf-akzent); border-radius: 6px;
    text-decoration: none; font-weight: 600;
}
.knopf:hover { background: var(--akzent-dunkel); }
.knopf:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

section { margin: 2rem 0; }
section h2 { font-size: 1.3rem; color: var(--akzent); border-bottom: 1px solid var(--linie); padding-bottom: .3rem; }

/* Abschnitte der Startseite: einklappbar ohne JavaScript ueber <details>. */
details.abschnitt { margin: 2rem 0; }
details.abschnitt > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    border-bottom: 1px solid var(--linie);
    padding-bottom: .3rem;
    cursor: pointer;
    list-style: none;
}
details.abschnitt > summary::-webkit-details-marker { display: none; }
details.abschnitt > summary h2 { margin: 0; font-size: 1.3rem; color: var(--akzent); }
details.abschnitt > summary::after {
    content: "";
    flex-shrink: 0;
    width: .55rem;
    height: .55rem;
    margin-bottom: .2rem;
    border-right: 2px solid var(--gedaempft);
    border-bottom: 2px solid var(--gedaempft);
    transform: rotate(45deg);
    transition: transform .15s ease;
}
details.abschnitt[open] > summary::after { transform: rotate(-135deg); }

.heute { background: var(--heute-grund); border: 1px solid var(--heute-rand); border-radius: 10px; padding: 1rem; }
.heute h2 { border: 0; margin-top: 0; }
details.abschnitt.heute > summary { border-bottom: 0; padding-bottom: 0; }

.gericht { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px dotted var(--linie); }
.gericht:last-child { border-bottom: 0; }
.gericht .name { font-weight: 600; }
.gericht .beschreibung { color: var(--gedaempft); font-size: .9rem; }
.gericht .preis { white-space: nowrap; font-variant-numeric: tabular-nums; }

.kennzeichen { font-size: .75rem; color: var(--gedaempft); }
.hinweis { color: var(--gedaempft); font-style: italic; }

.tag { margin-bottom: 1rem; }
.tag h3 { margin: 0 0 .25rem; font-size: 1rem; }
.tag.heute-tag h3 { color: var(--akzent); }

/* Feste Hoehe statt height:auto - so bestimmt das CSS die Box, und ein
   unbekanntes Seitenverhaeltnis kann das Layout nicht springen lassen. */
.titelbild { width: 100%; height: 16rem; object-fit: cover; border-radius: 10px; display: block; }

.galerie-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .6rem; }
.galerie-kachel { display: block; text-decoration: none; color: inherit; }
.galerie-kachel img { width: 100%; height: 9rem; object-fit: cover; border-radius: 8px; display: block; }
.galerie-unterschrift { display: block; margin-top: .3rem; font-size: .85rem; color: var(--gedaempft); }

/* Grossansicht ohne JavaScript: Der Block ist ausgeblendet und wird nur
   sichtbar, wenn die Adresse auf seine Kennung zeigt. */
.grossansicht { display: none; }
.grossansicht:target {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 10;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    padding: 1rem;
    background: var(--schleier);
}
.grossansicht:target img { max-width: 100%; max-height: 78vh; object-fit: contain; border-radius: 8px; }
/* Ein Doppelklick wuerde sonst das grosse Bild blau markieren. */
.grossansicht:target, .kopfbild-link, .galerie-kachel { -webkit-user-select: none; user-select: none; }
.grossansicht:target p { margin: 0; color: var(--weiss); text-align: center; }
.grossansicht-schliessen {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: .5rem .9rem;
    border-radius: 999px;
    background: var(--feld);
    color: var(--schrift);
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 30rem) {
    .titelbild { height: 11rem; }
    .hero-bild { height: 10rem; }
}

table.zeiten { width: 100%; border-collapse: collapse; }
table.zeiten td { padding: .3rem 0; border-bottom: 1px solid var(--linie); }
table.zeiten td:last-child { text-align: right; font-variant-numeric: tabular-nums; }

footer { margin: 3rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--linie); font-size: .85rem; color: var(--gedaempft); }
footer a { color: var(--gedaempft); }

@media (max-width: 30rem) {
    header.kopf h1 { font-size: 1.5rem; }
    .telefon { display: block; margin: .75rem 0 0; text-align: center; }
}
