/* === Seitenspezifische Styles: aus dem Inline-<style> von album.html
   extrahiert (UI-Konzept A3) — bewusst NICHT in app.css, um
   Selektor-Kollisionen zwischen den Seiten zu vermeiden. === */

    /* Album page overrides */
    body { max-width: 1000px; padding-top: 0; }

    /* Mehr Fläche für Galerie/Karte auf echten Desktop-Monitoren (Design-
       Audit 16.07.2026) — Formulare (Einstellungen etc.) haben eigene,
       engere max-width-Werte und bleiben davon unberührt. */
    @media (min-width: 1300px) {
      body { max-width: 1220px; }
    }

    /* --- Nav --- */
    .anav { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; padding: 10px 0; margin-bottom: 20px; background: var(--bg-primary); border-bottom: 1px solid var(--border-subtle); }
    .anav-brand { line-height: 0; }
    .anav-brand img { height: 40px; }
    .anav-links { display: flex; gap: 8px; align-items: center; }
    .anav-link { font-size: 0.8rem; color: var(--text-secondary); text-decoration: none; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); white-space: nowrap; transition: all .15s; cursor: pointer; background: none; }
    .anav-link:hover { background: var(--bg-hover); color: var(--text-primary); }
    /* UX-01: Navigation darf auf schmalen Bildschirmen umbrechen statt die Seite zu verbreitern */
    .anav { gap: 8px; flex-wrap: wrap; }
    .anav-brand { min-width: 0; flex: 0 1 auto; }
    .anav-brand img { max-width: 100%; height: auto; max-height: 40px; }
    .anav-links { flex-wrap: wrap; justify-content: flex-end; min-width: 0; margin-left: auto; }
    @media (max-width: 480px) {
      .anav-brand img { max-height: 32px; }
      .anav-link { padding: 6px 9px; font-size: 0.76rem; }
    }

    /* --- Album Header --- */
    .ah { margin-bottom: 20px; }

    /* Live-Reise-Banner (REQ-LIVE-001/004) */
    .live-badge {
      display: inline-flex; align-items: center; gap: 7px; margin-bottom: 10px;
      padding: 5px 12px; border-radius: 20px; font-size: 0.78rem; font-weight: 600;
      background: rgba(232,168,56,.12); color: var(--accent); border: 1px solid rgba(232,168,56,.3);
    }
    .live-dot {
      width: 8px; height: 8px; border-radius: 50%; background: #e74c3c; flex-shrink: 0;
      animation: live-pulse 1.6s ease-in-out infinite;
    }
    .live-sep { opacity: .5; }
    .live-badge-done { background: rgba(46,204,113,.12); color: #2ecc71; border-color: rgba(46,204,113,.3); }
    .live-badge-done .icon { width: 14px; height: 14px; }
    @keyframes live-pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: .4; transform: scale(.8); }
    }

    .ah-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
    .ah-desc { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 10px; }
    .ah-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.76rem; color: var(--text-muted); }
    .ah-meta span { display: flex; align-items: center; gap: 4px; }

    /* Journey Stats */
    .ah-stats { display: flex; flex-wrap: wrap; gap: 1px; background: var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
    .ah-stat { flex: 1 1 auto; min-width: 76px; background: var(--bg-card); padding: 14px 8px 12px; text-align: center; transition: background .15s; }
    .ah-stat:hover { background: var(--bg-card-hover); }
    .ah-stat-icon { width: 16px; height: 16px; display: block; margin: 0 auto 4px; color: var(--accent); opacity: .85; }
    .ah-stat-val { display: block; font-size: 1.4rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
    .ah-stat-lbl { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

    /* Etappenziel-Fortschritt (REQ-LIVE-002, v1.18) — nur sichtbar, wenn der
       Creator eine geplante Gesamtdistanz hinterlegt hat. */
    .ah-goal { margin-bottom: 14px; }
    .ah-goal-bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
    .ah-goal-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-hover)); transition: width .5s ease-out; }
    .ah-goal-label { margin-top: 6px; font-size: 0.78rem; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
    .ah-goal-label .icon { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; }
    .ah-goal-sep { opacity: .5; }

    /* Day grouping */
    /* Stage (Etappe) chapter header — sticky */
    .gal-stage-header { position: sticky; top: 0; z-index: 5; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 14px 12px; margin: 24px 0 4px; background: var(--bg-card); border-radius: var(--radius); border-left: 3px solid var(--accent); }
    .gal-stage-title { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
    .gal-stage-stats { font-size: 0.78rem; color: var(--accent); font-variant-numeric: tabular-nums; }
    .gal-stage-desc { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.5; margin: 0 12px 8px; }
    .gal-day-header { display: flex; align-items: baseline; gap: 10px; padding: 18px 0 8px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
    .gal-day-header:first-child { padding-top: 0; }
    .gal-day-num { font-size: 0.82rem; font-weight: 700; color: var(--accent); min-width: 48px; }
    .gal-day-date { font-size: 0.82rem; color: var(--text-secondary); }
    .gal-day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 8px; }

    /* Day minimap */
    .gal-day-section { display: flex; gap: 14px; margin-bottom: 14px; }
    .gal-day-map { flex-shrink: 0; width: 180px; height: 140px; border-radius: 8px; border: 1px solid var(--border); overflow: hidden; position: relative; z-index: 0; }
    .gal-day-content { flex: 1; min-width: 0; }
    .gal-controls { display: flex; justify-content: flex-end; margin-bottom: 8px; }
    .gal-collapse-all { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-secondary); font-size: 0.8rem; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-family: var(--font); transition: all .15s; }
    .gal-collapse-all:hover { color: var(--text-primary); border-color: var(--text-muted); }
    .gal-day-toggle { cursor: pointer; user-select: none; }
    .gal-day-toggle:hover .gal-day-date { color: var(--text-primary); }
    .gal-day-live-tag {
      font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
      color: #e74c3c; background: rgba(231,76,60,.12); border-radius: 10px; padding: 2px 8px;
    }
    .gal-day-chevron { margin-left: auto; font-size: 0.85rem; color: var(--text-muted); transition: transform .2s; }
    .gal-day-toggle[aria-expanded="false"] .gal-day-chevron { transform: rotate(-90deg); }
    .gal-day-body.collapsed { display: none; }
    @media (max-width: 600px) {
      .gal-day-section { flex-direction: column; }
      .gal-day-map { width: 100%; height: 120px; }
    }

    /* --- Galerie: Weg-Timeline (UI-Konzept B3) --- */
    @media (min-width: 600px) {
      .gal-grid { position: relative; padding-left: 26px; }
      .gal-grid::before {
        content: '';
        position: absolute;
        left: 6px; top: 14px; bottom: 14px;
        border-left: 2px dashed var(--border);
      }
      .gal-day-header { position: relative; }
      .gal-day-header::before {
        content: '';
        position: absolute;
        left: -26px; top: 24px;
        width: 11px; height: 11px;
        border-radius: 50%;
        background: var(--bg-primary);
        border: 2px solid var(--accent);
        box-shadow: 0 0 0 3px var(--bg-primary);
      }
      .gal-empty { margin-left: -26px; }
    }
    .gi-cover.active .icon, .gi-cover:hover .icon { fill: currentColor; }
    .gal-day-chevron .icon { width: 1em; height: 1em; }

    /* --- Tabs --- */
    .tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 0; position: relative; z-index: 10; }
    .tab { padding: 10px 18px; font-size: 0.84rem; font-weight: 500; color: var(--text-muted); background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; transition: all .15s; margin-bottom: -1px; }
    .tab:hover { color: var(--text-primary); }
    .tab.active { color: var(--accent); border-bottom-color: var(--accent); }
    .tab-panel { display: none; animation: viewFadeIn 0.2s ease; }
    .tab-panel.active { display: block; }
    @keyframes viewFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

    /* --- Gallery Grid --- */
    .gal-grid { margin-bottom: 20px; }
    .gal-item { position: relative; border-radius: 8px; overflow: hidden; cursor: pointer; background: transparent; transition: opacity .15s, transform .15s, box-shadow .2s; aspect-ratio: 3/2; }
    .gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; pointer-events: none; }
    .gal-item:hover img { transform: scale(1.05); }
    .gal-item .gi-ov { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.6) 0%, transparent 40%); opacity: 0; transition: opacity .2s; display: flex; flex-direction: column; justify-content: flex-end; padding: 10px; }
    .gal-item:hover .gi-ov { opacity: 1; }
    .gi-t { font-size: 0.78rem; font-weight: 600; color: #fff; }
    .gi-m { font-size: 0.75rem; color: rgba(255,255,255,.6); margin-top: 2px; }
    .gal-empty { text-align: center; padding: 48px 20px; color: var(--text-muted); }

    /* Creator: drag-and-drop + delete on gallery tiles */
    .gal-item[draggable="true"] { cursor: grab; }
    .gal-item.dragging { opacity: 0.35; transform: scale(0.95); }
    .gal-item.drag-over { box-shadow: 0 0 0 3px var(--accent); border-radius: 8px; }
    .gi-cover { position: absolute; top: 6px; left: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.6); border: none; color: rgba(255,255,255,.4); font-size: 14px; cursor: pointer; display: none; align-items: center; justify-content: center; backdrop-filter: blur(4px); transition: all .15s; z-index: 2; }
    .gi-cover:hover { color: var(--accent); background: rgba(0,0,0,.8); }
    .gi-cover.active { display: flex; color: var(--accent); }
    .gal-item:hover .gi-cover { display: flex; }
    .gi-del { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.6); border: none; color: #fff; font-size: 14px; cursor: pointer; display: none; align-items: center; justify-content: center; backdrop-filter: blur(4px); transition: background .15s; z-index: 2; }
    .gi-del:hover { background: var(--danger); }
    .gal-item:hover .gi-del { display: flex; }

    /* --- Lightbox --- */
    .lb { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; cursor: zoom-out; }
    .lb.open { display: flex; }
    .lb-img { max-width: 90vw; max-height: 82vh; border-radius: 8px; object-fit: contain; transition: opacity .15s ease; }
    .lb-img.lb-fading { opacity: 0; }
    .lb-info { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; padding: 32px 20px 20px; background: linear-gradient(to top, rgba(8,12,20,.94) 0%, rgba(8,12,20,.6) 65%, transparent 100%); }
    .lb-info > * { max-width: 820px; margin-left: auto; margin-right: auto; }
    .lb-title { font-size: 1.05rem; font-weight: 600; color: #fff; }
    .lb-caption { font-size: 0.9rem; line-height: 1.45; color: rgba(255,255,255,.9); margin-top: 4px; }
    .lb-meta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; font-size: 0.78rem; color: rgba(255,255,255,.68); margin-top: 7px; }
    .lb-edit { position: absolute; top: 14px; left: 18px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.15); color: #fff; font-size: 0.78rem; padding: 6px 14px; border-radius: 8px; cursor: pointer; backdrop-filter: blur(6px); transition: all .15s; display: none; }
    .lb-edit:hover { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
    .lb-edit-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
    .lb-edit-form input, .lb-edit-form textarea { width: 100%; padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.5); color: #fff; font-family: var(--font); font-size: 0.85rem; backdrop-filter: blur(8px); }
    .lb-edit-form input::placeholder, .lb-edit-form textarea::placeholder { color: rgba(255,255,255,.35); }
    .lb-edit-form textarea { resize: none; }
    .lb-edit-form input:focus, .lb-edit-form textarea:focus { outline: none; border-color: var(--accent); }
    .lb-edit-actions { display: flex; gap: 8px; justify-content: center; }
    .lb-edit-actions button { padding: 6px 16px; border-radius: 8px; border: none; font-size: 0.8rem; cursor: pointer; }
    .lb-save { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
    .lb-cancel { background: rgba(255,255,255,.1); color: #fff; }
    .lb-ai { font-size: 0.76rem; color: var(--accent); margin-top: 6px; font-style: italic; }
    .lb-ai::before { content: 'KI: '; font-style: normal; }
    .lb-close { position: absolute; top: 14px; right: 18px; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; opacity: .7; }
    .lb-close:hover { opacity: 1; }
    .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; opacity: .5; padding: 12px; }
    .lb-nav:hover { opacity: 1; }
    .lb-prev { left: 10px; }
    .lb-next { right: 10px; }

    /* --- Map --- */
    #amap { height: 380px; border-radius: var(--radius) var(--radius) 0 0; border: 1px solid var(--border); border-bottom: none; }

    /* Filmstrip below map */
    .map-strip {
      display: flex; gap: 6px; padding: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch;
      background: var(--bg-card); border: 1px solid var(--border); border-top: none;
      scrollbar-width: thin; scrollbar-color: var(--text-muted) transparent;
    }
    .strip-wrap { display: flex; align-items: stretch; background: var(--bg-card); border: 1px solid var(--border); border-top: none; }
    .strip-nav { flex-shrink: 0; width: 32px; background: rgba(255,255,255,.03); border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; transition: all .15s; }
    .strip-nav:hover { background: rgba(255,255,255,.08); color: var(--text); }
    .strip-play { flex-shrink: 0; width: 36px; background: rgba(232,168,56,.08); border: none; color: var(--accent); font-size: 0.9rem; cursor: pointer; transition: all .15s; border-left: 1px solid var(--border); }
    .strip-play:hover { background: rgba(232,168,56,.15); }
    .strip-play.playing { background: var(--accent); color: var(--accent-ink); }
    .map-strip { flex: 1; overflow-x: auto; min-width: 0; }  /* min-width: sonst sprengt der Filmstreifen auf dem Handy die Seite (UX-01) */
    .map-strip:empty ~ .strip-nav, .map-strip:empty ~ .strip-play { display: none; }
    .ms-thumb {
      flex-shrink: 0; width: 72px; height: 54px; border-radius: 6px; overflow: hidden;
      cursor: pointer; border: 2px solid transparent; transition: border-color .15s, transform .15s;
      background: var(--bg-primary);
    }
    .ms-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .ms-thumb:hover { border-color: var(--text-muted); transform: scale(1.05); }
    .ms-thumb.active { border-color: var(--accent); }

    /* Preview below filmstrip */
    .map-preview {
      background: var(--bg-card); border: 1px solid var(--border); border-top: none;
      border-radius: 0 0 var(--radius) var(--radius); overflow: hidden;
    }
    .map-preview:empty { display: none; }
    .mp-inner { display: flex; gap: 20px; padding: 16px; align-items: flex-start; }
    .mp-img { max-width: 50%; max-height: 320px; border-radius: 8px; object-fit: contain; cursor: pointer; }
    .mp-info { flex: 1; min-width: 0; }
    .mp-title { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
    .mp-caption { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 8px; }
    .mp-meta { font-size: 0.76rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 10px; }
    .mp-meta span { display: flex; align-items: center; gap: 4px; }

    /* Creator actions in preview */
    .mp-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
    .mp-btn { padding: 5px 12px; border-radius: 6px; border: 1px solid var(--border); background: rgba(255,255,255,.03); color: var(--text-secondary); font-size: 0.76rem; cursor: pointer; transition: all .15s; }
    .mp-btn:hover { background: var(--bg-hover); color: var(--text); border-color: var(--text-muted); }
    .mp-btn-danger:hover { color: var(--danger); border-color: rgba(248,81,73,.3); background: rgba(248,81,73,.06); }
    .mp-btn-save { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
    .mp-btn-save:hover { background: var(--accent-hover); }

    .mp-edit-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
    .mp-edit-form input, .mp-edit-form textarea { width: 100%; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-primary); color: var(--text); font-family: var(--font); font-size: 0.84rem; }
    .mp-edit-form input:focus, .mp-edit-form textarea:focus { outline: none; border-color: var(--accent); }
    .mp-edit-form textarea { resize: none; }
    .mp-edit-btns { display: flex; gap: 6px; }

    /* Fullscreen image toggle */
    .mp-img { cursor: pointer; transition: all .2s; }
    .mp-fullscreen .mp-inner { flex-direction: column; align-items: center; }
    .mp-fullscreen .mp-img { max-width: 100%; max-height: 75vh; cursor: zoom-out; }
    .mp-fullscreen .mp-info { width: 100%; }

    /* Elevation profile chart (REQ-ELEV) below the map preview */
    .elev-card {
      margin-top: 14px; background: var(--bg-card); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 14px 16px;
    }
    .elev-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; margin-bottom: 8px; }
    .elev-title { display: flex; align-items: center; gap: 6px; font-size: 0.86rem; font-weight: 600; color: var(--text-secondary); }
    .elev-title .icon { width: 15px; height: 15px; }
    .elev-summary { font-size: 0.78rem; color: var(--accent); font-weight: 600; }
    .elev-chart-wrap { position: relative; }
    .elev-svg { width: 100%; height: 120px; display: block; cursor: crosshair; }
    .elev-tooltip {
      position: absolute; top: 4px; transform: translateX(-50%);
      background: var(--bg-primary); border: 1px solid var(--border); border-radius: 6px;
      padding: 3px 8px; font-size: 0.75rem; color: var(--text-primary); white-space: nowrap;
      pointer-events: none; opacity: 0; transition: opacity .1s;
    }
    .elev-tooltip.visible { opacity: 1; }

    @media (max-width: 600px) {
      #amap { height: 280px; }
      .mp-inner { flex-direction: column; }
      .mp-img { max-width: 100%; max-height: 220px; }
      .ms-thumb { width: 60px; height: 45px; }
      .mp-caption { font-size: 0.9rem; color: var(--text-primary); }
      /* Galerie: Titel/Beschreibung immer sichtbar auf Mobile */
      .gal-item .gi-ov { opacity: 1; }
      .gi-t { font-size: 0.82rem; }
      .gi-m { font-size: 0.75rem; }
      /* Lightbox: Bild kleiner halten, damit die Info-Box lesbar darunter liegt */
      .lb-img { max-height: 68vh; }
      .lb-info { padding: 26px 14px 16px; }
      .lb-title { font-size: 1.1rem; }
      .lb-caption { font-size: 0.95rem; }
      .lb-meta { font-size: 0.8rem; gap: 10px 14px; }
    }

    /* --- Subscribe form (reader) --- */
    .sub-form { display: flex; gap: 8px; margin-bottom: 16px; max-width: 420px; }
    .sub-form input { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text); font-size: 0.84rem; }
    .sub-form input:focus { outline: none; border-color: var(--accent); }
    .sub-form button { padding: 8px 16px; border: none; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 0.82rem; cursor: pointer; white-space: nowrap; }
    .sub-msg { font-size: 0.78rem; margin-top: -10px; margin-bottom: 12px; }
    .sub-msg.ok { color: var(--success); }
    .sub-msg.err { color: var(--danger); }

    /* --- Subscriber management (creator) --- */
    .sub-list { list-style: none; margin: 0; padding: 0; }
    .sub-list li { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 0.84rem; }
    .sub-email { flex: 1; }
    .sub-badge { font-size: 0.75rem; padding: 2px 6px; border-radius: 4px; margin-left: 8px; }
    .sub-badge.verified { background: rgba(46,204,113,.15); color: #2ecc71; }
    .sub-badge.pending { background: rgba(232,168,56,.15); color: var(--accent); }
    .sub-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.8rem; padding: 4px 8px; }
    .sub-remove:hover { color: var(--danger); }

    /* --- Settings --- */
    .settings-grid { display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
    .settings-form { display: flex; flex-direction: column; gap: 8px; }
    .settings-form label { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
    .set-input { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-primary); color: var(--text); font-family: var(--font); font-size: 0.84rem; }
    .set-check-label { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--text); cursor: pointer; margin-top: 4px; }
    .set-check-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
    .set-hint { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; margin: -2px 0 2px; }
    .set-input:focus { outline: none; border-color: var(--accent); }
    .btn-settings-save { margin-top: 8px; padding: 9px 20px; border: none; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 0.84rem; cursor: pointer; align-self: flex-start; }
    .btn-settings-save:hover { background: var(--accent-hover); }
    .set-status { font-size: 0.78rem; min-height: 1.2em; }
    .set-status.ok { color: var(--success); }
    .set-status.err { color: var(--danger); }
    .cover-hint-toast {
      position: fixed; bottom: 24px; left: 50%; z-index: 50; max-width: 360px;
      background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
      padding: 10px 16px; font-size: 0.84rem; line-height: 1.4; color: var(--warning);
      box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
      transform: translateX(-50%) translateY(12px); transition: opacity .2s, transform .2s;
    }
    .cover-hint-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
    @media (prefers-reduced-motion: reduce) { .cover-hint-toast { transition: opacity .01s; } }
    .pdf-progress { margin: 12px 0 6px; }
    .pdf-bar-track { height: 8px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
    .pdf-bar-fill { height: 100%; width: 0; border-radius: 6px; background: var(--accent); transition: width .3s ease; }
    .btn-action[disabled] { opacity: .55; cursor: progress; }
    .danger-zone { border-color: rgba(248,81,73,.25); }
    .danger-zone h3 { color: var(--danger); }
    .btn-danger { padding: 8px 16px; border: 1px solid rgba(248,81,73,.4); border-radius: 8px; background: rgba(248,81,73,.08); color: var(--danger); font-size: 0.82rem; cursor: pointer; }
    .btn-danger:hover { background: rgba(248,81,73,.15); border-color: var(--danger); }

    /* --- Device tokens (Companion-App, REQ-AUTH-007) --- */
    .devtok-reveal { margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--accent); border-radius: 8px; background: rgba(232,168,56,.08); }
    .devtok-reveal-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
    .devtok-reveal-row code { flex: 1; font-size: 0.8rem; padding: 6px 10px; border-radius: 6px; background: var(--bg-primary); color: var(--text); overflow-wrap: anywhere; }
    .devtok-reveal-row button { padding: 6px 14px; border: none; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 0.8rem; cursor: pointer; white-space: nowrap; }

    /* --- Upload --- */
    .up-area { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
    .up-card { flex: 1; min-width: 240px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
    .up-card h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
    .up-card p { font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 12px; line-height: 1.4; }
    .up-card .image-input-label { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px dashed var(--border); border-radius: 8px; cursor: pointer; font-size: 0.82rem; color: var(--text-secondary); transition: border-color .15s; }
    .up-card .image-input-label:hover { border-color: var(--accent); color: var(--text-primary); }
    .up-card input[type="file"] { display: none; }
    .up-status { font-size: 0.78rem; margin-top: 8px; min-height: 1.2em; }
    .up-status.ok { color: var(--success); }
    .up-status.err { color: var(--danger); }
    .up-errors { list-style: none; margin-top: 6px; font-size: 0.75rem; }
    .up-errors li { padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,.05); }

    @media (max-width: 520px) {
      .gal-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

      /* Mobile: Album header — compact but keep stats */
      .ah { margin-bottom: 12px; }
      .ah-title { font-size: 1.2rem; margin-bottom: 6px; }
      .ah-desc { font-size: 0.8rem; margin-bottom: 8px; }
      .ah-meta { font-size: 0.75rem; gap: 8px; }
      .ah-stats { margin-bottom: 8px; }
      .ah-stat { padding: 8px 6px; min-width: 62px; }
      .ah-stat-icon { width: 13px; height: 13px; margin-bottom: 3px; }
      .ah-stat-val { font-size: 1.1rem; }
      .ah-stat-lbl { font-size: 0.75rem; }
      .ah-goal { margin-bottom: 8px; }
      .ah-goal-label { font-size: 0.75rem; }

      /* Mobile: Subscribe section — keep visible but compact */
      #subscribe-section { margin-bottom: 12px; }
      .sub-form { gap: 6px; max-width: 100%; }
      .sub-form input { font-size: 0.8rem; padding: 6px 10px; }
      .sub-form button { font-size: 0.8rem; padding: 6px 12px; }
      .sub-msg { font-size: 0.75rem; }

      /* Mobile: Tabs — make prominent & scrollable, positioned after subscribe */
      .tabs {
        width: 100%;
        box-sizing: border-box;
        min-height: 48px;
        align-items: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 16px;
        background: var(--bg-primary);
        padding: 8px 4px;
        border-radius: 8px;
        /* Rand-Fade rechts als Hinweis, dass die Leiste horizontal scrollt
           (der 4. Tab „Einstellungen" liegt bei 375px außerhalb) */
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent 100%);
        mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent 100%);
      }
      .tabs::-webkit-scrollbar { display: none; }
      .tab {
        white-space: nowrap;
        padding: 10px 14px;
        font-size: 0.88rem;
        flex-shrink: 0;
      }
    }

/* === Touch-Ziele >= 40px auf Touch-Geräten (UI-Konzept D5) === */
@media (pointer: coarse) {
  .gi-del, .gi-cover { width: 38px; height: 38px; display: flex; }
  .strip-nav { min-width: 44px; min-height: 44px; }
  .gal-day-header { min-height: 44px; }
}

/* === Upload: Android-Picker-Hinweis + Ohne-GPS-Rueckmeldung (EXIF-Dreiklang) === */
.up-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
}
.up-nogps {
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-glow);
  border-radius: 8px;
}
.up-nogps a { color: var(--accent); font-weight: 600; }

/* === Herkunfts-Badge fuer approximierte Koordinaten (REQ-DB-004) === */
.geo-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px dashed rgba(232, 168, 56, .45);
  border-radius: 6px;
  padding: 1px 6px;
  vertical-align: 1px;
}

/* === Likes in der Lightbox + Galerie (REQ-LIKE-001) === */
.lb-like { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.lb-like .like-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px; padding: 6px 15px; cursor: pointer;
  color: #fff; font-size: 0.95rem; transition: all .15s;
}
.lb-like .like-btn:hover { border-color: var(--accent); color: var(--accent); }
.lb-like .like-btn.liked { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.like-heart { font-size: 1.2rem; line-height: 1; }
.like-btn.liked .like-heart { animation: like-pop .3s ease; }
@keyframes like-pop { 0%{transform:scale(1);} 50%{transform:scale(1.35);} 100%{transform:scale(1);} }
.like-count { font-variant-numeric: tabular-nums; }
.like-email-form { display: flex; gap: 6px; align-items: center; }
.like-email-submit { background: var(--accent); color: var(--accent-ink); border: none; border-radius: 6px; padding: 7px 12px; font-weight: 600; cursor: pointer; font-size: 0.82rem; }
.like-msg { font-size: 0.82rem; color: var(--accent); }

/* Like-Badge auf der Galerie-Kachel (immer sichtbar, unten links) */
.gi-likes {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  background: rgba(12,16,24,.72); color: #fff;
  font-size: 0.75rem; font-weight: 600;
  padding: 2px 8px; border-radius: 12px;
  display: inline-flex; align-items: center; gap: 3px;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .like-btn.liked .like-heart { animation: none; } }

/* === Trail-Marker (REQ-STATS-001) === */
/* Lightbox: erstes/letztes Trail-Foto markieren (nur Owner) */
.lb-trail { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.lb-trail-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px; padding: 6px 14px; cursor: pointer;
  color: #fff; font-size: 0.85rem; transition: all .15s;
}
.lb-trail-btn:hover { border-color: var(--accent); color: var(--accent); }
.lb-trail-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.lb-trail-btn .icon { width: 1em; height: 1em; }
/* Galerie-Kachel: Trail-Anfang/-Ende (oben mittig) */
.gi-trail {
  position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 2;
  background: var(--accent); color: var(--accent-ink);
  font-size: 0.75rem; font-weight: 700; letter-spacing: .02em;
  padding: 2px 9px; border-radius: 12px;
  display: inline-flex; align-items: center; gap: 4px;
  pointer-events: none; box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.gi-trail .icon { width: 0.9em; height: 0.9em; }

/* === Kommentare pro Tag (REQ-COMMENT-003) === */
.day-comments { margin: 6px 0 18px; }
.daycomments-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--border); color: var(--text-secondary);
  border-radius: 8px; padding: 7px 14px; cursor: pointer; font-size: 0.84rem; font-family: var(--font);
}
.daycomments-toggle:hover { color: var(--text-primary); border-color: var(--text-muted); }
.daycomments-count { color: var(--accent); font-weight: 600; }
.daycomments-chevron .icon { width: 1em; height: 1em; transition: transform .2s; }
.daycomments-toggle[aria-expanded="true"] .daycomments-chevron .icon { transform: rotate(180deg); }
.daycomments-body { margin-top: 12px; max-width: 640px; }
.daycomments-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.comment-entry { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 10px 13px; }
.comment-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.comment-author { font-size: 0.86rem; color: var(--text-primary); }
.comment-date { font-size: 0.75rem; color: var(--text-muted); }
.comment-content { font-size: 0.88rem; line-height: 1.5; color: var(--text-secondary); white-space: pre-wrap; }
.comment-actions { display: flex; gap: 10px; margin-top: 6px; }
.comment-reply-btn, .comment-del-btn {
  background: none; border: none; cursor: pointer; font-size: 0.76rem; padding: 2px 4px; font-family: var(--font);
  color: var(--text-muted);
}
.comment-reply-btn:hover { color: var(--accent); }
.comment-del-btn:hover { color: var(--danger); }
.comment-replies { margin-left: 16px; padding-left: 12px; border-left: 2px solid var(--border); margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.comment-empty { font-size: 0.82rem; color: var(--text-muted); }
.day-comments .comment-form { display: flex; flex-direction: column; gap: 8px; max-width: 420px; margin-top: 10px; }
.comment-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.comment-pending-msg { font-size: 0.8rem; color: var(--success); }
.comment-reply-slot .comment-form { margin-top: 8px; }

/* Re-Upload: Koordinaten ergänzt (REQ-UPLOAD-010) */
.up-merged { margin-top: 8px; padding: 8px 10px; font-size: 0.78rem; color: var(--success); background: rgba(52,208,88,.1); border-radius: 8px; }

/* === Teilen-Knopf im Albumkopf (FUNK-12) === */
.ah-share {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0;
  color: var(--accent); font: inherit; cursor: pointer;
}
.ah-share:hover, .ah-share:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.ah-share-note { margin-left: 8px; color: var(--text-muted); font-size: 0.85em; }

/* === A11Y: Bedienelemente mindestens 24 px hoch (WCAG 2.5.8) === */
.sub-remove { min-width: 28px; min-height: 28px; display: inline-flex; align-items: center; justify-content: center; }
.ah-share { min-height: 28px; padding: 4px 6px; }
.anav-link { min-height: 28px; }
.ah-meta a { display: inline-block; padding: 6px 0; }

/* FUNK-13: Absaetze in Bild-/Etappentexten */
.gi-cap-text p, #lb-caption p, .mp-caption p, .gal-stage-desc p { margin: 0 0 0.6em; }
.gi-cap-text p:last-child, #lb-caption p:last-child, .mp-caption p:last-child, .gal-stage-desc p:last-child { margin-bottom: 0; }

/* Melden (E-6) */
.report-dialog { max-width: 28rem; width: calc(100% - 32px); border: 1px solid var(--border, #ccc); border-radius: 12px;
  background: var(--bg-card, var(--bg)); color: var(--text); padding: 20px; }
.report-dialog::backdrop { background: rgba(0, 0, 0, .55); }
.report-dialog label { display: block; margin-top: 12px; font-size: .9rem; }
.report-dialog textarea, .report-dialog input { width: 100%; margin-top: 4px; }
.report-buttons { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.report-status { min-height: 1.2em; margin-top: 8px; color: var(--danger, #c0392b); font-size: .9rem; }

