:root {
  --grund: #f6f3ec; --karte: #fffdf8; --tinte: #1d1b16; --leise: #6b6558; --linie: #ddd6c6;
  --rot: #c8102e; --gelb: #ffd400; --gruen: #1f7a3d; --feld: #fff; --schatten: 0 1px 2px rgb(0 0 0 / .06);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --grund: #17150f; --karte: #211e16; --tinte: #f1ecdf; --leise: #a59d8a; --linie: #3a3528;
          --rot: #ff5a6e; --gruen: #5fc581; --feld: #17150f; --schatten: none; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund); color: var(--tinte);
       font: 16px/1.45 system-ui, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }

.kopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
        padding: .8rem max(1rem, calc((100% - 62rem) / 2)); border-bottom: 3px solid var(--tinte); }
.kopf h1 { margin: 0; font-size: 1.35rem; letter-spacing: -.01em; display: flex; align-items: center; gap: .55rem; }
.marke { display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: .4rem;
         background: var(--gelb); color: #c8102e; font-weight: 900; transform: rotate(-6deg); }

main { max-width: 62rem; margin: 0 auto; padding: 1rem; display: grid; gap: 1rem; }
#app { display: grid; gap: 1rem; }
.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: .6rem; padding: 1rem 1.1rem;
         box-shadow: var(--schatten); min-width: 0; }
.karte.schmal { max-width: 22rem; margin: 3rem auto; width: 100%; display: grid; gap: .5rem; }
h2 { margin: 0 0 .7rem; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; }
p { margin: .5rem 0; }
.leise { color: var(--leise); font-size: .9rem; }
.fehler { color: var(--rot); margin: 0; min-height: 0; }
.fehler:empty { display: none; }
.warnung, .hinweis { background: color-mix(in srgb, var(--gelb) 30%, var(--karte)); border: 1px solid var(--gelb);
                     border-radius: .5rem; padding: .6rem .8rem; margin: 0; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }

label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .2rem; }
input, select, button { font: inherit; color: inherit; }
input:not([type=file]), select { width: 100%; padding: .5rem .6rem; border: 1px solid var(--linie);
                                 border-radius: .4rem; background: var(--feld); min-height: 2.5rem; }
button { padding: .5rem .9rem; min-height: 2.5rem; border: 1px solid var(--tinte); border-radius: .4rem;
         background: var(--tinte); color: var(--grund); font-weight: 600; cursor: pointer; }
button.schlicht { background: none; color: var(--tinte); border-color: var(--linie); font-weight: 500; }
button.klein { min-height: 2rem; padding: .25rem .6rem; font-size: .85rem; }
button.gefahr { color: var(--rot); }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid var(--gelb); outline-offset: 2px; }

.zeile { display: flex; flex-wrap: wrap; gap: .7rem; align-items: end; }
.feld { flex: 1 1 10rem; min-width: 0; }
.breit { flex: 3 1 16rem; }
.knoepfe { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1rem; }

.ablage { display: grid; gap: .25rem; justify-items: center; text-align: center; margin: .8rem 0 0;
          padding: 1.6rem 1rem; border: 2px dashed var(--linie); border-radius: .6rem; cursor: pointer;
          font-weight: 400; font-size: 1rem; }
.ablage.aktiv, .ablage:hover { border-color: var(--tinte); background: color-mix(in srgb, var(--gelb) 18%, transparent); }
.ablage input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ablage:focus-within { outline: 3px solid var(--gelb); outline-offset: 2px; }

ul { list-style: none; margin: 0; padding: 0; }
.uebertragungen li { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; margin-top: .6rem;
                     font-size: .9rem; overflow-wrap: anywhere; }
progress { width: 100%; height: .5rem; grid-column: 1 / -1; accent-color: var(--rot); }

.prospekte li { display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; padding: .7rem 0;
                border-top: 1px solid var(--linie); align-items: start; }
.prospekte li:first-child { border-top: 0; padding-top: 0; }
.prospekte .name { font-weight: 700; font-size: 1.05rem; }
.prospekte .datei { overflow-wrap: anywhere; }
.prospekte .aktionen { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; }
.prospekte progress { margin-top: .2rem; }
.marke-status { display: inline-block; padding: .05rem .5rem; border-radius: 1rem; font-size: .8rem;
                font-weight: 600; border: 1px solid currentColor; margin-left: .4rem; vertical-align: middle; }
.status-fertig { color: var(--gruen); } .status-fehler { color: var(--rot); }
.status-abgelaufen, .status-wartet, .status-laeuft { color: var(--leise); }

.angebote { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .6rem; }
.angebote li { display: grid; grid-template-columns: 1fr auto; gap: .1rem .7rem; align-content: start;
               padding: .7rem .8rem; border: 1px solid var(--linie); border-radius: .5rem; background: var(--feld);
               min-width: 0; }
.angebote .produkt { font-weight: 700; overflow-wrap: anywhere; }
.angebote .preis { grid-row: span 2; align-self: start; justify-self: end; text-align: right; white-space: nowrap; }
.angebote .preis b { display: inline-block; background: var(--gelb); color: #c8102e; font-size: 1.25rem;
                     font-weight: 900; padding: .05rem .45rem; border-radius: .3rem; transform: rotate(-2deg);
                     font-variant-numeric: tabular-nums; }
.angebote .preis s { display: block; color: var(--leise); font-size: .85rem; margin-top: .15rem; }
.angebote .zusatz { grid-column: 1 / -1; color: var(--leise); font-size: .87rem; overflow-wrap: anywhere; }
.angebote .wo { grid-column: 1 / -1; font-size: .87rem; margin-top: .25rem; display: flex; flex-wrap: wrap;
                gap: .1rem .6rem; }
.angebote .wo strong { font-weight: 700; }
.angebote .bedingung { color: var(--rot); }
.angebote a { color: inherit; }

@media (max-width: 34rem) {
  .prospekte li { grid-template-columns: 1fr; }
  .prospekte .aktionen { justify-content: flex-start; }
}

dialog { border: 1px solid var(--linie); border-radius: .6rem; background: var(--karte); color: var(--tinte);
         padding: 1.1rem; width: min(26rem, calc(100vw - 2rem)); }
dialog::backdrop { background: rgb(0 0 0 / .45); }
dialog label { margin-top: .6rem; }
