/* ============================================================
   TYPEWALK – main.css
   Utility-first. Vollständig. Klar strukturiert.

   ── SCHRIFTEN ──────────────────────────────────────────────
   Typewalk1915 (Fließtext, Headlines) und TypewalkMono1915 (Meta-Daten)
   liegen als woff2 in assets/fonts/ und werden in Abschnitt 0 geladen.
   Familien tauschen: nur die --font-* Tokens in :root ändern.
   Statische Schnitte: 400, 700, 900 (kein Variable Font).

   ── FARBEN TAUSCHEN ────────────────────────────────────────
   Nur Werte in :root ändern – nie hex außerhalb :root.

   ── INHALTSVERZEICHNIS (aus den Abschnittsüberschriften unten) ──
   0. SCHRIFTEN (@font-face) – Dateien liegen in assets/fonts/
   1. VARIABLEN
   2. RESET
   3. UTILITIES – TYPOGRAFIE
   4. UTILITIES – LAYOUT
   5. UTILITIES – SPACING
   6. UTILITIES – AUSSEHEN
   7. UTILITIES – SONSTIGES
   7b. ERGÄNZUNGEN AUS DEM LIVE-STAND (Feb 2026)
   7c. UMBENANNTE KLASSEN (Views nutzen die neuen Namen)
   7d. SEITEN OHNE BISHERIGES CSS
   8. KOMPONENTE – NAVIGATION
   9. KOMPONENTE – BUTTONS
   10. KOMPONENTE – FORMULARE
   11. KOMPONENTE – KARTEN
   12. KOMPONENTE – TAGS & BADGES
   13. KOMPONENTE – TOASTS & ALERTS
   14. KOMPONENTE – GAMIFICATION
   15. KOMPONENTE – TABELLEN & TABS
   16. KOMPONENTE – PAGINATION & LEERE ZUSTÄNDE
   17. KOMPONENTE – KOMMENTARE
   19. SEITE – AUTH
   20. SEITE – UPLOAD (2-Step Wizard)
   22. SEITE – MAP (Vollbild)
   23. KOMPONENTE – FOOTER
   ALIAS-BLOCK – Dashboard, Rollen-Badges, About, Autosave
   VERTIKALE SEITEN-BESCHRIFTUNG
   KATEGORIEN, PLACE, GALERIE, EDIT, ADMIN (gemischter Block)
   24. Seite – Walk-Detail (Split-View + Pull Card)
   25. Seite – Walks-Liste + Pagination
   PHASE 9 – Entdecken
   PHASE 10 – Challenges
   9f. Walk-Aufnahme-Modus
   Danach, je ein „── ──“-Block: Capture-Fehlerpfade, Explore-Links, Touch-Ziele,
   /health, Nächster Schritt, Walk-Navigation-Sheet, Sprachumschalter, Fokus,
   Skip-Link, Reduced Motion, FormUX, Mobile Tab-Leiste, Explore-Suche (9g),
   Skeleton, Erste Schritte, Kategorie-Glyphe

   Prüfen nach jeder Änderung: python3 tools/css-audit.py (Duplikate, fehlende
   Klassen) und node tests/e2e/shots.js compare (Screenshot-Vergleich).
   ============================================================ */


/* ============================================================
   0. SCHRIFTEN (@font-face) – Dateien liegen in assets/fonts/
   ============================================================ */
/* Typewalk1915 – Fließtext + Headlines */
@font-face {
  font-family: 'Typewalk1915';
  src: url('../fonts/Typewalk1915-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Typewalk1915';
  src: url('../fonts/Typewalk1915-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Typewalk1915';
  src: url('../fonts/Typewalk1915-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* TypewalkMono1915 – Meta-Daten, Koordinaten, Code */
@font-face {
  font-family: 'TypewalkMono1915';
  src: url('../fonts/TypewalkMono1915-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TypewalkMono1915';
  src: url('../fonts/TypewalkMono1915-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


/* ============================================================
   1. VARIABLEN
   ============================================================ */
:root {
  /* ── Schriften (Typewalk Custom Fonts, siehe Abschnitt 0) ─── */
  --font-ui:   'Typewalk1915', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Typewalk1915', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --font-nav:  'Typewalk1915', system-ui, sans-serif;
  --font-mono: 'TypewalkMono1915', 'SF Mono', 'Fira Code', ui-monospace, monospace;

  /* Gewichts-Stufen (statische Schnitte 400 / 700 / 900) */
  --wght:      400;
  --wght-bold: 700;
  --wght-head: 900;

  /* Laufweite & Zeilenhöhe: Headlines eng, Eyebrows weit */
  --track-tighter: -.04em;
  --track-tight:   -.02em;
  --track-wide:    .08em;
  --track-wider:   .16em;
  --lh-tight: 1.05;
  --lh-snug:  1.15;
  --lh-body:  1.6;

  /* ── Farben (nur hier ändern) ──────────────────────────── */
  --c-accent: #c41e3a;
  --c-accent-dk: #9a1830;
  --c-black:  #1a1a1a;
  --c-white:  #ffffff;
  --c-cream:  #f5f2ed;   /* warmes Papier – Sekundär-Hintergrund */
  --c-beige:  #d4c5b5;   /* Trennlinien, historische Elemente */

  /* Grau */
  --c-50:  #f9fafb;
  --c-100: #f3f4f6;
  --c-200: #e5e7eb;
  --c-300: #d1d5db;
  --c-400: #9ca3af;
  --c-500: #6b7280;
  --c-550: #5b6370;   /* Muted-Text: AA auf Weiß (6.0) und Creme (5.4) */
  --c-600: #4b5563;
  --c-700: #374151;
  --c-900: #111111;

  /* Status */
  --c-green:      #10b981;
  --c-green-bg:   #d1fae5;
  --c-green-fg:   #065f46;
  --c-yellow:     #f59e0b;
  --c-yellow-bg:  #fef9c3;
  --c-yellow-fg:  #854d0e;
  --c-blue:       #2563eb;
  --c-blue-bg:    #dbeafe;
  --c-blue-fg:    #1e40af;
  --c-red-bg:     #fef2f2;
  --c-red-fg:     #991b1b;
  --c-red-brd:    #fecaca;
  --c-purple:     #7c3aed;
  --c-gold:       #c9a84c;
  --c-silver:     #9e9e9e;
  --c-bronze:     #a0522d;

  /* Transparenz (kein hardcodes rgba außerhalb :root) */
  --c-black-70: rgba(0,0,0,.70);
  --c-black-60: rgba(0,0,0,.60);
  --c-black-40: rgba(0,0,0,.40);
  --c-black-35: rgba(0,0,0,.35);
  --c-black-14: rgba(0,0,0,.14);
  --c-black-10: rgba(0,0,0,.10);
  --c-black-08: rgba(0,0,0,.08);
  --c-white-90: rgba(255,255,255,.90);
  --c-white-75: rgba(255,255,255,.75);
  --c-white-60: rgba(255,255,255,.60);
  --c-white-50: rgba(255,255,255,.50);
  --c-white-35: rgba(255,255,255,.35);
  --c-white-30: rgba(255,255,255,.30);
  --c-white-10: rgba(255,255,255,.10);
  --c-white-08: rgba(255,255,255,.08);
  --c-bg-blur:  rgba(249,250,251,.88);

  /* ── Semantische Aliases ───────────────────────────────── */
  --fg:        var(--c-black);
  --fg-muted:  var(--c-550);
  --bg:        var(--c-white);
  --bg-alt:    var(--c-cream);
  --bg-subtle: var(--c-100);
  --border:    var(--c-200);
  --accent:    var(--c-accent);
  --accent-dk: var(--c-accent-dk);
  --on-accent: var(--c-white);      /* Text auf Akzentfläche */
  --surface:   var(--bg);           /* Flächen (Home-Abschnitte); live bisher undefiniert */
  --surface-2: var(--bg-alt);
  --scrim:     var(--c-black-60);   /* Abdunkelung hinter Modals */
  --rule:      1px solid var(--fg); /* harte editoriale Haarlinie */

  /* ── Spacing (4px-Skala) ───────────────────────────────── */
  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;
  --sp-4: 1rem;    --sp-5: 1.25rem; --sp-6: 1.5rem;
  --sp-8: 2rem;    --sp-10: 2.5rem; --sp-12: 3rem;
  --sp-16: 4rem;   --sp-24: 6rem;

  /* ── Schriftgrößen (fluid via clamp) ──────────────────── */
  --fz-xs:   clamp(.875rem,  0.7vw + .6rem,  1.125rem); /* 14 → 18px */
  --fz-sm:   clamp(.9375rem, 0.8vw + .6rem,  1.1875rem);/* 15 → 19px */
  --fz-base: clamp(1rem,     0.8vw + .7rem,  1.3125rem);/* 16 → 21px */
  --fz-lg:   clamp(1.125rem, 1vw + .75rem,   1.5rem);   /* 18 → 24px */
  --fz-xl:   clamp(1.25rem,  1.2vw + .8rem,  1.75rem);  /* 20 → 28px */
  --fz-2xl:  clamp(1.375rem, 1.5vw + .8rem,  2.125rem); /* 22 → 34px */
  --fz-3xl:  clamp(1.5rem,   2vw + .8rem,    2.75rem);  /* 24 → 44px */
  --fz-4xl:  clamp(1.75rem,  2.5vw + .8rem,  3.25rem);  /* 28 → 52px */
  --fz-5xl:  clamp(2rem,     3vw + .8rem,    4rem);     /* 32 → 64px */
  --fz-hero: clamp(2.5rem,   4vw + 1rem,     5.5rem);   /* 40 → 88px */
  --fz-2xs:  var(--fz-xs);   /* in Views genutzt, im Live-Stand nicht definiert */

  /* ── Shape & Motion ────────────────────────────────────── */
  --radius-sm:   4px;
  --radius:      8px;
  --radius-lg:   16px;              /* Pull-Card, Modals, große Flächen */
  --radius-pill: 9999px;            /* Vollrund – Pills, Tags, Chips */
  --shadow:    0 2px 8px var(--c-black-08);
  --shadow-md: 0 4px 16px var(--c-black-10);
  --shadow-lg: 0 8px 32px var(--c-black-14);
  --shadow-xl: 0 16px 48px var(--c-black-14);
  --ease:      cubic-bezier(.4,0,.2,1);
  --ease-out:  cubic-bezier(.22,1,.36,1);   /* Reveals, Pop-ins */
  --dur:       180ms;
  --dur-slow:  0.3s;                /* Für Transform-Transitions (Drawer, Images) */

  /* Fehlende Transparenz-Stufen */
  --c-black-25: rgba(0,0,0,.25);
  --c-white-92: rgba(255,255,255,.92);
  --c-white-95: rgba(255,255,255,.95);

  /* ── Aus dem Live-Stand übernommen ─────────────────────── */
  --font-nav: 'Typewalk1915', system-ui, sans-serif;
  --ink: #0a0a0a;
  --mid: #6b6355;
  --light: #a09890;
  --paper: #f4f1eb;
  --admin-bg: #fffbea;
  --admin-border: #e8c840;
  --admin-text: #7a5c00;
  --map-bg: #E8E4DC;
  --fz-3xs: clamp(.625rem,  0.5vw + .4rem,  .875rem);

  /* ── Layout ────────────────────────────────────────────── */
  --nav-h:     60px;
  --tabbar-h:  60px;   /* mobile Tab-Leiste (nav.php) */

  /* ── Ebenen (z-index-Skala; neue Werte nur hier ergänzen) ── */
  --z-base:    0;
  --z-raised:  10;
  --z-sticky:  100;
  --z-nav:     200;
  --z-drawer:  300;
  --z-overlay: 400;
  --z-modal:   500;
  --z-toast:   600;
  --content-w: 960px;
}


/* ============================================================
   2. RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-ui);
  font-size: var(--fz-base);
  font-weight: var(--wght);
  line-height: var(--lh-body);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, video, svg { display: block; max-width: 100%; height: auto; }
p + p { margin-top: var(--sp-4); }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
table { border-collapse: collapse; }
strong { font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; background: none; border: none; }
button { cursor: pointer; }
input, select, textarea { appearance: none; }
p, h1, h2, h3, h4 { overflow-wrap: break-word; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: var(--wght-head);
  line-height: var(--lh-snug);
  text-wrap: balance;
  color: var(--fg);
}
h4 {
  font-family: var(--font-head);
  font-weight: var(--wght-bold);
  line-height: var(--lh-snug);
  color: var(--fg);
}
h1 { font-size: var(--fz-3xl); }
h2 { font-size: var(--fz-2xl); }
h3 { font-size: var(--fz-xl); }
h4 { font-size: var(--fz-lg); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.leaflet-container { font-family: var(--font-ui); isolation: isolate; }
/* isolation: Leaflet-Ebenen (z-index 400–1000) bleiben in der Karte eingeschlossen –
   schwebende Suche, Sheets und Leisten daneben brauchen so nur z-index ≥ 1. */
/* Graue Karte auf allen Ansichten: OSM-Kacheln entsättigt und leicht aufgehellt (ehemals CARTO light_all) */
.tw-tiles { filter: grayscale(1) brightness(1.06) contrast(.9); }


/* ============================================================
   3. UTILITIES – TYPOGRAFIE
   ============================================================ */

/* Schriftfamilien */
.font-ui   { font-family: var(--font-ui); }
.font-head { font-family: var(--font-head); }
.font-mono { font-family: var(--font-mono); }

/* Größen */
.text-xs   { font-size: var(--fz-xs); }
.text-sm   { font-size: var(--fz-sm); }
.text-base { font-size: var(--fz-base); }
.text-lg   { font-size: var(--fz-lg); }
.text-xl   { font-size: var(--fz-xl); }
.text-2xl  { font-size: var(--fz-2xl); }
.text-3xl  { font-size: var(--fz-3xl); }
.text-4xl  { font-size: var(--fz-4xl); }
.text-5xl  { font-size: var(--fz-5xl); }
.text-hero { font-size: var(--fz-hero); }

/* Gewicht */
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-bold   { font-weight: 700; }
.font-black  { font-weight: 900; }

/* Farbe */
.text-muted   { color: var(--fg-muted); }
.text-accent  { color: var(--accent); }
.text-danger  { color: var(--c-accent); }
.text-success { color: var(--c-green); }
.text-white   { color: var(--c-white); }

/* Ausrichtung */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }

/* Stil */
.italic      { font-style: italic; }
.not-italic  { font-style: normal; }
/* Laufweite */
.tracking-tight  { letter-spacing: var(--track-tight); }
.tracking-wide   { letter-spacing: var(--track-wide); }
.tracking-wider  { letter-spacing: var(--track-wider); }
.uppercase   { text-transform: uppercase; letter-spacing: .07em; }
.truncate    { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.break-word  { overflow-wrap: break-word; }

/* Ziffern & Kapitälchen (No-op, wenn die Schrift die Features nicht kennt) */
.nums-tabular { font-variant-numeric: tabular-nums; }   /* Zähler, XP, Koordinaten */
.nums-old     { font-variant-numeric: oldstyle-nums; }  /* Fließtext-Jahreszahlen */
.small-caps   { font-variant-caps: all-small-caps; letter-spacing: var(--track-wide); }

/* Eyebrow: kleines Label über Überschriften */
/* ── Icons: Linien-Icons aus includes/icons.php, immer currentColor ── */
.tw-icon { flex-shrink: 0; vertical-align: -.15em; } /* Größe kommt aus width/height des SVG (twIcon(name, px)) */
.tw-btn-icon .tw-icon, .tw-invite-item__copy .tw-icon { width: 18px; height: 18px; }
.tw-icon-note { color: var(--fg-muted); }
.tw-placeholder-icon { display: inline-flex; color: var(--fg-muted); opacity: .45; }
.is-liked .tw-icon--heart, .liked .tw-icon--heart, [aria-pressed="true"] .tw-icon--heart { fill: currentColor; }
.tw-hero-icon { color: var(--fg-muted); }
/* Große Icons mittig: SVGs sind per Reset display:block und ignorieren daher
   text-align:center, mit dem früher die Emojis zentriert waren. */
.tw-hero-icon {
  display: flex; justify-content: center; align-items: center;
}
.tw-capture__done-check { display: inline-flex; justify-content: center; align-items: center; }
/* Chips mit Icon: Icon und Schrift auf derselben Mitte */
.tw-pill { align-items: center; justify-content: center; }
.tw-pill span { line-height: 1; }
.tw-ac__icon .tw-icon, .tw-sidebar-card__loc .tw-icon, .tw-pin-popup__loc .tw-icon, .tw-tag .tw-icon { vertical-align: -.1em; }

/* ── Seitenkopf: EINE Komponente für Konto, Admin, System-Seiten ──
   Eyebrow (Bereich) · H1 · Lead · Aktionen rechts. */
.tw-page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap;
  margin-bottom: var(--sp-6); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--border);
}
.tw-page-head__text { min-width: 0; flex: 1 1 18rem; }
.tw-page-head .eyebrow { margin: 0 0 var(--sp-1); }
.tw-page-head h1 { font-size: var(--fz-3xl); font-weight: 900; line-height: 1.05; margin: 0; letter-spacing: var(--track-tight, -.01em); }
.tw-page-head__title { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.tw-page-head__media { flex-shrink: 0; align-self: center; }
.tw-profile__stats { display: flex; gap: var(--sp-5); flex-wrap: wrap; margin: calc(var(--sp-2) * -1) 0 var(--sp-6); }
.tw-profile__stats > div { display: flex; flex-direction: column; align-items: flex-start; }
.tw-profile__stats strong { font-size: var(--fz-lg); font-variant-numeric: tabular-nums; }
.tw-profile__stats span { font-size: var(--fz-xs); color: var(--fg-muted); }
.tw-page-head__lead { margin: var(--sp-1) 0 0; font-size: var(--fz-sm); color: var(--fg-muted); }
.tw-page-head__actions { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }

/* ── Abschnittskopf: H2 + Zähler + Aktionen rechts (Dashboard, Admin, Entwürfe) ── */
.tw-section-head {
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
  margin-bottom: var(--sp-4); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--border);
}
.tw-section-head h2 {
  display: inline-flex; align-items: center; gap: var(--sp-2); margin: 0;
  font-family: var(--font-mono); font-size: var(--fz-xs); font-weight: 700; text-transform: uppercase; letter-spacing: var(--track-wide); color: var(--fg);
}
.tw-section-head__count { font-family: var(--font-mono); font-size: var(--fz-xs); font-weight: 600; color: var(--fg-muted); background: var(--bg-subtle); border-radius: 999px; padding: .05rem .5rem; }
.tw-section-head > .tw-btn, .tw-section-head > a:last-child:not(:first-child), .tw-section-head__actions { margin-left: auto; }
.tw-section-head p { margin: 0; font-size: var(--fz-sm); color: var(--fg-muted); flex-basis: 100%; }
.tw-dot--ink { background: var(--fg); }

/* Einstellungen-Karten (Admin): Icon statt Emoji */
.tw-setting-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--fg); flex-shrink: 0; }

/* Rangliste: Platz 1–3 als Zahl im Kreis statt Medaillen-Emoji */
.tw-rank { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; font-family: var(--font-mono); font-weight: 700; font-size: var(--fz-xs); background: var(--fg); color: var(--bg); }
.tw-rank--2 { background: var(--c-500); }
.tw-rank--3 { background: var(--c-400); }
.tw-podium__rank--1, .tw-podium__rank--2, .tw-podium__rank--3 { font-family: var(--font-mono); font-weight: 900; }

.eyebrow {
  font-size: var(--fz-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--track-wider);
  color: var(--fg-muted);
}

/* Gewicht wechselt beim Hover (statische Schnitte 400→700; bei Variable Font stufenlos) */
.weight-hover { transition: font-weight var(--dur) var(--ease); }
.weight-hover:hover { font-weight: var(--wght-bold); }
@media (prefers-reduced-motion: reduce) { .weight-hover { transition: none; } }

/* Zahlen in UI-Elementen bündig */
.tw-nav__xp, .tw-pagination__btn { font-variant-numeric: tabular-nums; }

/* Zeilenhöhe */
.leading-tight  { line-height: 1.15; }
.leading-normal { line-height: 1.6; }
.leading-loose  { line-height: 1.8; }

/* Fließtext-Block */
.prose   { line-height: 1.75; color: var(--c-700); }
.prose p { margin: 0 0 1em; }
.prose a { color: var(--accent); }
.prose h2 { font-size: var(--fz-2xl); margin: var(--sp-8) 0 var(--sp-3); }
/* Alias für Templates die noch tw-prose nutzen */
.tw-prose { line-height: 1.75; color: var(--c-700); }
.tw-prose p { margin: 0 0 1em; }
.tw-prose a { color: var(--accent); }


/* ============================================================
   4. UTILITIES – LAYOUT
   ============================================================ */

/* Container – einziger max-width im Projekt */
.container, .tw-container {
  width: 100%;
  max-width: var(--content-w);
  margin-inline: auto;
  padding-inline: var(--sp-4);
}
@media (min-width: 640px) { .container { padding-inline: var(--sp-6); } }

/* Nav-Spacer */
.nav-spacer, .tw-nav-spacer { height: var(--nav-h); }

/* Flex */
.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.flex-wrap    { display: flex; flex-wrap: wrap; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* Flex-Modifikatoren (benötigen übergeordnetes flex) */
.items-center   { align-items: center; }
.items-start    { align-items: flex-start; }
.items-end      { align-items: flex-end; }
.items-base     { align-items: baseline; }
.justify-center { justify-content: center; }
.justify-between{ justify-content: space-between; }
.flex-1         { flex: 1; }
.flex-shrink-0  { flex-shrink: 0; }
.flex-grow      { flex-grow: 1; }
.min-w-0        { min-width: 0; }
.ml-auto        { margin-left: auto; }
.mr-auto        { margin-right: auto; }

/* Gap */
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }

/* Grid */
.grid         { display: grid; }
.grid-2       { display: grid; grid-template-columns: repeat(2, 1fr); }
.grid-3       { display: grid; grid-template-columns: repeat(3, 1fr); }
.grid-auto-sm { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.grid-auto    { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
@media (max-width: 639px) { .grid-auto { grid-template-columns: repeat(2, minmax(0, 1fr)); } } /* Handy: zwei Spalten statt riesiger Einzelkarten */
.grid-auto-lg { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 639px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }

/* 2-Spalten-Layout mit Sidebar */
.layout-sidebar      { display: grid; gap: var(--sp-6); }
.layout-sidebar-wide { display: grid; gap: var(--sp-6); }
@media (min-width: 768px) {
  .layout-sidebar      { grid-template-columns: 1fr 280px; }
  .layout-sidebar-wide { grid-template-columns: 1fr 320px; }
}

/* Größen */
.w-full  { width: 100%; }
.w-6     { width: 1.5rem; }
.h-full  { height: 100%; }
.min-h-screen { min-height: 100vh; }


/* ============================================================
   5. UTILITIES – SPACING
   ============================================================ */

/* Margin – top */
.mt-1  { margin-top: var(--sp-1); }
.mt-2  { margin-top: var(--sp-2); }
.mt-3  { margin-top: var(--sp-3); }
.mt-4  { margin-top: var(--sp-4); }
.mt-5  { margin-top: var(--sp-5); }
.mt-6  { margin-top: var(--sp-6); }
.mt-8  { margin-top: var(--sp-8); }
.mt-12 { margin-top: var(--sp-12); }

/* Margin – bottom */
.mb-1  { margin-bottom: var(--sp-1); }
.mb-2  { margin-bottom: var(--sp-2); }
.mb-3  { margin-bottom: var(--sp-3); }
.mb-4  { margin-bottom: var(--sp-4); }
.mb-5  { margin-bottom: var(--sp-5); }
.mb-6  { margin-bottom: var(--sp-6); }
.mb-8  { margin-bottom: var(--sp-8); }
.mb-12 { margin-bottom: var(--sp-12); }

/* Margin – y-Achse */
.my-4 { margin-block: var(--sp-4); }
.my-6 { margin-block: var(--sp-6); }
.my-8 { margin-block: var(--sp-8); }
.mx-auto { margin-inline: auto; }

/* Padding – alle Seiten */
.p-2  { padding: var(--sp-2); }
.p-3  { padding: var(--sp-3); }
.p-4  { padding: var(--sp-4); }
.p-5  { padding: var(--sp-5); }
.p-6  { padding: var(--sp-6); }

/* Padding – x-Achse */
.px-3 { padding-inline: var(--sp-3); }
.px-4 { padding-inline: var(--sp-4); }
.px-5 { padding-inline: var(--sp-5); }
.px-6 { padding-inline: var(--sp-6); }

/* Padding – y-Achse */
.py-2  { padding-block: var(--sp-2); }
.py-3  { padding-block: var(--sp-3); }
.py-4  { padding-block: var(--sp-4); }
.py-5  { padding-block: var(--sp-5); }
.py-6  { padding-block: var(--sp-6); }
.py-8  { padding-block: var(--sp-8); }
.py-12 { padding-block: var(--sp-12); }
.py-16 { padding-block: var(--sp-16); }

/* Padding – einzelne Seiten */
.pt-4  { padding-top: var(--sp-4); }
.pt-6  { padding-top: var(--sp-6); }
.pb-4  { padding-bottom: var(--sp-4); }
.pb-8  { padding-bottom: var(--sp-8); }
.pb-16 { padding-bottom: var(--sp-16); }


/* ============================================================
   6. UTILITIES – AUSSEHEN
   ============================================================ */

/* Hintergrund */
.bg-alt    { background: var(--bg-alt); }
.bg-subtle { background: var(--bg-subtle); }
.bg-dark   { background: var(--c-900); }
.bg-accent { background: var(--accent); }
.bg-white  { background: var(--c-white); }

/* Border */
.border    { border: 1px solid var(--border); }
.border-t  { border-top: 1px solid var(--border); }
.border-b  { border-bottom: 1px solid var(--border); }
.border-dashed { border-style: dashed; }

/* Radius */
.rounded-sm   { border-radius: var(--radius-sm); }
.rounded      { border-radius: var(--radius); }
.rounded-full { border-radius: var(--radius-pill); }

/* Shadow */
.shadow    { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Aspect Ratio */
.aspect-square { aspect-ratio: 1; }
.aspect-video  { aspect-ratio: 16/9; }
.aspect-4-3    { aspect-ratio: 4/3; }

/* Object-fit */
.object-cover   { object-fit: cover; width: 100%; height: 100%; }
.object-contain { object-fit: contain; }

/* Opacity */
.opacity-0   { opacity: 0; }
.opacity-30  { opacity: .3; }
.opacity-50  { opacity: .5; }
.opacity-85  { opacity: .85; }

/* Divider */
.divider { border: none; border-top: 1px solid var(--border); }


/* ============================================================
   7. UTILITIES – SONSTIGES
   ============================================================ */

/* Display */
.block        { display: block; }
.inline-block { display: inline-block; }
.inline       { display: inline; }
.hidden, .tw-hidden { display: none !important; }
.sr-only      { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.inset-0  { inset: 0; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* Cursor */
.pointer { cursor: pointer; }

/* Transition */
.transition { transition: all var(--dur) var(--ease); }

/* Spinner */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--fg);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--bg-alt) 25%, var(--border) 50%, var(--bg-alt) 75%);
  background-size: 200% 100%;
  animation: skeleton-anim 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-anim { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Range */
.range { width: 100%; accent-color: var(--accent); }

/* Stack – vertikaler Abstand ohne flex (für nicht-flex Contexts) */
.stack > * + * { margin-top: var(--sp-4); }
.stack-3 > * + * { margin-top: var(--sp-3); }

/* Autosave */
.autosave           { font-size: var(--fz-xs); color: var(--fg-muted); display: flex; align-items: center; gap: .3rem; }
.autosave.is-saving { color: var(--c-yellow); }
.autosave.is-saved  { color: var(--c-green); }
.autosave.is-error  { color: var(--c-accent); }

/* Passwort-Stärke */
.pw-strength           { font-size: var(--fz-xs); font-weight: 600; }
.pw-strength.is-weak   { color: var(--c-accent); }
.pw-strength.is-medium { color: var(--c-yellow); }
.pw-strength.is-strong { color: var(--c-green); }


/* ============================================================
   7b. ERGÄNZUNGEN AUS DEM LIVE-STAND (Feb 2026)
   Regeln, die nur im ausgelieferten CSS existierten und von den
   Views noch genutzt werden. Steht bewusst VOR den Komponenten:
   bei gleichem Selektor gewinnt der spätere Repo-Stand.
   ============================================================ */
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.15;
  color: var(--fg);
}
/* Split-Seiten (Karte, Walk, Editor): die Nav ist fixed, der Inhalt beginnt darunter.
   Vorher stand hier padding-top: 0 – dann lag die schwebende Suche unter der Nav. */
body.tw-split-page { padding-top: var(--nav-h); }



#panel-2,#edit-panel {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--nav-h));
}


.tw-strip-thumb--cover::after,
.tw-strip-thumb--pending::after {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: #000; color: var(--c-white);
  font-size: var(--fz-3xs); font-weight: 700; letter-spacing: .04em;
  text-align: center; padding: 2px 0;
  pointer-events: none; line-height: 1.4;
}


.tw-upload-submit__draft:hover { background: var(--bg-subtle); color: var(--fg); }


.tw-capture {
  min-height: calc(100vh - var(--nav-h));
  display: flex; flex-direction: column;
}
.tw-capture__select {
  flex: 1; display: flex; flex-direction: column;
  min-height: calc(100vh - var(--nav-h));
}
.tw-capture__drop {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  border: 2px dashed var(--border);
  margin: var(--sp-4) var(--sp-4);
  cursor: pointer; transition: border-color var(--dur), background var(--dur);
  position: relative; overflow: hidden;
}
.tw-capture__drop:hover,
.tw-capture__drop.is-dragover {
  border-color: var(--fg); background: var(--c-50);
}
.tw-capture__drop-inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-3); pointer-events: none; padding: var(--sp-8);
}
.tw-capture__drop-icon svg { width: 56px; height: 56px; color: var(--c-400); }
.tw-capture__drop-label { font-size: 1.1rem; font-weight: 700; color: var(--fg); }
.tw-capture__drop-hint { font-size: var(--fz-sm); color: var(--fg-muted); }
.tw-capture__file-input {
  position: absolute; inset: 0;
  width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2;
}
.tw-capture__post {
  flex: 1; display: flex; flex-direction: column;
  min-height: calc(100vh - var(--nav-h));
}
.tw-capture__preview {
  flex: 1; position: relative; background: var(--c-900);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; min-height: 0;
}
.tw-capture__preview img {
  max-width: 100%; max-height: 100%;
  width: 100%; height: 100%;
  object-fit: contain; display: block;
}
.tw-capture__upload-progress {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: rgba(255,255,255,.15);
}
.tw-capture__upload-bar {
  height: 100%; background: var(--accent);
  width: 0%; transition: width .15s ease;
}
.tw-capture__meta {
  padding: var(--sp-3) var(--sp-4);
  display: flex; flex-direction: column; gap: var(--sp-2);
  flex-shrink: 0;
  border-top: 2px solid var(--fg);
}
.tw-capture__location {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-2);
  background: var(--c-50); border: 1px solid var(--border);
  font-size: var(--fz-sm); color: var(--fg);
}
.tw-capture__location-icon { font-size: 1rem; flex-shrink: 0; }
.tw-capture__location-text { font-family: var(--font-mono); font-size: var(--fz-xs); }
.tw-capture__note {
  width: 100%; border: 1px solid var(--border); border-radius: 0;
  padding: var(--sp-2) var(--sp-3); font-family: inherit; font-size: var(--fz-sm);
  background: var(--bg); color: var(--fg); outline: none;
  transition: border-color var(--dur);
}
.tw-capture__note:focus { border-color: var(--fg); }
.tw-capture__note::placeholder { color: var(--c-400); font-style: italic; }
.tw-capture__actions {
  display: flex; border-top: 2px solid var(--fg); flex-shrink: 0;
}
.tw-capture__btn {
  flex: 1; padding: var(--sp-4) 0;
  font-size: var(--fz-sm); font-weight: 700;
  border: none; cursor: pointer; font-family: inherit;
  transition: background var(--dur), color var(--dur);
  text-align: center; text-decoration: none; display: block;
}
.tw-capture__btn--save {
  background: var(--fg); color: var(--bg);
}
.tw-capture__btn--save:hover { background: var(--accent); }
.tw-capture__btn--save:disabled { background: var(--c-300); color: var(--c-500); cursor: not-allowed; }
.tw-capture__btn--skip {
  background: var(--bg); color: var(--fg-muted);
  border-left: 1px solid var(--border);
}
.tw-capture__btn--skip:hover { background: var(--c-100); color: var(--fg); }
.tw-capture__btn--skip:disabled { color: var(--c-300); cursor: not-allowed; }
.tw-capture__done {
  flex: 1; display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - var(--nav-h));
}
.tw-capture__done-inner { text-align: center; }
.tw-capture__done-check {
  width: 64px; height: 64px; line-height: 64px;
  font-size: 2rem; font-weight: 700;
  background: var(--fg); color: var(--bg);
  margin-bottom: var(--sp-4);
}
.tw-capture__done-text { font-size: 1.125rem; font-weight: 700; margin-bottom: var(--sp-6); }
.tw-capture__done-actions { display: flex; gap: var(--sp-2); justify-content: center; }
.tw-capture__done-actions .tw-capture__btn {
  flex: 0; padding: var(--sp-3) var(--sp-6);
}
.tw-drafts__header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--sp-4);
}
.tw-drafts__toolbar {
  display: flex; align-items: center; gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
}
.tw-drafts__views {
  display: flex; gap: var(--sp-1);
}
.tw-drafts__view-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--bg);
  cursor: pointer; color: var(--fg-muted);
  transition: all var(--dur);
}
.tw-drafts__view-btn.is-active,
.tw-drafts__view-btn:hover {
  background: var(--fg); color: var(--bg); border-color: var(--fg);
}
.tw-drafts__filters {
  display: flex; gap: var(--sp-2); flex-wrap: wrap;
}
.tw-drafts__list {
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.tw-draft-card { position: relative; display: flex; gap: var(--sp-3); transition: border-color var(--dur); }
.tw-draft-card:hover { border-color: var(--fg); }
.tw-draft-card.hidden { display: none; }
.tw-draft-card__thumb {
  width: 100px; height: 100px; flex-shrink: 0;
  background: var(--c-100); overflow: hidden; display: block;
}
.tw-draft-card__thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.tw-draft-card__placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; opacity: .2;
}
.tw-draft-card__body {
  flex: 1; min-width: 0;
  padding: var(--sp-2) var(--sp-3) var(--sp-2) 0;
  display: flex; flex-direction: column;
}
.tw-draft-card__top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--sp-1);
}
.tw-draft-card__date {
  font-size: var(--fz-xs); color: var(--fg-muted); font-family: var(--font-mono);
}
.tw-draft-card__badges {
  display: flex; gap: var(--sp-1);
}
.tw-draft-badge {
  font-size: 11px; line-height: 1;
}
.tw-draft-badge--gps { opacity: .7; }
.tw-draft-badge--no-gps { opacity: .45; }
.tw-draft-badge--note { opacity: .7; }
.tw-draft-card__title {
  font-size: var(--fz-sm); font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tw-draft-card__note {
  font-size: var(--fz-xs); color: var(--fg-muted);
  font-style: italic;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tw-draft-card__location {
  font-size: var(--fz-xs); color: var(--fg-muted); font-family: var(--font-mono);
}
.tw-draft-card__actions {
  display: flex; gap: var(--sp-1); margin-top: auto; padding-top: var(--sp-1);
}
.tw-drafts__map { margin-top: var(--sp-2); }
.tw-drafts__map .leaflet-container { border: 1px solid var(--border); }
.tw-session-group {
  margin-bottom: var(--sp-4);
  border: 1px solid var(--border);
}
.tw-session-group__header {
  padding: var(--sp-2) var(--sp-3);
  background: var(--c-50);
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
  font-size: var(--fz-sm);
}
.tw-session-group__thumbs {
  display: flex; gap: var(--sp-1); padding: var(--sp-2);
  overflow-x: auto; scrollbar-width: thin;
}
.tw-session-thumb {
  width: 72px; height: 72px; flex-shrink: 0;
  overflow: hidden; display: block;
}
.tw-session-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
21. GLOBAL SPLIT LAYOUT (Map links, Sidebar rechts)
       Gilt für: maps.php, walk.php, walk-editor.php
   ============================================================ */

/* ════════════════════════════════════════════════════════════════
   SPLIT LAYOUT
   ────────────────────────────────────────────────────────────────
   Viewport exakt füllen – kein Scroll auf der Seite selbst.

   ┌─────────────────────────────────┐  ← viewport top
   │         NAV (fixed, 60px)       │
   ├─────────────────────────────────┤  ← margin-top: var(--nav-h)
   │  Sidebar (scroll) │  Karte     │
   │                   │  (kein     │
   │                   │   scroll)  │
   └─────────────────────────────────┘  ← viewport bottom

   Mobile (≤639px): Nav = 4px-Linie → margin-top: 4px
   Desktop (≥900px): Karte links, Sidebar rechts
   ════════════════════════════════════════════════════════════════ */

/* 1. Kein globaler Scroll auf Split-Seiten.
      html braucht height:100% damit body height:100% funktioniert. */
html:has(body.tw-split-page) { height: 100%; overflow: hidden; }
.tw-floating-search {
  position: absolute;
  top: var(--sp-4);
  left: 140px;
  right: var(--sp-4);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  pointer-events: none;
}
.tw-floating-search > * { pointer-events: auto; }
.tw-search-bar__locate {
  background: none; border: none; cursor: pointer;
  color: var(--fg-muted); display: flex; align-items: center;
  padding: 0; flex-shrink: 0;
  transition: color .15s;
}
.tw-search-bar__locate:hover { color: var(--fg); }
.tw-map-locate {
  position: absolute;
  bottom: 76px; right: var(--sp-4);
  z-index: 1;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--fg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: var(--shadow-md);
  transition: transform .15s;
}
.tw-map-locate:hover { transform: scale(1.05); }
.tw-split-page footer,
.tw-split-page .nav-spacer,
.tw-split-page .tw-nav-spacer { display: none; }
.tw-split__header {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--fz-2xs);
  color: var(--fg-muted);
  letter-spacing: .06em;
  flex-shrink: 0;
}
.tw-split__footer {
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border);
  display: flex; gap: var(--sp-2);
  flex-shrink: 0; background: var(--bg);
}
.tw-search-bar {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--fg);
  padding: var(--sp-2) var(--sp-4);
  gap: var(--sp-2);
  box-shadow: 0 4px 20px var(--c-black-14);
}
.tw-search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-ui);
  font-size: var(--fz-sm);
  font-weight: 500;
  background: transparent;
  color: var(--fg);
}
.tw-search-bar input::placeholder { color: var(--c-300); font-weight: 400; }
.tw-search-bar__clear {
  background: none; border: none; cursor: pointer;
  color: var(--fg-muted); font-size: 18px; line-height: 1;
  opacity: 0; pointer-events: none;
  transition: opacity .15s; padding: 0 var(--sp-1);
}
.tw-search-bar.has-value .tw-search-bar__clear {
  opacity: 1; pointer-events: auto;
}
.tw-search-bar__divider {
  width: 1px; height: 20px;
  background: var(--c-300); flex-shrink: 0;
}
.tw-search-bar__filter-btn {
  background: none; border: none; cursor: pointer;
  color: var(--fg-muted); display: flex; align-items: center;
  position: relative; padding: 0; flex-shrink: 0;
  transition: color .15s;
}
.tw-search-bar__filter-btn svg {
  display: block;
  transition: transform .3s cubic-bezier(.16,1,.3,1);
}
.tw-search-bar__filter-btn.is-open svg { transform: rotate(180deg); }
.tw-search-bar__filter-btn.is-open { color: var(--fg); }
.tw-search-bar__filter-btn .dot {
  position: absolute; top: -2px; right: -2px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); opacity: 0;
  transition: opacity .15s;
}
.tw-search-bar__filter-btn.has-filters .dot { opacity: 1; }
/* Karte: dieselben Filter-Pills wie Entdecken, als Panel unter der Suchleiste.
   Filter-Knopf klappt es auf/zu; auf dem Handy scrollen die Zeilen seitlich. */
.tw-map-filters {
  display: none; flex-direction: column; gap: var(--sp-3);
  background: var(--bg); border: 1.5px solid var(--fg);
  padding: var(--sp-3);
  box-shadow: var(--shadow-md);
}
.tw-map-filters.is-open { display: flex; }
.tw-map-filters .tw-filter-pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tw-map-filters .tw-filter-pills::-webkit-scrollbar { display: none; }
.tw-map-filters .tw-pill { flex-shrink: 0; }
.tw-maps__list-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); }
.tw-maps__list-link { font-size: var(--fz-xs); font-weight: 600; color: var(--fg); white-space: nowrap; }
.tw-maps__list-link:hover { color: var(--accent); }
@media (min-width: 900px) { .tw-map-filters .tw-filter-pills { flex-wrap: wrap; overflow: visible; } }



.tw-sidebar-card__fav {
  position: absolute; bottom: var(--sp-2); right: var(--sp-2);
  background: none; border: none; cursor: pointer;
  font-size: 16px; color: var(--c-300);
  transition: color .15s; padding: 0;
}
.tw-sidebar-card__fav:hover,
.tw-sidebar-card__fav.is-liked { color: var(--accent); }


.tw-sidebar-card__drag {
  display: flex; align-items: center;
  cursor: grab; padding: 0 2px;
  color: var(--c-300); font-size: 18px;
  flex-shrink: 0; user-select: none;
}
.tw-sidebar-card__drag:active { cursor: grabbing; }
.tw-sidebar-card__remove {
  position: absolute; top: var(--sp-2); right: var(--sp-2);
  background: none; border: none; cursor: pointer;
  color: var(--c-400); font-size: 14px;
  transition: color .15s; padding: 0;
}
.tw-sidebar-card__remove:hover { color: var(--accent); }
.tw-sidebar-card.is-dragging {
  opacity: .5; background: var(--bg-subtle);
}

.tw-walk-edit { overflow: hidden; height: 100%; }
.tw-walk-edit .tw-split__sidebar { order: -1; }
.we-meta-section {
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: var(--sp-2);
  flex-shrink: 0;
}
.we-title-input {
  font-family: var(--font-head); font-weight: 700; font-size: 20px;
  width: 100%; border: none; padding: 0; background: transparent;
  outline: none; color: var(--fg);
}
.we-meta {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--fg-muted); margin-top: 2px;
  display: flex; gap: var(--sp-2);
}
.we-status-badge {
  font-family: var(--font-mono); font-size: 8px;
  color: var(--accent); border: 1px solid var(--accent);
  padding: 2px 6px; white-space: nowrap;
}
.we-stations { gap: 0; padding: var(--sp-2) var(--sp-3); }
.we-stations-add { padding: 0 var(--sp-3) var(--sp-3); flex-shrink: 0; }
.we-empty {
  text-align: center; padding: var(--sp-8);
  color: var(--fg-muted); font-size: var(--fz-2xs);
}
.we-desc-input {
  width: 100%; border: 1px solid var(--border);
  padding: var(--sp-2); font-family: var(--font-head);
  font-size: 14px; font-style: italic; outline: none;
  resize: vertical;
}
.we-desc-input:focus { border-color: var(--fg); }
.we-footer { border-top: 2px solid var(--fg); }
.we-footer .we-publish { flex: 1; }
.we-btn-delete { color: var(--accent); flex-shrink: 0; }
.we-btn-back { flex-shrink: 0; color: var(--c-500); }
.we-station {
  border-bottom: 1px solid var(--rule, var(--border));
  background: var(--bg);
}
.we-station__head {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  cursor: pointer; user-select: none;
  transition: opacity .1s;
}
.we-station__head:hover { opacity: .7; }
.we-station__num {
  width: 22px; height: 22px;
  background: var(--ink, var(--fg)); color: var(--c-white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; flex-shrink: 0;
}
.we-station__num--active { background: var(--accent); }
.we-station__num--done { background: var(--bg); border: 1.5px solid var(--fg); color: var(--fg); }
.we-station__spine {
  display: flex; flex-direction: column; align-items: center;
  width: 22px; flex-shrink: 0;
}
.we-station__spline {
  width: 1px; flex: 1; background: var(--rule, var(--border));
  margin-top: 3px; min-height: 8px;
}
.we-station__thumb {
  width: 40px; height: 40px; flex-shrink: 0;
  overflow: hidden; background: var(--bg-subtle);
}
.we-station__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.we-station__info { flex: 1; min-width: 0; }
.we-station__title {
  font-family: var(--font-head); font-weight: 700; font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--ink, var(--fg));
}
.we-station__meta {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--mid, var(--fg-muted));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.we-station__chevron {
  flex-shrink: 0; color: var(--c-400);
  transition: transform .2s;
  font-size: 14px;
}
.we-station.is-open .we-station__chevron { transform: rotate(90deg); }
.we-station__drag {
  flex-shrink: 0; cursor: grab; color: var(--c-300);
  font-size: 18px; padding: 0 2px; user-select: none;
}
.we-station__drag:active { cursor: grabbing; }
.we-station__remove {
  flex-shrink: 0; background: none; border: none;
  color: var(--c-400); cursor: pointer; font-size: 14px;
  padding: 0 2px; transition: color .15s;
}
.we-station__remove:hover { color: var(--accent); }
.we-station__body {
  max-height: 0; overflow: hidden;
  transition: max-height .3s var(--ease);
}
.we-station.is-open .we-station__body { max-height: 400px; }
.we-station__body-inner {
  padding: 0 var(--sp-3) var(--sp-3);
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.we-station__photo {
  width: 100%; height: 60px;
  object-fit: cover; display: block;
  background: var(--bg-subtle);
}
.we-station__desc {
  font-family: var(--font-head); font-size: 12px;
  color: var(--mid, var(--fg-muted));
  line-height: 1.6; font-style: italic;
}
.we-station__remove-btn {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--accent); padding: var(--sp-1) 0;
  margin-top: var(--sp-1);
}
.we-station__remove-btn:hover { text-decoration: underline; }
.we-station__tags { display: flex; gap: 4px; flex-wrap: wrap; }
.we-connector {
  display: flex; align-items: center;
  padding: 0 var(--sp-3);
  height: 28px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--light, var(--c-400));
}
.we-connector::before,
.we-connector::after {
  content: ''; flex: 1; height: 1px;
  background: var(--rule, var(--border));
}
.we-connector::before { margin-right: var(--sp-2); }
.we-connector::after  { margin-left: var(--sp-2); }
.we-add-btn {
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  width: 100%; padding: var(--sp-3);
  border: 1.5px dashed var(--border);
  background: none; cursor: pointer;
  font-family: var(--font-mono); font-size: var(--fz-2xs);
  color: var(--fg-muted);
  transition: border-color .15s, color .15s;
}
.we-add-btn:hover { border-color: var(--fg); color: var(--fg); }
.we-picker {
  display: none; position: fixed; inset: 0;
  background: var(--c-black-40); z-index: 200;
  align-items: flex-end; justify-content: center;
}
.we-picker.is-open { display: flex; }
.we-picker__panel {
  width: 100%; max-width: 480px;
  max-height: 80vh;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.we-picker__header {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.we-picker__search {
  flex: 1; border: 1.5px solid var(--fg);
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fz-sm); font-family: var(--font-ui);
  outline: none;
}
.we-picker__close {
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: var(--fg-muted);
  padding: 0 var(--sp-1);
}
.we-picker__results {
  flex: 1; overflow-y: auto; padding: var(--sp-2);
}
.we-picker__item {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2); cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s;
}
.we-picker__item:hover { background: var(--bg-alt); }
.we-picker__item-thumb {
  width: 48px; height: 48px; flex-shrink: 0;
  overflow: hidden; background: var(--bg-subtle);
}
.we-picker__item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.we-picker__item-info { flex: 1; min-width: 0; }
.we-picker__item-title { font-weight: 600; font-size: var(--fz-2xs); }
.we-picker__item-meta {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--fg-muted);
}
.we-picker__empty {
  text-align: center; padding: var(--sp-8);
  color: var(--fg-muted); font-size: var(--fz-2xs);
}
.we-info { display: flex; flex-direction: column; gap: var(--sp-2); }
.we-info input, .we-info textarea {
  width: 100%; border: 1px solid var(--border);
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--font-ui); font-size: var(--fz-2xs);
  outline: none;
}
.we-info input:focus, .we-info textarea:focus { border-color: var(--fg); }
.we-info textarea { resize: vertical; min-height: 48px; }
.we-publish {
  width: 100%; padding: var(--sp-3);
  background: var(--fg); color: var(--bg);
  border: none; font-size: var(--fz-sm); font-weight: 700;
  cursor: pointer; transition: opacity .15s;
  font-family: var(--font-ui);
}
.we-publish:hover { opacity: .85; }
.we-publish:disabled { opacity: .4; cursor: default; }
.we-check {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--paper, var(--bg-alt));
  border: 1px solid var(--rule, var(--border));
  font-size: var(--fz-2xs);
}
.we-check__icon { font-size: 11px; flex-shrink: 0; }
.we-check__label { flex: 1; }
.we-check__opt { font-size: 10px; color: var(--mid, var(--fg-muted)); }
.we-check--ok .we-check__label { color: var(--fg); }
.we-check--warn { opacity: .5; }
.we-visibility { display: flex; gap: 5px; }
.we-vis-opt {
  flex: 1; padding: var(--sp-2) var(--sp-1);
  background: var(--paper, var(--bg-alt));
  border: 1px solid var(--rule, var(--border));
  text-align: center; cursor: pointer;
  transition: all .15s;
}
.we-vis-opt.is-active {
  border-color: var(--fg); background: var(--fg);
}
.we-vis-opt.is-active .we-vis-label { color: var(--bg); }
.we-vis-icon { font-size: 14px; margin-bottom: 2px; }
.we-vis-label { font-size: 8px; color: var(--mid, var(--fg-muted)); }
.we-info-panel {
  display: none; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-4);
  border-top: 1px solid var(--border);
}
.we-info-panel.is-open { display: flex; }
.we-info-label {
  font-size: 8px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--mid, var(--fg-muted)); margin-bottom: var(--sp-1);
}

.tw-walk-editor-page .tw-split__sidebar { gap: 0; }
.tw-walk-editor-page .tw-split__header {
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--sp-4);
}
.tw-walk-editor-page .tw-split__footer {
  flex-wrap: wrap;
}
.tw-walk-page .tw-sidebar-card[data-active="true"] {
  border-color: var(--fg);
}
.tw-comments {
  padding: var(--sp-4);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.tw-comments__heading {
  font-size: var(--fz-sm);
  font-weight: 700;
  margin-bottom: var(--sp-3);
}
.tw-comments__count {
  font-family: var(--font-mono);
  font-size: var(--fz-2xs);
  color: var(--fg-muted);
  font-weight: 400;
}
.tw-comment__header {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin-bottom: var(--sp-1);
}
.tw-comment__date {
  font-family: var(--font-mono);
  font-size: var(--fz-3xs);
  color: var(--fg-muted);
}
.tw-comments__empty {
  font-size: var(--fz-2xs);
  color: var(--fg-muted);
}
.tw-comments__login {
  font-size: var(--fz-2xs);
  color: var(--fg-muted);
  margin-top: var(--sp-3);
}
.tw-comments__login a { color: var(--accent); }


.pd-last-visit__label {
  font-family: var(--font-mono);
  font-size: var(--fz-3xs);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--fg-muted);
}
.pd-last-visit__value {
  font-size: var(--fz-2xs);
}
.pd-rule { border: none; border-top: 1px solid var(--rule); }


#place-map { width: 100%; height: 280px; border-radius: var(--radius); }
#walk-map, #editor-map, #explore-map { width: 100%; height: 100%; }

.tw-map-marker--place { background: var(--fg); }
.tw-map-marker--added { background: var(--c-green); }

.tw-map-popup__added { font-size: var(--fz-2xs); color: var(--c-green); font-weight: 600; }


.tw-categories { min-height: calc(100vh - var(--nav-h)); }


.tw-categories__section {
  font-family: var(--font-mono); font-size: var(--fz-2xs);
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--fg-muted); margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border); padding-bottom: var(--sp-2);
}
.tw-explore {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--sp-8) 20px var(--sp-16);   /* oben wie alle Seiten mit Seitenkopf */
}
.tw-explore__show-all {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-muted); text-decoration: underline;
  letter-spacing: .04em;
}
.tw-explore__show-all:hover { color: var(--fg); }
.tw-explore__toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-6) 0 var(--sp-3);
  border-bottom: 1.5px solid var(--fg);
}
.tw-explore__toolbar-left {
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
  font-family: var(--font-mono); font-size: var(--fz-2xs);
  min-width: 0;
}
.tw-explore__toolbar-left strong { font-size: var(--fz-xs); color: var(--fg); }
.tw-explore__toolbar-left .count { color: var(--fg-muted); }
.tw-explore__toolbar-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.tw-active-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--fg); color: var(--bg);
  font-family: var(--font-mono); font-size: var(--fz-3xs);
  padding: 3px 8px 3px 10px; border-radius: 999px;
  text-decoration: none;
}
.tw-active-badge__x {
  background: none; border: none; color: var(--bg);
  cursor: pointer; font-size: 13px; line-height: 1;
  padding: 0 0 0 3px; opacity: .6; transition: opacity .15s;
}
.tw-active-badge__x:hover { opacity: 1; }
.tw-toolbar-link {
  width: 34px; height: 34px;
  border: 1.5px solid var(--fg); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; transition: background .15s;
  position: relative;
}
.tw-toolbar-link:hover { background: var(--fg); }
.tw-toolbar-link:hover svg { stroke: var(--bg); }
.tw-toolbar-link::after {
  content: 'View on map'; position: absolute;
  top: calc(100% + 6px); right: 0;
  background: var(--fg); color: var(--bg);
  font-family: var(--font-mono); font-size: var(--fz-3xs);
  padding: 4px 8px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.tw-toolbar-link:hover::after { opacity: 1; }
.tw-filter-row { display: flex; flex-direction: column; gap: 9px; }
.tw-filter-label {
  font-family: var(--font-mono); font-size: var(--fz-3xs);
  letter-spacing: .1em; text-transform: uppercase; color: var(--fg-muted);
}
.tw-filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.tw-autocomplete {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--bg); border: 1.5px solid var(--fg);
  z-index: 200; max-height: 280px; overflow-y: auto;
  box-shadow: var(--shadow-md);
}
.tw-ac__item {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3); cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background var(--dur);
}
.tw-ac__item:last-child { border-bottom: none; }
.tw-ac__item:hover { background: var(--bg-subtle); }
.tw-ac__icon { flex-shrink: 0; width: 20px; text-align: center; font-size: var(--fz-sm); }
.tw-ac__label { font-size: var(--fz-sm); font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-ac__sub { font-size: var(--fz-2xs); color: var(--fg-muted); }
.tw-ac__count { font-family: var(--font-mono); font-size: var(--fz-2xs); color: var(--fg-muted); flex-shrink: 0; }
.tw-ac__item--city .tw-ac__label { color: var(--accent); }
.tw-pill {
  padding: var(--sp-1) var(--sp-3);
  border: 1.5px solid var(--fg); background: var(--bg);
  font-family: var(--font-mono); font-size: var(--fz-2xs);
  cursor: pointer; position: relative; overflow: hidden;
  text-decoration: none; color: inherit; display: inline-flex;
}
.tw-pill span { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: var(--sp-1); transition: color .2s; }
.tw-pill::before {
  content: ''; position: absolute; inset: 0;
  background: var(--fg); transform: translateY(100%);
  transition: transform .25s cubic-bezier(.16,1,.3,1);
}
.tw-pill.is-active::before { transform: translateY(0); }
.tw-pill.is-active span { color: var(--bg); }
.tw-pill__icon { width: 20px; height: 20px; flex-shrink: 0; } /* Kategorie-SVGs (assets/icons/cat-*.svg) brauchen etwas Fläche, sonst erdrückt der Rahmen die Form */
.tw-pill.is-active .tw-pill__icon { color: var(--bg); }
.tw-pill:hover:not(.is-active) span { color: var(--accent); }
.tw-pill:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 2px; }
/* Kachel: großes Icon über der Beschriftung (Klassifizieren auf der Edit-Seite) */
.tw-pill--tile { padding: var(--sp-3) var(--sp-1); }
.tw-classify:has(.tw-pill--tile) { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.tw-pill--tile span { flex-direction: column; gap: var(--sp-2); text-align: center; }
.tw-pill--tile .tw-pill__icon { width: 36px; height: 36px; }
.tw-explore__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding-top: var(--sp-4);
}
.tw-explore .tw-place-card {
  border-radius: 0;
  border: none;
  box-shadow: 0 1px 4px var(--c-black-08);
  transition: box-shadow .2s, transform .2s;
}
.tw-explore .tw-place-card:hover {
  box-shadow: 0 6px 20px var(--c-black-10);
  transform: translateY(-2px);
  background: var(--bg); color: var(--fg);
}
.tw-explore .tw-place-card__img-wrap { aspect-ratio: 4/3; }
.tw-explore .tw-place-card__body {
  padding: 11px 12px 12px;
  display: flex; flex-direction: column; gap: 4px;
}

.tw-explore .tw-place-card__fav {
  background: none; border: none; cursor: pointer;
  font-size: 16px; color: var(--c-300); line-height: 1;
  flex-shrink: 0; transition: color .15s, transform .2s;
  position: static;
}
.tw-explore .tw-place-card__fav:hover { transform: scale(1.2); }
.tw-explore .tw-place-card__fav.liked, .tw-explore .tw-place-card__fav.is-liked { color: var(--accent); }
.tw-page-btn--arrow:disabled,
.tw-page-btn--arrow[aria-disabled="true"] { color: var(--c-300); cursor: default; pointer-events: none; }
.tw-maps-page .tw-footer { display: none; }
.tw-maps-page .tw-nav-spacer { display: none; }




.tw-place-card__img--placeholder svg { width: 32px; height: 32px; opacity: .4; }
.tw-place-card:hover .tw-place-card__fav { color: var(--c-white-60); }
.tw-place-card:hover .tw-place-card__location { color: var(--c-white-60); }
.tw-place-card:hover .tw-tag--style     { opacity: .8; }
.tw-place-card:hover .tw-tag--preserved,
.tw-place-card:hover .tw-tag--decayed,
.tw-place-card:hover .tw-tag--removed   { background: var(--c-white-10); color: var(--c-white-75); border-color: transparent; }
.tw-place-card:hover .tw-tag--era       { border-color: var(--c-white-30); color: var(--c-white-50); }
.tw-place-card--station .tw-place-card__img-wrap { aspect-ratio: 16/9; }
.tw-place-card--compact .tw-place-card__body { padding: var(--sp-2); }


.tw-cat-cell--empty .tw-cat-count { color: var(--fg-muted); }
.tw-cat-cell--empty:hover { opacity: .5; }
.pd-hero {
  position: relative;
  width: 100%;
  max-height: 75vh;
  background: var(--ink);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-hero__img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
}
.pd-breadcrumb {
  display: block;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--mid); text-decoration: none;
  margin-bottom: var(--sp-3);
}
.pd-breadcrumb:hover { color: var(--ink); }
.pd-hero__counter {
  position: absolute; bottom: var(--sp-4); right: var(--sp-4);
  background: var(--c-black-60); color: var(--c-white);
  font-family: var(--font-mono); font-size: 11px;
  padding: 4px 10px; z-index: 2;
}
.pd-hero--portrait { height: clamp(320px, 70vh, 680px); }
.pd-hero--portrait .pd-hero__img { object-fit: contain; position: relative; z-index: 1; }
.pd-hero--portrait::before {
  content: ''; position: absolute; inset: -10%;
  background-image: var(--hero-bg);
  background-size: cover; background-position: center;
  filter: blur(24px) brightness(.4) saturate(1.4);
  transform: scale(1.15); z-index: 0;
}
.pd-filmstrip {
  background: #111; display: flex;
  align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) 20px;
  overflow-x: auto; scrollbar-width: none;
  max-width: 1280px; margin: 0 auto;
}
.pd-filmstrip::-webkit-scrollbar { display: none; }
.pd-filmstrip__thumb {
  flex-shrink: 0; height: 48px; width: auto;
  overflow: hidden; cursor: pointer;
  background: var(--c-900); border: none; padding: 0;
  transition: outline-color .15s;
  outline: 1.5px solid transparent; outline-offset: 1px;
}
.pd-filmstrip__thumb img { height: 100%; width: auto; object-fit: contain; display: block; }
.pd-filmstrip__thumb--active { outline-color: var(--accent); }
.pd-filmstrip__thumb:hover:not(.pd-filmstrip__thumb--active) { outline-color: var(--c-400); }
.pd-filmstrip__label {
  margin-left: auto; flex-shrink: 0;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--c-white-50); white-space: nowrap;
}
.pd-filmstrip__add {
  flex-shrink: 0; width: 48px; height: 48px;
  border: 1.5px dashed var(--c-500); background: transparent;
  color: var(--c-400); font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color .15s, color .15s;
  position: relative; overflow: hidden;
}
.pd-filmstrip__add:hover { border-color: var(--c-white); color: var(--c-white); }
.pd-layout {
  max-width: 1280px; margin: 0 auto;
  padding: calc(var(--sp-6) + 30px) 20px var(--sp-16);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
}
.pd-main { min-width: 0; }
.pd-eyebrow {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}
.pd-eyebrow__badges { display: flex; gap: 6px; flex-wrap: wrap; }


.pd-eyebrow__actions {
  display: flex; gap: var(--sp-4);
  font-family: var(--font-mono); font-size: 12px;
  color: var(--mid); letter-spacing: .04em;
}
.pd-eyebrow__actions button,
.pd-eyebrow__actions a {
  background: none; border: none; cursor: pointer;
  font: inherit; color: inherit; text-decoration: none;
  transition: color .15s;
}
.pd-eyebrow__actions button:hover,
.pd-eyebrow__actions a:hover { color: var(--ink); }
.pd-title {
  font-family: var(--font-head); font-weight: 900;
  font-size: clamp(1.4rem, 4vw, 2rem);
  line-height: 1.15; margin-bottom: var(--sp-2);
}
.pd-meta {
  margin-bottom: var(--sp-5);
}
.pd-meta__loc {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--mid); margin-bottom: 2px;
}
.pd-meta__by {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--light); text-transform: uppercase;
  letter-spacing: .08em;
}
.pd-label {
  font-family: var(--font-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--mid); margin-bottom: var(--sp-2);
}
.pd-description {
  font-size: var(--fz-sm); line-height: 1.7;
  margin-bottom: var(--sp-6);
}
.pd-divider {
  border: none; border-top: 1px solid var(--rule);
  margin: var(--sp-6) 0;
}
.pd-comments { margin-bottom: var(--sp-6); }
.pd-comment {
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--rule);
}
.pd-comment:last-of-type { border-bottom: none; }
.pd-comment__avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--c-200); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--mid);
}
.pd-comment__name { font-weight: 600; font-size: var(--fz-2xs); }
.pd-comment__time { font-family: var(--font-mono); font-size: 12px; color: var(--light); }
.pd-comment__body { font-size: var(--fz-2xs); line-height: 1.6; }
.pd-comment-form {
  display: flex; gap: var(--sp-2); align-items: flex-start;
  margin-top: var(--sp-4);
}
.pd-comment-form textarea {
  flex: 1; border: 1px solid var(--rule); padding: var(--sp-2);
  font-family: var(--font-ui); font-size: var(--fz-2xs);
  resize: vertical; min-height: 48px; outline: none;
}
.pd-comment-form textarea:focus { border-color: var(--ink); }
.pd-comment-form button {
  padding: var(--sp-2) var(--sp-3);
  background: var(--ink); color: var(--c-white);
  border: none; font-size: var(--fz-2xs); font-weight: 600;
  cursor: pointer; flex-shrink: 0;
}
.pd-admin {
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
  padding: var(--sp-3) var(--sp-4);
  margin-top: var(--sp-6);
  color: var(--admin-text);
  font-size: var(--fz-2xs);
}
.pd-admin__row {
  display: flex; align-items: center; gap: var(--sp-2);
  flex-wrap: wrap;
}
.pd-admin__status {
  font-family: var(--font-mono); font-size: 10px;
  font-weight: 700; text-transform: uppercase;
}
.pd-sidebar {
  display: flex; flex-direction: column; gap: var(--sp-6);
}
.pd-card {
  border: 1px solid var(--rule);
}
.pd-card__label {
  font-family: var(--font-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--mid); padding: var(--sp-3) var(--sp-3) var(--sp-1);
}
.pd-map {
  width: 100%; height: 150px;
  position: relative; overflow: hidden;
  isolation: isolate; z-index: 0;
}
.pd-map--empty {
  height: 100px; background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  color: var(--light); font-size: var(--fz-2xs);
}
.pd-coords {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--paper); font-family: var(--font-mono);
  font-size: 10px; color: var(--mid);
}
.pd-coords__copy {
  background: none; border: none; cursor: pointer;
  font-size: 14px; color: var(--mid);
  transition: color .15s; padding: 0;
}
.pd-coords__copy:hover { color: var(--ink); }
.pd-address {
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fz-2xs); color: var(--mid);
  display: flex; align-items: center; justify-content: space-between;
}
.pd-address a { color: var(--accent); text-decoration: none; font-size: 10px; }
.pd-community { padding: 0; }
.pd-visits {
  display: flex; align-items: stretch;
  padding: var(--sp-3);
}
.pd-visits__count {
  font-family: var(--font-mono); font-size: 32px;
  font-weight: 700; line-height: 1; color: var(--ink);
}
.pd-visits__label {
  font-family: var(--font-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--mid); margin-top: 2px;
}
.pd-visits__last {
  margin-left: var(--sp-3); padding-left: var(--sp-3);
  border-left: 1px solid var(--rule);
  font-size: var(--fz-2xs); color: var(--mid);
  display: flex; flex-direction: column; justify-content: center;
}
.pd-checkin-btn {
  display: block; width: 100%;
  padding: var(--sp-3); text-align: center;
  background: var(--ink); color: var(--c-white);
  border: none; font-size: var(--fz-sm); font-weight: 600;
  cursor: pointer; transition: opacity .15s;
  font-family: var(--font-ui);
}
.pd-checkin-btn:hover { opacity: .85; }
.pd-checkin-btn:disabled { opacity: .5; cursor: default; }
.pd-checkin-btn--done { background: var(--c-green); }
.pd-photo-overlay-input {
  position: absolute; inset: 0;
  opacity: 0; width: 100%; height: 100%; cursor: pointer;
}
.tw-btn.tw-btn--on-dark { color: var(--c-white); border-color: var(--c-white-35); }
.tw-btn.tw-btn--on-dark:hover { background: var(--c-white-10); border-color: var(--c-white); }
.pd-checkin-note {
  padding: var(--sp-1) var(--sp-3);
  font-size: 10px; color: var(--light);
  font-family: var(--font-mono);
}


.pd-walks-label {
  font-family: var(--font-mono); font-size: 9px;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--mid); padding: var(--sp-2) var(--sp-3) var(--sp-1);
}
.pd-walk-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-2) var(--sp-3);
  border-top: 1px solid var(--rule);
  font-size: var(--fz-2xs); text-decoration: none; color: var(--ink);
  transition: background .15s;
}
.pd-walk-item:hover { background: var(--paper); }
.pd-walk-item__stops {
  font-family: var(--font-mono); font-size: 10px; color: var(--mid);
}
.pd-doc-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--sp-2) var(--sp-3);
  border-top: 1px solid var(--rule);
  font-size: var(--fz-2xs);
}
.pd-doc-row:first-of-type { border-top: none; }
.pd-doc-label {
  font-family: var(--font-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--light);
}
.pd-doc-value { font-weight: 500; }
.pd-doc-value a { color: var(--accent); text-decoration: none; }
.pd-photo-actions {
  display: flex; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4);
  background: #111;
}


.tw-btn--start-walk {
  width: 100%;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.tw-nav-tag:not(.tw-nav-tag--primary) {
  border: 1px solid var(--border);
  color: var(--c-500);
}
.tw-nav-panel__like.is-liked,
.tw-nav-panel__like:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.tw-nav-station-row.is-done .tw-nav-station-row__title { text-decoration: line-through; color: var(--c-400); }


@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


.tw-related {
  border-top: 2px solid var(--fg);
  padding-block: var(--sp-10);
  background: var(--surface-2);
}
.tw-related__title {
  font-family: var(--font-mono);
  font-size: var(--fz-xs);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--c-400);
  margin-bottom: var(--sp-4);
}
.tw-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--sp-3);
}
.tw-related-card { text-decoration: none; color: inherit; display: block; }
.tw-related-card__img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface);
  margin-bottom: var(--sp-2);
}
.tw-related-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.tw-related-card:hover .tw-related-card__img img { transform: scale(1.04); }
.tw-related-card__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.tw-related-card__body { display: flex; flex-direction: column; gap: 2px; }
.tw-related-card__title { font-size: var(--fz-sm); font-weight: 600; line-height: 1.3; }
.tw-related-card__tag {
  font-family: var(--font-mono);
  font-size: var(--fz-xs);
  color: var(--c-400);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.tw-walks-filter__select:focus { outline: none; border-color: var(--fg); }


.tw-not-found { padding: 4rem 1rem; text-align: center; }
.tw-walk-card__title a { text-decoration: none; color: inherit; }
.tw-walk-card__title a:hover { color: var(--accent); }
.tw-admin-th-action { width: 56px; }
.ms-auto          { margin-left: auto; }
.tw-admin-input-sm { width: 100px; }
.tw-admin-ai-meta { font-size: var(--fz-xs); color: var(--fg-muted); display: flex; gap: var(--sp-4); margin-top: var(--sp-3); }
.tw-admin-ai-num  { color: var(--fg); }
.tw-admin-ai-ok   { color: var(--c-green); }
.tw-admin-ai-warn { color: var(--accent); }
.tw-profile-avatar {
  width: 64px;
  height: 64px;
  background: var(--accent);
  color: var(--c-white, var(--c-white));
  font-size: 1.75rem;
  font-weight: 700;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.tw-comments__load-more {
  width: 100%;
  margin-top: var(--sp-2);
  text-align: center;
}.tw-nav-step--first .tw-nav-step__icon {
  color: var(--accent);
  font-size: 1rem;
}


@media (min-width: 640px) {
  .layout-sidebar      { grid-template-columns: 1fr 280px; }
  .layout-sidebar-wide { grid-template-columns: 1fr 320px; }
  
  
  
  .tw-capture__post { max-width: 600px; margin: 0 auto; width: 100%; }
  .tw-capture__preview { max-height: calc(100vh - var(--nav-h) - 200px); }
  .tw-draft-card__thumb { width: 140px; height: 120px; }
  .tw-session-thumb { width: 96px; height: 96px; }
  #place-map { height: 340px; }
  .tw-footer__inner { grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--sp-10); }
}
@media (max-width: 639px) {
  body { padding-top: 56px; }
  .tw-floating-search { left: 68px; right: var(--sp-3); top: var(--sp-2); }
}
@media (min-width: 900px) {
  #panel-2,#edit-panel {
      flex-direction: row;
      height: calc(100vh - var(--nav-h));
      min-height: unset;
      overflow: hidden;
    }
  .tw-step2-right {
      flex: 0 0 50%;
      border-top: none;
      border-left: 2px solid var(--fg);
      overflow-y: auto;
    }
  .tw-split { flex-direction: row; }
  .tw-split__sidebar {
      width: 360px;
      height: 100%;
      border-top: none;
      border-left: 1.5px solid var(--fg);
      order: 1;
    }
  .tw-walk-edit .tw-split__sidebar {
      width: 300px;
      border-left: none;
      border-right: 2px solid var(--fg);
    }
  .we-picker__panel {
      border-radius: 0;
      max-height: none; height: 100%;
      position: absolute; right: 0; top: 0; bottom: 0;
      width: 360px;
    }
  .we-picker { align-items: stretch; }
  
  .pd-layout {
      grid-template-columns: 1fr 300px;
      gap: var(--sp-10);
    }
  .pd-sidebar {
      position: sticky; top: calc(var(--nav-h) + var(--sp-4));
      align-self: start;
    }
  
  
  
  
  
}
@media (max-width: 767px) {
  .tw-split__map .leaflet-control-zoom {
      bottom: calc(30vh + 8px) !important;
    }
  .tw-split__sidebar { display: none; }
  .tw-split__map { height: 100%; }
  .tw-pull-card {
      display: flex;
      flex-direction: column;
      position: fixed;
      bottom: 0; left: 0; right: 0;
      /* Always full height, transform moves it up to reveal different amounts */
      height: calc(100dvh - var(--nav-h, 56px));
      background: var(--bg);
      border-radius: 16px 16px 0 0;
      box-shadow: 0 -4px 24px rgba(0,0,0,.12);
      z-index: 200;
      transition: transform .35s cubic-bezier(.4,0,.2,1);
      overflow: hidden;
      will-change: transform;
    }
  .tw-pull-card__handle {
      width: 40px; height: 4px;
      background: var(--c-300);
      border-radius: 2px;
      margin: 10px auto 0;
      cursor: grab;
      flex-shrink: 0;
    }
  .tw-pull-card__content {
      flex: 1;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      padding: var(--sp-2) var(--sp-4) var(--sp-8);
      min-height: 0;
    }
  .tw-pull-card--peek { transform: translateY(calc(100% - 72px)); }
  .tw-pull-card--half { transform: translateY(45%); }
  .tw-pull-card--full { transform: translateY(0); }
}
@media (max-width: 899px) {
  .tw-admin-two-col { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tw-explore__grid { grid-template-columns: 1fr; }
  .tw-explore .tw-place-card {
      flex-direction: row;
      box-shadow: none; transform: none !important;
    }
  .tw-explore .tw-place-card:hover { box-shadow: none; transform: none !important; }
  .tw-explore .tw-place-card__img-wrap {
      width: 100px; height: 100px; aspect-ratio: unset; flex-shrink: 0;
    }
  .tw-explore .tw-place-card__body { padding: 10px 12px; }
  
  .tw-explore .tw-place-card__fav {
      position: absolute; bottom: 10px; right: 10px;
    }}
@media (max-width: 1024px) {
  .tw-explore__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .tw-btn--start-walk { width: auto; }
}


/* ============================================================
   7c. UMBENANNTE KLASSEN (Views nutzen die neuen Namen)
   .tw-auth__tab → .tw-auth-tab, .tw-form__row → .tw-form-row
   ============================================================ */
.tw-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.tw-auth-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: var(--sp-5); }
.tw-auth-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.tw-auth-panel { display: none; }
.tw-auth-panel.is-active { display: block; }
.tw-auth-tab { flex: 1; padding: var(--sp-3); border-bottom: 2px solid transparent; font-size: var(--fz-sm); font-weight: 600; color: var(--fg-muted); cursor: pointer; }


/* ============================================================
   7d. SEITEN OHNE BISHERIGES CSS
   Klassen, die die Views nutzen und die bisher nirgends gestylt waren
   (Prüfung: php tests/check-css-classes.php). Nur Tokens, mobile-first.
   ============================================================ */

/* ── Seiten-Wurzeln: Abstand nach oben/unten ─────────────────── */
.tw-blog, .tw-blog-editor, .tw-drafts, .tw-profile, .tw-leaderboard, .tw-walks, .tw-challenges, .tw-curated-index, .tw-legal, .tw-dashboard, .tw-categories, .tw-admin, .tw-account-settings, .tw-health-page { padding-block: var(--sp-8) var(--sp-12); }
.tw-page { flex: 1 0 auto; }
.tw-about, .tw-blog-post { display: block; }

/* ── Profil ──────────────────────────────────────────────────── */

.tw-level-card { margin-bottom: var(--sp-8); padding: var(--sp-4); border: 1px solid var(--border); background: var(--bg-alt); }
.tw-level-card__inner { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-3); }
.tw-level-card__text { flex: 1; min-width: 0; }
.tw-level-card__name { font-family: var(--font-head); font-weight: var(--wght-bold); font-size: var(--fz-lg); }
.tw-level-card__sub { font-size: var(--fz-sm); color: var(--fg-muted); }
.tw-level-card__total { font-family: var(--font-mono); font-weight: 700; font-size: var(--fz-lg); color: var(--accent); white-space: nowrap; }

.tw-badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: var(--sp-3); }
.tw-badge-card {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-1);
  padding: var(--sp-4) var(--sp-2); text-align: center;
  background: var(--bg); border: 1px solid var(--border); border-top: 3px solid var(--c-300);
}
.tw-badge-card__icon   { font-size: 2rem; line-height: 1; }
.tw-badge-card__name   { font-size: var(--fz-sm); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.tw-badge-card__rarity { font-size: var(--fz-2xs); text-transform: uppercase; letter-spacing: var(--track-wide); color: var(--fg-muted); }
/* Seltenheit (Klasse wird aus der DB gebaut: tw-badge-card--<rarity>) */
.tw-badge-card--common    { border-color: var(--c-300); }
.tw-badge-card--uncommon  { border-color: var(--c-green); }
.tw-badge-card--rare      { border-color: var(--c-blue); }
.tw-badge-card--epic      { border-color: var(--c-purple); }
.tw-badge-card--legendary { border-color: var(--c-gold); }

/* ── Leaderboard ─────────────────────────────────────────────── */
.tw-leaderboard__table { width: 100%; }
.tw-leaderboard__row--me td { background: var(--bg-alt); font-weight: 700; }
.tw-podium { display: flex; justify-content: center; gap: var(--sp-4); align-items: flex-end; margin-bottom: var(--sp-8); }
.tw-podium__place { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: var(--sp-3) var(--sp-2) var(--sp-4); border-top: 3px solid var(--c-300); background: var(--bg-alt); min-width: 6rem; }
.tw-podium__place--gold   { border-top-color: var(--c-gold);   padding-bottom: var(--sp-8); }
.tw-podium__place--silver { border-top-color: var(--c-silver); padding-bottom: var(--sp-5); }
.tw-podium__place--bronze { border-top-color: var(--c-bronze); }
.tw-podium__place--me { outline: 2px solid var(--accent); outline-offset: 2px; }
.tw-podium__rank { font-size: 1.75rem; line-height: 1; }
.tw-podium__avatar {
  display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-head); font-weight: 900; font-size: var(--fz-xl);
}
.tw-podium__level { margin-top: var(--sp-1); }

/* ── Dashboard ───────────────────────────────────────────────── */
.tw-dashboard-xp__badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border: 2px solid var(--c-300); border-radius: 50%;
  background: var(--bg); font-size: var(--fz-base); line-height: 1;
}
.tw-dashboard-card__thumb { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-subtle); }
.tw-dashboard-card__thumb--walk { aspect-ratio: 16 / 9; overflow: hidden; }
.tw-dashboard-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tw-dashboard__empty-icon { margin-bottom: var(--sp-3); font-size: 3rem; line-height: 1; opacity: .25; }
.tw-form-row--2col { grid-template-columns: 1fr; }
@media (min-width: 640px) { .tw-form-row--2col { grid-template-columns: 1fr 1fr; } }

/* ── Einladungen (Dashboard) ─────────────────────────────────── */
.tw-invite-list { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-6); }
.tw-invite-item { padding: var(--sp-3); background: var(--bg); border: 1px solid var(--border); }
.tw-invite-item__code { display: flex; align-items: center; gap: var(--sp-2); font-family: var(--font-mono); font-weight: 700; word-break: break-all; }
.tw-invite-item__copy { min-width: 44px; min-height: 44px; font-size: var(--fz-lg); line-height: 1; background: none; cursor: pointer; }
.tw-invite-item__meta { margin-top: var(--sp-1); font-size: var(--fz-xs); color: var(--fg-muted); }
.tw-invite-form { padding-top: var(--sp-4); border-top: 1px solid var(--border); }
.tw-invite-form__title { margin-bottom: var(--sp-3); font-size: var(--fz-base); }
.tw-invite-form__msg { margin-top: var(--sp-3); }
.tw-invite-form__empty { font-size: var(--fz-sm); color: var(--fg-muted); }

/* ── Blog ────────────────────────────────────────────────────── */
.tw-blog-card img { width: 100%; height: 100%; object-fit: cover; }
.tw-tag__count { margin-left: var(--sp-1); font-family: var(--font-mono); opacity: .6; }
.tw-blog-post__inner { padding-block: var(--sp-8) var(--sp-12); }
.tw-blog-post__header { margin-bottom: var(--sp-6); }
.tw-blog-post__author { font-weight: 700; color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.tw-blog-post__body { font-size: var(--fz-lg); line-height: 1.75; }

.tw-blog-editor__layout { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); }
@media (min-width: 960px) { .tw-blog-editor__layout { grid-template-columns: minmax(0, 1fr) 20rem; } }
.tw-input--textarea { min-height: 12rem; line-height: 1.6; resize: vertical; }
.tw-blog-editor__textarea { min-height: 24rem; font-family: var(--font-mono); font-size: var(--fz-sm); }
.tw-blog-editor__linked-item { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); font-size: var(--fz-sm); border: 1px solid var(--border); }
.tw-search-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: var(--z-overlay);
  max-height: 16rem; overflow: auto; list-style: none;
  background: var(--bg); border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
.tw-search-dropdown[hidden] { display: none; }
.tw-search-dropdown li { padding: var(--sp-2) var(--sp-3); font-size: var(--fz-sm); cursor: pointer; }
.tw-search-dropdown li:hover { background: var(--bg-subtle); }

/* ── Drafts, About, Impressum ────────────────────────────────── */
.tw-drafts__sessions { display: flex; flex-direction: column; gap: var(--sp-6); }
.tw-about-contact__note, .tw-about-credits__oss { margin-top: var(--sp-3); font-size: var(--fz-sm); color: var(--fg-muted); }
.tw-legal { padding-block: var(--sp-8) var(--sp-12); line-height: 1.7; }
.tw-legal h2 { margin: var(--sp-8) 0 var(--sp-2); font-size: var(--fz-xl); }

/* ── Footer, Auth, Pagination, leere Zustände ────────────────── */
.tw-footer__col { min-width: 0; }
.tw-footer__brand { max-width: 22rem; }
.tw-auth-box__footer { margin-top: var(--sp-6); text-align: center; font-size: var(--fz-sm); color: var(--fg-muted); }
.tw-password-strength { min-height: 1.25em; margin-top: var(--sp-1); font-size: var(--fz-xs); font-weight: 600; }
.tw-password-strength.is-weak   { color: var(--accent); }
.tw-password-strength.is-medium { color: var(--c-yellow-fg); }
.tw-password-strength.is-good   { color: var(--c-green-fg); }
.tw-password-strength.is-strong { color: var(--c-green); }
.tw-page-btn--ellipsis { border-color: transparent; color: var(--fg-muted); pointer-events: none; }

/* ── Stadt-Seite & Sammlungen (per JS gebaute Karten) ────────── */
.tw-place-grid, .tw-walk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: var(--sp-4); }
.tw-place-card__photo { aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-subtle); }
.tw-place-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.tw-place-card__placeholder { width: 100%; height: 100%; background: var(--bg-subtle); }
.tw-place-card__tags { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-top: var(--sp-1); }
.tw-place-card__tag { padding: 0 var(--sp-2); font-size: var(--fz-2xs); text-transform: uppercase; letter-spacing: var(--track-wide); color: var(--fg-muted); border: 1px solid var(--border); }

/* ── Modal-Bausteine ─────────────────────────────────────────── */

/* ── Account-Unternavigation ─────────────────────────────────── */
.tw-user-subnav { background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.tw-user-subnav__links { display: flex; align-items: stretch; gap: var(--sp-1); overflow-x: auto; }
.tw-user-subnav__link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--sp-3);
  font-size: var(--fz-sm); font-weight: 600; white-space: nowrap; color: var(--fg-muted);
  background: none; border-bottom: 3px solid transparent; cursor: pointer;
}
.tw-user-subnav__link:hover, .tw-user-subnav__link.is-active { color: var(--fg); border-bottom-color: var(--accent); }
.tw-user-subnav__link--logout { margin-left: auto; }
@media (min-width: 640px) { .tw-user-subnav__link { padding: 0 var(--sp-4); } }

/* ── Admin-Reste, Suche, Place-Aktionen ──────────────────────── */
.tw-admin-two-col__main, .tw-admin-two-col__side { min-width: 0; }
.tw-select--sm { width: auto; padding: var(--sp-1) var(--sp-2); font-size: var(--fz-sm); }
.tw-table-date { white-space: nowrap; font-size: var(--fz-sm); color: var(--fg-muted); }
.tw-toggle__label { font-size: var(--fz-sm); font-weight: 600; }
.tw-ac__item--place .tw-ac__icon { color: var(--accent); }
.tw-upload-search__item { display: block; width: 100%; padding: var(--sp-2) var(--sp-3); font-size: var(--fz-sm); text-align: left; background: none; cursor: pointer; }
.tw-upload-search__item:hover { background: var(--bg-subtle); }
.tw-upload-search__no-result { padding: var(--sp-3); font-size: var(--fz-sm); color: var(--fg-muted); }
.pd-eyebrow__btn {
  display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 44px; padding: 0 var(--sp-3);
  font-size: var(--fz-sm); font-weight: 600; background: var(--bg); border: 1px solid var(--border); cursor: pointer;
  transition: border-color var(--dur), color var(--dur);
}
.pd-eyebrow__btn:hover { border-color: var(--fg); }
.pd-eyebrow__btn[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.pd-eyebrow__btn:disabled { opacity: .5; cursor: not-allowed; }


/* ============================================================
   8. KOMPONENTE – NAVIGATION
   ============================================================ */

/* ── Logo ── */
.tw-logo-layer {
  position: fixed; top: 0; left: var(--page-offset, 0px);   /* bündig mit dem zentrierten Seitenrahmen */
  width: 130px; height: 130px;
  display: flex; align-items: center; justify-content: center;
  z-index: 1001; pointer-events: none;   /* über der Nav (1000), damit das Logo nicht abgeschnitten wird */
}
.tw-logo-layer a { pointer-events: all; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.tw-logo-layer svg, .tw-logo-layer img { width: 60px; height: auto; display: block; }
.tw-logo-layer__placeholder { font-family: var(--font-head); font-size: 3.5rem; font-weight: 900; color: var(--fg); line-height: 1; }

/* ── Burger: immer fixed, nur mobile sichtbar ── */
.tw-nav__burger {
  display: none;
  position: fixed; top: 10px; right: 16px;
  z-index: 600; /* höchster z-index */
  flex-direction: column; justify-content: center;
  gap: 6px; width: 44px; height: 44px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
@media (max-width: 639px) { .tw-nav__burger { display: flex; } }
.tw-nav__burger span { display: block; width: 22px; height: 2px; background: var(--fg); transition: transform .22s, opacity .22s; }
.tw-nav__burger.is-open span            { background: var(--c-white); }
.tw-nav__burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.tw-nav__burger.is-open span:nth-child(2) { opacity: 0; }
.tw-nav__burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ── Nav Bar ── */
.tw-nav {
  position: fixed; inset: 0 0 auto;
  height: var(--nav-h);
  background: var(--bg);
  z-index: 1000;
  overflow: visible;
}
.tw-nav__inner {
  height: 100%; max-width: var(--page-max); margin-inline: auto;
  display: flex; align-items: stretch; justify-content: space-between;
  padding-left: var(--page-left); padding-right: var(--page-right);
  position: relative;
}
/* Schwarze Linie: beginnt beim ersten Link (nach dem Logo-Bereich, 160px) und
   endet mit der Meta-Navigation rechts – nicht über die volle Breite. */
.tw-nav__inner::after {
  content: ''; position: absolute;
  bottom: 0; left: var(--page-left); right: var(--page-right);
  height: 4px; background: var(--fg); z-index: 0;
}


.tw-nav__links { display: none; align-items: stretch; gap: 0; flex: 1; }
@media (min-width: 640px) { .tw-nav__links { display: flex; } }

/* Link: rote Linie bei hover/aktiv überdeckt schwarz */
.tw-nav__link {
  font-size: 1rem; font-weight: 700; color: var(--fg);
  white-space: nowrap; display: flex; align-items: center;
  padding: 0 var(--sp-5); text-decoration: none;
  border-bottom: 4px solid transparent;
  margin-bottom: -4px;
  transition: border-color var(--dur);
  position: relative; z-index: 2;
}
.tw-nav__link:hover     { border-bottom-color: var(--accent); }
.tw-nav__link.is-active { border-bottom-color: var(--accent); }

/* Meta rechts */
.tw-nav__meta { display: none; align-items: center; gap: var(--sp-4); }
@media (min-width: 640px) { .tw-nav__meta { display: flex; } }
.tw-nav__meta-link {
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  color: var(--fg-muted); white-space: nowrap; transition: color var(--dur); text-decoration: none;
}
.tw-nav__meta-link:hover { color: var(--fg); }
.tw-nav__meta-link--upload { font-weight: 700; color: var(--accent); font-size: 12px; }
.tw-nav__meta-link--upload:hover { color: var(--accent-dk); }

/* User dropdown */
.tw-nav__user { position: relative; display: flex; align-items: center; }
.tw-nav__user-btn {
  display: flex; align-items: center; gap: var(--sp-2);
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 11px; color: var(--fg-muted); padding: var(--sp-1) var(--sp-2);
  transition: color var(--dur);
}
.tw-nav__user-btn:hover { color: var(--fg); }
.tw-nav__xp     { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--accent); }
.tw-nav__avatar { width: 28px; height: 28px; background: var(--c-900); color: var(--c-white); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; text-transform: uppercase; flex-shrink: 0; }
.tw-nav__dropdown {
  display: none; position: absolute; top: 100%; right: 0;
  background: var(--bg); border: 2px solid var(--fg); border-radius: 0;
  min-width: 160px; box-shadow: 3px 3px 0 var(--fg);
  z-index: 300; padding: var(--sp-1) 0;
}
.tw-nav__user::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 12px; }
.tw-nav__user:hover .tw-nav__dropdown { display: block; }
.tw-nav__dropdown a, .tw-nav__dropdown button {
  display: block; width: 100%; text-align: left;
  padding: var(--sp-2) var(--sp-4); font-size: 13px; color: var(--fg);
  text-decoration: none; background: none; border: none;
  font-family: inherit; cursor: pointer; transition: background var(--dur);
}
.tw-nav__dropdown a:hover, .tw-nav__dropdown button:hover { background: var(--c-100); }
.tw-nav__dropdown hr { border: none; border-top: 1px solid var(--border); margin: var(--sp-1) 0; }
.tw-nav__dropdown .tw-nav__dropdown-admin  { color: var(--fg-muted); font-size: 12px; }
.tw-nav__dropdown .tw-nav__dropdown-logout { color: var(--fg-muted); font-size: 12px; }

/* Mobile: Nav = nur schwarze 4px-Linie */
@media (max-width: 639px) {
  .tw-nav { height: 4px; background: var(--fg); overflow: hidden; }
  .tw-nav__inner { display: none; }
  .tw-logo-layer { width: 68px; height: 68px; top: 4px; z-index: 1001; }
  .tw-logo-layer svg, .tw-logo-layer img { width: 38px; }
  .tw-nav-spacer { height: 4px; }
}

/* ── Mobile Drawer: schwarz, Text weiß ── */
.tw-nav__drawer {
  display: flex; /* IMMER flex – kein display toggle */
  flex-direction: column; align-items: center;
  position: fixed; inset: 0;
  background: #1a1a1a;
  z-index: 400;
  overflow-y: auto;
  /* Versteckt via transform+visibility, NICHT display:none */
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform var(--dur-slow) cubic-bezier(.4,0,.2,1), visibility var(--dur-slow);
}
.tw-nav__drawer.is-open {
  transform: translateY(0);
  visibility: visible;
}

/* Logo: absolut top-left, 80px Platz via drawer-main padding reserviert */
.tw-nav__drawer-logo {
  position: absolute; top: 0; left: 0;
  padding: 12px 16px; z-index: 1;
}
.tw-nav__drawer-logo svg,
.tw-nav__drawer-logo img { width: 38px; height: auto; display: block; }
.tw-nav__drawer-logo-text { font-size: 1.1rem; font-weight: 900; color: var(--c-white); letter-spacing: -.02em; }

.tw-nav__drawer-main {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; width: 100%;
  padding: 80px 0 0; /* Platz für Logo + Burger */
}
.tw-nav__drawer-link, button.tw-nav__drawer-link {
  display: block; width: 100%; text-align: center;
  padding: var(--sp-5) 0; font-size: clamp(1.5rem, 6vw, 2rem); font-weight: 700;
  color: var(--c-white);
  border-bottom: 1px solid var(--c-white-10);
  border-top: none; border-left: none; border-right: none;
  text-decoration: none; background: none;
  cursor: pointer; font-family: inherit; transition: color var(--dur), background var(--dur);
}
.tw-nav__drawer-link:hover { color: var(--accent); }
.tw-nav__drawer-link--upload { color: var(--accent); }
.tw-nav__drawer-link.is-active {
  color: var(--accent);
  border-color: rgba(196,30,58,.2);
  background: rgba(196,30,58,.07);
}

.tw-nav__drawer-footer {
  width: 100%; border-top: 1px solid rgba(255,255,255,.15);
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
/* User-Info im Drawer (wenn eingeloggt + Gamification an) */
.tw-nav__drawer-user {
  width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--c-white-10);
}
.tw-nav__drawer-user-name { font-size: var(--fz-sm); font-weight: 700; color: var(--c-white); }
.tw-nav__drawer-user-xp   { font-size: var(--fz-xs); color: var(--c-white-50); font-family: var(--font-mono); }
.tw-nav__drawer-footer a, .tw-nav__drawer-footer button {
  padding: var(--sp-3) var(--sp-4); font-size: 13px; color: var(--c-white-50);
  text-decoration: none; background: none; border: none;
  font-family: inherit; cursor: pointer; transition: color var(--dur);
}
.tw-nav__drawer-footer a:hover, .tw-nav__drawer-footer button:hover { color: var(--c-white); }
.tw-nav__drawer-footer-muted { color: var(--c-white-30) !important; font-size: 12px; }


/* ============================================================
   9. KOMPONENTE – BUTTONS
   ============================================================ */
.tw-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-2); padding: var(--sp-3) var(--sp-5);
  font-family: var(--font-ui); font-size: var(--fz-sm); font-weight: 600; line-height: 1;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  cursor: pointer; white-space: nowrap;
  transition: background var(--dur), color var(--dur), border-color var(--dur);
}
.tw-btn:active   { transform: scale(.98); }
.tw-btn:disabled, .tw-btn.is-loading { opacity: .5; cursor: not-allowed; pointer-events: none; }

.tw-btn--primary       { background: var(--fg);      color: var(--bg);      border-color: var(--fg); }
.tw-btn--primary:hover { background: var(--accent);  border-color: var(--accent); }
.tw-btn--accent        { background: var(--accent);  color: var(--c-white); border-color: var(--accent); }
.tw-btn--accent:hover  { background: var(--accent-dk); border-color: var(--accent-dk); }
/* Sekundär: die eine Variante neben Primär (schwarz). Rot (accent) nur für „Erfassen". */
.tw-btn--ghost         { background: transparent; color: var(--fg); border-color: var(--border); }
.tw-btn--ghost:hover   { border-color: var(--fg); }
/* Hell: Primär-Button auf dunklem Grund (z. B. Aufruf am Ende der Startseite) */
.tw-btn--light         { background: var(--bg); color: var(--fg); border-color: var(--bg); }
.tw-btn--light:hover   { background: var(--accent); color: var(--c-white); border-color: var(--accent); }


.tw-btn--sm    { padding: var(--sp-2) var(--sp-4); font-size: var(--fz-xs); }
.tw-btn--lg    { padding: var(--sp-4) var(--sp-6); font-size: var(--fz-base); }
.tw-btn--block { display: block; width: 100%; text-align: center; }
.tw-btn-icon   { padding: .25rem; opacity: .5; transition: opacity .15s; }
.tw-btn-icon:hover { opacity: 1; }


/* ============================================================
   10. KOMPONENTE – FORMULARE
   ============================================================ */
.tw-label { font-size: var(--fz-sm); font-weight: 600; color: var(--c-700); }

.tw-input, .tw-select, .tw-textarea {
  width: 100%; padding: .65rem .75rem;
  background: var(--bg); border: 1px solid var(--c-300); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.tw-input:focus, .tw-select:focus, .tw-textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}
.tw-input::placeholder, .tw-textarea::placeholder { color: var(--fg-muted); }
.tw-input--sm    { padding: .4rem .6rem; font-size: var(--fz-sm); }
.tw-input--error { border-color: var(--c-accent); }
.tw-textarea     { resize: vertical; min-height: 100px; }

.tw-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center;
  padding-right: var(--sp-10); cursor: pointer;
}

/* ── tw-form BEM-Helfer ──────────────────────────────────── */
.tw-form                  { display: flex; flex-direction: column; gap: var(--sp-4); }
.tw-form__label           { display: flex; flex-direction: column; gap: var(--sp-1); font-size: var(--fz-sm); font-weight: 600; color: var(--fg); }
.tw-form__hint            { font-size: var(--fz-sm); color: var(--fg-muted); margin: 0; }
.tw-form__hint--mt        { margin-top: var(--sp-4); }
.tw-form__error           { font-size: var(--fz-sm); font-weight: 600; color: var(--accent); margin: var(--sp-1) 0 0; }
.tw-form__req             { color: var(--accent); }
.tw-form__row             { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.tw-form__actions         { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-2); }
.tw-form__footer          { font-size: var(--fz-sm); color: var(--fg-muted); text-align: center; }
.tw-form__link            { color: var(--accent); text-decoration: none; }
.tw-form__link:hover      { text-decoration: underline; }
.tw-input-row             { display: flex; gap: var(--sp-2); align-items: stretch; }
.tw-input--flex           { flex: 1; min-width: 0; }

/* Passwort-Toggle */
.tw-input-wrap            { position: relative; }
.tw-input-wrap .tw-input  { padding-right: 2.5rem; }
.tw-input-eye             { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); color: var(--c-400); padding: .2rem; }
.tw-input-eye:hover       { color: var(--c-700); }

/* Toggle-Switch */
.tw-toggle        { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.tw-toggle__track { width: 40px; height: 22px; background: var(--c-300); border-radius: 999px; position: relative; transition: background .2s; flex-shrink: 0; }
.tw-toggle__track::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; background: var(--c-white); border-radius: 50%; transition: transform .2s; }
input:checked ~ .tw-toggle__track { background: var(--accent); }
input:checked ~ .tw-toggle__track::after { transform: translateX(18px); }


/* ============================================================
   11. KOMPONENTE – KARTEN
   ============================================================ */

/* ── Karten: EINE Basis, die Varianten setzen nur noch ihr Layout ────
   Alle Karten: Hintergrund, Rand, Clip. Verlinkte Karten erben Farbe und
   verlieren die Unterstreichung. Hover: Rand + Schatten (Listen) oder
   Schatten + Anheben (Sammlungen, Challenges). Ecken: runde Ecken bei
   Grid-Karten, harte Kanten bei Blog/Walk/Entwurf (Editorial-Look). */
.tw-card, .tw-place-card, .tw-profile-card, .tw-blog-place-card, .tw-blog-card, .tw-walk-card,
.tw-curated-card, .tw-challenge-card, .tw-draft-card, .tw-dashboard-card {
  background: var(--bg); border: 1px solid var(--border);
}
.tw-card, .tw-place-card, .tw-profile-card, .tw-blog-place-card, .tw-blog-card, .tw-walk-card,
.tw-curated-card, .tw-dashboard-card { overflow: hidden; }
.tw-card, .tw-place-card, .tw-profile-card, .tw-blog-card, .tw-walk-card, .tw-curated-card { display: flex; flex-direction: column; }
.tw-card, .tw-place-card, .tw-profile-card, .tw-blog-place-card, .tw-curated-card, .tw-challenge-card, .tw-dashboard-card { border-radius: var(--radius); }
.tw-place-card, .tw-profile-card, .tw-blog-place-card, .tw-walk-card, .tw-curated-card { text-decoration: none; color: inherit; }
.tw-place-card, .tw-profile-card, .tw-blog-place-card, .tw-blog-card, .tw-walk-card { transition: border-color var(--dur), box-shadow var(--dur); }
.tw-place-card:hover, .tw-profile-card:hover, .tw-blog-place-card:hover, .tw-blog-card:hover, .tw-walk-card:hover { border-color: var(--fg-muted); box-shadow: var(--shadow); color: inherit; }
.tw-curated-card, .tw-challenge-card { transition: box-shadow var(--dur), transform var(--dur); }
.tw-curated-card:hover   { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.tw-challenge-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.tw-blog-card--draft, .tw-walk-card--draft { border-style: dashed; opacity: .8; }
.tw-place-card:hover .tw-place-card__img, .tw-profile-card:hover .tw-profile-card__img, 
/* ── Place-Card (Explore, Suche, Profil-Komponente) ────────── */
/* Muster: Bild oben (3:2) + Body unten – identisch zu tw-walk-card */
.tw-place-card__img-wrap {
  aspect-ratio: 3 / 2; overflow: hidden;
  background: var(--bg-alt); position: relative;
}
.tw-place-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--dur-slow); }
.tw-place-card__img--placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--fg-muted);
}
/* Station-Nummer-Badge (oben links über dem Bild) */
.tw-place-card__station-num {
  position: absolute; top: var(--sp-2); left: var(--sp-2);
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--c-white);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fz-xs); font-weight: 700;
}
.tw-place-card__body { padding: var(--sp-3) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-1); flex: 1; }
.tw-place-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-2); }
.tw-place-card__title { font-size: var(--fz-base); font-weight: 700; line-height: 1.3; color: var(--fg); flex: 1; }
.tw-place-card__fav { font-size: var(--fz-xs); color: var(--fg-muted); white-space: nowrap; }
.tw-place-card__location { font-size: var(--fz-xs); color: var(--fg-muted); }
.tw-place-card__badges { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-top: var(--sp-1); }
/* Variante: kein Bild (compact) */
.tw-place-card--compact .tw-place-card__img-wrap { display: none; }

/* ── Profile-Card (Profil: Places + Liked Sektion) ─────────── */
/* Muster: Bild oben (1:1 quadratisch) + Body unten (kompakt) */
.tw-profile-card__img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; transition: transform var(--dur-slow); }
.tw-profile-card__placeholder {
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt); font-size: 2rem; color: var(--fg-muted);
}
.tw-profile-card__body { padding: var(--sp-2) var(--sp-3); display: flex; flex-direction: column; gap: 2px; }
.tw-profile-card__title { font-size: var(--fz-sm); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--fg); }
.tw-profile-card__loc { font-size: var(--fz-xs); color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Blog-Place-Card (Blog-Posts: verlinkte Places) ──────────── */
/* Muster: Bild links (80px) + Body rechts – leichter als tw-sidebar-card */
.tw-blog-place-card { display: flex; gap: var(--sp-3); }
.tw-blog-place-card img {
  width: 80px; min-height: 80px; object-fit: cover; flex-shrink: 0;
  display: block; transition: transform var(--dur-slow);
}
.tw-blog-place-card:hover img { transform: scale(1.04); }
.tw-blog-place-card__body {
  padding: var(--sp-3) var(--sp-3) var(--sp-3) 0;
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: var(--sp-1);
}
.tw-blog-place-card__body strong { font-size: var(--fz-sm); font-weight: 700; color: var(--fg); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-blog-place-card__body span { font-size: var(--fz-xs); color: var(--fg-muted); }
.tw-blog-place-card__body p { font-size: var(--fz-xs); color: var(--fg-muted); line-height: 1.4; margin: 0; }


/* ============================================================
   12. KOMPONENTE – TAGS & BADGES
   ============================================================ */

/* ── Tag: kleiner Mono-Chip für Metadaten (Stil, Zustand, Epoche) ── */
/* Info-Etikett (nicht klickbar oder reiner Link). Filter = .tw-pill, Status = .tw-badge */
.tw-tag { display: inline-flex; align-items: center; gap: var(--sp-1); padding: 2px 8px; font-family: var(--font-mono); font-size: 10px; font-weight: 500; line-height: 1.4; background: var(--bg-alt); color: var(--fg-muted); border: 1px solid transparent; text-decoration: none; }
.tw-tag--lg { font-size: var(--fz-xs); padding: 3px 10px; }
a.tw-tag:hover { border-color: var(--fg); color: var(--fg); }
.tw-tag--accent    { background: var(--accent); color: var(--c-white); border-color: var(--accent); }
.tw-tag--style     { background: var(--ink); color: var(--c-white); border-color: var(--ink); }
.tw-tag--preserved { background: var(--c-green-bg);  color: var(--c-green-fg);  border-color: var(--c-green); }
.tw-tag--decayed   { background: var(--c-yellow-bg); color: var(--c-yellow-fg); border-color: var(--c-yellow); }
.tw-tag--removed   { background: var(--c-red-bg);    color: var(--c-red-fg);    border-color: var(--c-red-brd); }
.tw-tag--era       { border-color: var(--border); color: var(--fg-muted); }

/* ── Badge: Status und Rolle – EINE Komponente, Farben nur über Tokens ──
   Status: published / pending / draft / rejected · Rolle: admin / curator
   Modifier --sm für Hinweise in Zeilen (ehemals tw-role-badge--hint) */
.tw-badge { display: inline-block; padding: .15rem .5rem; font-size: var(--fz-xs); font-weight: 700; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; line-height: 1.4; }
.tw-badge--published { background: var(--c-green-bg);  color: var(--c-green-fg); }
.tw-badge--pending   { background: var(--c-yellow-bg); color: var(--c-yellow-fg); }
.tw-badge--draft     { background: var(--bg-subtle);   color: var(--fg-muted); }
.tw-badge--rejected  { background: var(--c-red-bg);    color: var(--c-red-fg); }
.tw-badge--accent    { background: var(--accent);      color: var(--c-white); }
.tw-badge--admin     { background: var(--fg);          color: var(--bg); }
.tw-badge--curator   { background: var(--c-blue-bg);   color: var(--c-blue-fg); }
.tw-badge--sm        { font-size: var(--fz-2xs); padding: .1rem .4rem; }

/* Rollen */


/* Status-Punkt */

.tw-dot--green  { background: var(--c-green); }
.tw-dot--yellow { background: var(--c-yellow); }
.tw-dot--gray   { background: var(--c-300); }

/* Mono-Code (Invite-Codes etc.) */
.tw-code { font-family: var(--font-mono); font-size: .9rem; font-weight: 700; letter-spacing: .08em; background: var(--bg-subtle); padding: .2rem .5rem; border-radius: var(--radius-sm); }


/* ============================================================
   13. KOMPONENTE – TOASTS & ALERTS
   ============================================================ */
.tw-toast-container { position: fixed; bottom: var(--sp-6); right: var(--sp-6); z-index: 1000; display: flex; flex-direction: column; gap: var(--sp-3); pointer-events: none; }
.tw-toast           { padding: var(--sp-3) var(--sp-5); background: var(--c-900); color: var(--c-white); font-size: var(--fz-sm); font-weight: 500; border-radius: var(--radius); box-shadow: var(--shadow-lg); pointer-events: auto; animation: toast-in .3s var(--ease); max-width: 320px; }
.tw-toast--success  { background: var(--c-green); }
.tw-toast--error    { background: var(--c-accent); }
.tw-toast--warning  { background: var(--c-yellow); color: var(--c-900); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.tw-alert          { padding: var(--sp-4) var(--sp-5); border-radius: var(--radius); font-size: var(--fz-sm); border: 1px solid; }
.tw-alert--error   { background: var(--c-red-bg);    border-color: var(--c-red-brd); color: var(--c-red-fg); }
.tw-alert--success { background: var(--c-green-bg);  border-color: var(--c-green);   color: var(--c-green-fg); }
.tw-alert--info    { background: var(--c-blue-bg);   border-color: var(--c-blue);    color: var(--c-blue-fg); }
.tw-alert--warning { background: var(--c-yellow-bg); border-color: var(--c-yellow);  color: var(--c-yellow-fg); }


/* ============================================================
   14. KOMPONENTE – GAMIFICATION
   ============================================================ */
.tw-xp-bar       { background: var(--bg-alt); border-radius: 999px; height: 8px; overflow: hidden; }
.tw-xp-bar__fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .6s var(--ease); }

.tw-level     { display: inline-flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) var(--sp-3); color: var(--c-white); background: var(--fg); border-radius: 999px; font-size: var(--fz-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }


/* Gamification-Badge */


/* Stat-Kachel */


.tw-podium__name  { font-size: var(--fz-xs); font-weight: 600; text-align: center; }
.tw-podium__xp    { font-family: var(--font-mono); font-size: var(--fz-xs); color: var(--fg-muted); }

/* XP-Badge-Benachrichtigung */


/* ============================================================
   15. KOMPONENTE – TABELLEN & TABS
   ============================================================ */
.tw-table       { width: 100%; font-size: var(--fz-sm); }
.tw-table th    { padding: var(--sp-3) var(--sp-4); text-align: left; font-family: var(--font-mono); font-size: var(--fz-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-muted); background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.tw-table td    { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--bg-alt); vertical-align: middle; }
.tw-table tr:last-child td { border-bottom: none; }
.tw-table tr:hover td      { background: var(--bg-alt); }
.tw-table--wrap {
  overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius);
  /* Scroll-Schatten: zeigt auf dem Handy, dass die Tabelle weitergeht */
  background:
    linear-gradient(to right, var(--bg) 30%, transparent) left / 40px 100% no-repeat local,
    linear-gradient(to left,  var(--bg) 30%, transparent) right / 40px 100% no-repeat local,
    linear-gradient(to right, rgba(0,0,0,.12), transparent) left / 14px 100% no-repeat scroll,
    linear-gradient(to left,  rgba(0,0,0,.12), transparent) right / 14px 100% no-repeat scroll;
}
.tw-table--wrap .tw-table { background: transparent; }

.tw-tab       { padding: .6rem var(--sp-4); border-bottom: 2px solid transparent; font-size: var(--fz-sm); font-weight: 600; color: var(--fg-muted); cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: .4rem; transition: color var(--dur), border-color var(--dur); }
.tw-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }


/* ============================================================
   16. KOMPONENTE – PAGINATION & LEERE ZUSTÄNDE
   ============================================================ */
.tw-pagination__btn    { padding: .4rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: var(--fz-sm); cursor: pointer; }
.tw-pagination__btn:hover      { background: var(--bg-alt); }
.tw-pagination__btn.is-active  { background: var(--accent); color: var(--c-white); border-color: var(--accent); }
.tw-pagination__btn:disabled   { opacity: .4; cursor: default; }



/* Breadcrumb */
.tw-breadcrumb { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fz-sm); color: var(--fg-muted); margin-bottom: var(--sp-4); }
.tw-breadcrumb a { color: var(--fg-muted); text-decoration: underline; text-underline-offset: 2px; }
.tw-breadcrumb a:hover { color: var(--fg); }
.tw-breadcrumb__sep { opacity: .4; }


/* ============================================================
   17. KOMPONENTE – KOMMENTARE
   ============================================================ */
.tw-comment              { border-bottom: 1px solid var(--bg-alt); padding-block: var(--sp-4); }
.tw-comment:last-of-type { border-bottom: none; }
.tw-comment__author      { font-weight: 600; font-size: var(--fz-sm); }
.tw-comment__author:hover { color: var(--accent); }
.tw-comment__body        { font-size: var(--fz-sm); line-height: 1.6; }

/* pd-comment: place detail Kommentar-Block (pd-* Prefix = place detail) */
.pd-comment__head { display: flex; align-items: center; gap: var(--sp-2); }
.pd-comment__delete {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--fg-muted);
  font-size: var(--fz-lg);
  line-height: 1;
  cursor: pointer;
  padding: 0 var(--sp-1);
  opacity: 0;
  transition: opacity .15s;
}
.pd-comment:hover .pd-comment__delete { opacity: 1; }
.pd-comment__delete:hover { color: var(--accent); }


/* ============================================================
   19. SEITE – AUTH
   ============================================================ */

.tw-auth__box { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-6); margin-inline: auto; }
/* Mitte der Box = Bildschirmmitte (Container ist links fürs Logo breiter gepolstert) */
:is(.container, .tw-container) .tw-auth__box { position: relative; left: calc((var(--page-right) - var(--page-left)) / 2); }
.tw-auth__title { margin: 0 0 var(--sp-2); font-size: var(--fz-2xl); font-weight: 900; line-height: 1.1; }

/* ── Start-Bildschirm: EINE Komponente (In der Nähe, Walk aufnehmen, Eingereicht, Einladung) ──
   Zentriert im Bildschirm: Icon · H1 · Lead · Tag-Reihe · Button(s) · Hinweiszeile. */
.tw-start-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - var(--nav-h, 60px)); min-height: calc(100dvh - var(--nav-h, 60px));
  padding: var(--sp-8) var(--sp-4);
}
.tw-start-screen__inner { width: 100%; max-width: 30rem; text-align: center; }
.tw-start-screen__icon  { display: flex; justify-content: center; margin-bottom: var(--sp-5); color: var(--fg); }
.tw-start-screen__icon--ok { color: var(--accent); }
.tw-start-screen__title { margin: 0 0 var(--sp-3); font-size: var(--fz-4xl); font-weight: 900; line-height: 1.05; letter-spacing: var(--track-tight, -.02em); }
.tw-start-screen__lead  { margin: 0 auto var(--sp-6); max-width: 38ch; color: var(--fg-muted); line-height: 1.6; }
.tw-start-screen__tags  { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); margin-bottom: var(--sp-8); }
.tw-start-screen__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); }
.tw-start-screen__hint  { margin: var(--sp-4) 0 0; min-height: 1.5em; font-size: var(--fz-sm); color: var(--fg-muted); }
@media (min-width: 640px) { .tw-auth__box { max-width: 420px; } }


/* ============================================================
   20. SEITE – UPLOAD (2-Step Wizard)
   ============================================================ */

/* ── Upload Page Layout ── */
.tw-upload { min-height: 100vh; }
.tw-upload-step { position: relative; }
.tw-upload-step.hidden { display: none !important; }

/* ── STEP 1: Fullscreen Dropzone ── */
#panel-1 {
  height: calc(100vh - var(--nav-h));
  display: flex; flex-direction: column;
  overflow: hidden;
}


#upload-preview-img {
  max-height: 100%; max-width: 100%;
  width: 100%; height: 100%;
  object-fit: contain; display: block;
  transition: filter 0.25s ease;
}


/* iOS: file input muss sichtbar (aber transparent) sein damit .click() zuverlässig klappt */


/* Progress-Balken via Filter ersetzt */ 


/* Weiter-Button: rechts unten, inaktiv = grau, aktiv = rot */


/* ── STEP 1: Desktop ohne Scrollen ── */
@media (min-width: 640px) {
  #panel-1 {
    height: calc(100vh - var(--nav-h));
    min-height: unset;
    overflow: hidden;
  }
  
  
}

/* ── STEP 2: Map + Form Layout ── */
#panel-2,
#edit-panel {
  display: flex;
  flex-direction: column; /* Mobile: stapeln */
  min-height: calc(100vh - var(--nav-h));
}
#panel-2.hidden { display: none !important; }

/* Karte: Mobile = 45vh, Desktop = volle Höhe */
.tw-step2-map {
  width: 100%; height: 45vh; min-height: 220px;
  flex-shrink: 0; position: relative; background: var(--c-100);
}
.tw-step2-map > div { width: 100%; height: 100%; min-height: 220px; }

/* Rechte Spalte (Mobile: gesamte Breite, Desktop: 38%) */
.tw-step2-right {
  display: flex; flex-direction: column;
  flex: 1;
  border-top: 2px solid var(--fg);
}

/* Suchleiste: unter Karte, sp-4 links/rechts = gleich wie Felder */
.tw-step2-searchbar {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-bottom: 2px solid var(--fg);
  background: var(--bg);
  position: relative;
  flex-shrink: 0;
}
.tw-upload-search__input {
  flex: 1; height: 40px;
  border: 2px solid var(--fg); background: var(--bg);
  padding: 0 var(--sp-3); font-family: var(--font-ui); font-size: var(--fz-sm);
  outline: none;
}
.tw-upload-search__input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.tw-upload-search__btn {
  height: 40px; padding: 0 var(--sp-4);
  background: var(--fg); color: var(--bg);
  border: 2px solid var(--fg); font-family: inherit; font-weight: 700;
  font-size: var(--fz-sm); cursor: pointer; white-space: nowrap;
  transition: background var(--dur);
}
.tw-upload-search__btn:hover { background: var(--accent); border-color: var(--accent); }
.tw-upload-search__loc {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--bg); border: 2px solid var(--fg);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--dur);
}
.tw-upload-search__loc svg { width: 18px; height: 18px; }
.tw-upload-search__loc:hover { background: var(--fg); color: var(--bg); }
.tw-upload-search__loc:hover svg { stroke: var(--bg); }
.tw-upload-search__results {
  position: absolute; top: calc(100% + 2px); left: 0; right: 0;
  background: var(--bg); border: 2px solid var(--fg);
  z-index: 600; max-height: 220px; overflow-y: auto;
}
.tw-search-result {
  padding: var(--sp-2) var(--sp-3); cursor: pointer; border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.tw-search-result:last-child { border-bottom: none; }
.tw-search-result:hover { background: var(--c-100); }
.tw-search-result strong { font-size: var(--fz-sm); font-weight: 700; }
.tw-search-result span   { font-size: var(--fz-xs); color: var(--fg-muted); }


/* ── Photo Cover + Strip (shared: upload & edit) ────────── */

/* Cover: Mobile hidden, Desktop: Vollbild oben rechts */
.tw-photo-cover {
  display: none;
}
.tw-photo-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Strip: horizontale Zeile kleiner Thumbs + Add-Button */
.tw-photo-strip {
  display: flex;
  flex-direction: row;
  gap: var(--sp-2);
  padding: var(--sp-2) 0;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: thin;
}
.tw-strip-thumb {
  position: relative;
  width: 64px; height: 64px;
  flex-shrink: 0;
  background: var(--c-100);
  overflow: hidden;
}
.tw-strip-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.tw-strip-thumb--cover {
  outline: 2px solid var(--fg);
  outline-offset: -2px;
}
button.tw-strip-thumb { cursor: pointer; padding: 0; border: none; transition: opacity var(--dur); }
.tw-strip-thumb--add.is-loading { opacity: .5; pointer-events: none; }

/* Cover: schwarze Meta-Leiste unten */
.tw-strip-thumb--cover::after {
  content: '★  Cover';
  position: absolute; bottom: 0; left: 0; right: 0;
  background: #000;
  color: var(--c-white);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
  padding: 2px 0;
  pointer-events: none;
  line-height: 1.4;
}
/* Pending: ausgegraut mit Label unten */
.tw-strip-thumb--pending {
  opacity: .5;
}
.tw-strip-thumb--pending::after {
  content: '⧖  Pending';
  position: absolute; bottom: 0; left: 0; right: 0;
  background: #000;
  color: var(--c-white);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
  padding: 2px 0;
  pointer-events: none;
  line-height: 1.4;
}

/* Gallery thumb pending (place.php) */


.tw-strip-thumb--add {
  position: relative; display: flex; align-items: center; justify-content: center;
  border: 2px dashed var(--border);
  font-size: 1.5rem; color: var(--fg-muted); cursor: pointer;
  transition: border-color .15s, color .15s;
}
.tw-strip-thumb--add:hover { border-color: var(--fg); color: var(--fg); }
.tw-strip-thumb__del {
  position: absolute; top: 2px; right: 2px;
  width: 18px; height: 18px;
  background: rgba(0,0,0,.65); color: var(--c-white);
  border: none; cursor: pointer; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}
.tw-strip-thumb__del:hover { background: #c00; }
.tw-strip-thumb__star {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: rgba(0,0,0,.55); color: var(--c-white);
  border: none; cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
  line-height: 1;
  font-style: normal;
}
/* Kein Layout-Shift: beide Zeichen auf feste Breite */
.tw-strip-thumb__star::before {
  content: '☆';
  display: inline-block;
  width: 1em; text-align: center;
}
.tw-strip-thumb__star:hover { background: rgba(0,0,0,.85); }
.tw-strip-thumb__star:hover::before { content: '★'; }
.tw-strip-thumb__star.is-loading {
  cursor: wait;
  pointer-events: none;
  opacity: .7;
}
.tw-strip-thumb__star.is-loading::before { content: '…'; }

/* Mobile Form: nur Felder, kein Thumb */
.tw-step2-form {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tw-step2-form .tw-upload-fields {
  flex: 1; min-width: 0;
  padding: var(--sp-4);
}

.tw-step2-submit {
  padding: var(--sp-4);
  flex-shrink: 0;
}

/* Desktop: ≥900px → Map links (62%), Rechte Spalte rechts (38%) */
@media (min-width: 900px) {
  #panel-2,
  #edit-panel {
    flex-direction: row;
    height: calc(100vh - var(--nav-h));
    min-height: unset;
    overflow: hidden;
  }
  .tw-step2-map {
    flex: 0 0 62%;
    height: 100%;
  }
  .tw-step2-right {
    flex: 0 0 38%;
    border-top: none;
    border-left: 2px solid var(--fg);
    overflow-y: auto;
  }
  /* Desktop: Cover kompakt, Strip klein darunter – immer oben */
  .tw-photo-cover {
    display: block;
    width: 100%;
    height: 160px;
    border-bottom: 2px solid var(--fg);
    flex-shrink: 0;
    background: var(--c-100);
    order: -2;
    overflow: hidden;
  }
  .tw-photo-strip {
    border-bottom: 2px solid var(--fg);
    padding: var(--sp-2) var(--sp-3);
    order: -1;
  }
  .tw-strip-thumb {
    width: 56px; height: 56px;
  }
  .tw-step2-form {
    flex-direction: column;
  }
  .tw-step2-form .tw-upload-fields {
    padding: var(--sp-4);
  }
}

/* Thumbnail */


/* Formfelder */
.tw-upload-fields {
  padding: 0; /* padding is set by parent context */
  display: flex; flex-direction: column; gap: var(--sp-3);
}

.tw-upload-row {
  display: flex; gap: var(--sp-2);
}
.tw-upload-row .tw-upload-field { flex: 1; min-width: 0; }

.tw-upload-field { display: flex; flex-direction: column; gap: var(--sp-1); }
.tw-upload-label {
  font-size: var(--fz-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--fg-muted);
}
.tw-upload-input {
  width: 100%; border: 1px solid var(--border); border-radius: 0;
  padding: var(--sp-2) var(--sp-2); font-family: inherit; font-size: var(--fz-sm);
  background: var(--bg); color: var(--fg); outline: none;
  transition: border-color var(--dur);
}
.tw-upload-input:focus { border-color: var(--fg); }
.tw-upload-input.tw-input--error { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: -2px; }
.tw-upload-input.tw-input--error:focus { border-color: var(--accent); }
.tw-upload-textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 0;
  padding: var(--sp-2); font-family: inherit; font-size: var(--fz-sm);
  background: var(--bg); color: var(--fg); outline: none; resize: vertical;
  transition: border-color var(--dur);
}
.tw-upload-textarea:focus { border-color: var(--fg); }
.tw-upload-select {
  width: 100%; padding: var(--sp-2) var(--sp-3);
  border: 1.5px solid var(--border); border-radius: 0;
  background: var(--bg); color: var(--fg);
  font-family: var(--font-ui); font-size: 14px;
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23333' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 2rem;
}
.tw-upload-select:focus { border-color: var(--fg); outline: none; }

/* "Use this location" Banner */


/* Submit-Button Split 50/50 */
.tw-upload-submit {
  display: flex; margin-top: auto;
  border-top: 2px solid var(--fg);
  flex-shrink: 0;
}
.tw-upload-submit__draft,
.tw-upload-submit__publish {
  flex: 1; padding: var(--sp-4) 0;
  font-size: var(--fz-sm); font-weight: 700;
  border: none; cursor: pointer; font-family: inherit;
  transition: background var(--dur), color var(--dur);
  text-align: center; text-decoration: none; display: block;
}
.tw-upload-submit__draft {
  background: var(--bg); color: var(--fg-muted);
  border-right: 1px solid var(--border);
}
.tw-upload-submit__draft:hover { background: var(--c-100); color: var(--fg); }
.tw-upload-submit__publish {
  background: var(--fg); color: var(--bg);
}
.tw-upload-submit__publish:hover { background: var(--accent); }
.tw-upload-submit__delete {
  flex: 0 0 auto;
  padding: var(--sp-4);
  background: transparent; color: var(--accent);
  border: none; border-right: 2px solid var(--fg);
  cursor: pointer; font-family: inherit;
  font-weight: 700; font-size: var(--fz-sm);
  transition: background var(--dur), color var(--dur);
}
.tw-upload-submit__delete:hover { background: var(--accent); color: var(--bg); }

/* Back-Button */


/* Mobile: upload-row stacked */
@media (max-width: 639px) {
  .tw-upload-row { flex-direction: column; }
}

   
/* #editor-map war position:fixed über die volle Breite und deckte die Sidebar
   des Walk-Editors ab; er füllt jetzt wie alle Karten .tw-split__map-inner. */

/* Panel: unten auf Mobile → rechts ab 768px */


/* ============================================================
   22. SEITE – MAP (Vollbild)
   ============================================================ */


/* Vollbild-Map */

#places-map { width: 100%; height: 100%; }


/* Mini-Map (Place, Walk, Upload)
   Leaflet braucht explizite px-Höhe auf dem Element das es initialisiert.
   Wrapper nur für Border + Radius – kein overflow:hidden (bricht Leaflet-Popups). */

/* Walk/Place map: fixed height (standalone) */
#walk-map, #place-map {
  width: 100%;
  height: 280px;
  border-radius: var(--radius);
}
@media (min-width: 640px) {
  #walk-map, #place-map { height: 340px; }
}
/* Upload/Edit map: fills parent .tw-step2-map via flex */
#upload-map, #edit-map {
  width: 100%;
  height: 100%;
  min-height: 240px;
}

/* Map-Marker & Popups */

.tw-map-marker { width: 28px; height: 28px; background: var(--accent); color: var(--c-white); border: 2px solid var(--c-white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: var(--fz-xs); font-weight: 700; box-shadow: 0 2px 6px var(--c-black-35); cursor: pointer; }
.tw-map-popup  { min-width: 180px; font-size: var(--fz-sm); }
.tw-map-popup__img  { width: 100%; height: 120px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: .5rem; }
.tw-map-popup__link { color: var(--accent); font-weight: 600; font-size: var(--fz-xs); display: inline-block; margin-top: .5rem; }


/* ============================================================
   23. KOMPONENTE – FOOTER
   ============================================================ */
.tw-footer { background: var(--c-900); color: var(--c-white-75); margin-top: var(--sp-16); }

.tw-footer__inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--sp-6); padding-block: var(--sp-10) var(--sp-8);
}
@media (min-width: 768px) { .tw-footer__inner { grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--sp-10); } }

.tw-footer__logo    { font-family: var(--font-head); font-size: 1.25rem; font-weight: 900; color: var(--c-white); display: block; margin-bottom: .5rem; letter-spacing: -.02em; }
.tw-footer__tagline { font-size: var(--fz-xs); color: var(--c-white-35); line-height: 1.5; }
.tw-footer__heading { font-family: var(--font-mono); font-size: var(--fz-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--c-white-35); margin-bottom: var(--sp-3); }
.tw-footer__links   { display: flex; flex-direction: column; gap: .4rem; }
.tw-footer__links a { font-size: var(--fz-sm); color: var(--c-white-60); transition: color .12s; }
.tw-footer__links a:hover { color: var(--c-white); }
.tw-footer__bottom  { border-top: 1px solid var(--c-white-08); padding-block: var(--sp-4); }
.tw-footer__copy    { font-size: var(--fz-xs); color: var(--c-white-30); }
.tw-footer__copy a:hover { color: var(--c-white-75); }


/* ============================================================
   ALIAS-BLOCK – Dashboard, Rollen-Badges, About, Autosave
   (werden schrittweise ersetzt)
   ============================================================ */

.tw-auth-page__main   { width: 100%; padding-block: var(--sp-8) var(--sp-12); }
.tw-about-section     { padding-block: var(--sp-12); }
.tw-about-section--alt { padding-block: var(--sp-12); background: var(--bg-alt); }

/* Fehlende Root-Klassen für Views */
.tw-account-settings                { padding-block: var(--sp-8); }
.tw-account-settings__section       { margin-bottom: var(--sp-6); }
.tw-account-settings__section--danger { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.tw-admin-table                     { width: 100%; border-collapse: collapse; font-size: var(--fz-sm); }
.tw-admin-table th, .tw-admin-table td { padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--border); text-align: left; }


.tw-status-dot        { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

/* ── Edit: Status-Zeile + Quick-Note ────────────────────── */
.tw-edit-status    { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-2); }
.tw-edit-quicknote { font-size: var(--fz-xs); color: var(--fg-muted); font-style: italic; }

/* ── Autosave-Status (Edit-Seite) ───────────────────────── */
.tw-autosave { font-size: var(--fz-xs); color: var(--fg-muted); min-height: 1.2em; padding: 0 var(--sp-4) var(--sp-2); }

/* ── Inline-Error-Zeile ─────────────────────────────────── */
.tw-error { font-size: var(--fz-sm); color: var(--c-accent); padding: var(--sp-2) var(--sp-4); }

/* ── Required-Marker ───────────────────────────────────── */
.tw-required { color: var(--c-accent); margin-left: 2px; }

/* ── Classify-Chip-Widget (Schriftstil, Zustand) ──────── */
.tw-classify {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
}
/* ── AI Auto-classify Button ───────────────────────────── */
.tw-classify-btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fz-sm); font-weight: 600;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color .12s, background .12s;
}
.tw-classify-btn:hover { border-color: var(--accent); color: var(--accent); }
.tw-classify-btn:disabled { opacity: .5; cursor: default; }
.tw-classify-btn__icon { font-size: 1rem; }
.tw-classify-btn__info { font-size: var(--fz-xs); color: var(--fg-muted); cursor: help; margin-left: var(--sp-1); }
.tw-classify-result { margin-top: var(--sp-2); }

/* ============================================================
   KATEGORIEN, PLACE, GALERIE, EDIT, ADMIN (gemischter Block)
   ============================================================ */
.tw-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0;
  margin-bottom: var(--sp-12);
}
@media (max-width: 639px) { .tw-cat-grid { grid-template-columns: repeat(3, 1fr); } }

.tw-cat-cell {
  display: flex; flex-direction: column; align-items: center;
  padding: var(--sp-8) var(--sp-4) var(--sp-5);
  text-decoration: none; color: var(--fg);
  cursor: pointer;
  transition: opacity .2s;
}
.tw-cat-cell:hover { opacity: 1; }
.tw-cat-cell:hover .tw-cat-icon { color: var(--accent); }

.tw-cat-icon {
  width: clamp(70px, 11vw, 120px);
  height: clamp(70px, 11vw, 120px);
  color: var(--fg);
  transition: color .18s ease;
  display: flex; align-items: center; justify-content: center;
}
.tw-cat-icon svg { width: 100%; height: 100%; }

.tw-cat-count {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--fg);
  border-bottom: 2px solid var(--fg);
  padding-bottom: 3px;
  width: 100%;
  text-align: right;
  margin-top: var(--sp-2);
}

.tw-cat-name {
  font-size: var(--fz-xs);
  color: var(--fg);
  text-align: right;
  width: 100%;
  margin-top: var(--sp-1);
  letter-spacing: .02em;
}

/* Divider-Linie im Kategorien-Header */


/* Logo-Mark Hover */


/* Leere Kategorien (count=0) */
.tw-cat-cell--empty { opacity: .35; pointer-events: none; }


/* ══════════════════════════════════════════════════════════════
   PLACE DETAIL
══════════════════════════════════════════════════════════════ */

/* ── Gallery ─────────────────────────────────────────────────── */


/* ── Hero: Landscape (default) ── */


/* ── Hero: Portrait – switch to contain + blur bg ── */


/* Blurred background for portrait photos */


/* ── Photo Card Grid ─────────────────────────────────────────── */


/* ── Place layout ────────────────────────────────────────────── */


/* Zwei-Spalten: Info + Karte */


/* Sections: Check-ins + Comments */


.tw-btn--xs {
  padding: 2px 8px; font-size: 11px;
}

/* ── Check-in ────────────────────────────────────────────────── */


/* ── Metadata grid ───────────────────────────────────────────── */


/* ── Check-in History (Profile) ──────────────────────────────── */
.tw-checkin-history { display: flex; flex-direction: column; gap: 0; }
.tw-checkin-history__item {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3) 0; border-bottom: 1px solid var(--border);
}
.tw-checkin-history__item:last-child { border-bottom: none; }
.tw-checkin-history__icon { font-size: 1rem; flex-shrink: 0; margin-top: 2px; }
.tw-checkin-history__body { flex: 1; min-width: 0; }
.tw-checkin-history__place {
  font-weight: 700; font-size: var(--fz-sm); color: var(--fg);
  text-decoration: none;
}
.tw-checkin-history__place:hover { text-decoration: underline; }
.tw-checkin-history__note {
  font-size: var(--fz-xs); color: var(--fg-muted);
  margin-top: 2px; font-style: italic;
}
.tw-checkin-history__date {
  font-size: 10px; color: var(--fg-muted); flex-shrink: 0;
  margin-top: 3px;
}

/* ── Edit Page ────────────────────────────────────────────────── */


/* ── Admin Photo Moderation ────────────────────────────────── */


.tw-btn--success {
  background: #1a7a3c; color: var(--c-white); border-color: #1a7a3c;
}
.tw-btn--success:hover { background: #145e2d; }
.tw-btn--danger {
  background: var(--accent); color: var(--c-white); border-color: var(--accent);
}
.tw-btn--danger:hover { opacity: .85; }
/* Löschen als Sekundär-Aktion: rot umrandet statt rot gefüllt */
.tw-btn--ghost.tw-btn--danger { background: transparent; color: var(--accent); border-color: var(--accent); }
.tw-btn--ghost.tw-btn--danger:hover { background: var(--accent); color: var(--c-white); opacity: 1; }

/* ── Admin Panel ─────────────────────────────────────────────────── */


/* Two-column layout: Users + Invites */
.tw-admin-two-col {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--sp-8);
  align-items: start;
}
@media (max-width: 900px) {
  .tw-admin-two-col { grid-template-columns: 1fr; }
}


/* Action cell */
.tw-admin-actions {
  display: flex;
  gap: .25rem;
  flex-wrap: nowrap;
  align-items: center;
  white-space: nowrap;
}
/* Icon-only buttons in admin */
.tw-btn--icon {
  width: 28px; height: 28px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .85rem;
  flex-shrink: 0;
}
/* Admin thumb placeholder */
.tw-admin-thumb-wrap {
  width: 40px; height: 40px;
  background: var(--c-100);
  flex-shrink: 0;
  overflow: hidden;
}
.tw-admin-thumb {
  width: 40px; height: 40px;
  object-fit: cover; display: block;
}

/* ── Leerzustand: EINE Komponente (emptyState() in PHP und main.js) ──────
   Icon · Titel · Satz · ein Button, zentriert auf die Mitte des Bildschirms.
   Der Seiten-Container ist asymmetrisch gepolstert (links Platz fürs Logo),
   darum wird der Block innerhalb eines Containers um die halbe Differenz
   zurückgeschoben – sonst säße er ~64 px rechts der Mitte. */
.tw-empty {
  max-width: 32rem; margin: 0 auto var(--sp-8);
  padding: var(--sp-12) var(--sp-4);
  text-align: center; color: var(--fg-muted);
}
:is(.container, .tw-container, .tw-explore) .tw-empty {
  position: relative; left: calc((var(--page-right) - var(--page-left)) / 2);
}
/* In zweispaltigen Layouts (Liste + Seitenleiste) gilt die Mitte der Spalte */
:is(.layout-sidebar, .tw-split, .tw-admin-two-col) .tw-empty { left: 0; }
.tw-empty__icon  { display: flex; justify-content: center; margin-bottom: var(--sp-3); color: var(--fg-muted); }
.tw-empty__title { margin: 0 0 var(--sp-2); font-size: var(--fz-xl); font-weight: 700; line-height: 1.2; color: var(--fg); }
.tw-empty__sub   { margin: 0 0 var(--sp-4); font-size: var(--fz-sm); color: var(--fg-muted); }
.tw-empty__cta   { margin-top: var(--sp-4); }

/* Admin tabs */
.tw-admin-tab {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .5rem .875rem;
  font-size: .875rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  color: var(--c-500);
  text-decoration: none;
  transition: color var(--dur), border-color var(--dur);
  white-space: nowrap;
}
.tw-admin-tab:hover { color: var(--fg); }
.tw-admin-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tw-admin-tab__badge {
  font-size: .7rem;
  padding: .1rem .35rem;
  border-radius: 99px;
  font-weight: 600;
}
.tw-admin-tab__badge--gray {
  background: var(--c-200);
  color: var(--c-600);
}

/* Admin table scoped overrides (smaller, tighter) */
.tw-admin .tw-table { font-size: .8125rem; }
.tw-admin .tw-table th { padding: .4rem .625rem; font-size: .6875rem; }
.tw-admin .tw-table td { padding: .5rem .625rem; }
.tw-admin .tw-table--wrap { margin-bottom: var(--sp-8); }
.tw-row--used td { opacity: .5; }
.tw-row--expired td { opacity: .6; }

/* Tabs nav bar */
.tw-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
}
.tw-tabs::-webkit-scrollbar { display: none; }


/* Admin row transition */
.tw-admin-row { transition: opacity .35s, background .2s; }
.tw-admin-row--fading { opacity: 0; pointer-events: none; }
.tw-admin-row--approved td { background: color-mix(in srgb, var(--success,#16a34a) 8%, transparent); }


/* ============================================================
   24. Seite – Walk-Detail (Split-View + Pull Card)
   ============================================================ */

/* ── Split-View: Desktop (Karte links, Sidebar rechts) ────── */
.tw-split-page { overflow: hidden; }

.tw-split {
  display: flex;
  height: calc(100vh - var(--nav-h, 60px));
}
.tw-split__map {
  flex: 1;
  position: relative;
  min-width: 0;
}
.tw-split__map-inner {
  position: absolute;
  inset: 0;
}
/* Walk-Map im Split füllt den Container */
.tw-split #walk-map {
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
}
.tw-split__sidebar {
  width: 360px;
  flex-shrink: 0;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.tw-split__cards {
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* ── Walk-Header ─────────────────────────────────────────── */
.tw-walk-header {
  padding: var(--sp-5) var(--sp-4) var(--sp-3);
  border-bottom: 1px solid var(--border);
}
.tw-walk-header__title {
  font-family: var(--font-head);
  font-size: var(--fz-xl);
  font-weight: 900;
  margin: 0 0 var(--sp-2);
  line-height: 1.2;
}
.tw-walk-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-3);
  font-size: var(--fz-xs);
  color: var(--fg-muted);
  margin-bottom: var(--sp-2);
  font-family: var(--font-mono);
}
.tw-walk-header__desc {
  font-size: var(--fz-sm);
  color: var(--fg-muted);
  margin: var(--sp-2) 0 0;
  line-height: 1.5;
}

/* ── Sidebar-Cards (Stop-Liste) ─────────────────────────── */
.tw-sidebar-card {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-3);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--dur), background var(--dur);
  position: relative;
}
.tw-sidebar-card:hover { border-color: var(--fg-muted); }
.tw-sidebar-card.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 4%, var(--bg)); }
.tw-sidebar-card__num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--fz-xs);
  font-weight: 700;
}
.tw-sidebar-card.is-active .tw-sidebar-card__num { background: var(--accent); }
.tw-sidebar-card__thumb {
  flex-shrink: 0;
  width: 64px; height: 64px;
  overflow: hidden;
  background: var(--c-100);
}
.tw-sidebar-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tw-sidebar-card__thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--fg-muted); }
.tw-sidebar-card__body { flex: 1; min-width: 0; }
.tw-sidebar-card__title {
  font-weight: 700;
  font-size: var(--fz-sm);
  color: var(--fg);
  text-decoration: none;
  display: block;
  margin-bottom: 2px;
}
.tw-sidebar-card__title:hover { color: var(--accent); }
.tw-sidebar-card__loc { font-size: var(--fz-xs); color: var(--fg-muted); margin-bottom: 4px; }
.tw-sidebar-card__tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tw-sidebar-card__note {
  font-size: var(--fz-xs);
  color: var(--fg-muted);
  padding: var(--sp-1) var(--sp-3) var(--sp-3) calc(28px + var(--sp-3) + var(--sp-3));
  font-style: italic;
  line-height: 1.4;
  border: 1px solid var(--border);
  border-top: none;
  background: var(--bg-alt);
  margin-top: -var(--sp-3);
}

/* ── Pull Card (Mobile: Bottom Sheet) ───────────────────── */
.tw-pull-card {
  display: none; /* nur mobile sichtbar */
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 400;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,.12);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  /* Drei Zustände via CSS-Klassen */
  max-height: calc(100vh - var(--nav-h, 60px) - 8px);
  overflow: hidden;
}
/* Peek: nur Handle + Titel-Zeile sichtbar */
.tw-pull-card--peek  { transform: translateY(calc(100% - 80px)); }
/* Half: ~50% sichtbar */
.tw-pull-card--half  { transform: translateY(30%); }
/* Full: fast vollständig */
.tw-pull-card--full  { transform: translateY(0); }

.tw-pull-card__handle {
  width: 40px; height: 4px;
  background: var(--c-300);
  border-radius: 2px;
  margin: var(--sp-3) auto var(--sp-2);
  cursor: pointer;
  flex-shrink: 0;
}
.tw-pull-card__content {
  overflow-y: auto;
  max-height: calc(100vh - var(--nav-h,60px) - 80px);
  -webkit-overflow-scrolling: touch;
}

/* ── Nav-Panel (Walk-Navigation-Modus) ──────────────────── */
.tw-nav-panel { display: flex; flex-direction: column; height: 100%; overflow: hidden; }

/* Peek-Zeile: immer sichtbar wenn pull-card collapsed */
.tw-nav-panel__peek {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  border-bottom: 1px solid var(--border);
  min-height: 64px;
  flex-shrink: 0;
}
.tw-nav-panel__badge {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--fz-sm);
  font-weight: 700;
}
.tw-nav-panel__badge.is-done { background: var(--accent); }
.tw-nav-panel__peek-info { flex: 1; min-width: 0; }
.tw-nav-panel__peek-title {
  font-weight: 700;
  font-size: var(--fz-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tw-nav-panel__peek-sub  { font-size: var(--fz-xs); color: var(--fg-muted); }
.tw-nav-panel__peek-dist { font-size: var(--fz-xs); color: var(--accent); font-family: var(--font-mono); }

/* GPS-Pfeil */
.tw-nav-panel__gps {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: var(--fz-xs);
  color: var(--accent);
  flex-shrink: 0;
}
.tw-nav-panel__gps--searching { color: var(--fg-muted); animation: tw-pulse 1.2s ease-in-out infinite; }
.tw-nav-panel__gps--error { color: var(--accent); cursor: pointer; }
@keyframes tw-pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
.tw-nav-panel__gps-arrow { font-size: 1.1rem; display: inline-block; line-height: 1; }

/* Panel-Body: Foto + Desc + Actions */
.tw-nav-panel__body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}
.tw-nav-panel__photo {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--c-100) center/cover no-repeat;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.tw-nav-panel__photo-tags {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.tw-nav-panel__photo-num {
  position: absolute;
  bottom: var(--sp-2);
  right: var(--sp-2);
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: var(--fz-xs);
  font-weight: 700;
  padding: 2px 8px;
}
.tw-nav-panel__desc-wrap {
  padding: var(--sp-3) var(--sp-4) 0;
}
.tw-nav-panel__desc {
  font-size: var(--fz-sm);
  color: var(--fg-muted);
  line-height: 1.55;
  white-space: pre-wrap;
  margin: 0;
}
.tw-nav-panel__expand {
  display: block;
  margin-top: var(--sp-1);
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-ui);
  font-size: var(--fz-xs);
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
}
.tw-nav-panel__expand:hover { text-decoration: underline; }
.tw-nav-panel__place-link {
  display: inline-block;
  margin-top: var(--sp-2);
  margin-bottom: var(--sp-3);
  font-size: var(--fz-xs);
  font-weight: 600;
  color: var(--fg-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
}
.tw-nav-panel__place-link:hover { color: var(--fg); border-color: var(--fg); }

/* Nav-Tags */
.tw-nav-tag {
  background: rgba(255,255,255,.85);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  font-weight: 600;
}
.tw-nav-tag--primary { background: var(--fg); color: var(--bg); }

/* Route Schritte */
.tw-nav-route {
  margin: 0 var(--sp-4) var(--sp-3);
  border: 1px solid var(--border);
}
.tw-nav-route__header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--fz-xs);
}
.tw-nav-route__icon { font-size: 1rem; }
.tw-nav-route__dist { font-weight: 700; }
.tw-nav-route__time { color: var(--fg-muted); }
.tw-nav-route__steps { display: flex; flex-direction: column; }
.tw-nav-step {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fz-xs);
  border-bottom: 1px solid var(--border);
}
.tw-nav-step:last-child { border-bottom: none; }
.tw-nav-step--first { font-weight: 600; }
.tw-nav-step__icon { flex-shrink: 0; font-size: .85rem; }
.tw-nav-step__text { flex: 1; }
.tw-nav-step__dist { color: var(--fg-muted); font-family: var(--font-mono); flex-shrink: 0; }
.tw-nav-step--more { color: var(--fg-muted); font-style: italic; }

/* Action Bar */
.tw-nav-panel__actions {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  align-items: center;
  position: sticky; bottom: 0; z-index: 1;   /* bleibt im Sheet unten sichtbar */
  background: var(--bg);
}
.tw-nav-panel__like {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: var(--sp-2) var(--sp-3);
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: var(--fz-sm);
  transition: border-color var(--dur), color var(--dur);
}
.tw-nav-panel__like:hover,
.tw-nav-panel__like.is-liked { border-color: var(--accent); color: var(--accent); }
.tw-nav-panel__like-icon { font-size: 1.1rem; }
.tw-nav-panel__like-count { font-family: var(--font-mono); font-size: var(--fz-xs); }
.tw-nav-panel__checkin {
  flex: 1;
  padding: var(--sp-2) var(--sp-3);
  background: var(--fg);
  color: var(--bg);
  border: none;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: var(--fz-sm);
  font-weight: 600;
  transition: background var(--dur);
}
.tw-nav-panel__checkin:hover:not(:disabled) { background: var(--accent); }
.tw-nav-panel__checkin.is-done { background: var(--c-500); cursor: default; }
.tw-nav-panel__checkin:disabled { opacity: .55; cursor: default; }

/* Stations-Liste (full mode) */
.tw-nav-panel__stations {
  border-top: 1px solid var(--border);
  margin-top: var(--sp-2);
}
.tw-nav-panel__stations-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--fg-muted);
  padding: var(--sp-3) var(--sp-4) var(--sp-1);
}
.tw-nav-panel__stations-list { display: flex; flex-direction: column; }
.tw-nav-station-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  cursor: pointer;
  transition: background var(--dur);
}
.tw-nav-station-row:hover { background: var(--bg-alt); }
.tw-nav-station-row.is-active { background: color-mix(in srgb, var(--accent) 6%, var(--bg)); }
.tw-nav-station-row.is-done { opacity: .6; }
.tw-nav-station-row__num {
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--c-200);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
.tw-nav-station-row__num.is-active { background: var(--fg); color: var(--bg); }
.tw-nav-station-row__num.is-done   { background: var(--accent); color: var(--bg); }
.tw-nav-station-row__info { flex: 1; min-width: 0; }
.tw-nav-station-row__title { font-size: var(--fz-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-nav-station-row__loc   { font-size: var(--fz-xs); color: var(--fg-muted); }
.tw-nav-station-row__like  { color: var(--accent); flex-shrink: 0; }
.tw-nav-panel__end-btn {
  display: block;
  width: calc(100% - var(--sp-8));
  margin: var(--sp-3) var(--sp-4);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--border);
  background: none;
  font-family: var(--font-ui);
  font-size: var(--fz-sm);
  cursor: pointer;
  color: var(--fg-muted);
  transition: border-color var(--dur), color var(--dur);
}
.tw-nav-panel__end-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Progress Dots */
.tw-nav-panel__progress {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: var(--sp-2) var(--sp-4) var(--sp-3);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  flex-shrink: 0;
}
.tw-nav-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-300);
  transition: background var(--dur), transform var(--dur);
}
.tw-nav-dot.is-active { background: var(--fg); transform: scale(1.3); }
.tw-nav-dot.is-done   { background: var(--accent); }

/* User-Dot (GPS-Position) */
.tw-user-dot {
  width: 14px; height: 14px;
  background: #2563eb;
  border: 2px solid var(--c-white);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

/* ── Map-Pins & Popups ──────────────────────────────────── */
.tw-pin-stop {
  background: var(--fg);
  color: var(--bg);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
  box-shadow: 0 2px 6px var(--c-black-25);
}
.tw-pin-stop__num {
  transform: rotate(45deg);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.tw-pin-dot {
  background: var(--fg);
  border: 2px solid var(--bg);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  width: 12px; height: 12px;
}
.tw-pin-dot--active { background: var(--accent); transform: scale(1.4); }
.tw-pin-shield {
  background: var(--fg);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  clip-path: polygon(50% 100%, 0 70%, 0 0, 100% 0, 100% 70%);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .03em;
}
.tw-pin-shield--active { background: var(--accent); }
.tw-pin-cluster {
  background: var(--fg);
  color: var(--bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  font-family: var(--font-mono);
  font-size: var(--fz-xs);
  font-weight: 700;
  border: 2px solid var(--bg);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.tw-pin-popup { min-width: 180px; max-width: 220px; }
.tw-pin-popup__img { width: 100%; height: 110px; object-fit: cover; display: block; margin-bottom: var(--sp-2); }
.tw-pin-popup__body { padding: 0 var(--sp-1); }
.tw-pin-popup__title { font-weight: 700; font-size: var(--fz-sm); margin-bottom: 4px; }
.tw-pin-popup__loc   { font-size: var(--fz-xs); color: var(--fg-muted); margin-bottom: 4px; }
.tw-pin-popup__tags  { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.tw-pin-popup__link  { color: var(--accent); font-size: var(--fz-xs); font-weight: 600; text-decoration: none; display: inline-block; }
.tw-pin-popup__link:hover { text-decoration: underline; }

/* ── Modal: EINE Komponente (Overlay, Box, Titel, Schließen, Text, Aktionen) ──
   Markup: .tw-modal-overlay (oder -backdrop) > .tw-modal[--wide] > __title, __close, __msg, __input, __actions
   Modal.confirm/prompt in main.js baut genau dieses Markup. */
.tw-modal-overlay, .tw-modal-backdrop {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4);
  animation: tw-modal-fade .15s ease;
}
@keyframes tw-modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.tw-modal {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: var(--sp-6);
  max-width: 380px; width: 100%;
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
  animation: tw-modal-slide .15s ease;
}
@keyframes tw-modal-slide {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0);   opacity: 1; }
}
.tw-modal__msg {
  font-size: var(--fz-base);
  font-weight: 500;
  margin: 0 0 var(--sp-5);
  line-height: 1.5;
}
.tw-modal__actions { display: flex; gap: var(--sp-2); justify-content: flex-end; }
.tw-modal__input { margin-bottom: var(--sp-4); }
.tw-modal--wide { max-width: 36rem; }
.tw-modal__title { margin-bottom: var(--sp-4); padding-right: var(--sp-8); font-size: var(--fz-xl); }
.tw-modal__close {
  position: absolute; top: var(--sp-2); right: var(--sp-2);
  width: 44px; height: 44px; font-size: 1.5rem; line-height: 1;
  color: var(--fg-muted); background: none; cursor: pointer;
}
.tw-modal__close:hover { color: var(--fg); }
.tw-modal-overlay.is-open { opacity: 1; pointer-events: all; }
.tw-modal-overlay.is-open .tw-modal { transform: translateY(0); }

/* ── Mobile: Split → Fullscreen Map + Pull Card ─────────── */
@media (max-width: 639px) {
  .tw-split {
    height: calc(100vh - var(--nav-h, 60px));
    position: relative;
  }
  .tw-split__sidebar { display: none; }
  .tw-pull-card { display: flex; flex-direction: column; }
}


/* ============================================================
   25. Seite – Walks-Liste + Pagination
   ============================================================ */

/* ── Walk-Cards Grid ─────────────────────────────────────── */


.tw-walk-card__thumb {
  display: block;
  aspect-ratio: 3/2;
  overflow: hidden;
  background: var(--c-100);
  position: relative;
}
.tw-walk-card__cover {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--dur-slow) ease;
}
.tw-walk-card:hover .tw-walk-card__cover { transform: scale(1.03); }
.tw-walk-card__icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
}
.tw-walk-card__body {
  padding: var(--sp-3) var(--sp-4);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.tw-walk-card__title {
  font-family: var(--font-head);
  font-size: var(--fz-base);
  font-weight: 700;
  margin: 0 0 var(--sp-1);
  line-height: 1.25;
}
.tw-walk-card__meta {
  font-size: var(--fz-xs);
  color: var(--fg-muted);
  font-family: var(--font-mono);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-3);
  margin-bottom: var(--sp-2);
}
.tw-walk-card__desc {
  font-size: var(--fz-sm);
  color: var(--fg-muted);
  line-height: 1.45;
  flex: 1;
  margin-bottom: var(--sp-3);
}


/* ── Walk-Filter ─────────────────────────────────────────── */
.tw-walks-filter {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}
.tw-walks-filter__group { display: flex; align-items: center; gap: var(--sp-2); }
.tw-walks-filter__select {
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: var(--fz-sm);
  cursor: pointer;
}
.tw-walks-filter__count {
  font-family: var(--font-mono);
  font-size: var(--fz-xs);
  color: var(--fg-muted);
  margin-left: auto;
}
.tw-walks-filter__empty {
  text-align: center;
  padding: var(--sp-8) 0;
  color: var(--fg-muted);
  font-size: var(--fz-sm);
}
.tw-walks-filter__empty.hidden { display: none; }

/* ── Pagination (tw-page-btn) ────────────────────────────── */
.tw-pagination {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
  margin: var(--sp-6) 0;
}
.tw-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 var(--sp-2);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  font-size: var(--fz-sm);
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--dur), background var(--dur), color var(--dur);
  font-family: var(--font-mono);
  font-weight: 600;
}
.tw-page-btn:hover { border-color: var(--fg-muted); background: var(--bg-alt); }
.tw-page-btn.is-active { background: var(--fg); color: var(--bg); border-color: var(--fg); cursor: default; }
.tw-page-btn--arrow { font-size: 1.1rem; font-weight: 400; font-family: var(--font-ui); }
.tw-page-btn--gap { border: none; cursor: default; color: var(--fg-muted); }
.tw-page-btn[aria-disabled="true"] { opacity: .35; cursor: default; pointer-events: none; }

/* ============================================================
   PHASE 9 – Entdecken
   a. Stadt-Seiten  b. Kuratierte Sammlungen
   c. Korrekturen   d. Schatzsuche / Discover
   ============================================================ */

/* ── a. Stadt-Seiten (city.php) ─────────────────────────── */
.tw-city { padding-bottom: var(--sp-16); }

.tw-city__hero {
  background: var(--fg);
  color: var(--bg);
  padding: var(--sp-12) 0 var(--sp-10);
}
.tw-city__eyebrow {
  font-size: var(--fz-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .6;
  margin-bottom: var(--sp-2);
}
.tw-city__title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  margin: 0 0 var(--sp-6);
  letter-spacing: -.03em;
}
.tw-city__stats { display: flex; gap: var(--sp-4); flex-wrap: wrap; }
.tw-city__stat-chip {
  display: flex; flex-direction: column; align-items: center;
  background: var(--c-white-10);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-6);
  min-width: 100px;
}
.tw-city__stat-num   { font-size: var(--fz-2xl); font-weight: 800; line-height: 1; }
.tw-city__stat-label { font-size: var(--fz-xs); opacity: .7; margin-top: 2px; }

.tw-city__section { margin-top: var(--sp-12); }
.tw-city__section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: var(--sp-6);
}
.tw-city__section-title {
  font-family: var(--font-head);
  font-size: var(--fz-xl);
  font-weight: 800;
  margin: 0;
}
.tw-city__section-more { font-size: var(--fz-sm); color: var(--accent); text-decoration: none; }
.tw-city__section-more:hover { text-decoration: underline; }

.tw-city__style-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.tw-city__leaderboard { display: flex; flex-direction: column; gap: 0; }
.tw-city__rank-row {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}
.tw-city__rank-pos   { font-weight: 800; width: 2rem; color: var(--fg-muted); }
.tw-city__rank-name  { flex: 1; font-weight: 600; }
.tw-city__rank-badge { font-size: var(--fz-xs); color: var(--fg-muted); }
.tw-city__rank-count { font-size: var(--fz-sm); font-weight: 600; color: var(--accent); }


/* ── b. Kuratierte Sammlungen ───────────────────────────── */
.tw-curated-index { padding-bottom: var(--sp-16); }

.tw-curated-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-6);
  padding-bottom: var(--sp-16);
}
.tw-curated-card__photo { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-alt); }
.tw-curated-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.tw-curated-card__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--fg-muted); }
.tw-curated-card__body  { padding: var(--sp-4); flex: 1; }
.tw-curated-card__title { font-size: var(--fz-lg); font-weight: 700; margin: 0 0 var(--sp-1); }
.tw-curated-card__city  { font-size: var(--fz-xs); color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.tw-curated-card__count { font-size: var(--fz-sm); color: var(--fg-muted); margin: var(--sp-1) 0 0; }
.tw-curated-card__desc  { font-size: var(--fz-sm); color: var(--fg-muted); margin-top: var(--sp-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.tw-curated-loading { padding: var(--sp-8); text-align: center; color: var(--fg-muted); }

/* Curated Detail */
.tw-curated-detail { padding-bottom: var(--sp-16); }
.tw-curated-detail__header {
  padding: var(--sp-12) 0 var(--sp-8);
  position: relative;
}
.tw-curated-detail__header--has-photo { color: var(--c-white); min-height: 320px; display: flex; align-items: flex-end; }
.tw-curated-detail__cover {
  position: absolute; inset: 0;
  z-index: 0;
}
.tw-curated-detail__cover img { width: 100%; height: 100%; object-fit: cover; }
.tw-curated-detail__cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.2) 60%);
}
.tw-curated-detail__header-inner { position: relative; z-index: 1; }
.tw-curated-detail__city-link { font-size: var(--fz-xs); letter-spacing: .1em; text-transform: uppercase; opacity: .7; text-decoration: none; }
.tw-curated-detail__city-link:hover { opacity: 1; }
.tw-curated-detail__title { font-family: var(--font-head); font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 900; margin: var(--sp-2) 0 var(--sp-4); }
.tw-curated-detail__desc  { max-width: 65ch; color: inherit; opacity: .85; margin-bottom: var(--sp-4); }
.tw-curated-detail__meta  { font-size: var(--fz-sm); opacity: .7; }
.tw-curated-detail__admin-actions { margin-top: var(--sp-6); }
.tw-curated-detail__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-6);
  padding: var(--sp-8) 0 var(--sp-16);
}
.tw-place-card-wrap { position: relative; }
.tw-curated-detail__remove {
  position: absolute; top: var(--sp-2); right: var(--sp-2); z-index: 10;
  width: 28px; height: 28px;
  background: var(--c-black-60); color: var(--c-white);
  border: none; border-radius: 50%;
  font-size: 1rem; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--dur);
}
.tw-place-card-wrap:hover .tw-curated-detail__remove { opacity: 1; }

/* ── c. Korrekturen ─────────────────────────────────────── */
.tw-correction__btn {
  font-size: var(--fz-sm);
  color: var(--fg-muted);
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.tw-correction__btn:hover { color: var(--accent); }

.pd-correction-hint { margin-top: var(--sp-4); }

.tw-admin-filter-row { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.tw-correction-old   { color: var(--fg-muted); text-decoration: line-through; }
.tw-correction-new   { color: var(--fg); font-weight: 600; }

/* ── d. Schatzsuche / Discover ──────────────────────────── */
.tw-discover {
  min-height: calc(100vh - var(--nav-h));
}


/* Aktiv-Modus */
.tw-discover__active { position: fixed; inset: var(--nav-h) 0 0; display: flex; flex-direction: column; }
.tw-discover__map    { position: absolute; inset: 0; z-index: 0; }
.tw-discover__overlay {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column;
  pointer-events: none;
}
.tw-discover__status-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--c-white-92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-2) var(--sp-4);
  pointer-events: all;
}
.tw-discover__status-indicator { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fz-sm); }
.tw-discover__pulse {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  animation: tw-pulse-dot 1.5s ease-in-out infinite;
}
@keyframes tw-pulse-dot {
  0%,100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: .6; }
}
.tw-discover__stop-btn {
  display: inline-flex; align-items: center; gap: var(--sp-1); white-space: nowrap;
  min-height: 44px; flex-shrink: 0;
  background: var(--fg); color: var(--bg); border: none; border-radius: var(--radius-sm);
  padding: var(--sp-1) var(--sp-3); font-size: var(--fz-sm); cursor: pointer;
}

.tw-discover__found {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column;
  padding: var(--sp-4);
  gap: var(--sp-3);
  pointer-events: none;      /* Karte darunter bleibt verschiebbar */
  justify-content: flex-end; /* neueste Karten unten */
}
/* Hinweis auf der Karte: eigenes Kärtchen, sonst ist graue Schrift auf grauer Karte unlesbar */
.tw-discover__found-empty {
  align-self: center; max-width: 32ch; margin: 0;
  padding: var(--sp-2) var(--sp-4);
  background: var(--bg); color: var(--fg); border: 1px solid var(--border); box-shadow: var(--shadow);
  font-size: var(--fz-sm); text-align: center; line-height: 1.4;
}

/* Gefundene Karte */
.tw-discover__card {
  display: flex; gap: var(--sp-3); align-items: center;
  background: var(--c-white-95);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-3);
  text-decoration: none; color: inherit;
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  align-self: flex-end;
  pointer-events: auto;
}
.tw-discover__card--new {
  animation: tw-pop-in .5s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes tw-pop-in {
  from { transform: scale(.8) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0);      opacity: 1; }
}
.tw-discover__card-photo {
  width: 72px; height: 72px; flex-shrink: 0;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-alt);
}
.tw-discover__card-photo img { width: 100%; height: 100%; object-fit: cover; }
.tw-discover__card-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.tw-discover__card-body  { flex: 1; min-width: 0; }
.tw-discover__card-title { font-weight: 700; font-size: var(--fz-sm); margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-discover__card-loc   { font-size: var(--fz-xs); color: var(--fg-muted); margin: 0; }
.tw-discover__card-dist  { font-size: var(--fz-xs); color: var(--accent); font-weight: 600; margin: 2px 0 0; }

/* ============================================================
   PHASE 10 – Challenges
   ============================================================ */

.tw-challenges { padding-bottom: var(--sp-16); }


.tw-challenges__tabs {
  display: flex; gap: var(--sp-1); flex-wrap: wrap;
  border-bottom: 2px solid var(--border);
  margin-bottom: var(--sp-8);
}
.tw-challenges__tab {
  padding: var(--sp-2) var(--sp-4);
  border: none; background: none;
  font-size: var(--fz-sm); font-weight: 600; color: var(--fg-muted);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color var(--dur), border-color var(--dur);
}
.tw-challenges__tab:hover    { color: var(--fg); }
.tw-challenges__tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.tw-challenges__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-6);
}
.tw-challenges__loading { padding: var(--sp-8); text-align: center; color: var(--fg-muted); }
.tw-challenges__empty   { padding: var(--sp-12) 0; }

/* Challenge-Karte */
.tw-challenge-card { display: flex; gap: var(--sp-4); padding: var(--sp-5); }
.tw-challenge-card.is-done     { border-color: var(--c-green, #22c55e); background: color-mix(in srgb, var(--c-green,#22c55e) 5%, var(--bg)); }
.tw-challenge-card.is-upcoming { opacity: .65; }

.tw-challenge-card__icon { flex-shrink: 0; line-height: 1; color: var(--fg); display: inline-flex; }
.tw-challenge-card__body { flex: 1; min-width: 0; }

.tw-challenge-card__chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }


.tw-challenge-card__title { font-size: var(--fz-base); font-weight: 700; margin: 0 0 var(--sp-1); }
.tw-challenge-card__desc  { font-size: var(--fz-sm); color: var(--fg-muted); margin: 0 0 var(--sp-3); }
.tw-challenge-card__goal  { font-size: var(--fz-sm); color: var(--fg-muted); margin: 0 0 var(--sp-3); }

/* Fortschrittsbalken */
.tw-challenge-card__progress { margin-top: var(--sp-3); }
.tw-challenge-card__progress-bar {
  height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; margin-bottom: var(--sp-1);
}
.tw-challenge-card__progress-fill {
  height: 100%; background: var(--accent); border-radius: 999px;
  transition: width .4s ease;
}
.tw-challenge-card__progress-fill.is-done { background: var(--c-green,#22c55e); }
.tw-challenge-card__progress-label { font-size: var(--fz-xs); color: var(--fg-muted); }

.tw-challenge-card__admin { margin-top: var(--sp-4); display: flex; gap: var(--sp-2); }

/* Admin: Challenges-Tab */
.tw-admin-filter-row + .tw-table--wrap { margin-top: var(--sp-4); }
.tw-admin-row--rejected td { background: color-mix(in srgb, var(--accent) 6%, transparent); }

/* ============================================================
   9f. Walk-Aufnahme-Modus
   Danach, je ein „── ──“-Block: Capture-Fehlerpfade, Explore-Links, Touch-Ziele,
   /health, Nächster Schritt, Walk-Navigation-Sheet, Sprachumschalter, Fokus,
   Skip-Link, Reduced Motion, FormUX, Mobile Tab-Leiste, Explore-Suche (9g),
   Skeleton, Erste Schritte, Kategorie-Glyphe

   Prüfen nach jeder Änderung: python3 tools/css-audit.py (Duplikate, fehlende
   Klassen) und node tests/e2e/shots.js compare (Screenshot-Vergleich).
   ============================================================ */

/* Start-Bildschirm */
.tw-record         { min-height: 100vh; }

/* Aktiv-Modus */
.tw-record__active { position: fixed; inset: 0; display: flex; flex-direction: column; }
.tw-record__map    { flex: 1; width: 100%; }

/* Top-Bar */
.tw-record__topbar {
  position: absolute; top: calc(var(--nav-h) + var(--sp-3)); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: var(--sp-4);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--sp-2) var(--sp-4); box-shadow: var(--shadow);
  z-index: 800; white-space: nowrap;
}
.tw-record__topbar-stats { display: flex; gap: var(--sp-4); }
.tw-record__stat   { font-size: var(--fz-sm); font-weight: 700; color: var(--fg); }
.tw-record__stop-btn { flex-shrink: 0; }

/* GPS-Status */
.tw-record__gps-status {
  position: absolute; bottom: calc(280px + var(--sp-3)); left: var(--sp-3);
  display: flex; align-items: center; gap: var(--sp-2);
  background: var(--c-white-90); border-radius: var(--radius-sm);
  padding: var(--sp-1) var(--sp-3); font-size: var(--fz-xs); box-shadow: var(--shadow);
  z-index: 800;
}
.tw-record__gps-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border);
  transition: background .3s;
}
.tw-record__gps-dot.is-active {
  background: #22c55e;
  animation: tw-pulse-dot 1.5s ease-in-out infinite;
}

/* Panel */
.tw-record__panel {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--bg); border-top: 2px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  max-height: 280px; display: flex; flex-direction: column;
  transition: max-height .3s ease;
  z-index: 800;
}
.tw-record__panel.is-collapsed { max-height: 52px; }
.tw-record__panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.tw-record__panel-title  { font-weight: 700; font-size: var(--fz-sm); }
.tw-record__panel-toggle { background: none; border: none; cursor: pointer; font-size: 1rem; padding: 0 var(--sp-2); color: var(--fg-muted); }
.tw-record__panel-body   { overflow-y: auto; flex: 1; padding: var(--sp-3) var(--sp-4); }
.tw-record__panel-footer { padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border); flex-shrink: 0; }
.tw-record__panel-empty  { color: var(--fg-muted); font-size: var(--fz-sm); margin: 0; }

/* Stops-Liste */
.tw-record__stops-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.tw-record__stop-item  { display: flex; align-items: center; gap: var(--sp-3); }
.tw-record__stop-num   {
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--c-white);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fz-xs); font-weight: 700; flex-shrink: 0;
}
.tw-record__stop-title  { flex: 1; font-size: var(--fz-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-record__stop-remove {
  background: none; border: none; cursor: pointer; color: var(--fg-muted); font-size: 1.1rem;
  padding: 0; line-height: 1; opacity: 0;
  transition: opacity .2s, color .2s;
}
.tw-record__stop-item:hover .tw-record__stop-remove { opacity: 1; }
.tw-record__stop-remove:hover { color: var(--accent); }

/* Stop-Marker auf Karte */
.tw-record__stop-marker {
  background: var(--accent); color: var(--c-white); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800; border: 2px solid var(--c-white);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.tw-record__stop-marker span { line-height: 1; }

/* Nearby-Liste im Modal */
.tw-record__nearby-list { max-height: 200px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.tw-record__nearby-loading { padding: var(--sp-4); color: var(--fg-muted); font-size: var(--fz-sm); text-align: center; margin: 0; }
.tw-record__nearby-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border);
}
.tw-record__nearby-item:last-child { border-bottom: none; }
.tw-record__nearby-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tw-record__nearby-info strong { font-size: var(--fz-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-record__nearby-info span   { font-size: var(--fz-xs); color: var(--fg-muted); }

/* Abschluss-Overlay */
.tw-record__finish-overlay {
  position: fixed; inset: 0; background: var(--c-black-60);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; padding: var(--sp-4);
}
.tw-record__finish-modal {
  background: var(--bg); border-radius: var(--radius-lg);
  padding: var(--sp-8); width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
}
.tw-record__finish-title   { font-size: var(--fz-xl); font-weight: 800; margin: 0 0 var(--sp-2); }
.tw-record__finish-summary { color: var(--fg-muted); margin: 0 0 var(--sp-6); font-size: var(--fz-sm); }

/* Responsive: Desktop – Panel als Sidebar */
@media (min-width: 768px) {
  .tw-record__active { flex-direction: row; }
  .tw-record__map    { flex: 1; height: 100%; }
  .tw-record__panel  {
    position: relative; bottom: auto; left: auto; right: auto;
    width: 320px; max-height: none; height: 100%;
    border-top: none; border-left: 2px solid var(--border);
    border-radius: 0;
  }
  .tw-record__panel.is-collapsed { max-height: none; width: 52px; }
  .tw-record__panel.is-collapsed .tw-record__panel-body,
  .tw-record__panel.is-collapsed .tw-record__panel-footer { display: none; }
  .tw-record__gps-status { bottom: var(--sp-4); }
  .tw-record__topbar { top: calc(var(--nav-h) + var(--sp-3)); }
}


/* ── Capture: Wiederholen + Nähe-Hinweis ───────────────────── */
.tw-capture__retry {
  margin-left: var(--sp-2); padding: var(--sp-1) var(--sp-3);
  border: 1px solid currentColor; border-radius: var(--radius-sm);
  font-weight: 700; font-size: var(--fz-sm); color: inherit; cursor: pointer;
  min-height: 44px;
}
.tw-capture__nearby { margin-top: var(--sp-2); }


/* ── Explore: weitere Wege zum Entdecken ───────────────────── */
.tw-explore__links {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4) 0;
}
.tw-explore__links a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius-pill);
  font-size: var(--fz-sm); font-weight: 600; color: var(--fg);
  transition: border-color var(--dur), background var(--dur);
}
.tw-explore__links a:hover { border-color: var(--fg); background: var(--bg-alt); }

/* Drawer: Zusatzlinks etwas leiser als die Hauptpunkte */
.tw-nav__drawer-link--sub { font-size: var(--fz-xl); opacity: .75; }


/* ── Touch-Ziele (WCAG 2.5.8: mind. 24 px, Ziel 44 px auf Touch) ──
   Kleine, absolut positionierte Buttons behalten ihr Aussehen; nur die
   antippbare Fläche wächst (unsichtbares ::after). */
.tw-strip-thumb__del::after,
.tw-strip-thumb__star::after,
.tw-curated-detail__remove::after {
  content: ''; position: absolute; inset: -8px;
}
@media (pointer: coarse) {
  .tw-strip-thumb__del::after,
  .tw-strip-thumb__star::after,
  .tw-curated-detail__remove::after { inset: -13px; }
  .tw-toolbar-link { min-width: 44px; min-height: 44px; }
}


/* ── Admin: System-Check (/health) ─────────────────────────── */
.tw-health-page { padding-block: var(--sp-8); }
.tw-health__summary { margin: var(--sp-3) 0 var(--sp-6); font-weight: 700; }
.tw-health__group { margin-top: var(--sp-8); font-size: var(--fz-xl); }
.tw-health { width: 100%; margin-top: var(--sp-2); }
.tw-health td { padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--border); vertical-align: top; }
.tw-health__state { width: 2.5rem; font-weight: 700; }
.tw-health__state.is-ok  { color: var(--c-green); }
.tw-health__state.is-bad { color: var(--accent); }


/* ── Dashboard: Nächster Schritt ───────────────────────────── */
.tw-next-step {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-6); padding: var(--sp-4);
  background: var(--bg-alt); border-left: 4px solid var(--accent);
}
.tw-next-step__body { flex: 1 1 16rem; min-width: 0; }
.tw-next-step__text { margin-top: var(--sp-1); font-size: var(--fz-lg); font-weight: 600; line-height: 1.35; }


/* ── Moderation: Grund beim Zurückschicken ─────────────────── */
.tw-reject-note { margin: var(--sp-2) 0; font-size: var(--fz-sm); line-height: 1.4; }

/* ── Walk-Editor: Hinweis für Nutzer ohne Veröffentlichen-Recht ── */
.tw-split__note { padding: var(--sp-2) var(--sp-3); font-size: var(--fz-xs); color: var(--fg-muted); border-top: 1px solid var(--border); }


/* ── Walk-Navigation: Sheet im Bild halten ─────────────────────
   Vorher wurde die Karte im „Half"-Zustand um 30 % nach unten geschoben – genau dort
   saßen Like und Check-in, also außerhalb des Bildschirms. Jetzt hat „Half" im
   Navigationsmodus eine echte Höhe (62 % des Bildschirms): die Karte endet am unteren
   Rand, der Inhalt scrollt, und die Aktionsleiste bleibt unten sichtbar.
   (vh zuerst, dvh überschreibt es dort, wo die Adressleiste mitzählt) */
.tw-pull-card.is-nav {
  height: calc(100vh - var(--nav-h, 60px) - 8px);
  height: calc(100dvh - var(--nav-h, 60px) - 8px);
  max-height: none;
  transition: transform .35s cubic-bezier(.4,0,.2,1), height .35s cubic-bezier(.4,0,.2,1);
}
.tw-pull-card.is-nav.tw-pull-card--half {
  transform: none;
  height: 62vh;
  height: 62dvh;
}
@media (prefers-reduced-motion: reduce) { .tw-pull-card.is-nav { transition: none; } }

/* Leaflet-Bedienelemente (z-index 800+) dürfen nicht über dem Bottom-Sheet liegen */
#walk-map { isolation: isolate; }



/* ── Tastaturfokus sichtbar ─────────────────────────────────
   Diese Felder entfernen den Browser-Fokusrahmen und setzen nur die Randfarbe.
   Für Tastaturnutzer (focus-visible) kommt ein klarer Rahmen zurück. */
.tw-capture__note:focus-visible,
.tw-search-bar input:focus-visible,
.we-title-input:focus-visible,
.we-desc-input:focus-visible,
.we-picker__search:focus-visible,
.we-info input:focus-visible,
.we-info textarea:focus-visible,
.pd-comment-form textarea:focus-visible,
.tw-walks-filter__select:focus-visible,
.tw-input:focus-visible,
.tw-select:focus-visible,
.tw-textarea:focus-visible,
.tw-upload-search__input:focus-visible,
.tw-upload-input:focus-visible,
.tw-upload-textarea:focus-visible,
.tw-upload-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* ── Skip-Link (Tastatur: „Zum Inhalt springen") ─────────────── */
.tw-skip {
  position: absolute; left: var(--sp-4); top: -100px; z-index: 3000;
  padding: var(--sp-3) var(--sp-4); background: var(--fg); color: var(--bg);
  font-weight: 700; font-size: var(--fz-sm); text-decoration: none;
}
.tw-skip:focus { top: var(--sp-2); }
main:focus { outline: none; }   /* Sprungziel des Skip-Links, kein Rahmen um die ganze Seite */

/* ── Weniger Bewegung, wenn das Gerät es wünscht ─────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

/* ── Formulare: Fehler direkt am Feld (FormUX in main.js) ───── */
.tw-input[aria-invalid="true"], .tw-select[aria-invalid="true"], .tw-textarea[aria-invalid="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}


/* ── Mobile Tab-Leiste (nav.php, nur unter 640 px) ─────────────
   Zusätzlich zum Menü: Entdecken, Walks, Erfassen (hervorgehoben), Konto.
   Ausgeblendet auf Vollbild-Seiten (Karte, Walk, Editoren, Erfassen, Login, Aufnahme)
   und solange die Bildschirmtastatur offen ist. */
.tw-tabbar { display: none; }
@media (max-width: 639px) {
  .tw-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-nav);
    display: grid; grid-template-columns: repeat(4, 1fr);
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
    background: var(--bg); border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .tw-tabbar__item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    height: var(--tabbar-h); padding: var(--sp-1) 0 0;
    font-size: var(--fz-2xs); font-weight: 700; letter-spacing: var(--track-wide);
    color: var(--fg-muted); text-decoration: none;
  }
  .tw-tabbar__item.is-active { color: var(--fg); box-shadow: inset 0 3px 0 var(--accent); }
  .tw-tabbar__plus {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-top: -16px; border-radius: 50%;
    background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-md);
  }
  .tw-tabbar__item--capture { color: var(--fg); }
  .tw-tabbar__item--capture.is-active { box-shadow: none; }

  /* Platz unter dem Inhalt, damit nichts verdeckt wird; Hinweise (Toast) darüber */
  body:has(.tw-tabbar) { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); }
  body:has(.tw-tabbar) .tw-toast-container { bottom: calc(var(--sp-4) + var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); left: var(--sp-4); right: var(--sp-4); }

  .tw-tabbar.is-kb,
  .tw-split-page .tw-tabbar, .tw-capture-page .tw-tabbar, .tw-edit-page .tw-tabbar,
  .tw-blog-editor-page .tw-tabbar, .tw-auth-page .tw-tabbar,
  body:has(.tw-record, .tw-discover) .tw-tabbar { display: none; }
  body.tw-split-page, body.tw-capture-page, body.tw-edit-page, body.tw-blog-editor-page, body.tw-auth-page,
  body:has(.tw-record, .tw-discover) { padding-bottom: 0; }
  body.tw-split-page .tw-toast-container, body.tw-capture-page .tw-toast-container, body.tw-edit-page .tw-toast-container,
  body.tw-blog-editor-page .tw-toast-container, body.tw-auth-page .tw-toast-container,
  body:has(.tw-record, .tw-discover) .tw-toast-container { bottom: var(--sp-4); }
}

/* ── 9g. Explore: Suche + sichtbare Filter-Chips ─────────────── */
.tw-explore__search { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.tw-explore__filters { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.tw-explore__filters .tw-filter-row { flex-direction: row; align-items: center; gap: var(--sp-3); }
.tw-explore__filters .tw-filter-label { flex: 0 0 5.5rem; }
.tw-explore__filters .tw-filter-pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.tw-explore__filters .tw-filter-pills::-webkit-scrollbar { display: none; }
.tw-explore__filters .tw-pill { flex: 0 0 auto; align-items: center; min-height: 36px; }
@media (min-width: 960px) {
  .tw-explore__filters .tw-filter-pills { flex-wrap: wrap; }
}
@media (max-width: 639px) {
  .tw-explore__filters .tw-filter-row { flex-direction: column; align-items: stretch; gap: var(--sp-1); }
  .tw-explore__filters .tw-filter-label { flex: none; }
}

/* ── Lade-Platzhalter (Skeleton-Karten) ──────────────────────── */
.tw-skeleton-card { display: flex; flex-direction: column; gap: var(--sp-2); }
.tw-skeleton-card__img { aspect-ratio: 4 / 3; border-radius: 0; }
.tw-skeleton-card__line { height: 14px; width: 80%; }
.tw-skeleton-card__line--short { width: 50%; }
.tw-empty--error { grid-column: 1 / -1; }

/* ── Erste Schritte (Dashboard) + Foto-Tipp (Capture) ────────── */
.tw-firststeps { border: 1.5px solid var(--fg); padding: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-4); }
.tw-firststeps__title { margin: 0; }
.tw-firststeps__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-4); }
.tw-firststeps__item { display: grid; grid-template-columns: 2rem 1fr; column-gap: var(--sp-3); align-items: baseline; }
.tw-firststeps__num { grid-row: span 2; font-family: var(--font-mono); color: var(--accent); }
.tw-firststeps__text { color: var(--fg-muted); font-size: var(--fz-sm); }
@media (min-width: 640px) { .tw-firststeps__list { grid-template-columns: repeat(3, 1fr); } }
.tw-capture__tip { margin: var(--sp-3) 0 0; font-size: var(--fz-sm); color: var(--fg-muted); max-width: 28ch; }

/* ── Dashboard-Einladungen: ehemals Inline-Styles ─────────────── */
.tw-label__opt { color: var(--fg-muted); font-weight: 400; }
.tw-invite-form__empty-note { color: var(--fg-muted); font-size: var(--fz-sm); margin: 0 0 var(--sp-4); }

/* ── Kategorie-Glyphe (catIcon): Buchstabe im Kreis ───────────── */
.tw-cat-glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.4em; height: 1.4em; border-radius: 50%;
  border: 1.5px solid currentColor; font-family: var(--font-head);
  font-weight: 700; font-size: .85em; line-height: 1; flex-shrink: 0;
}
.tw-pill__icon.tw-cat-glyph { width: 14px; height: 14px; font-size: 9px; }
.tw-cat-icon .tw-cat-glyph { width: 100%; height: 100%; font-size: 1.6rem; }

/* ── 7e. Ehemalige Inline-Styles (je Seite ein kleiner Block) ──── */
.tw-wed__title   { font-weight: 700; font-size: var(--fz-sm); }
.tw-wed__small   { font-size: var(--fz-2xs); }
.tw-wed__min     { width: 84px; }
.tw-wed__cards   { padding: var(--sp-3); }
.tw-wed__hint    { text-align: center; color: var(--fg-muted); font-size: var(--fz-2xs); padding: var(--sp-4); }
.tw-split__footer .tw-btn { flex: 1; }
.tw-wed__publish { flex: 2; }
.tw-wed__delete  { color: var(--accent); flex: 0 0 auto; }
.tw-dash__xp-total { font-size: 2rem; }
.tw-cover-img { width: 100%; height: 100%; object-fit: cover; }
.tw-invite-item__used    { color: var(--c-green-fg); font-size: var(--fz-xs); }
.tw-invite-item__pending { color: var(--fg-muted);  font-size: var(--fz-xs); }
.text-white :is(h1, h2, h3), .bg-dark :is(h1, h2, h3) { color: inherit; }   /* Überschriften auf dunklem Grund */
.tw-about-hero__title { font-size: var(--fz-hero); line-height: 1.05; letter-spacing: -.03em; }
.tw-about-hero__lead  { color: var(--c-white-60); line-height: 1.6; }
.tw-about-step__num   { font-size: 3rem; opacity: .25; line-height: 1; }
.tw-about-avatar      { width: 3rem; height: 3rem; background: var(--accent); color: var(--c-white); }
.tw-drafts__map-canvas { width: 100%; height: 500px; background: var(--c-100); }
.tw-map-popup--center { text-align: center; min-width: 120px; }
.tw-map-popup--center .tw-map-popup__img { width: 100px; height: 75px; margin-bottom: 4px; }
.tw-map-popup__title { font-size: 12px; font-weight: 700; }
.tw-strip-thumb__input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.tw-classify-result__box { font-size: var(--fz-xs); padding: var(--sp-2); border: 1px solid var(--border); margin-top: var(--sp-2); }
.tw-classify-result__box .tw-btn { margin-top: var(--sp-2); }
.tw-capture__link        { color: var(--accent); font-weight: 700; }
.tw-capture__nearby-link { color: var(--accent); font-size: var(--fz-2xs); }
.tw-capture__nearby-text { font-size: var(--fz-2xs); color: var(--fg-muted); }
.tw-maps__pull-header { padding-left: 0; padding-right: 0; }
.tw-maps__pull-list   { padding: 0; gap: var(--sp-2); }
.tw-blog-post__cover  { aspect-ratio: 16 / 9; object-fit: cover; }
.tw-blog-post__title  { font-size: var(--fz-3xl); }
.tw-search-result__meta { font-size: var(--fz-xs); color: var(--fg-muted); }
.tw-form--inline { margin: 0; }
.tw-avatar-sm { width: 28px; height: 28px; }

/* ── /migrate: Ergebnisliste + Gefahrzone ─────────────────────── */
.tw-migrate__list { list-style: none; padding: 0; margin: 0 0 var(--sp-6); display: grid; gap: var(--sp-2); }
.tw-migrate__list li { padding: var(--sp-2) var(--sp-3); border-left: 3px solid var(--border); }
.tw-migrate__list li.is-ok  { border-left-color: var(--c-green); }
.tw-migrate__list li.is-bad { border-left-color: var(--accent); }
.tw-migrate__error { font-family: var(--font-mono); font-size: var(--fz-xs); color: var(--accent); margin-top: var(--sp-1); }
.tw-migrate__form { margin: var(--sp-4) 0 var(--sp-8); }
.tw-migrate__danger { margin-top: var(--sp-12); padding: var(--sp-6); border: 2px solid var(--accent); }
.tw-migrate__danger h2 { margin-top: 0; color: var(--accent); }
.tw-migrate__danger .tw-input-row { margin-top: var(--sp-3); }
.tw-migrate { --narrow-w: 60rem; }
.tw-migrate__result { margin: var(--sp-6) 0; padding: var(--sp-4); background: var(--bg-alt); }

/* ── Startseite (einfach): Einstieg, neueste Funde, Walks, Aufruf ─ */
.tw-home-main { max-width: var(--container, 1200px); margin: 0 auto; padding: 0 var(--sp-4) var(--sp-16); }
.tw-start { padding: var(--sp-12) 0 var(--sp-8); max-width: 42rem; }
.tw-start__title { font-size: var(--fz-hero); line-height: 1; letter-spacing: var(--track-tighter, -.03em); margin: var(--sp-2) 0 var(--sp-4); }
.tw-start__lead { font-size: var(--fz-lg); color: var(--fg-muted); max-width: 36rem; margin: 0 0 var(--sp-6); }
.tw-start__actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.tw-start__stats { margin: var(--sp-6) 0 0; font-family: var(--font-mono); font-size: var(--fz-xs); color: var(--fg-muted); }
.tw-start-section { margin-top: var(--sp-12); }
.tw-start-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-4); }
.tw-start-section__head h2 { margin: 0; font-size: var(--fz-2xl); }
.tw-start-section__head a { font-family: var(--font-mono); font-size: var(--fz-xs); color: var(--accent); text-decoration: none; }
.tw-start-walks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.tw-start-walk { display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; padding: var(--sp-4); border: 1.5px solid var(--fg); text-decoration: none; color: inherit; transition: background var(--dur); }
.tw-start-walk:hover { background: var(--bg-alt); }
.tw-start-walk__title { font-weight: 700; }
.tw-start-walk__meta { font-family: var(--font-mono); font-size: var(--fz-xs); color: var(--fg-muted); }
.tw-start-cta { margin-top: var(--sp-16); padding: var(--sp-8); background: var(--fg); color: var(--bg); text-align: center; }
.tw-start-cta h2 { margin: 0 0 var(--sp-3); color: inherit; }
.tw-start-cta p { max-width: 36rem; margin: 0 auto var(--sp-6); color: var(--c-white-60, rgba(255,255,255,.6)); }
@media (min-width: 640px) { .tw-start { padding-top: var(--sp-16); } }

/* ── Seitenraster: Inhalt bündig mit der Navigation ───────────────
   Links bleibt Platz für das Logo (--page-left), rechts endet der Inhalt mit der
   Meta-Navigation (--page-right). Nav-Linie, Links und Seiteninhalt teilen sich
   dieselben Kanten. Unter 640 px (Burger-Navigation) gilt der normale Rand. */
:root { --page-max: 1400px; --page-left: 160px; --page-right: var(--sp-8);
        --page-offset: max(0px, calc((100vw - var(--page-max)) / 2)); }   /* linker Rand des Rahmens */
@media (max-width: 639px) { :root { --page-left: var(--sp-4); --page-right: var(--sp-4); } }
@media (min-width: 640px) {
  .container, .tw-container, .tw-explore, .tw-home-main {
    max-width: var(--page-max); margin-inline: auto;
    padding-left: var(--page-left); padding-right: var(--page-right);
  }
  .container .container, .tw-container .tw-container { padding-left: 0; padding-right: 0; }
}
/* Lese-Seiten (Blog-Beitrag, Impressum, Über, Migrationen): schmale Spalte,
   links bündig mit dem Seitenraster. Steht nach der Raster-Regel, weil ein
   max-width am Container selbst von ihr überschrieben würde. */
.container--narrow > * { max-width: var(--narrow-w, 44rem); }

/* ── Offener Drawer (Mobile): Logo springt in die Mitte, invertiert ───── */
.tw-logo-layer { transition: left .35s cubic-bezier(.4,0,.2,1), transform .35s cubic-bezier(.4,0,.2,1); }
body.tw-drawer-open .tw-logo-layer { left: 50%; transform: translateX(-50%); z-index: 1001; }
body.tw-drawer-open .tw-logo-layer__placeholder { color: var(--c-white); }
body.tw-drawer-open .tw-logo-layer svg,
body.tw-drawer-open .tw-logo-layer img { filter: invert(1); }
.tw-nav__drawer-logo { display: none; }   /* das Logo kommt aus der festen Logo-Ebene */
@media (prefers-reduced-motion: reduce) { .tw-logo-layer { transition: none; } }
