:root {
  --bg: #f6f1ea;
  --flaeche: #fffdf9;
  --flaeche-2: #efe8df;
  --tinte: #1f1b18;
  --leise: #6b625b;
  --linie: #e2d9ce;
  --akzent: #a3584a;
  --akzent-text: #ffffff;
  --akzent-zart: #f3e2dc;
  --fehler: #a8321f;
  --schatten: 0 1px 2px rgb(31 27 24 / 6%), 0 8px 24px rgb(31 27 24 / 8%);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171513;
    --flaeche: #221f1c;
    --flaeche-2: #2c2825;
    --tinte: #f3ede6;
    --leise: #b3a89d;
    --linie: #3a3531;
    --akzent: #e0907e;
    --akzent-text: #171513;
    --akzent-zart: #3a2a25;
    --fehler: #f08a78;
    --schatten: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--tinte);
  font: 17px/1.45 var(--sans);
  min-height: 100dvh;
  padding: env(safe-area-inset-top) 0 calc(76px + env(safe-area-inset-bottom));
}
body.ohne-tabs { padding-bottom: env(safe-area-inset-bottom); }
main { max-width: 560px; margin: 0 auto; padding: 20px 16px 24px; }
main > * + *:not(.kopf) { margin-top: 12px; }
/* Unter einer Überschrift: Untertitel eng, Kästen mit Luft */
main > h1 + p, main > h1 + .leise { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 6px; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 22px; }
p { margin: 0 0 12px; }
.leise { color: var(--leise); }
.klein { font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
img { display: block; max-width: 100%; }

/* Bedienelemente: mindestens 44 px hoch */
.knopf, .knopf-zweit, .knopf-text {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px;
  font: 600 16px/1 var(--sans); cursor: pointer; text-decoration: none;
  border: 1px solid transparent; -webkit-tap-highlight-color: transparent;
}
/* Langes Drücken auf Bedienelemente markiert auf dem iPhone keinen Text und öffnet kein Kontextmenü */
button, .knopf, .knopf-zweit, .knopf-text, .chip, .kachel, label.datei, .tabs {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.knopf { background: var(--akzent); color: var(--akzent-text); }
.knopf-zweit { background: var(--flaeche); color: var(--tinte); border-color: var(--linie); }
.knopf-text { background: none; color: var(--akzent); padding: 0 8px; }
.knopf:active, .knopf-zweit:active { transform: scale(0.98); }
.knopf[disabled], .knopf-zweit[disabled] { opacity: 0.5; cursor: default; }
.breit { width: 100%; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
.reihe { display: flex; gap: 10px; flex-wrap: wrap; }
.reihe > * { flex: 1 1 0; min-width: 140px; }
/* Knöpfe nebeneinander nie im Text umbrechen: Passt es nicht, rutscht der nächste Knopf in die nächste Zeile */
.reihe > .knopf, .reihe > .knopf-zweit, .reihe > .knopf-text { flex: 1 1 auto; white-space: nowrap; }
.stapel { display: grid; gap: 10px; }

.karte {
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 20px;
  padding: 18px; box-shadow: var(--schatten); margin-bottom: 16px;
}
.kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.mini-profil { width: 48px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--flaeche-2); }

input.code {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--linie); background: var(--flaeche); color: var(--tinte);
  font: 600 20px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; text-align: center;
}
label.feld { display: block; font-weight: 600; margin-bottom: 8px; }
.datei { position: relative; overflow: hidden; }
.datei input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }

.meldung { border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; background: var(--akzent-zart); }
.meldung.fehler { color: var(--fehler); }

/* Anmeldung */
.willkommen { min-height: calc(100dvh - 80px); display: grid; align-content: center; gap: 22px; text-align: center; }
.willkommen .logo { width: 84px; height: 84px; border-radius: 22px; margin: 0 auto; box-shadow: var(--schatten); }
.abschied { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--akzent); margin: 0; }
/* Zustimmung bei der Registrierung: ganze Zeile ist die Tipp-Fläche (mindestens 44 px), Links im Text unterstrichen */
.zustimmung { text-align: left; }
.haken { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 0; cursor: pointer; }
.haken input { flex: 0 0 auto; width: 24px; height: 24px; margin: 0; accent-color: var(--akzent); }
.haken a, .rechtliches a { color: var(--akzent); text-decoration: underline; text-underline-offset: 2px; }
/* Eigenständige Links (nicht im Fließtext): eigene Tipp-Fläche von 44 px */
.rechtliches { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0; }
.rechtliches a { display: inline-flex; align-items: center; min-height: 44px; }
/* Restkontingent auf der Startseite: unter der Karte, Abstand kommt von main > * + * */
.kontingent > * { margin: 0; }

/* Größen nach Marke */
.groesse-zeile { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.groesse-zeile + .groesse-zeile { border-top: 1px solid var(--linie); padding-top: 8px; }
.groesse-zeile .reihe { flex-wrap: nowrap; gap: 0; }
.groesse-zeile .reihe > *, .groesse-zeile > .knopf-text { flex: 0 0 auto; min-width: 0; min-height: 44px; }

/* Fotos */
.bildrahmen { position: relative; border-radius: 20px; overflow: hidden; background: var(--flaeche-2); box-shadow: var(--schatten); }
.bildrahmen img { width: 100%; height: auto; }
.vorschau { max-height: 46vh; width: auto; margin: 0 auto; border-radius: 16px; }
.schimmer::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgb(255 255 255 / 35%) 50%, transparent 80%);
  animation: schimmer 1.6s ease-in-out infinite; transform: translateX(-100%);
}
@keyframes schimmer { to { transform: translateX(100%); } }
.marke {
  position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 999px;
  background: rgb(0 0 0 / 55%); color: #fff; font-size: 13px; font-weight: 600;
}
.marke-rechts { left: auto; right: 12px; }
.umschaltbar img { cursor: pointer; -webkit-user-select: none; user-select: none; }
/* Bilder behalten das iPhone-Menü (z. B. „In Fotos sichern“), auch in Kacheln */
.kachel, .kachel img, .umschaltbar img { -webkit-touch-callout: default; }
.hinweis { font-size: 14px; color: var(--leise); text-align: center; margin: 12px 4px 0; }

.raster { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kachel {
  position: relative; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; padding: 0;
  background: var(--flaeche-2); border: 2px solid transparent; cursor: pointer;
}
.kachel img { width: 100%; height: 100%; object-fit: cover; }
.kachel.aktiv { border-color: var(--akzent); }
.kachel .herz { position: absolute; right: 8px; top: 6px; font-size: 20px; color: #fff; text-shadow: 0 1px 3px rgb(0 0 0 / 50%); }
.kachel .status { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; color: var(--leise); padding: 8px; text-align: center; }
.filter { display: flex; gap: 8px; margin-bottom: 14px; }
.filter button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--linie); background: var(--flaeche); color: var(--tinte); font: 600 15px var(--sans); }
.filter button[aria-pressed="true"] { background: var(--tinte); color: var(--bg); border-color: var(--tinte); }

/* Überlagerung für Details */
.overlay { position: fixed; inset: 0; z-index: 20; background: var(--bg); overflow-y: auto; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.overlay main { padding-top: 12px; }

/* Ladekreis */
.laden { min-height: 60dvh; display: grid; place-items: center; }
.kreis { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--linie); border-top-color: var(--akzent); animation: dreh 0.9s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }

/* Tabs */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: center; gap: 4px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--linie);
}
.tabs[hidden] { display: none; }
.tabs button {
  flex: 0 1 160px; min-height: 56px; display: grid; justify-items: center; gap: 2px;
  background: none; border: 0; color: var(--leise); font: 600 12px var(--sans); cursor: pointer;
}
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tabs button[aria-current="page"] { color: var(--akzent); }

@media (prefers-reduced-motion: reduce) {
  .schimmer::after, .kreis { animation: none; }
}

/* --- Ausbau: Schrank, Outfits, Stylist, Passform, Profil --------------------------------------- */
body.overlay-offen { overflow: hidden; }
h3 { font-family: var(--serif); font-size: 19px; margin: 10px 0 4px; }
.abstand { margin-top: 18px; }
.gefahr { color: var(--fehler); }
.tabs button { flex: 1 1 0; min-width: 0; font-size: 11px; }

input.text, textarea.text, input.zahl {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px;
  border: 1px solid var(--linie); background: var(--flaeche); color: var(--tinte); font: 400 16px/1.4 var(--sans);
}
textarea.text { resize: vertical; }
input.zahl { max-width: 160px; }
input.code { letter-spacing: 0.12em; text-transform: uppercase; text-align: center; font-weight: 600; font-size: 20px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--linie); background: var(--flaeche); color: var(--tinte); font: 600 14px var(--sans); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--tinte); color: var(--bg); border-color: var(--tinte); }
.farbpunkt { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgb(0 0 0 / 20%); display: inline-block; }
.farbreihe { display: flex; gap: 6px; margin-bottom: 10px; }
.scroll-chips { overflow-x: auto; margin: 0 -16px 10px; padding: 0 16px; scrollbar-width: none; }
.scroll-chips .chips { flex-wrap: nowrap; }
.scroll-chips .chip { white-space: nowrap; }
.filterbox { display: grid; gap: 6px; margin-bottom: 14px; }
.filterbox p { margin: 6px 0 0; }

.hinweis-karte { display: grid; gap: 2px; width: 100%; text-align: left; cursor: pointer; color: var(--tinte); }
.raster-schrank { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.raster-klein { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.raster-outfits { grid-template-columns: repeat(2, 1fr); gap: 12px; }
.kachel-teil { background: var(--flaeche-2); }
.kachel-teil img { object-fit: contain; padding: 6px; }
.kachel-titel { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font-size: 12px; font-weight: 600; text-align: left;
  color: var(--tinte); background: color-mix(in srgb, var(--flaeche) 85%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kachel-info { position: absolute; left: 6px; top: 6px; font-size: 11px; color: var(--leise); }
.kachel[aria-pressed="true"] { border-color: var(--akzent); }
.klein-marke { top: auto; bottom: 8px; left: 8px; font-size: 11px; }
.outfit-kachel { position: relative; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; color: var(--tinte); }
.outfit-kachel .kachel-titel { position: static; background: none; padding: 6px 2px; font-size: 14px; }

.teil-bild img { max-height: 52vh; width: auto; margin: 0 auto; object-fit: contain; }
.teil-bild.freigestellt { background: var(--flaeche-2); }
.feldzeile { display: grid; gap: 6px; }
.pruef-karte { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; }
.pruef-bild { padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--flaeche-2); aspect-ratio: 3 / 4; cursor: pointer; }
.pruef-bild img { width: 100%; height: 100%; object-fit: contain; }
.ordner-zeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 0; }
.ordner-zeile .reihe > * { min-width: 0; flex: 0 0 auto; }
.klebrig { position: sticky; top: 0; z-index: 2; }

/* Collage: freigestellte Teile auf ruhigem Grund */
.collage { display: grid; gap: 4px; background: var(--flaeche-2); border-radius: 16px; padding: 8px; aspect-ratio: 1 / 1; }
.collage-1 { grid-template-columns: 1fr; }
.collage-2 { grid-template-columns: 1fr 1fr; }
.collage-3, .collage-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.collage-5, .collage-6 { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.collage-3 .collage-teil:first-child { grid-row: span 2; }
.collage-teil { min-height: 0; display: grid; place-items: center; }
.collage-teil img { max-width: 100%; max-height: 100%; object-fit: contain; }
.collage-gross { max-width: 420px; margin: 0 auto; }
.vorschlag .reihe { margin-top: 8px; }
.stylist textarea { min-height: 64px; }

/* Passform-Raster */
.raster-box { display: grid; place-items: center; margin-bottom: 12px; }
svg.raster { width: 100%; max-width: 320px; height: auto; display: block; margin: 8px auto 0; }
svg.raster .silhouette { fill: var(--flaeche-2); stroke: var(--leise); stroke-width: 1; }
svg.raster .marke { stroke: var(--leise); stroke-dasharray: 3 3; stroke-width: 1; }
svg.raster .marke-text { fill: var(--leise); font: 10px var(--sans); }
svg.raster .saum { stroke: var(--akzent); stroke-width: 3; }
svg.raster .saum-text { fill: var(--akzent); font: 700 11px var(--sans); }
svg.raster .boden { stroke: var(--tinte); stroke-width: 1.5; }
.passform-text { font-weight: 600; }

.tabelle { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabelle th, .tabelle td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--linie); }
.anleitung { padding-left: 22px; display: grid; gap: 10px; }
.anleitung li { padding-left: 4px; }
code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--flaeche-2); padding: 1px 5px; border-radius: 6px; word-break: break-all; }

@media (max-width: 360px) {
  .raster-schrank { grid-template-columns: repeat(2, 1fr); }
  .tabs button span { font-size: 10px; }
}

/* Freundinnen */
.tabs button { position: relative; }
.badge {
  position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--akzent); color: var(--akzent-text); font: 700 11px/18px var(--sans); text-align: center;
}
.post h3 { margin: 0; }
.post .nachricht { font-family: var(--serif); font-style: italic; font-size: 18px; margin: 0; }
.post .collage { max-width: 360px; width: 100%; margin: 0 auto; }
.post .reihe > * { min-width: 120px; }
.neu-marke { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--akzent); color: var(--akzent-text); font-weight: 700; font-size: 12px; }
.freund-zeile {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; width: 100%; margin: 0;
  text-align: left; color: var(--tinte); font: inherit; cursor: pointer; min-height: 64px;
}
.freund-zeile strong { font-size: 18px; }
.freund-zeile .leise { grid-column: 1; }
.freund-zeile .pfeil { grid-column: 2; grid-row: 1 / span 2; font-size: 26px; color: var(--leise); }
/* Freunde: Reiter „Für dich · Gesendet · Freundinnen“, Gesendetes als Zeilen */
.reiter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding-top: 6px; }
.reiter button {
  position: relative; min-height: 44px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--linie);
  background: var(--flaeche); color: var(--tinte); font: 600 14px var(--sans); white-space: nowrap; cursor: pointer;
}
.reiter button[aria-selected="true"] { background: var(--tinte); color: var(--bg); border-color: var(--tinte); }
.reiter .zahl {
  position: absolute; top: -8px; right: 4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--akzent); color: var(--akzent-text); border: 1px solid var(--akzent); font: 700 11px/18px var(--sans); text-align: center;
}
.reiter .zahl[hidden] { display: none; }
.sendung-zeile {
  display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 12px; width: 100%; margin: 0;
  text-align: left; color: var(--tinte); font: inherit; cursor: pointer; min-height: 64px;
}
.sendung-zeile img { width: 52px; height: 68px; object-fit: cover; border-radius: 10px; background: var(--flaeche-2); }
.sendung-text { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.sendung-zeile .pfeil { font-size: 26px; color: var(--leise); }
.bild-knopf { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; color: inherit; font: inherit; cursor: zoom-in; }
.post .bild-knopf { max-width: 360px; margin: 0 auto; }
.raster-einzel { grid-template-columns: minmax(0, 320px); justify-content: center; }

/* Vollbild für Fotos (bewusst dunkel, auch im hellen Modus) */
.vollbild {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top) + 60px) 12px calc(env(safe-area-inset-bottom) + 16px); background: rgb(0 0 0 / 92%);
}
.vollbild img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; }
.vollbild-zu {
  position: absolute; top: calc(env(safe-area-inset-top) + 8px); right: 12px; width: 44px; height: 44px; border-radius: 999px;
  border: 0; background: rgb(255 255 255 / 18%); color: #fff; font: 600 20px var(--sans); cursor: pointer;
}
body.vollbild-offen { overflow: hidden; }
/* Rückfrage über allem (Einwilligung für fal): unten wie ein Blatt, Inhalt scrollt bei wenig Höhe */
.dialog-ebene {
  position: fixed; inset: 0; z-index: 45; display: flex; align-items: flex-end; justify-content: center; overflow-y: auto;
  padding: calc(env(safe-area-inset-top) + 24px) 12px calc(env(safe-area-inset-bottom) + 12px); background: rgb(0 0 0 / 55%);
}
.dialog-ebene .dialog { width: 100%; max-width: 560px; margin: 0; }
.quelle { font-size: 13px; color: var(--leise); }
.quelle a { color: inherit; }
code.link { display: block; padding: 10px 12px; border-radius: 12px; font-size: 14px; user-select: all; -webkit-user-select: all; }
.klebrig-unten {
  position: sticky; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 2; padding: 10px; border-radius: 20px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--schatten);
}

/* Umfrage „Welches soll ich nehmen?“ und Shop-Links */
.umfrage-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.umfrage-raster > img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; background: var(--flaeche-2); }
.umfrage-zelle { display: grid; gap: 6px; align-content: start; }
.umfrage-zelle img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; background: var(--flaeche-2); border: 3px solid transparent; }
.umfrage-zelle.favorit img { border-color: var(--akzent); }
.umfrage-zelle .knopf-zweit { min-height: 44px; padding: 0 10px; }
.umfrage-zelle .knopf-zweit[aria-pressed="true"] { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
.umfrage-zelle p { margin: 0; }
.stimmen { font-weight: 600; }
.umfrage-zeile {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; margin: 0;
  text-align: left; color: var(--tinte); font: inherit; cursor: pointer;
}
.umfrage-zeile p { margin: 2px 0 0; }
.umfrage-zeile .pfeil { font-size: 26px; color: var(--leise); }
.umfrage-mini { display: flex; gap: 4px; }
.umfrage-mini img { width: 34px; height: 46px; object-fit: cover; border-radius: 8px; background: var(--flaeche-2); }
.shop-links { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.shop-links .knopf-text { padding: 0; min-height: 44px; }
.abstand-unten { margin-bottom: 14px; }

/* Kommentare unter Sendungen */
.kommentare { display: grid; gap: 8px; border-top: 1px solid var(--linie); padding-top: 6px; }
.karte > .kommentare:only-child { border-top: 0; padding-top: 0; }
.kommentar-knopf { justify-content: flex-start; padding: 0; min-height: 44px; }
.verlauf { display: grid; gap: 8px; }
.blase { max-width: 85%; justify-self: start; background: var(--flaeche-2); border-radius: 16px 16px 16px 4px; padding: 8px 12px; }
.blase.eigen { justify-self: end; background: var(--akzent-zart); border-radius: 16px 16px 4px 16px; }
.blase-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; overflow: hidden; }
.blase-zeit { margin: 2px 0 0; font-size: 12px; color: var(--leise); display: flex; align-items: center; gap: 6px; }
/* Tipp-Fläche 44 px, optisch klein: negativer Rand, damit die Blase nicht wächst */
.blase-weg { border: 0; background: none; color: var(--leise); font-size: 18px; line-height: 1; min-width: 44px; min-height: 44px; margin: -12px -10px -12px -6px; cursor: pointer; }
.kommentar-zeile { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.kommentar-zeile .knopf { padding: 0 16px; }

/* Mehrfachauswahl im Schrank */
.kopf-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.kopf-knoepfe .knopf, .kopf-knoepfe .knopf-zweit { padding: 0 16px; }
.auswahl-haken {
  position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font: 700 14px/1 var(--sans); background: color-mix(in srgb, var(--flaeche) 85%, transparent); color: transparent;
  border: 2px solid var(--linie);
}
.kachel[aria-pressed="true"] .auswahl-haken { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
/* Über der Tab-Leiste (unten fest, ~76 px) schweben */
.auswahl-leiste {
  position: sticky; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 3; padding: 12px; border-radius: 20px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--schatten); border: 1px solid var(--linie);
}
.auswahl-zeile { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.auswahl-zeile .knopf-text { padding: 0 4px; }

/* hidden muss immer gewinnen, auch gegen display-Regeln */
[hidden] { display: none !important; }
/* Collage: Zellen dürfen nie über die quadratische Fläche hinauswachsen */
.collage { grid-auto-rows: minmax(0, 1fr); overflow: hidden; }
.collage-1, .collage-2 { grid-template-rows: minmax(0, 1fr); }
.collage-3, .collage-4, .collage-5, .collage-6 { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
.collage-teil { overflow: hidden; width: 100%; height: 100%; }
.collage-teil img { width: 100%; height: 100%; object-fit: contain; }
