/* ══════════ Kamera & Warteschlange ══════════ */

.offline {
  display: none; align-items: center; gap: 9px;
  background: var(--sunken); border-bottom: 1px solid var(--line);
  padding: 9px 14px; font-size: var(--step--1); color: var(--ink-2);
}
.offline.on { display: flex; }
.offline svg { flex: none; color: var(--ink-3); }

.capture {
  display: flex; flex-direction: column; align-items: center; gap: 13px;
  padding: 26px 18px 24px; text-align: center;
}
.capture h2 { font-size: var(--step-1); }
.capture p { margin: 0; color: var(--ink-2); font-size: var(--step-0); max-width: 30ch; }
.shutter {
  border: 0; background: var(--accent); color: var(--on-accent);
  width: 100%; max-width: 300px; border-radius: var(--r);
  padding: 15px; font-size: var(--step-1); font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  transition: background .12s;
}
.shutter:hover { background: var(--accent-deep); }
.shutter:active { transform: translateY(1px); }
.shutter.ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-strong); font-weight: 600;
  padding: 12px; font-size: var(--step-0);
}
.shutter.ghost:hover { background: var(--sunken); border-color: var(--accent); }

.capture-hint { font-size: var(--step--1); color: var(--ink-3); max-width: 32ch; }

.btn.small { padding: 8px 12px; font-size: var(--step--1); }

/* Bilder dieser Flasche */
.shots {
  display: flex; gap: 10px; overflow-x: auto;
  padding: 12px 14px; scrollbar-width: thin;
}
.shot-card { position: relative; flex: none; width: 84px; }
.shot-card img {
  width: 84px; height: 112px; object-fit: cover;
  border-radius: 7px; border: 1px solid var(--line); background: var(--sunken);
  display: block;
}
.shot-role {
  display: block; font-size: 0.6875rem; color: var(--ink-2);
  text-align: center; margin-top: 4px;
}
.shot-x {
  position: absolute; top: -6px; right: -6px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--card);
  color: var(--ink-2); cursor: pointer; font-size: 13px; line-height: 1;
  display: grid; place-items: center; padding: 0;
}
.shot-x:hover { border-color: var(--accent); color: var(--accent-deep); }

.busybar {
  display: flex; align-items: center; gap: 9px;
  font-size: var(--step--1); color: var(--ink-2);
}

.problem {
  display: flex; flex-direction: column; gap: 5px;
  background: var(--sunken); font-size: var(--step--1); color: var(--ink-2);
}
.problem strong { color: var(--ink); font-size: var(--step-0); }
.problem span { word-break: break-word; }

/* Aufgenommene Flasche */
.taken { display: grid; grid-template-columns: 96px 1fr; gap: 13px; padding: 13px 14px; }
.taken img {
  width: 96px; height: 128px; object-fit: cover;
  border-radius: 7px; border: 1px solid var(--line); background: var(--sunken);
}
.taken-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.taken-state { font-weight: 600; font-size: var(--step-0); }
.taken-sub { font-size: var(--step--1); color: var(--ink-2); }
.pending {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--step--1); color: var(--accent-deep); font-weight: 600;
}
.spin {
  width: 11px; height: 11px; border-radius: 50%; flex: none;
  border: 2px solid var(--line-strong); border-top-color: var(--accent);
  animation: sp .7s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }

/* Warteschlange */
.qrow {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 11px;
  align-items: center; padding: 9px 14px;
}
.qrow + .qrow { border-top: 1px solid var(--line); }
.qrow img {
  width: 34px; height: 46px; object-fit: cover;
  border-radius: 4px; border: 1px solid var(--line);
}
.qrow-t { font-size: var(--step--1); }
.qrow-s { font-size: 0.6875rem; color: var(--ink-3); margin-top: 1px; }
.linkbtn {
  border: 0; background: transparent; color: var(--accent-deep);
  font-size: var(--step--1); font-weight: 600; cursor: pointer; padding: 4px;
}
.linkbtn:hover { text-decoration: underline; }

.storage {
  padding: 10px 14px; font-size: var(--step--1); color: var(--ink-3);
  display: flex; justify-content: space-between; gap: 10px;
}

.empty-hint {
  padding: 16px 14px; text-align: center;
  font-size: var(--step--1); color: var(--ink-3);
}

/* Ankreuzfeld */
.opt {
  display: flex; align-items: center; gap: 9px;
  font-size: var(--step--1); color: var(--ink-2); cursor: pointer;
}
.opt input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }

/* Eingabefelder, die wirklich Eingaben sind */
input.input, select.input, textarea.input {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--card); color: var(--ink);
  font: inherit; font-size: var(--step-0); padding: 9px 11px;
}
input.input:focus, select.input:focus, textarea.input:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.feldpaar { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

/* Sammlung */
.samm-zeile {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 11px;
  align-items: center; padding: 10px 14px; width: 100%;
  background: transparent; border: 0; text-align: left; cursor: pointer;
  color: inherit; font: inherit;
}
.samm-zeile + .samm-zeile { border-top: 1px solid var(--line); }
.samm-zeile:hover { background: var(--sunken); }
.samm-zeile img {
  width: 40px; height: 54px; object-fit: cover;
  border-radius: 5px; border: 1px solid var(--line);
}
/* Die Zeilen unter der Karte tragen kein Bild — sonst rutscht der Name
   in die 40-Pixel-Spalte und bricht nach jedem Wort um. */
.samm-zeile.ohne-bild { grid-template-columns: 1fr auto; }
.samm-name { font-size: var(--step-0); font-weight: 600; }
.samm-sub { font-size: var(--step--1); color: var(--ink-2); margin-top: 1px; }
.samm-preis { font-size: var(--step--1); color: var(--ink-3); white-space: nowrap; }
/* Ein Urteil ist länger als ein Preis und darf umbrechen. */
.samm-preis.urteil { white-space: normal; text-align: right; max-width: 8.5em; }

/* Sicherung */
.sicher-zeile { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.sicher-zeile .btn { flex: 1 1 auto; }
.sicher-stand { font-size: var(--step--1); margin-top: 3px; }
.sicher-hinweis {
  font-size: 0.6875rem; color: var(--ink-3);
  margin-top: 10px; line-height: 1.45;
}
.sicher-warnung { color: var(--ink-2); font-weight: 600; }

/* ══════════ Flaschenseite ══════════
   Die Seite, die man jemandem hinhält. Volle Fläche, damit nichts
   von der App drumherum ablenkt — der Reiter darunter bleibt stehen,
   wo er war.                                                        */
.seite {
  position: fixed; inset: 0; z-index: 40;
  background: var(--ground);
  display: none; flex-direction: column;
}
.seite.on { display: flex; }
.seite > * { width: 100%; max-width: 460px; margin-inline: auto; }
.seite-kopf {
  display: flex; align-items: center; gap: 11px; flex: none;
  padding: 10px 14px; background: var(--card);
  border-bottom: 1px solid var(--line);
}
.seite-kopf h2 {
  font-size: var(--step-0); font-weight: 600; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.seite-inhalt {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px; display: flex; flex-direction: column; gap: 12px;
}
/* Ohne das schrumpfen die Karten, bis alles auf einen Bildschirm passt:
   Jede Karte war angeschnitten, statt dass die Seite scrollt. */
.seite-inhalt > * { flex: 0 0 auto; }
.seite-fuss {
  flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 9px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--line);
}
/* Gilt für den Seitenfuß und für die Knöpfe unter der Auskunft: ein
   Merkmal, das schon gesetzt ist, sieht man dem Knopf an. */
.seite-fuss .btn[aria-pressed="true"],
#ergebnis-aktionen .btn[aria-pressed="true"] {
  border-color: var(--accent); color: var(--accent-deep); font-weight: 600;
}

/* Fotos klein, zum Vergrößern antippen */
.galerie { display: flex; gap: 8px; flex-wrap: wrap; padding: 13px 14px; }
.galerie button {
  padding: 0; width: 76px; height: 98px; flex: none; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--sunken); overflow: hidden;
}
.galerie button:hover { border-color: var(--accent); }
.galerie img { display: block; width: 100%; height: 100%; object-fit: cover; }
.galerie-rolle {
  display: block; font-size: 0.625rem; color: var(--ink-3);
  text-align: center; margin-top: 3px;
}
.lupe {
  position: fixed; inset: 0; z-index: 50; padding: 14px;
  background: rgba(20,22,25,.94);
  display: none; align-items: center; justify-content: center;
}
.lupe.on { display: flex; }
.lupe img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }

/* Angaben als Zeilen, nicht als Formular */
.angaben { display: flex; flex-direction: column; }
.ang {
  display: grid; grid-template-columns: 38% 1fr; gap: 10px;
  padding: 9px 14px; font-size: var(--step-0);
}
.ang + .ang { border-top: 1px solid var(--line); }
.ang > span { color: var(--ink-3); font-size: var(--step--1); }
.ang > b { font-weight: 600; }
.notizfeld {
  width: 100%; min-height: 88px; resize: vertical;
  font-family: inherit; line-height: 1.45;
}
.eigene-notiz { white-space: pre-wrap; margin: 0; color: var(--ink); }

.suchfeld { display: flex; gap: 8px; align-items: center; }
.suchfeld .input { flex: 1; min-width: 0; }
.suchfeld .btn { flex: none; }

/* ── Preis und Bezugsquelle (Stufe 2) ── */
.preis-eingabe { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.preis-urteil { font-size: var(--step-1); font-weight: 700; margin: 0; }
.preis-satz { color: var(--ink-2); font-size: var(--step-0); margin: 5px 0 0; }
.angebote { display: flex; flex-direction: column; }
.ang-zeile {
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  padding: 10px 14px; align-items: baseline;
}
.ang-zeile + .ang-zeile { border-top: 1px solid var(--line); }
.ang-haus { font-weight: 600; font-size: var(--step-0); }
.ang-sub { font-size: var(--step--1); color: var(--ink-3); margin-top: 2px; }
.ang-preis { font-weight: 700; white-space: nowrap; }
.ang-zeile a { color: var(--accent-deep); }
/* Eine fremde Verkostungsnotiz — mit Absender, damit sie nie als
   eigenes Urteil durchgeht. */
.stimme { padding: 11px 14px; }
.stimme + .stimme { border-top: 1px solid var(--line); }
.stimme a { color: var(--accent-deep); }
.stimme-satz {
  margin: 4px 0 0; color: var(--ink-2); font-size: var(--step-0);
  font-style: italic; line-height: 1.5;
}
.stand { font-size: 0.6875rem; color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .spin { animation-duration: 2s; }
}
