/* Luminous V2 consistency layer ------------------------------------------
   Diese Datei ist absichtlich klein, spaet geladen und streng auf bereits
   migrierte Oberflaechen begrenzt. Sie ist der verbindliche visuelle Vertrag
   nach mehreren explorativen Redesign-Staenden in luminous.css.

   Grammatik:
   - Information steht offen auf Leseflaechen und wird durch Linien geordnet.
   - Rund ist fuer Objekt-/Icon-Aktionen reserviert, nicht fuer jeden Text.
   - Tabs sind eine ruhige Unterstreichung, keine konkurrierenden Pillen.
   - Dynamischer Text fliesst auf Mobile; absolute Koordinaten sind Dekoration.
   - Kein sichtbarer Informationstext unter 10 px.

   Scanner, Erkennung und .karte-Inhalte sind ausdruecklich nicht Teil davon. */

:root {
  --lumi-v2-label: .625rem;
  --lumi-v2-meta: .7rem;
  --lumi-v2-body: .78rem;
  --lumi-v2-control: .72rem;
  --lumi-v2-line: rgba(31, 103, 112, .18);
  --lumi-v2-reading: rgba(244, 253, 248, .76);
  --lumi-v2-ink: #173f4c;
  --lumi-v2-muted: #58757d;
  --lumi-v2-green: #168267;
  --lumi-v2-gold: #b77b18;
}

/* Gemeinsame Mindestgroessen nur in den migrierten Produktflaechen. */
:where(
  #todayView.heute-v2,
  #collectionView.collection-v2-active,
  #catalogView.catalog-v2,
  #mergeView,
  #studioView.studio-v2,
  #battleView.arena-v2,
  #mapView.map-v2,
  #feedView.feed-v2,
  #missionsView.missions-v2,
  #tradeView.trade-v2,
  #profileView.profile-v2
) :where(button, [role="button"], summary, input, select) {
  font-size: max(var(--lumi-v2-control), 1em);
}

:where(
  #todayView.heute-v2,
  #collectionView.collection-v2-active,
  #catalogView.catalog-v2,
  #mergeView,
  #studioView.studio-v2,
  #battleView.arena-v2,
  #mapView.map-v2,
  #feedView.feed-v2,
  #missionsView.missions-v2,
  #tradeView.trade-v2,
  #profileView.profile-v2
) :where(p, em) {
  line-height: 1.42;
}

/* COLLECTION: Hierarchie und Archiv bleiben kompakt, aber lesbar. */
.collection-v2-title small,
.collection-v2-next-trail small,
.collection-v2-journey-label,
.collection-v2-archive-intro small,
.collection-v2-filter-panel header small,
.collection-v2-filter-axis legend,
.collection-v2-filter-sort > span {
  font-size: var(--lumi-v2-label);
}

.collection-v2-title p,
.collection-v2-next-trail span,
.collection-v2-archive-intro p,
.collection-v2-journey small,
.collection-v2-journey .collection-v2-operations small {
  font-size: var(--lumi-v2-meta);
}

.collection-v2-journey b { font-size: .75rem; }
.collection-v2-journey button { min-height: 94px; }
.collection-v2-journey .collection-v2-operations button {
  min-height: 52px;
  padding-block: 7px;
}

.collection-v2-card-copy {
  min-height: 96px;
  margin-top: 10px;
}
.collection-v2-card-copy > span small,
.collection-v2-card-copy em,
.collection-v2-rank-copy {
  font-size: var(--lumi-v2-label);
  line-height: 1.25;
}
.collection-v2-card-copy strong { font-size: .84rem; }
.collection-v2-rank-copy { bottom: 2px; }
.collection-v2-rank-track { bottom: 22px; }
.collection-v2-count small { font-size: var(--lumi-v2-label); }
.collection-v2-filter-fab {
  width: 82px;
  height: 46px;
  grid-template-columns: 24px auto;
  grid-template-rows: 1fr;
  align-content: center;
  gap: 6px;
  border-radius: 16px 5px 16px 5px;
}
.collection-v2-filter-fab small {
  display: block;
  font-size: var(--lumi-v2-label);
}

.collection-v2-filter-panel {
  border-radius: 20px 8px 20px 8px;
}
.collection-v2-search-rail {
  border-radius: 14px 5px 14px 5px;
}
.collection-v2-search-rail input,
.collection-v2-search-rail button,
.collection-v2-filter-axis button,
.collection-v2-filter-sort select,
.collection-v2-filter-panel footer button,
.collection-v2-filter-panel footer > span small {
  font-size: var(--lumi-v2-label);
}
.collection-v2-filter-axis button,
.collection-v2-filter-sort select,
.collection-v2-filter-panel footer button { min-height: 44px; }
.collection-v2-filter-axis.groups > div {
  flex-wrap: wrap;
  overflow: visible;
}

.collection-v2-gap-overview small,
.collection-v2-gap-total small,
.collection-v2-gap-node-copy small,
.collection-v2-gap-medallion i,
.collection-v2-gap-focus small,
.collection-v2-gap-focus p,
.collection-v2-gaps.is-unknown .collection-v2-gap-core small {
  font-size: var(--lumi-v2-label);
}
.collection-v2-gap-node-copy em,
.collection-v2-gap-overview p,
.collection-v2-gaps.is-unknown .collection-v2-gap-core p {
  font-size: var(--lumi-v2-meta);
}
.collection-v2-gap-node-copy b,
.collection-v2-gap-focus h3 { font-size: var(--lumi-v2-control); }
.collection-v2-gap-nodes button { min-height: 86px; }
.collection-v2-gap-focus button { min-height: 44px; font-size: var(--lumi-v2-label); }

/* Die kompakte Sammlungsreise bleibt auf Unterseiten dieselbe Navigation. */
.collection-v2-journey.is-compact {
  min-height: 102px;
  padding-top: 17px;
}
.collection-v2-journey.is-compact .collection-v2-journey-label {
  top: 6px;
  font-size: var(--lumi-v2-label);
}
.collection-v2-journey.is-compact button {
  min-height: 79px;
  padding-top: 6px;
}
.collection-v2-journey.is-compact b { font-size: .68rem; }
.collection-v2-journey.is-compact small { font-size: var(--lumi-v2-label); }

/* HEUTE: Die Reise ist Inhalt, keine auf festen Pixeln gezeichnete Collage. */
#todayView.heute-v2 .heute-v2-meta > p,
#todayView.heute-v2 .heute-v2-route > header p,
#todayView.heute-v2 .heute-v2-fortschritt > header p,
#todayView.heute-v2 .heute-v2-freunde .heute-block-kopf p,
#todayView.heute-v2 .heute-v2-knoten-text small,
#todayView.heute-v2 .heute-v2-wochenpfad summary small {
  font-size: var(--lumi-v2-label);
}
#todayView.heute-v2 .heute-v2-netz,
#todayView.heute-v2 .heute-v2-route > header > span,
#todayView.heute-v2 .heute-v2-knoten-text em,
#todayView.heute-v2 .heute-kachel em,
#todayView.heute-v2 .heute-stufenbalken span,
#todayView.heute-v2 .fold-value,
#todayView.heute-v2 .fold-note,
#todayView.heute-v2 .heute-feed-zeile small,
#todayView.heute-v2 .heute-feed-zeile em {
  font-size: var(--lumi-v2-meta);
}
#todayView.heute-v2 .heute-v2-profil small { font-size: var(--lumi-v2-label); }
#todayView.heute-v2 .heute-v2-knoten-text strong { font-size: .84rem; }
#todayView.heute-v2 .heute-v2-gruss h1 { line-height: .96; }
#todayView.heute-v2 .heute-v2-gruss h1 strong { line-height: .9; }
#todayView.heute-v2 .quest-row .quest-copy strong {
  color: var(--lumi-v2-ink);
  font-size: var(--lumi-v2-meta);
}
#todayView.heute-v2 .quest-row .quest-copy em,
#todayView.heute-v2 .quest-lohn { color: #536f77; font-size: var(--lumi-v2-label); }
#todayView.heute-v2 .quest-claim {
  min-width: 44px;
  min-height: 44px;
  color: #4f3609;
  background: #ffd260;
  font-size: var(--lumi-v2-meta);
}

/* KARTENOBSERVATORIUM: eine offene Feldblatt-Sprache statt drei konkurrierender
   Glas-/Pillenvarianten. Die echte Karte und ihre Controller bleiben intakt. */
.karten-buehne-v2 .buehne-v2-info {
  color: var(--lumi-v2-ink);
  border-radius: 18px 18px 8px 8px;
  background: linear-gradient(180deg, rgba(244,253,250,.9), rgba(222,244,240,.82));
  backdrop-filter: blur(8px) saturate(1.05);
}
.karten-buehne-v2 .buehne-v2-tabs {
  height: 46px;
  padding-inline: 14px;
  border: 0;
  border-bottom: 1px solid var(--lumi-v2-line);
  border-radius: 0;
  background: transparent;
}
.karten-buehne-v2 .buehne-v2-tabs button {
  min-height: 44px;
  border-radius: 0;
  font-size: var(--lumi-v2-label);
}
.karten-buehne-v2 .buehne-v2-tabs button[aria-selected="true"] {
  color: #805712;
  background: transparent;
  box-shadow: none;
}
.buehne-v2-sheet-griff {
  min-width: 158px;
  min-height: 44px;
  height: 44px;
  border: 0;
  border-bottom: 1px solid rgba(38, 110, 111, .28);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-shadow: 0 1px 10px rgba(255,255,255,.92);
}
.buehne-v2-sheet-griff span { font-size: var(--lumi-v2-label); }
.karten-buehne-v2 .buehne-v2-panel.profil,
.karten-buehne-v2 .buehne-v2-panel.seltenheit {
  grid-template-rows: auto auto auto;
}
.karten-buehne-v2 .buehne-v2-signatur { min-height: 50px; }
.karten-buehne-v2 .buehne-v2-signatur small,
.karten-buehne-v2 .buehne-v2-fundnotiz small,
.karten-buehne-v2 .buehne-v2-meisterschaft > span small,
.karten-buehne-v2 .buehne-v2-fangstapel small,
.karten-buehne-v2 .buehne-v2-meisterschaft > em,
.karten-buehne-v2 .buehne-v2-meisterschaft > em b {
  font-size: var(--lumi-v2-label);
}
.karten-buehne-v2 .buehne-v2-signatur strong,
.karten-buehne-v2 .buehne-v2-fundnotiz strong,
.karten-buehne-v2 .buehne-v2-meisterschaft > span strong,
.karten-buehne-v2 .buehne-v2-fangstapel strong {
  font-size: var(--lumi-v2-meta);
}
.karten-buehne-v2 .buehne-v2-fundnotiz strong { line-height: 1.35; }
.karten-buehne-v2 .buehne-v2-meisterschaft {
  grid-template-columns: 82px minmax(72px, 1fr) 84px;
  grid-template-rows: 58px auto;
  min-height: 88px;
}
.karten-buehne-v2 .buehne-v2-meisterschaft > span,
.karten-buehne-v2 .buehne-v2-meisterschaft > i { height: 56px; }
.karten-buehne-v2 .buehne-v2-werkzeug { min-height: 76px; }
.karten-buehne-v2 .buehne-v2-kartenblatt { min-height: 48px; font-size: var(--lumi-v2-control); }
.karten-buehne-v2 .buehne-v2-kopf em { font-size: var(--lumi-v2-label); }
.karten-buehne-v2 .buehne-v2-schliessen {
  border-radius: 16px 5px 16px 5px;
}
.karten-buehne-v2 .buehne-v2-ausrichten {
  width: 58px;
  height: 48px;
  border-radius: 16px 5px 16px 5px;
}
.karten-buehne-v2 .buehne-art-nav { width: 44px; }
.karten-buehne-v2 .buehne-art-vorschau,
.karten-buehne-v2 .buehne-art-nav:is(:hover,:focus-visible) .buehne-art-vorschau { width: 34px; opacity: .58; }
.karten-buehne-v2 .buehne-art-vorschau small { display: none; }
.karten-buehne-v2 .buehne-v2-rarity-route {
  min-height: 78px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 31px 43px;
}
.karten-buehne-v2 .buehne-v2-rarity-route > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.karten-buehne-v2 .buehne-v2-rarity-route > i {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: start;
}
.karten-buehne-v2 .buehne-v2-rarity-route :is(small, em) {
  font-size: var(--lumi-v2-label);
  line-height: 1.12;
}
.karten-buehne-v2 .buehne-v2-rarity-route strong { font-size: var(--lumi-v2-meta); }
.karten-buehne-v2 .buehne-v2-rarity-route > i > b {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 3px;
  text-align: center;
}
.karten-buehne-v2 .buehne-v2-rarity-route > i > b em {
  overflow-wrap: anywhere;
  font-style: normal;
}
.karten-buehne-v2 .buehne-v2-attribute button small,
.karten-buehne-v2 .buehne-v2-inspektor small { font-size: var(--lumi-v2-label); }
.karten-buehne-v2 .buehne-v2-attribute button b,
.karten-buehne-v2 .buehne-v2-inspektor strong { font-size: var(--lumi-v2-meta); }
.karten-buehne-v2 .buehne-v2-inspektor p,
.karten-buehne-v2 .buehne-v2-inspektor em { font-size: var(--lumi-v2-label); }
.buehne-stapeldeck {
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.buehne-stapeldeck::-webkit-scrollbar { display: none; }
.buehne-stapeldeck > button { scroll-snap-align: center; }

/* V2-Unterseiten: gemeinsame Mindestlesbarkeit, ohne Karteninnereien. */
:where(
  .meisterschaft-v2,
  .vitrinen-v2,
  .studio-v2,
  .catalog-v2-root,
  .arena-v2,
  .map-v2,
  .feed-v2,
  .missions-v2,
  .trade-v2,
  .profile-v2
) :where(small) { font-size: var(--lumi-v2-label); line-height: 1.25; }

:where(
  .meisterschaft-v2,
  .vitrinen-v2,
  .studio-v2,
  .catalog-v2-root,
  .arena-v2,
  .map-v2,
  .feed-v2,
  .missions-v2,
  .trade-v2,
  .profile-v2
) :where(p, em) { font-size: var(--lumi-v2-meta); }

.arena-v2 .arena-titel,
.arena-v2 .gegner-tat,
.arena-v2 .wild-lohn,
.arena-v2 .wild-fuss,
.arena-v2 .wild-tat,
.arena-v2 .verlauf-knopf-text small,
.map-v2 .map-v2-label,
.map-v2 .map-tool.map-hauptwerkzeug small,
.map-v2 .map-ansicht-menue > span,
.feed-v2 .feed-v2-label,
.feed-v2 .feed-v2-einleitung > span,
.feed-v2 .feed-owner,
.feed-v2 .feed-rarity,
.studio-v2 .studio-v2-kicker,
.studio-v2 .studio-zahl-kopf b,
.studio-v2 .studio-zahl-kopf span,
.studio-v2 .studio-tipp,
.studio-v2 .studio-zahl-fuss,
.studio-v2 .studio-achse,
.studio-v2 .studio-gruppe h2,
.studio-v2 .studio-knopf i,
.studio-v2 .studio-schluss,
.profile-v2 .profile-v2-index small {
  font-size: var(--lumi-v2-label);
}
.arena-v2 .arena-hinweis,
.arena-v2 .wild-satz,
.arena-v2 .wild-sicht,
.arena-v2 .gegner-text em,
.map-v2 .map-v2-privat,
.feed-v2 .feed-v2-kopf p,
.feed-v2 .feed-species,
.studio-v2 .studio-v2-head > p,
.studio-v2 .studio-zahl-satz,
.profile-v2 .profile-v2-index span {
  font-size: var(--lumi-v2-meta);
}

.arena-v2 :where(.arena-modus, .einsatz-knopf, .wild-tat),
.map-v2 :where(.map-tool, summary),
.studio-v2 :where(.studio-achse, .studio-knopf),
.profile-v2 .profile-v2-index a { min-height: 44px; }
.arena-v2 .arena-einsatz .chip.lohn {
  color: #8b6114;
  border-bottom-color: rgba(183, 123, 24, .44);
  background: linear-gradient(180deg, transparent, rgba(255, 211, 93, .16));
}

/* Hoehere Root-Spezifitaet setzt die alte routeweise Mikroschrift verlaesslich
   ausser Kraft. Die Karten selbst verwenden andere Elemente/Klassen. */
#catalogView.catalog-v2-active .catalog-v2-root small,
#itemsView .vitrinen-v2 small,
#mergeView .meisterschaft-v2 small,
#studioView.studio-v2 small,
#battleView.arena-v2 small,
#mapView.map-v2 small,
#feedView.feed-v2 small,
#missionsView.missions-v2 small,
#tradeView.trade-v2 small,
#profileView.profile-v2 small {
  font-size: var(--lumi-v2-label);
  line-height: 1.25;
}
#catalogView.catalog-v2-active .catalog-v2-root em,
#itemsView .vitrinen-v2 em,
#mergeView .meisterschaft-v2 em,
#studioView.studio-v2 em,
#battleView.arena-v2 em,
#mapView.map-v2 em,
#feedView.feed-v2 em,
#missionsView.missions-v2 em,
#tradeView.trade-v2 em,
#profileView.profile-v2 em {
  font-size: var(--lumi-v2-meta);
  line-height: 1.35;
}
#catalogView.catalog-v2-active .catalog-v2-root p,
#itemsView .vitrinen-v2 p,
#mergeView .meisterschaft-v2 p,
#studioView.studio-v2 p,
#battleView.arena-v2 p,
#feedView.feed-v2 p,
#missionsView.missions-v2 p,
#tradeView.trade-v2 p,
#profileView.profile-v2 p {
  font-size: var(--lumi-v2-body);
  line-height: 1.42;
}
#catalogView.catalog-v2-active .catalog-v2-root :where(button, input, select),
#itemsView .vitrinen-v2 button,
#mergeView .meisterschaft-v2 button,
#studioView.studio-v2 button,
#battleView.arena-v2 button,
#feedView.feed-v2 button,
#missionsView.missions-v2 button,
#tradeView.trade-v2 button,
#profileView.profile-v2 button { min-height: 44px; }
.profile-v2 .friend-chip {
  min-height: 64px;
  padding: 9px 2px;
  border: 0;
  border-bottom: 1px solid var(--lumi-v2-line);
  border-radius: 0;
  color: var(--lumi-v2-ink);
  background: linear-gradient(90deg, rgba(255,255,255,.34), transparent);
}
.profile-v2 .friend-initial {
  width: 40px;
  height: 40px;
  color: #176b59;
  background: #eef9ee;
  box-shadow: inset 0 0 0 1px rgba(31,120,98,.18);
}
.profile-v2 .friend-chip-copy strong { color: var(--lumi-v2-ink); font-size: var(--lumi-v2-control); }
.profile-v2 .friend-chip-copy em { color: var(--lumi-v2-muted); font-size: var(--lumi-v2-label); }

/* Artprofil: helle Welt braucht explizite Tinte, nicht geerbtes Legacy-Weiss. */
#speciesDialog.species-dialog-v2 .species-v2-mastery,
#speciesDialog.species-dialog-v2 .species-v2-mastery strong,
#speciesDialog.species-dialog-v2 .species-v2-mastery > i b {
  color: var(--lumi-v2-ink);
}
#speciesDialog.species-dialog-v2 .species-v2-mastery em {
  color: var(--lumi-v2-muted);
  font-size: var(--lumi-v2-label);
}
#speciesDialog.species-dialog-v2 .species-v2-mastery strong { font-size: var(--lumi-v2-meta); }

/* Leaflet-Attribution, Datenschutzsignal, Kartendock und Hauptnavigation
   bekommen getrennte Hoehenzonen. Nur die lizenznotwendige Quellenzeile
   bleibt sichtbar; sie ist kein weiteres Bedienelement. */
#mapView.map-v2 .leaflet-bottom.leaflet-right { bottom: 208px; }
#mapView.map-v2 .leaflet-control-attribution {
  max-width: 230px;
  line-height: 1.2;
  white-space: normal;
}
@media (max-width: 600px) {
  #mapView.map-v2 .leaflet-bottom.leaflet-right { bottom: 236px; }
  #mapView.map-v2 .leaflet-control-attribution {
    max-width: 185px;
    font-size: 8px;
    line-height: 1.2;
  }
}

/* Freundesprofil ist dieselbe helle Feldpass-Welt, egal ob es aus Profil oder
   Freundesfeed geoeffnet wurde. */
#friendCollectionDialog::backdrop {
  background: rgba(24, 67, 76, .34);
  backdrop-filter: blur(8px);
}
#friendCollectionDialog > form {
  color: var(--lumi-v2-ink);
  background: linear-gradient(180deg, rgba(231,249,247,.99), rgba(255,249,226,.99));
  box-shadow: 0 -22px 60px rgba(25, 72, 82, .22);
}
#friendCollectionDialog .sheet-handle { background: rgba(33, 111, 105, .44); }
#friendCollectionDialog .brand-mark,
#friendCollectionDialog .section-label { color: var(--lumi-v2-green); }
#friendCollectionDialog .sheet-kopf,
#friendCollectionDialog .friend-profile,
#friendCollectionDialog .friend-collection-section { border-color: var(--lumi-v2-line); }
#friendCollectionDialog .sheet-schliessen {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid rgba(39, 109, 107, .26);
  border-radius: 0;
  color: #2b686f;
  background: transparent;
}
#friendCollectionDialog .ring-bogen { stroke: #35aa7a; }
#friendCollectionDialog .ring-marke { stroke: #e2ad38; }
#friendCollectionDialog .ring-value { fill: var(--lumi-v2-ink); }
#friendCollectionDialog .friend-level,
#friendCollectionDialog .friend-medaille,
#friendCollectionDialog .friend-kennzahlen span,
#friendCollectionDialog .friend-collection-heading > strong,
#friendCollectionDialog .feed-owner,
#friendCollectionDialog .feed-rarity { color: #39716f; font-size: var(--lumi-v2-label); }
#friendCollectionDialog .friend-kennzahlen strong,
#friendCollectionDialog .friend-collection-heading h3,
#friendCollectionDialog .feed-copy strong { color: var(--lumi-v2-ink); }
#friendCollectionDialog .gallery-hint,
#friendCollectionDialog .feed-species { color: var(--lumi-v2-muted); font-size: var(--lumi-v2-meta); }
#friendCollectionDialog .friend-animal-list { gap: 0; }
#friendCollectionDialog .feed-card {
  min-height: 88px;
  padding: 10px 2px;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--lumi-v2-line);
  border-radius: 0;
  color: var(--lumi-v2-ink);
  background: transparent;
}
#friendCollectionDialog .feed-photo {
  width: 64px;
  height: 68px;
  border: 3px solid rgba(255,255,255,.76);
  border-radius: 48% 52% 43% 57% / 57% 46% 54% 43%;
  box-shadow: 0 7px 16px rgba(29,78,89,.14);
}
#friendCollectionDialog .secondary-bar {
  min-height: 48px;
  border: 0;
  border-bottom: 1px solid rgba(39, 109, 107, .25);
  border-radius: 0;
  color: #2d666c;
  background: transparent;
}

/* Nur echte Inhaltsrails duerfen horizontal laufen. Native Scrollbars werden
   dort versteckt; ein angeschnittener Nachbar bleibt als Richtungshinweis. */
.vitrinen-v2 :where(.vitrinen-v2-walls, .vitrinen-v2-tiere),
.karten-buehne-v2 .buehne-v2-fangstapel,
.arena-v2 .wild-raster {
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.vitrinen-v2 :where(.vitrinen-v2-walls, .vitrinen-v2-tiere)::-webkit-scrollbar,
.karten-buehne-v2 .buehne-v2-fangstapel::-webkit-scrollbar,
.arena-v2 .wild-raster::-webkit-scrollbar { display: none; }

/* Dialoge/Systemflaechen teilen dieselbe Mindestlesbarkeit. */
:where(
  .photo-viewer-v2,
  .freigabe-v2,
  .new-catch-v2,
  .name-gate-v2,
  #animalDetailDialog,
  #friendsDialog,
  #friendCollectionDialog,
  #mapListDialog,
  #markDialog,
  #animalPickerDialog,
  #battleDialog
) :where(small) { font-size: var(--lumi-v2-label); }
:where(
  .photo-viewer-v2,
  .freigabe-v2,
  .new-catch-v2,
  .name-gate-v2,
  #animalDetailDialog,
  #friendsDialog,
  #friendCollectionDialog,
  #mapListDialog,
  #markDialog,
  #animalPickerDialog,
  #battleDialog
) :where(p, em) { font-size: var(--lumi-v2-meta); line-height: 1.42; }

@media (max-width: 720px) {
  /* Lesbarer, dynamischer Heute-Fluss. */
  #todayView.heute-v2 .heute-v2-kopf {
    min-height: 224px;
    padding-top: calc(20px + env(safe-area-inset-top));
  }
  #todayView.heute-v2 .heute-v2-gruss h1 {
    margin-top: 12px;
    gap: 2px;
  }
  #todayView.heute-v2 .heute-v2-gruss h1 span { font-size: 1.32rem; }
  #todayView.heute-v2 .heute-v2-gruss h1 strong { font-size: clamp(2.25rem, 11vw, 3rem); }
  #todayView.heute-v2 .heute-v2-leitsatz {
    max-width: 300px;
    font-size: var(--lumi-v2-body);
  }
  #todayView.heute-v2 .heute-v2-routefeld {
    height: auto;
    margin-top: 14px;
    display: grid;
    gap: 8px;
  }
  #todayView.heute-v2 .heute-v2-pfad { display: none; }
  #todayView.heute-v2 .heute-v2-knoten.scan,
  #todayView.heute-v2 .heute-v2-knoten.kiste,
  #todayView.heute-v2 .heute-v2-knoten.missionen {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 76px;
    padding: 9px 7px;
    border: 0;
    border-bottom: 1px solid var(--lumi-v2-line);
    border-radius: 0;
    background: linear-gradient(90deg, rgba(247,253,249,.58), transparent 86%);
    box-shadow: none;
    transform: none;
  }
  #todayView.heute-v2 .heute-v2-knoten.kiste,
  #todayView.heute-v2 .heute-v2-knoten.missionen { background: transparent; }
  #todayView.heute-v2 .heute-v2-knoten:is(:hover,:focus-visible) {
    transform: translateX(3px);
    box-shadow: none;
  }
  #todayView.heute-v2 .heute-v2-fortschritt { margin-top: 0; }

  /* Feldblatt bleibt komplett im Viewport, ohne Mikroschrift. */
  .karten-buehne-v2 .buehne-v2-info {
    min-height: 344px;
    max-height: 540px;
    margin-top: 39px;
  }
  .buehne-v2-sheet-griff { top: -40px; }
  .karten-buehne-v2 .buehne-hinweis { display: none; }
  .karten-buehne-v2 .buehne-v2-panel { padding-inline: 16px; }
  .karten-buehne-v2 .buehne-v2-signatur button {
    min-width: 92px;
    min-height: 38px;
    border-radius: 12px 4px 12px 4px;
  }
  .karten-buehne-v2 .buehne-v2-fundnotiz { min-height: 70px; }
  .karten-buehne-v2 .buehne-v2-werkzeug {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding-inline: 10px;
  }
  .karten-buehne-v2 .buehne-v2-stapel-oeffnen { min-width: 122px; }
  .karten-buehne-v2 .buehne-v2-kartenblatt { padding-inline: 12px; }

  .collection-v2-archive { gap-block: 24px; }
  .collection-v2-hero {
    min-height: 286px;
    grid-template-columns: minmax(0, 1fr) 142px;
  }
  .collection-v2-next-trail small {
    letter-spacing: .05em;
    white-space: nowrap;
  }
  .collection-v2-journey.is-compact { width: 100%; }

  /* Katalogmerkmale muessen mit Text wachsen koennen. */
  .catalog-v2-root .catalog-v2-traits,
  .catalog-v2-root .catalog-v2-trait-map {
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
  }
  .catalog-v2-root .catalog-v2-trait,
  .catalog-v2-root [style*="--x"] {
    position: relative;
    inset: auto;
    transform: none;
  }
}

@media (max-width: 390px) {
  .collection-v2-journey b { font-size: .68rem; }
  .collection-v2-journey small { font-size: .625rem; }
  .collection-v2-card-copy { min-height: 100px; }
  .karten-buehne-v2 .buehne-v2-meisterschaft {
    grid-template-columns: 78px minmax(62px, 1fr) 80px;
    gap-inline: 4px;
  }
  .karten-buehne-v2 .buehne-v2-panel { padding-inline: 12px; }
  .karten-buehne-v2 .buehne-v2-werkzeug {
    grid-template-columns: minmax(0, 1fr) 124px;
    padding-inline: 8px;
  }
  .karten-buehne-v2 .buehne-v2-kartenblatt {
    min-width: 0;
    width: 124px;
    padding-inline: 8px;
    font-size: .66rem;
  }
}

/* Die Kartenbuehne ist ein eigenstaendiger Fokusraum. Die globale Navigation
   bleibt darunter im DOM, darf aber weder sichtbar sein noch Touchziele des
   Feldblatts ueberlagern. */
body.karte-vorn .bottom-nav,
body.karte-hinten .bottom-nav {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Kurze Android-WebViews: Die Karte bleibt das Fokusobjekt, wird aber gerade
   so weit verkleinert, dass das vollstaendige Feldblatt inklusive Auswahl und
   Kartenblatt erreichbar bleibt. */
@media (max-width: 699px) and (max-height: 880px) {
  .karten-buehne-v2 .buehne-karte { width: min(62vw, 250px); }
}
@media (max-width: 699px) and (max-height: 820px) {
  .karten-buehne-v2 .buehne-karte { width: min(58vw, 224px); }
}

@media (prefers-reduced-motion: reduce) {
  #todayView.heute-v2 .heute-v2-knoten,
  .collection-v2-card-shell,
  .karten-buehne-v2 .buehne-v2-info { transition: none; }
}

/* Die Heute-Erzaehlung liegt bewusst direkt in der Welt. Eine lokale
   Lichtkante haelt Text auch ueber Blaettern und Himmel lesbar, ohne daraus
   wieder eine weitere Glaskarte zu machen. */
#todayView.heute-v2 .heute-v2-gruss,
#todayView.heute-v2 .heute-v2-route > header {
  text-shadow:
    0 1px 10px rgba(248, 255, 250, .96),
    0 0 26px rgba(248, 255, 250, .82);
}

.collection-v2-gap-overview > span > small {
  font-size: var(--lumi-v2-label);
  letter-spacing: .08em;
}

#authGate .account-button small {
  font-size: var(--lumi-v2-meta);
  line-height: 1.3;
}

/* Geteilte Funde und Freunde oeffnen noch den bewaehrten Detaildialog. Seine
   Funktion bleibt bestehen; nur die alte schwarze Oberflaeche wird in das
   helle Feldblatt-System der migrierten App eingeordnet. */
#animalDetailDialog.sheet-dialog {
  width: min(100%, 440px);
  max-width: 440px;
  max-height: 100dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 26px 26px 0 0;
  background: rgba(242, 250, 243, .98);
  color: var(--lumi-v2-ink);
  box-shadow: 0 -18px 52px rgba(15, 58, 50, .24);
}
#animalDetailDialog::backdrop {
  background: rgba(8, 35, 38, .38);
  backdrop-filter: blur(5px);
}
#animalDetailDialog > form,
#animalDetailDialog .detail-body {
  background: linear-gradient(180deg, rgba(246, 252, 245, .98), rgba(231, 247, 240, .98));
  color: var(--lumi-v2-ink);
}
#animalDetailDialog .detail-hero {
  min-height: 276px;
  background: #143a35;
}
#animalDetailDialog .detail-hero-veil {
  background: linear-gradient(180deg, transparent 38%, rgba(8, 32, 31, .76));
}
#animalDetailDialog .detail-hero-copy {
  text-shadow: 0 2px 18px rgba(0, 0, 0, .64);
}
#animalDetailDialog .detail-body { padding: 18px 18px calc(94px + env(safe-area-inset-bottom)); }
#animalDetailDialog .rarity-meter,
#animalDetailDialog .fact-row,
#animalDetailDialog .settings-row,
#animalDetailDialog .detail-location-block {
  border-color: rgba(19, 91, 75, .16);
  color: var(--lumi-v2-ink);
}
#animalDetailDialog .rarity-name,
#animalDetailDialog .rarity-odds,
#animalDetailDialog .fact-row strong,
#animalDetailDialog .settings-row strong,
#animalDetailDialog .detail-location-head h3 {
  color: var(--lumi-v2-ink);
}
#animalDetailDialog .fact-row > span,
#animalDetailDialog .detail-location-head > span,
#animalDetailDialog .detail-location-note,
#animalDetailDialog .settings-row > span {
  color: rgba(16, 52, 49, .68);
}
#animalDetailDialog .trait-line > span,
#animalDetailDialog .merge-teaser,
#animalDetailDialog .wide-button,
#animalDetailDialog .settings-row {
  min-height: 44px;
  border-radius: 12px 4px 12px 4px;
  border-color: rgba(19, 91, 75, .18);
  background: rgba(255, 255, 255, .34);
  color: var(--lumi-v2-ink);
  box-shadow: none;
}
#animalDetailDialog .fact-row { min-height: 48px; }
#animalDetailDialog .detail-location-map {
  overflow: hidden;
  border: 1px solid rgba(19, 91, 75, .18);
  border-radius: 18px 5px 18px 5px;
}
#animalDetailDialog .detail-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 8px;
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  background: rgba(238, 249, 242, .9);
  border-top: 1px solid rgba(19, 91, 75, .18);
  backdrop-filter: blur(16px);
}
#animalDetailDialog .detail-actions .icon-action {
  min-height: 48px;
  border: 1px solid rgba(19, 91, 75, .26);
  border-radius: 15px 5px 15px 5px;
  background: transparent;
  color: var(--lumi-v2-ink);
}
#animalDetailDialog .detail-actions #detailSell:not([hidden]) {
  border-color: rgba(207, 151, 35, .46);
  background: rgba(255, 213, 109, .5);
}
