/** ChallengeFlow: 05-content.css */
@layer components {
  /* Feeds, Challenges und Updates */
  .avatar.is-three-chars {
    font-size: 9px;
    letter-spacing: -.04em;
  }
  .avatar.big.is-three-chars {
    font-size: 17px;
  }
  .update-copy p {
    margin: 4px 0 0;
    color: var(--copy);
    font-size: 14px;
    line-height: 1.55;
  }
  .media-carousel {
    position: relative;
  }
  .media-strip::-webkit-scrollbar {
    display: none;
  }
  /* Der Bildzaehler ist eine Randnotiz, kein Etikett: oben mittig, klein
     und nur so kraeftig, dass er auf hellen Fotos noch lesbar bleibt. */
  .photo-counter {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    padding: 2px 8px;
    border: 0;
    border-radius: 0;
    background: rgba(10,10,10,.42);
    color: rgba(255,255,255,.86);
    font-size: 10px;
    font-weight: 550;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .media-arrow-left {
    left: 12px;
  }
  .media-arrow-right {
    right: 12px;
  }
  .update-fallback {
    margin-bottom: 6px;
  }
  .hero-actions {
    gap: 6px;
  }
  /* Unter dem Bild bleiben Like, Kommentar, Bearbeiten und Teilnahme links.
     Der Challenge-Vote ist das letzte Element und wird per auto-Rand rechts
     verankert. */
  .challenge-detail-page .challenge-detail-actions {
    width: 100%;
    justify-content: flex-start;
    align-items: center;
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }
  .detail-text {
    margin: 10px 0;
    color: var(--copy);
    font-size: 14px;
    line-height: 1.55;
  }
  .expandable-copy {
    min-width: 0;
  }
  .expandable-copy-label {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 11.5px;
    font-weight: 700;
  }
  .expandable-copy-text {
    margin: 0;
    color: var(--copy);
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-line;
    overflow-wrap: anywhere;
  }
  .expandable-copy.is-collapsible:not(.is-expanded) .expandable-copy-text {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--expandable-lines,3);
  }
  .expandable-lines-1 { --expandable-lines: 1; }
  .expandable-lines-2 { --expandable-lines: 2; }
  .expandable-lines-3 { --expandable-lines: 3; }
  .expandable-lines-4 { --expandable-lines: 4; }
  .expandable-lines-5 { --expandable-lines: 5; }
  .expandable-lines-6 { --expandable-lines: 6; }
  .expandable-copy.is-dynamic:not(.has-overflow) .expandable-copy-toggle {
    display: none;
  }
  .expandable-copy-toggle {
    margin-top: 3px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
  }
  .expandable-copy-toggle:hover {
    text-decoration: underline;
  }
  .update-text-expandable {
    margin: 10px 0;
  }
  .update-text-expandable .expandable-copy-text {
    color: var(--copy);
    font-size: 14px;
    line-height: 1.55;
  }
  .update-text-expandable .expandable-copy-toggle {
    margin-top: 5px;
  }
  .comment-panel {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }
  .comment-panel-summary {
    display: grid;
    grid-template-columns: auto auto minmax(0,1fr);
    align-items: center;
    column-gap: 6px;
    min-height: 42px;
    padding: 0 2px;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    font-weight: 700;
  }
  .comment-panel-summary::-webkit-details-marker { display: none; }
  .comment-panel-summary::marker { content: ''; }
  .comment-panel-count {
    min-width: 0;
    padding-left: 2px;
    text-align: left;
    color: var(--muted);
    font-family: var(--font-data);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
  }
  .comment-panel-summary svg {
    justify-self: end;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .16s ease;
  }
  .comment-panel[open] > .comment-panel-summary svg { transform: rotate(180deg); }
  .comment-panel-body { padding-top: 10px; }
  .comments {
    display: grid;
    gap: 0;
  }
  .comment-thread {
    min-width: 0;
    border-bottom: 1px solid var(--line);
  }
  .comment-thread:last-child {
    border-bottom: 0;
  }
  .comment-thread .comment-thread {
    border-bottom: 0;
  }
  .comment-replies {
    margin-left: 44px;
    padding-left: 12px;
    border-left: 1px solid var(--line);
  }
  .comment-replies > .comment-thread + .comment-thread {
    border-top: 1px solid var(--line);
  }
  .comment-replies .comment-replies {
    margin-left: 34px;
  }
  .comment-body {
    min-width: 0;
  }
  .comment-avatar.avatar.mini {
    width: 34px;
    height: 34px;
    margin-top: 1px;
    font-size: 10px;
  }
  .comment.reply {
    padding-left: 0;
    border-left: 0;
    margin-left: 0;
  }
  .comment-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-start;
    column-gap: 8px;
    row-gap: 2px;
    min-width: 0;
    font-size: 12.5px;
  }
  .comment-head strong {
    flex: 0 0 auto;
    max-width: 100%;
    min-width: 0;
    color: var(--text);
    overflow-wrap: anywhere;
  }
  .comment-head-meta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    margin-left: auto;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.25;
  }
  .comment-head-meta .meta {
    font-size: inherit;
    line-height: inherit;
  }
  .edited-marker {
    display: inline-flex;
    align-items: center;
    border-radius: 0;
    padding: 2px 6px;
    background: var(--soft);
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 650;
    line-height: 1.2;
    vertical-align: middle;
  }
  .comment-text {
    margin: 5px 0 3px;
    color: var(--copy);
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .comment-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
  }
  .comment-like-button {
    min-width: 28px;
    height: 28px;
    margin-left: 0;
    padding: 0 5px;
    border: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: transparent;
    color: var(--text);
    font-family: var(--font-data);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
  }
  .comment-actions .tiny-link + .comment-like-button {
    margin-left: 6px;
  }
  .comment-like-button-heart {
    display: inline-grid;
    place-items: center;
    color: var(--muted);
    transition: color .15s ease;
  }
  .comment-like-button-heart .ui-icon {
    width: 15px;
    height: 15px;
    fill: none;
  }
  .comment-like-button-count {
    color: var(--text);
  }
  .comment-like-button:hover,
  .comment-like-button:focus-visible {
    background: var(--soft);
  }
  .comment-like-button:hover .comment-like-button-heart,
  .comment-like-button:focus-visible .comment-like-button-heart {
    color: var(--text);
  }
  .comment-like-button:active { transform: scale(.96); }
  .comment-like-button.is-active .comment-like-button-heart {
    color: #c51f3a;
  }
  .comment-like-button.is-active .comment-like-button-heart .ui-icon {
    fill: currentColor;
  }
  html.is-android-webview .comment[data-app-comment-double-like="true"] {
    touch-action: manipulation;
  }
  .comment-edit-toggle,
  .comment-delete-toggle {
    width: 25px;
    height: 25px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: transparent;
    color: var(--muted);
    opacity: .72;
  }
  .comment-edit-toggle:hover {
    background: var(--soft);
    color: var(--text);
    opacity: 1;
  }
  .comment-delete-toggle:hover {
    background: color-mix(in srgb, var(--danger) 12%, transparent);
    color: var(--danger);
    opacity: 1;
  }
  .comment-edit-toggle svg,
  .comment-delete-toggle svg {
    width: 13px;
    height: 13px;
  }
  .comment-edit-form {
    display: grid;
    gap: 9px;
    margin-top: 8px;
  }
  .comment-edit-form[hidden] { display: none; }
  .comment-edit-form textarea {
    width: 100%;
    min-height: 78px;
    resize: vertical;
    border: 1px solid var(--line-strong);
    border-radius: 0;
    padding: 10px 11px;
    background: var(--input);
    color: var(--text);
    line-height: 1.45;
  }
  .comment-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }
  .comment.is-editing .comment-text,
  .comment.is-editing .comment-actions { display: none; }
  .mention {
    color: var(--accent);
    font-weight: 700;
  }
  .country-challenges .challenge-card {
    margin-bottom: 0;
  }
  .country-challenges .challenge-card .photo {
    aspect-ratio: 4/3;
  }
  .update-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--post-radius);
    padding: 14px;
    background: #fff;
    box-shadow: var(--card-shadow);
  }
  /* Reihenfolge wie in sozialen Feeds: wer, dann das Bild, dann die
     Aktionen, dann der Text. Like und Kommentar liegen damit direkt unter
     dem Bild und auf dem Telefon im Daumenbereich. */
  .update-card:not(.discover-challenge-card) > .update-header {
    order: 1;
  }
  .update-card:not(.discover-challenge-card) > .media-carousel,
  .update-card:not(.discover-challenge-card) > .image-fallback,
  .update-card:not(.discover-challenge-card) > .update-text-poster,
  .update-card:not(.discover-challenge-card) > .text-update-card {
    order: 2;
  }
  .update-card:not(.discover-challenge-card) > .actionbar {
    order: 3;
  }
  .update-card:not(.discover-challenge-card) > .update-copy {
    order: 4;
    margin-top: 4px;
  }
  /* Die direkte Diskussion ist bewusst Desktop-exklusiv. Auf kleineren
     Ansichten bleibt der bisherige Wechsel in die Update-Detailseite erhalten. */
  .update-inline-discussion {
    display: none;
    order: 5;
  }
  .comment.is-new-comment {
    background: var(--accent-soft);
    box-shadow: inset 3px 0 0 var(--accent);
  }
  .update-header {
    padding: 2px 2px 0;
    margin-bottom: 12px;
  }
  /* Favoriten in Entdecken > Updates muessen in Browser und Android-WebView
     in derselben Kopfzeile sichtbar und bedienbar bleiben. Die Desktop-
     Split-Layout-Regeln duerfen diese Basis spaeter nur verfeinern. */
  .update-card.is-split-layout .update-header-shell {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }
  .update-card.is-split-layout .update-header-owner {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }
  .update-card.is-split-layout .update-owner-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .update-card.is-split-layout .update-header-stage {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-left: auto;
  }
  .update-card.is-split-layout .update-header-stage .challenge-favorite-button {
    width: 100%;
  }
  .update-card.is-split-layout .update-stage-badge {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    align-self: flex-end;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--update-progress-accent);
    font-family: var(--font-data);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .08em;
    line-height: 1.25;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .discover-update-copy.is-preview-link {
    cursor: pointer;
  }
  .discover-update-copy.is-preview-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
  }
  .userline {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  .userline>div:last-child {
    min-width: 0;
  }
  .userline strong {
    font-size: 13px;
    font-weight: 650;
  }
  .avatar {
    border-radius: 0;
    color: var(--accent-ink);
    display: grid;
    place-items: center;
    font-family: var(--font-data);
    font-size: 12px;
    letter-spacing: .04em;
    background: var(--accent);
    font-weight: 600;
    box-shadow: none;
  }
  .avatar.has-image {
    overflow: hidden;
    background: var(--soft);
    color: transparent;
  }
  .avatar.has-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .avatar.mini {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }
  .avatar.big {
    margin-bottom: 8px;
    width: 76px;
    height: 76px;
    font-size: 22px;
    margin: 0 auto 12px;
  }
  .update-location {
    display: block;
    font-weight: 500;
    line-height: 1.25;
    font-size: 11.5px;
    color: #767676;
    margin-top: 1px;
  }
  .update-location-edited {
    display: inline-grid;
    place-items: center;
    width: 12px;
    height: 12px;
    margin-left: 3px;
    color: inherit;
    font-style: normal;
    vertical-align: -2px;
  }
  .update-location-edited .ui-icon {
    width: 11px;
    height: 11px;
  }
  .media-carousel, .media-strip {
    border-radius: var(--photo-radius);
  }
  .media-strip {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    border-radius: var(--photo-radius);
    gap: 0;
    background: #f4f4f4;
    max-height: min(520px,64vh);
  }
  .media-frame {
    position: relative;
    flex: 0 0 100%;
    scroll-snap-align: start;
    aspect-ratio: var(--photo-ratio);
    max-height: min(520px,64vh);
    overflow: hidden;
  }
  /* Standardbrowser verwenden weiterhin das normale responsive Medienlayout.
     Der Android-WebView-Fallback steht bewusst in 30-responsive.css und wird
     nur ueber html.is-android-webview aktiviert. */
  .media-photo-button {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
  }
  .media-photo-button:focus-visible {
    outline: 3px solid var(--accent-glow);
    outline-offset: -4px;
  }
  .media-upload-caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    max-height: 54%;
    padding: 48px 14px 12px;
    background: linear-gradient(180deg,transparent,rgba(0,0,0,.78) 45%,rgba(0,0,0,.9));
    color: #fff;
    cursor: default;
  }
  .media-upload-caption .expandable-copy-text {
    color: #fff;
    font-size: 13px;
    line-height: 1.42;
    text-shadow: 0 1px 3px rgba(0,0,0,.65);
  }
  .media-upload-caption.is-collapsible:not(.is-expanded) .expandable-copy-text {
    -webkit-line-clamp: 2;
  }
  .media-upload-caption.is-expanded {
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .media-upload-caption .expandable-copy-toggle {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.75);
  }
  .update-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: saturate(1.01) contrast(1.005);
  }
  .update-video {
    background: #17181c;
    pointer-events: none;
  }
  .media-frame.is-video .media-photo-button,
  .card-media-video {
    background: #17181c;
  }
  .card-media-video {
    position: relative;
    overflow: hidden;
  }
  .card-media-video .photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
  }
  .media-play-indicator {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 50%;
    background: rgba(12,12,14,.68);
    color: #fff;
    box-shadow: 0 9px 28px rgba(0,0,0,.28);
    transform: translate(-50%,-50%);
    pointer-events: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .media-play-indicator svg {
    width: 20px;
    height: 20px;
    margin-left: 2px;
    fill: currentColor;
    stroke: currentColor;
  }
  .media-video-backdrop {
    position: absolute;
    z-index: 0;
    inset: 0;
    background: radial-gradient(circle at 50% 42%,#0a0a0a 0,#17181c 52%,#0a0a0a 100%);
    pointer-events: none;
  }
  .media-carousel.is-detail-media, .media-strip.is-detail-media {
    background: #0a0a0a;
  }
  .media-strip.is-detail-media {
    max-height: none;
  }
  .media-strip.is-detail-media .media-frame {
    height: min(72vh,720px);
    min-height: 360px;
    max-height: none;
    aspect-ratio: auto;
  }
  .media-strip.is-detail-media .update-photo {
    object-fit: contain;
  }
  .media-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 36px;
    height: 52px;
    padding: 0;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 0;
    background: rgba(20,20,22,.72);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.24);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: .88;
    transition: opacity .18s ease,background-color .18s ease,transform .18s ease,visibility .18s ease;
  }
  .media-arrow svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .media-arrow:hover {
    opacity: 1;
    background: rgba(20,20,22,.92);
    transform: translateY(-50%) scale(1.03);
  }
  .media-arrow:active {
    transform: translateY(-50%) scale(.96);
  }
  .media-arrow.is-hidden {
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
  }
  .update-copy {
    margin: 12px 4px 4px;
  }
  /* Im Entdecken-Feed steht zuerst die zugehörige Challenge. Der konkrete
     Tagesstand ordnet das Update darunter ein; anschließend folgt der Text. */
  .update-card .discover-update-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  /* Medien-Updates zeigen in der Vorschau nur den Update-Stand und den
     eigentlichen Update-Text. Der Challenge-Titel gehört nicht in diese
     zweite Inhaltsfläche und wird deshalb bewusst nicht mehr gerendert. */
  .update-card .discover-update-progress {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    color: var(--text);
    font-family: var(--font-data);
    font-size: clamp(14px,1.3vw,18px);
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.2;
    text-transform: uppercase;
  }
  .update-card .discover-update-progress .update-progress-values {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
  }
  .update-card .discover-update-progress .update-progress-current {
    font: inherit;
    font-weight: 900;
  }
  .update-card .discover-update-progress .update-progress-separator,
  .update-card .discover-update-progress .update-progress-total {
    color: inherit;
  }
  .update-card .discover-update-text {
    margin: 0;
    color: var(--text);
    font-size: clamp(17px,1.45vw,20px);
    font-weight: 600;
    line-height: 1.5;
  }
  .link-title:hover {
    color: var(--accent);
  }
  .update-copy p, .detail-text {
    font-size: 14px;
    line-height: 1.55;
    color: var(--copy);
  }
  .image-fallback {
    aspect-ratio: var(--photo-ratio);
    max-height: var(--media-max-h);
    border-radius: var(--photo-radius);
    display: grid;
    place-items: center;
    font-size: 12px;
    background: #f4f4f4;
    color: #767676;
    font-weight: 550;
  }

  /* Text-Updates erhalten statt der leeren Medienfläche eine eigenständige,
     typografische Bühne. Es wird kein künstliches Bild gespeichert: Die Karte
     liest ausschließlich die bereits vorhandenen Update-Daten aus. */
  .update-text-poster {
    position: relative;
    isolation: isolate;
    width: 100%;
    min-height: min(520px,64vh);
    max-height: min(520px,64vh);
    aspect-ratio: var(--photo-ratio);
    overflow: hidden;
    display: flex;
    border: 1px solid var(--text);
    border-radius: var(--photo-radius);
    background: var(--card);
    color: var(--text);
  }
  .update-text-poster.is-clickable-text-poster {
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  }
  .update-text-poster.is-clickable-text-poster:hover {
    border-color: var(--accent);
    box-shadow: 0 14px 34px rgba(0,0,0,.12);
  }
  .update-text-poster.is-clickable-text-poster:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-color: var(--accent);
  }

  /* Round 86: bildlose Full-Feed-Updates sind eine eigenständige Komponente.
     Die alte Poster-Komponente bleibt nur für Compact-/Detailansichten. */
  /* Gemeinsame Farbverantwortung fuer alle TAG-X-VON-Y-Komponenten.
     Layout/Typografie bleiben kontextspezifisch; die Farbe von X kommt nur hierher. */
  .update-progress-current {
    color: var(--update-progress-accent);
  }

  .text-update-card {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: clamp(650px,74vh,780px);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    isolation: isolate;
  }
  .text-update-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
  }
  .text-update-card-accent {
    position: absolute;
    z-index: 0;
    inset: 0 auto 0 0;
    width: 10px;
    background: var(--update-progress-accent);
    pointer-events: none;
  }
  .text-update-card-corner {
    position: absolute;
    z-index: 0;
    top: 24px;
    right: 24px;
    width: 22px;
    height: 22px;
    border-top: 2px solid var(--update-progress-accent);
    border-right: 2px solid var(--update-progress-accent);
    pointer-events: none;
  }
  .text-update-card-layout {
    position: relative;
    z-index: 1;
    height: 100%;
    min-height: inherit;
    padding: clamp(34px,4.5vw,54px) clamp(32px,5vw,62px) clamp(36px,4.8vw,58px) clamp(42px,5.8vw,72px);
    display: grid;
    grid-template-rows: auto minmax(170px,1fr) auto;
    gap: clamp(24px,3.5vh,38px);
  }
  .text-update-card-head {
    min-width: 0;
  }
  .text-update-card-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin: 0 0 14px;
    padding: 4px 8px;
    border: 1px solid var(--text);
    color: var(--text);
    font-family: var(--font-data);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
  }
  .text-update-card-title,
  .text-update-card-stream-text {
    width: min(100%,780px);
    margin: 0;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 850;
    letter-spacing: -.045em;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .text-update-card-title {
    font-size: clamp(28px,4vw,48px);
    line-height: 1.04;
    -webkit-line-clamp: 3;
  }
  .text-update-card-stream-text {
    /* Die vier Dichtestufen halten den Text sichtbar und auffällig, ohne den
       Fortschrittsblock aus der Karte zu drängen. Die Zeilenzahl wächst nur
       zusammen mit der leicht kleineren Schrift, damit die belegte Fläche
       annähernd stabil bleibt. WebKit setzt die Ellipse nur bei echtem Overflow. */
    font-size: var(--text-update-stream-size);
    line-height: var(--text-update-stream-line-height);
    -webkit-line-clamp: var(--text-update-stream-lines);
  }
  .text-update-card-stream-text.is-copy-short {
    --text-update-stream-size: clamp(28px,4vw,42px);
    --text-update-stream-line-height: 1.06;
    --text-update-stream-lines: 4;
  }
  .text-update-card-stream-text.is-copy-medium {
    --text-update-stream-size: clamp(25px,3.4vw,36px);
    --text-update-stream-line-height: 1.08;
    --text-update-stream-lines: 5;
  }
  .text-update-card-stream-text.is-copy-long {
    --text-update-stream-size: clamp(22px,2.8vw,31px);
    --text-update-stream-line-height: 1.1;
    --text-update-stream-lines: 6;
  }
  .text-update-card-stream-text.is-copy-very-long {
    --text-update-stream-size: clamp(19px,2.35vw,27px);
    --text-update-stream-line-height: 1.12;
    --text-update-stream-lines: 7;
  }
  .text-update-card-middle {
    display: grid;
    place-items: baseline;
    align-items: center;
    min-height: 0;
  }
  .text-update-card-middle.has-stream-copy {
    align-content: center;
    align-items: start;
    justify-items: start;
    gap: clamp(14px,1.8vh,20px);
  }
  .text-update-card.is-challenge-stream-text-card .text-update-card-stream-text {
    width: 100%;
    padding-top: clamp(12px,1.6vh,16px);
    border-top: 1px solid var(--text);
  }
  .text-update-card-progress {
    display: grid;
    justify-items: start;
    align-content: center;
    min-height: 0;
    color: var(--text);
    font-family: var(--font-data);
    font-variant-numeric: tabular-nums;
  }
  .text-update-card-progress .update-progress-label {
    padding-bottom: 4px;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1;
    text-transform: uppercase;
  }
  .text-update-card-progress .update-progress-values {
    display: inline-flex;
    align-items: flex-end;
    gap: 10px;
    margin-left: 12px;
  }
  .text-update-card-progress .update-progress-current {
    font-family: var(--font-display);
    font-size: clamp(82px,11vw,136px);
    font-weight: 900;
    letter-spacing: -.075em;
    line-height: .72;
  }
  .text-update-card-progress .update-progress-separator,
  .text-update-card-progress .update-progress-total {
    align-self: flex-end;
    padding-bottom: 4px;
    color: var(--text);
    font-size: clamp(12px,1.45vw,17px);
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.1;
    text-transform: uppercase;
  }
  .text-update-card-progress.is-generic {
    display: block;
  }
  .text-update-card-progress.is-generic strong {
    font-size: clamp(44px,7vw,88px);
    line-height: .9;
    text-transform: uppercase;
  }
  .text-update-card-foot {
    min-width: 0;
  }
  .text-update-card-rule {
    display: block;
    width: 100%;
    height: 1px;
    margin: 0 0 18px;
    background: var(--text);
    opacity: .72;
  }
  .text-update-card-description {
    width: min(100%,66ch);
    margin: 0;
    color: var(--copy);
    font-family: var(--font-copy);
    font-size: clamp(16px,1.55vw,19px);
    font-weight: 500;
    line-height: 1.55;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
  }
  .text-update-card-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
  }

  .update-text-poster-accent {
    position: absolute;
    z-index: 0;
    top: 0;
    bottom: 0;
    left: 0;
    width: 10px;
    background: var(--update-progress-accent);
    pointer-events: none;
  }
  .update-text-poster::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: 22px;
    right: 22px;
    width: 22px;
    height: 22px;
    border-top: 2px solid var(--update-progress-accent);
    border-right: 2px solid var(--update-progress-accent);
    pointer-events: none;
  }
  .update-text-poster-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    padding: clamp(28px,4.2vw,48px) clamp(28px,4.4vw,52px) clamp(30px,4.4vw,50px) clamp(36px,5vw,60px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  .update-text-poster-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    margin: 0 0 14px;
    padding: 4px 8px;
    border: 1px solid var(--text);
    color: var(--text);
    background: var(--card);
    font-family: var(--font-data);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
  }
  .update-text-poster-title {
    width: min(100%,780px);
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font-family: var(--font-display);
    font-size: clamp(28px,4vw,48px);
    font-weight: 850;
    letter-spacing: -.045em;
    line-height: 1.02;
    text-align: left;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }
  /* Lange Challenge-Titel dürfen die Tages-/Fortschrittsanzeige nicht
     verdrängen. Nur bei längeren Titeln wird die Schrift moderat reduziert;
     extrem lange Titel bleiben auf zwei Zeilen begrenzt und erhalten bei
     weiterem Überlauf eine Ellipse. Der vollständige Titel bleibt über das
     title-Attribut erreichbar. */
  .update-text-poster-title.is-long-title {
    font-size: clamp(24px,3.25vw,40px);
    line-height: 1.04;
    text-wrap: balance;
    -webkit-line-clamp: 2;
  }
  .update-text-poster-title.is-very-long-title {
    font-size: clamp(21px,2.75vw,34px);
    line-height: 1.06;
    text-wrap: balance;
    -webkit-line-clamp: 2;
  }
  .update-text-poster-title:hover,
  .update-text-poster-title:focus-visible {
    color: var(--accent);
  }
  .update-text-poster-progress {
    display: grid;
    justify-items: start;
    margin: auto 0 18px;
    color: var(--text);
    font-family: var(--font-data);
    font-variant-numeric: tabular-nums;
  }
  .update-text-poster-progress .update-progress-label {
    padding-bottom: 4px;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1;
    text-transform: uppercase;
  }
  .update-text-poster-progress .update-progress-values {
    display: inline-flex;
    align-items: flex-end;
    gap: 10px;
    margin-left: 12px;
  }
  .update-text-poster-progress .update-progress-current {
    font-family: var(--font-display);
    font-size: clamp(70px,10vw,126px);
    font-weight: 900;
    letter-spacing: -.075em;
    line-height: .72;
  }
  .update-text-poster-progress .update-progress-separator,
  .update-text-poster-progress .update-progress-total {
    align-self: flex-end;
    padding-bottom: 3px;
    color: var(--text);
    font-size: clamp(12px,1.45vw,17px);
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.1;
    text-transform: uppercase;
  }
  .update-text-poster-progress.is-generic {
    display: block;
    margin-top: auto;
  }
  .update-text-poster-progress.is-generic strong {
    display: block;
    font-size: clamp(42px,7vw,86px);
    line-height: .86;
    text-transform: uppercase;
  }
  .update-text-poster-rule {
    width: 100%;
    height: 1px;
    margin: 0 0 18px;
    background: var(--text);
  }
  .update-text-poster-description-wrap {
    width: min(100%,66ch);
    min-width: 0;
  }
  .update-text-poster-description {
    width: 100%;
    margin: 0;
    color: var(--copy);
    font-family: var(--font-copy);
    font-size: clamp(16px,1.55vw,19px);
    font-weight: 500;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }
  .update-text-poster-description-wrap > .update-text-poster-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
  }
  .update-text-poster-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
  }
  .update-text-poster.is-compact-text-poster {
    min-height: 0;
    max-height: none;
    aspect-ratio: 4/5;
  }
  .update-text-poster.is-compact-text-poster .update-text-poster-inner {
    padding: 20px 20px 22px 28px;
  }
  .update-text-poster.is-compact-text-poster::after {
    top: 16px;
    right: 16px;
    width: 16px;
    height: 16px;
  }
  .update-text-poster.is-compact-text-poster .update-text-poster-kicker {
    margin-bottom: 10px;
    font-size: 8.5px;
  }
  .update-text-poster.is-compact-text-poster .update-text-poster-title {
    font-size: clamp(19px,2vw,27px);
    line-height: 1.05;
    -webkit-line-clamp: 2;
  }
  .update-text-poster.is-compact-text-poster .update-text-poster-title.is-long-title,
  .update-text-poster.is-compact-text-poster .update-text-poster-title.is-very-long-title {
    font-size: clamp(17px,1.75vw,23px);
    line-height: 1.08;
  }
  .update-text-poster.is-compact-text-poster .update-text-poster-progress {
    margin-bottom: 13px;
    column-gap: 9px;
  }
  .update-text-poster.is-compact-text-poster .update-progress-current {
    font-size: clamp(52px,6vw,76px);
  }
  .update-text-poster.is-compact-text-poster .update-progress-separator,
  .update-text-poster.is-compact-text-poster .update-progress-total {
    font-size: 11px;
  }
  .update-text-poster.is-compact-text-poster .update-text-poster-rule {
    margin-bottom: 13px;
  }
  .update-text-poster.is-compact-text-poster .update-text-poster-description {
    font-size: 14px;
    line-height: 1.48;
  }
  .update-text-poster.is-compact-text-poster .update-text-poster-description-wrap > .update-text-poster-description {
    -webkit-line-clamp: 3;
  }
  .update-text-poster.is-detail-text-poster {
    min-height: clamp(430px,58vw,680px);
    max-height: none;
    aspect-ratio: auto;
    border: 0;
  }
  .update-text-poster.is-detail-text-poster .update-text-poster-inner {
    padding: clamp(34px,5vw,64px) clamp(32px,6vw,76px) clamp(38px,5.5vw,68px) clamp(42px,7vw,88px);
  }
  .update-text-poster.is-detail-text-poster .update-text-poster-title.has-overflow {
    cursor: pointer;
  }
  /* In der Detailansicht bleibt der Challenge-Titel selbst immer in seiner
     normalen Textfarbe. Nur die sichtbare Kürzung wird als Interaktionshinweis
     akzentuiert; beim Aufklappen verschwindet sie vollständig. */
  .update-text-poster.is-detail-text-poster .update-text-poster-title:hover,
  .update-text-poster.is-detail-text-poster .update-text-poster-title:focus-visible {
    color: var(--text);
  }
  .update-text-poster.is-detail-text-poster .update-text-poster-title.has-overflow:not(.is-expanded)::after {
    content: "...";
    position: absolute;
    right: 0;
    bottom: 0;
    min-width: 1.55em;
    padding-left: .08em;
    background: var(--card);
    color: var(--accent);
    font: inherit;
    letter-spacing: 0;
    line-height: inherit;
    text-align: right;
    pointer-events: none;
  }
  .update-text-poster.is-detail-text-poster .update-text-poster-title.has-overflow:not(.is-expanded) {
    position: relative;
  }
  .update-text-poster.is-detail-text-poster .update-text-poster-title.has-overflow:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
  }
  .update-text-poster.is-detail-text-poster .update-text-poster-title.is-expanded {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
  }
  .update-text-poster.is-detail-text-poster .update-text-poster-progress {
    margin-top: 0;
    padding-top: 24px;
  }
  .update-text-poster.is-detail-text-poster .update-text-poster-description,
  .update-text-poster.is-detail-text-poster .expandable-copy-text {
    font-size: clamp(17px,1.7vw,21px);
    line-height: 1.62;
  }
  .update-text-poster-expandable {
    width: min(100%,72ch);
    margin: 0;
  }
  .update-text-poster-expandable .expandable-copy-toggle {
    margin-top: 10px;
  }
  .update-detail-gallery.is-text-only-gallery {
    margin-top: 16px;
    background: var(--card);
  }
  .update-detail-location {
    display: inline-flex;
    margin: -4px 0 12px;
    border-radius: 0;
    color: var(--muted);
    font-size: 11.5px;
    border: 0;
    background: var(--soft);
    padding: 5px 10px;
    font-weight: 550;
  }
  /* Die geöffnete Update-Ansicht verwendet dieselbe großzügige Bildbühne
     wie das Hauptbild einer Challenge. Feed-Karten bleiben bewusst kompakt. */
  .update-detail-page {
    max-width: 1040px;
  }
  .update-detail-gallery {
    margin: 16px 0 20px;
  }
  .update-detail-gallery .media-carousel,
  .update-detail-gallery .media-strip {
    border-radius: 0;
    background: transparent;
  }
  .update-detail-gallery .media-strip.is-detail-media {
    overflow: hidden;
  }
  .update-detail-gallery .media-strip.is-detail-media .media-frame {
    height: clamp(480px,68vw,860px);
    min-height: 0;
    max-height: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
    background: #0a0a0a;
  }
  .update-detail-gallery .update-media-backdrop {
    position: absolute;
    z-index: 0;
    inset: -9%;
    width: 118%;
    height: 118%;
    object-fit: cover;
    object-position: center;
    opacity: .68;
    filter: blur(34px) brightness(.42) saturate(1.16);
    transform: scale(1.05);
    pointer-events: none;
  }
  .update-detail-gallery .media-strip.is-detail-media .media-photo-button {
    position: relative;
    z-index: 1;
    inset: auto;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .update-detail-gallery .media-strip.is-detail-media .update-photo {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    filter: drop-shadow(0 28px 64px rgba(0,0,0,.56));
  }
  .update-detail-gallery .image-fallback {
    min-height: min(48vh,420px);
    border: 0;
    border-radius: 0;
    display: grid;
    place-items: center;
    background: rgba(18,18,20,.72);
  }
  .grid.challenge-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit,minmax(360px,1fr));
  }
  .challenge-card:hover {
    transform: translate(-2px,-2px);
    box-shadow: 6px 6px 0 var(--text);
  }
  .challenge-card .photo {
    width: 100%;
    min-height: 260px;
    object-fit: cover;
    object-position: center;
    display: block;
    aspect-ratio: 4/3;
  }
  .challenge-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px;
  }
  .challenge-body h3 {
    font-family: var(--font-display);
    color: var(--text);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.06;
    text-transform: uppercase;
    margin: 4px 0 8px;
  }
  .challenge-body p {
    margin: 0 0 10px;
    color: var(--copy);
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 14px;
  }
  .challenge-detail-page {
    position: relative;
    width: 100%;
    max-width: 1280px;
    min-width: 0;
    padding: 0 0 72px;
    color: var(--text);
    isolation: isolate;
  }
  .challenge-detail-page > * {
    min-width: 0;
  }
  .challenge-detail-page::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -40px;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background:
      radial-gradient(circle at 50% -8%,var(--accent-glow),transparent 30%),
      linear-gradient(180deg,#0a0a0a 0,#08090b 38%,#000 100%);
  }
  .challenge-hero {
    position: relative;
    padding: 28px;
  }
  .challenge-detail-surface {
    position: relative;
    overflow: hidden;
    padding: 18px 24px 30px;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 0;
    background:
      radial-gradient(circle at top,var(--accent-glow),transparent 34%),
      linear-gradient(145deg,rgba(28,28,31,.82),rgba(12,12,14,.78));
    box-shadow: 0 28px 84px rgba(0,0,0,.48);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
  }
  .challenge-detail-surface::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg,rgba(255,255,255,.025),transparent 18%);
  }
  .challenge-detail-surface > * {
    position: relative;
    z-index: 1;
  }
  .hero-row h1 {
    font-family: var(--font-display);
    font-size: clamp(32px,4vw,48px);
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: .98;
    text-transform: uppercase;
  }
  .hero-row {
    align-items: flex-start;
    margin-top: 0;
    gap: 20px;
  }
  .challenge-hero-head {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 14px;
  }
  .challenge-hero-copy {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    justify-items: start;
    gap: 8px;
    text-align: left;
  }
  .challenge-detail-topbar {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 8px;
  }
  .challenge-detail-category-slot {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    max-width: min(56%,220px);
  }
  .challenge-detail-category-slot .challenge-category-badge {
    max-width: 100%;
    border-color: rgba(255,255,255,.16);
    background: rgba(8,9,12,.28);
  }
  .challenge-detail-title {
    max-width: 100%;
    display: block;
    overflow: visible;
    overflow-wrap: anywhere;
    hyphens: auto;
    text-wrap: balance;
    margin: 14px 0 11px;
    padding-block: 2px;
    font-size: clamp(30px,3.6vw,44px);
    font-weight: 900;
    letter-spacing: -.048em;
    line-height: 1.02;
    text-shadow: 0 8px 24px rgba(0,0,0,.12);
  }
  .challenge-detail-meta {
    width: 100%;
    margin: 2px 0 0;
    display: grid;
    grid-template-columns: minmax(0,1fr);
    align-items: start;
    gap: 9px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
  }
  .challenge-detail-owner,
  .challenge-detail-dates {
    display: inline-flex;
    align-items: center;
    gap: 7px;
  }
  .challenge-detail-owner svg,
  .challenge-detail-dates > svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: var(--accent-2);
  }
  .challenge-detail-owner strong {
    color: var(--text);
    font-weight: 680;
  }
  .challenge-detail-participants-meta {
    min-width: 0;
    display: flex;
    align-items: center;
    margin: 0;
  }
  .challenge-detail-dates > span:not(.challenge-detail-date-arrow) {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    color: var(--copy);
  }
  .challenge-detail-dates small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 720;
    letter-spacing: .07em;
    text-transform: uppercase;
  }
  .challenge-detail-date-arrow {
    color: var(--muted);
    opacity: .72;
  }
  .challenge-category-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid var(--line-strong);
    background: color-mix(in srgb,var(--surface) 86%,var(--accent) 14%);
    color: var(--muted);
    font-family: var(--font-data);
    font-size: 10.5px;
    font-weight: 720;
    letter-spacing: .035em;
    line-height: 1.2;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .challenge-category-badge.is-compact {
    min-height: 21px;
    padding: 2px 7px;
    font-size: 9.5px;
  }
  /* Die Detailansicht zeigt immer genau ein großes Bild. Der gemeinsame
     Slider bleibt für Pfeile, Wischen, Punktnavigation und Foto-Modal zuständig. */
  .challenge-detail-gallery {
    --challenge-detail-media-height: clamp(402px,50vw,648px);
    margin: 22px 0 20px;
  }
  .challenge-detail-gallery .media-carousel,
  .challenge-detail-gallery .media-strip {
    border-radius: 0;
    background: transparent;
  }
  .challenge-detail-gallery .media-strip.is-detail-media {
    /* Android WebView kann den Flex-Container sonst auf 0 px Höhe reduzieren,
       obwohl der enthaltene media-frame bereits korrekt dimensioniert ist. */
    height: var(--challenge-detail-media-height);
    min-height: var(--challenge-detail-media-height);
    overflow: hidden;
  }
  .challenge-detail-gallery .media-strip.is-detail-media .media-frame {
    height: var(--challenge-detail-media-height);
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
    background: #0a0a0a;
  }
  .challenge-detail-gallery .challenge-media-backdrop {
    position: absolute;
    z-index: 0;
    inset: -9%;
    width: 118%;
    height: 118%;
    object-fit: cover;
    object-position: center;
    opacity: .68;
    filter: blur(34px) brightness(.42) saturate(1.16);
    transform: scale(1.05);
    pointer-events: none;
  }
  .challenge-detail-gallery .media-strip.is-detail-media .media-photo-button {
    position: relative;
    z-index: 1;
    inset: auto;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .challenge-detail-gallery .media-strip.is-detail-media .update-photo {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
    filter: drop-shadow(0 28px 64px rgba(0,0,0,.56));
  }
  .challenge-detail-gallery .image-fallback {
    min-height: min(48vh,420px);
    border: 0;
    border-radius: 0;
    display: grid;
    place-items: center;
    background: rgba(18,18,20,.72);
  }
  /* In der Challenge-Detailansicht liegt die Beschreibung bewusst nicht
     mehr als dunkles Overlay auf dem Foto. Sie gehört direkt unter das aktuell
     sichtbare Medium und wird nur durch zwei sehr feine Linien abgegrenzt. */
  .challenge-detail-gallery .media-carousel.has-caption-below .media-arrow {
    top: calc(var(--challenge-detail-media-height) / 2);
  }
  .challenge-image-descriptions {
    width: 100%;
  }
  .challenge-image-description-slot.is-empty {
    display: none;
  }
  .challenge-image-description-slot:not(.is-empty) {
    margin-top: 0;
    padding: 12px 2px 11px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .challenge-image-description .expandable-copy-text {
    color: var(--copy);
    font-size: 14px;
    line-height: 1.58;
  }
  .challenge-image-description .expandable-copy-toggle {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
  }
  .media-dots {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 12px 0 2px;
  }
  .media-dot {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    background: transparent;
    display: grid;
    place-items: center;
  }
  .media-dot::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.28);
    transition: background-color .18s ease,transform .18s ease;
  }
  .media-dot:hover::after {
    background: rgba(255,255,255,.5);
  }
  .media-dot.active::after {
    background: var(--accent);
    transform: scale(1.2);
  }
  .media-dot:focus-visible {
    outline: 2px solid var(--accent-glow);
    outline-offset: 1px;
    border-radius: 50%;
    box-shadow: none;
  }
  /* Das Ziel bleibt sofort sichtbar und nutzt die volle Zeile. Beschreibung
     und Umsetzung liegen in einem kontrolliert aufklappbaren Zusatzbereich. */
  .challenge-detail-page .detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    border-top: 1px solid var(--line);
    gap: 0;
    margin: 26px 0 0;
    padding-top: 22px;
  }
  .challenge-detail-grid {
    align-items: start;
  }
  /* Die Angaben stehen jetzt untereinander: Beschriftung klein darueber,
     Text ueber die volle Zeilenbreite. Kein Kasten, keine Trennlinie unter
     dem Ziel — es ist die Kernaussage der Challenge, nicht ein Feld unter
     vielen. */
  .challenge-detail-page .challenge-detail-copy-row {
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .challenge-detail-page .challenge-detail-goal-row p {
    max-width: 62ch;
    font-size: 19px;
    line-height: 1.5;
  }
  .challenge-detail-more-content .challenge-detail-copy-row {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
  }
  .challenge-detail-page .detail-grid > .challenge-detail-more-content {
    padding: 0;
    border-radius: 0;
    background: transparent;
  }
  .challenge-detail-more-content:not([hidden]) {
    display: grid;
  }
  .challenge-detail-more-content .challenge-detail-copy-row:first-child {
    margin-top: 0;
  }
  .challenge-detail-page .detail-grid h3 {
    margin: 0 0 9px;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .08em;
    color: var(--muted);
  }
  .challenge-detail-page .detail-grid p {
    margin: 0;
    max-width: 78ch;
    line-height: 1.62;
    font-size: 15px;
    color: var(--text);
    overflow-wrap: anywhere;
  }
  .challenge-detail-more-toggle {
    width: fit-content;
    min-height: 42px;
    margin: 20px 0 0;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line-strong);
    background: var(--soft);
    color: var(--text);
    font: inherit;
    font-family: var(--font-data);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: .07em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
  }
  .challenge-detail-more-toggle:hover {
    background: var(--soft);
    color: var(--text);
  }
  .challenge-detail-more-toggle svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .18s ease;
  }
  .challenge-detail-more-toggle.is-expanded svg {
    transform: rotate(180deg);
  }
  /* Ort in der Kopfzeile, neben Autor und Zeitraum. */
  .challenge-detail-place {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: var(--copy);
  }
  .challenge-detail-place svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: var(--accent-2);
  }
  .challenge-detail-place > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /* Voting sitzt am rechten Ende jeder Aktionsleiste. */
  .actionbar .vote-control {
    margin-left: auto;
  }
  .challenge-detail-page .comment-panel {
    margin-top: 28px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--card);
    box-shadow: none;
  }
  .challenge-detail-page .comment-panel[open] {
    padding-bottom: 14px;
  }
  .challenge-detail-page .comment-panel[open] > .comment-panel-summary {
    border-bottom: 1px solid var(--line);
  }
  .challenge-detail-page .comment-input-wrap {
    padding-inline: 0;
    background: transparent;
    border: 0;
  }
  .detail-grid {
    display: grid;
    border-top: 1px solid var(--line);
    gap: 20px;
    margin: 22px 0;
    padding-top: 22px;
  }
  .detail-grid>div {
    padding: 16px;
    border-radius: 0;
    background: #fafafa;
  }
  .detail-grid h3 {
    font-family: var(--font-data);
    margin: 0 0 4px;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    color: var(--muted);
  }
  .detail-grid p {
    margin: 0;
    line-height: 1.5;
    font-size: 14px;
    color: var(--text);
  }
  .comment {
    display: grid;
    grid-template-columns: 34px minmax(0,1fr);
    align-items: start;
    column-gap: 10px;
    border-bottom: 0;
    padding: 12px 0;
  }
  .comment p {
    margin: 4px 0;
    color: var(--copy);
    line-height: 1.5;
    font-size: 13.5px;
  }
  .challenge-feed-discover .challenge-grid, .grid.challenge-grid {
    align-items: stretch;
  }
  .challenge-card {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 0;
    background: #fff;
    box-shadow: var(--card-shadow);
    transition: transform .22s ease,box-shadow .22s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .challenge-card .image-fallback {
    width: 100%;
    min-height: 260px;
    aspect-ratio: 4/3;
    border-radius: 0;
  }
  .challenge-watch-corner {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
  }
  .challenge-card .challenge-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
  }
  .challenge-card-actions .icon-button {
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .challenge-card-actions .icon-button:hover,
  .challenge-card-actions .icon-button:focus-visible {
    border: 0;
    box-shadow: none;
  }
  .link-title {
    font-family: var(--font-display);
    background: none;
    border: none;
    padding: 0;
    text-align: left;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.038em;
    text-transform: uppercase;
    line-height: 1.02;
    color: var(--text);
  }
  .inline-more {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-deep);
  }
  .tiny-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 11.5px;
    font-weight: 700;
    color: #3a3a3a;
  }

  /* Fortschritt und Teilnehmer */
  .progress-wrap {
    margin: 10px 0 4px;
  }
  .progress-wrap.compact {
    margin: 0 0 10px;
  }
  /* Signatur: das Tagesband. Der zurueckgelegte Teil einer Challenge wird
     wie die Sonnenseite des Globus gezeichnet, mit hellem Licht an der
     vorderen Kante. */
  .progress-meta {
    font-family: var(--font-data);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 7px;
  }
  .progress-meta strong {
    color: hsl(var(--progress-hue,32) 86% 42%);
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
  /* Signatur: das Tageslineal. Der Balken ist eine gedruckte Skala mit
     einem Strich je Tag; der zurueckgelegte Teil wird in Druckfarbe
     ueberdruckt. */
  /* Signatur: der Fortschritt ist keine Linie, sondern eine Reihe
     einzelner Bloecke. Die Maske zerlegt Spur und Fuellung gemeinsam. */
  .progress-bar {
    position: relative;
    height: 18px;
    border-radius: 0;
    border: 0;
    background: var(--track);
    mask-image: repeating-linear-gradient(90deg,#000 0 22px,transparent 22px 26px);
    -webkit-mask-image: repeating-linear-gradient(90deg,#000 0 22px,transparent 22px 26px);
    overflow: hidden;
  }
  .progress-bar span {
    display: block;
    height: 100%;
    border-radius: 0;
    background: hsl(var(--progress-hue,32) 78% 46%);
    box-shadow: none;
    min-width: 4px;
    transition: width .45s cubic-bezier(.2,.8,.2,1);
  }
  .progress-bar.done span {
    background: hsl(136 68% 38%);
  }
  .update-detail-focus-target {
    scroll-margin-top: calc(var(--topbar-height) + 20px);
    outline: 2px solid transparent;
    outline-offset: 8px;
    transition: outline-color .2s ease,background-color .2s ease;
  }
  .update-detail-focus-target.is-focus-target {
    outline-color: color-mix(in srgb,var(--accent) 60%,transparent);
    background: color-mix(in srgb,var(--accent-soft) 50%,transparent);
  }
  .participation-join-card {
    display: grid;
    gap: 0;
    margin-top: 12px;
    padding: 18px;
    border: 1px solid var(--line-strong);
    background: var(--card);
  }
  .participation-join-primary {
    width: 100%;
    min-height: 50px;
    font-size: 14px;
  }
  .participation-member-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
  }
  .participant-leave-button { min-height: 38px; color: var(--text); }
  .view-back-control {
    position: fixed;
    top: calc(var(--topbar-height) + 12px);
    left: 14px;
    z-index: 925;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px 0 12px;
    border: 1px solid var(--text);
    border-radius: 0;
    background: var(--card);
    color: var(--text);
    font-size: 12.5px;
    font-weight: 700;
    box-shadow: rgba(0,0,0,.19) 0 10px 20px, rgba(0,0,0,.23) 0 6px 6px;
    transition: transform .2s cubic-bezier(.2,.8,.2,1),box-shadow .2s ease,background-color .18s ease,color .18s ease,border-color .18s ease;
    will-change: transform;
  }
  .view-back-control:hover,
  .view-back-control:focus-visible {
    transform: translateY(-2px);
    background: var(--soft);
    color: var(--text);
    box-shadow: rgba(0,0,0,.19) 0 10px 20px, rgba(0,0,0,.23) 0 6px 6px;
    outline: 0;
  }
  .view-back-control svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .view-back-control.is-inline {
    position: static;
    z-index: auto;
    width: max-content;
    margin: 0 0 18px;
    box-shadow: none;
  }
  .detail-timeline-area {
    position: fixed;
    inset: var(--topbar-height) 0 0;
    z-index: 920;
    pointer-events: none;
  }
  .detail-timeline-trigger {
    position: absolute;
    top: 50%;
    right: 0;
    z-index: 3;
    width: 44px;
    min-width: 44px;
    height: 54px;
    display: grid;
    place-items: center;
    padding: 7px 5px;
    border: 1px solid var(--text);
    border-right: 0;
    border-radius: 0;
    background: var(--card);
    color: var(--text);
    box-shadow: rgba(0,0,0,.19) 0 10px 20px, rgba(0,0,0,.23) 0 6px 6px;
    pointer-events: auto;
    transform: translateY(-50%);
    backdrop-filter: blur(16px) saturate(135%);
    -webkit-backdrop-filter: blur(16px) saturate(135%);
    transition: opacity .18s ease,transform .2s cubic-bezier(.2,.8,.2,1),background-color .18s ease,color .18s ease,border-color .18s ease,box-shadow .2s ease;
  }
  .detail-timeline-trigger:hover,
  .detail-timeline-trigger:focus-visible {
    background: var(--text);
    color: var(--page-a);
  }
  .detail-timeline-trigger svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
  }

  .detail-timeline-area.is-open .detail-timeline-trigger {
    opacity: 0;
    pointer-events: none;
    transform: translate(8px,-50%);
  }
  .detail-timeline-scrim {
    display: none;
  }
  .detail-timeline-rail {
    position: absolute;
    top: 12px;
    right: 14px;
    width: min(276px,calc(100vw - 28px));
    max-height: calc(100dvh - var(--topbar-height) - 26px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--text);
    border-radius: 0;
    background: var(--card);
    box-shadow: rgba(0,0,0,.19) 0 10px 20px, rgba(0,0,0,.23) 0 6px 6px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(calc(100% + 30px));
    transition: transform .24s cubic-bezier(.2,.8,.2,1),opacity .2s ease,box-shadow .2s ease,background-color .18s ease,border-color .18s ease;
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
  }
  .detail-timeline-area.is-open .detail-timeline-rail {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }
  .detail-timeline-head {
    min-width: 0;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px 12px;
    border-bottom: 1px solid var(--line);
  }
  .detail-timeline-head > div {
    min-width: 0;
    display: grid;
    gap: 3px;
  }
  .detail-timeline-head strong {
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
  }
  .detail-timeline-head span {
    overflow: hidden;
    color: var(--muted);
    font-size: 11.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .detail-timeline-list {
    position: relative;
    flex: 0 1 auto;
    min-height: 0;
    max-height: calc(100dvh - var(--topbar-height) - 92px);
    display: grid;
    align-content: start;
    gap: 4px;
    padding: 10px 9px 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--muted) transparent;
  }
  .detail-timeline-list::before {
    content: "";
    position: absolute;
    top: 27px;
    bottom: 27px;
    left: 28px;
    width: 2px;
    background: var(--line);
  }
  .detail-timeline-list::-webkit-scrollbar { width: 6px; }
  .detail-timeline-list::-webkit-scrollbar-track { background: transparent; }
  .detail-timeline-list::-webkit-scrollbar-thumb { border-radius: 0; background: var(--muted); }
  .detail-timeline-item {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: 38px minmax(0,1fr);
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    /* Kein Klick-Puls: Der aktive Stand wechselt ohne Zwischenanimation. */
    transition: none;
  }
  .detail-timeline-item:hover,
  .detail-timeline-item:focus-visible {
    background: var(--soft);
  }
  /* Bei Mausbedienung soll beim Klick nichts aufleuchten. Die
     Tastaturbedienung behaelt ihren Rahmen ueber :focus-visible. */
  .detail-timeline-item:focus:not(:focus-visible) {
    outline: none;
  }
  .detail-timeline-node {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 2px solid var(--text);
    border-radius: 50%;
    background: var(--card);
    color: var(--text);
    font-size: 10.5px;
    font-weight: 720;
  }
  .detail-timeline-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
  }
  .detail-timeline-copy strong,
  .detail-timeline-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .detail-timeline-copy strong { color: inherit; font-size: 12px; }
  .detail-timeline-copy small { color: var(--muted); font-size: 10.5px; }
  .detail-timeline-item.is-completed .detail-timeline-node {
    border-color: var(--accent);
    color: var(--accent-hot);
  }
  .detail-timeline-item.is-active {
    background: var(--soft);
    color: var(--text);
    box-shadow: inset 3px 0 0 var(--accent);
  }
  .detail-timeline-item.is-active .detail-timeline-node {
    border-color: var(--accent);
    background: var(--card);
    color: var(--text);
    box-shadow: none;
  }
  .timeline-toggle {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 50%;
    background: rgba(255,255,255,.045);
    color: #8a8e97;
  }
  .timeline-toggle:hover {
    background: rgba(255,255,255,.09);
    color: #fff;
  }
  .timeline-toggle svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  @media (min-width: 1080px) {
    .app.timeline-open .challenge-detail-page,
    .app.timeline-open .update-detail-page {
      width: 100%;
      margin-left: 0;
      margin-right: auto;
      transition: max-width .24s cubic-bezier(.2,.8,.2,1);
    }
    .app.timeline-open .challenge-detail-page {
      max-width: min(1280px,calc(100vw - 352px));
    }
    .app.timeline-open .update-detail-page {
      max-width: min(1040px,calc(100vw - 352px));
    }
  }

  .challenge-detail-page .challenge-stream-area > .create-update-panel,
  .challenge-detail-page .challenge-stream-area > .compact-panel {
    margin-top: 0;
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 0;
    background: linear-gradient(145deg,rgba(22,22,24,.76),rgba(12,12,14,.72));
    box-shadow: 0 24px 56px rgba(0,0,0,.42);
    backdrop-filter: blur(14px) saturate(125%);
    -webkit-backdrop-filter: blur(14px) saturate(125%);
  }
  .challenge-detail-page .timeline-content {
    gap: 22px;
    margin-top: 22px;
  }
  .challenge-detail-page .timeline-content > .update-card,
  .challenge-detail-page .timeline-content > .panel {
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 0;
    background: linear-gradient(145deg,rgba(22,22,24,.72),rgba(10,10,12,.7));
    box-shadow: 0 24px 56px rgba(0,0,0,.42);
    backdrop-filter: blur(14px) saturate(125%);
    -webkit-backdrop-filter: blur(14px) saturate(125%);
  }
  .challenge-participation-card-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
    padding: 8px 10px;
    border: 1px solid var(--accent-glow);
    border-radius: 0;
    background: var(--accent-glow);
  }
  .challenge-participation-card-label span {
    color: var(--accent);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  .challenge-participation-card-label small {
    color: var(--muted);
    font-size: 11px;
  }
  .participant-stream-picker-panel {
    scroll-margin-top: calc(var(--topbar-height) + 18px);
    display: grid;
    gap: 14px;
    padding: 17px 18px;
    border: 1px solid var(--line-strong);
    background: var(--card);
  }
  .participant-stream-label,
  .challenge-stream-kicker {
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 750;
    letter-spacing: .09em;
    text-transform: uppercase;
  }
  .participant-stream-current {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
  }
  .participant-stream-current .avatar {
    flex: 0 0 auto;
  }
  .participant-stream-current-copy {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex-wrap: wrap;
  }
  .participant-stream-current-copy > strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 15px;
    line-height: 1.25;
  }
  .participant-stream-update-count {
    min-height: 22px;
    padding: 3px 7px;
    font-size: 9.5px;
    letter-spacing: .04em;
  }
  .participant-stream-more {
    display: grid;
    gap: 9px;
  }
  .participant-stream-more > summary {
    list-style: none;
  }
  .participant-stream-more > summary::-webkit-details-marker {
    display: none;
  }
  .participant-stream-more-button {
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }
  .participant-stream-more[open] .participant-stream-more-button {
    border-color: var(--accent);
    color: var(--accent);
  }
  .participant-stream-options {
    display: grid;
    gap: 6px;
    padding-top: 2px;
  }
  .participant-stream-option {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--soft);
    text-align: left;
  }
  .participant-stream-option:hover,
  .participant-stream-option:focus-within {
    border-color: var(--accent);
    background: var(--accent-glow);
  }
  .participant-stream-option-select {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
  }
  .participant-stream-option-select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
  }
  .participant-stream-option-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
  }
  .participant-stream-option-copy strong {
    overflow-wrap: anywhere;
    font-size: 13px;
  }
  .participant-stream-option-copy small {
    color: var(--muted);
    font-size: 10.5px;
  }
  .challenge-stream-area {
    gap: 20px;
    margin-top: 48px;
  }
  .challenge-stream-empty p {
    margin: 0;
  }
  .update-context-labels {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
    margin-left: auto;
  }
  .participant-update-label {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid var(--accent-glow);
    border-radius: 0;
    background: var(--accent-glow);
    color: var(--accent);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
  }
  .update-card.is-participant-update {
    border-color: var(--accent-glow);
  }
  .update-detail-meta-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
  }
  .update-detail-meta-line .meta {
    margin: 0;
  }

  /* Meine Challenges: Suche, Rubriken und beim Scrollen klar erkennbare Bereiche */
  .mine-overview-panel {
    display: grid;
    gap: 18px;
  }
  .mine-overview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
  }
  .mine-overview-row h1 {
    font-family: var(--font-display);
    margin-bottom: 4px;
  }
  .mine-overview-row p {
    margin: 0;
  }
  .mine-filter-bar {
    display: grid;
    grid-template-columns: auto minmax(220px,1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }

  .mine-content-switcher {
    justify-self: start;
  }
  .mine-update-view-spacer {
    grid-column: 2 / 4;
    min-width: 0;
  }
  .mine-update-results {
    display: grid;
    gap: 18px;
  }
  .mine-list-manage {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
  }
  .mine-list-vote .mine-list-manage {
    margin-left: 8px;
  }
  .mine-favorites-entry {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid color-mix(in srgb,var(--favorite) 50%,var(--line));
    border-radius: var(--photo-radius-sm);
    background: color-mix(in srgb,var(--favorite) 9%,var(--card));
    color: var(--favorite);
    font-size: 12px;
    font-weight: 760;
    cursor: pointer;
  }
  .mine-favorites-entry:hover, .mine-favorites-entry:focus-visible {
    border-color: var(--favorite);
    background: color-mix(in srgb,var(--favorite) 16%,var(--card));
    outline: none;
  }
  .mine-favorites-entry svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .mine-title-search {
    position: relative;
    display: block;
    min-width: 0;
  }
  .mine-title-search svg {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 1;
    width: 17px;
    height: 17px;
    transform: translateY(-50%);
    fill: none;
    stroke: var(--muted);
    stroke-width: 1.8;
    stroke-linecap: round;
    pointer-events: none;
  }
  .mine-title-search input {
    width: 100%;
    min-height: 44px;
    padding: 0 14px 0 42px;
    border: 1px solid var(--line-strong);
    border-radius: 0;
    background: var(--input);
    color: var(--text);
    font-size: 13px;
  }
  .mine-scope-filter {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
  }
  .mine-scope-button {
    min-height: 40px;
    padding: 0 11px 0 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--soft);
    color: var(--copy);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
    transition: background-color .18s ease,border-color .18s ease,color .18s ease,transform .18s ease;
  }
  .mine-scope-button:hover {
    background: var(--soft-2);
    color: var(--text);
  }
  .mine-scope-button:active {
    transform: scale(.97);
  }
  .mine-scope-button em {
    min-width: 0;
    height: auto;
    padding: 0;
    display: inline;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font-style: normal;
    font-size: 10.5px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  /* Die Auswahl lag auf einer blassen Aufhellung der Signalfarbe, mit
     weisser Schrift darauf — im hellen Modus praktisch unlesbar. Sie liegt
     jetzt auf der vollen Signalfarbe mit der zugehoerigen Kontrastschrift. */
  .mine-scope-button.is-active {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: none;
  }
  .mine-scope-button.is-active em {
    background: transparent;
    color: var(--accent-ink);
  }
  .mine-challenge-results {
    display: grid;
    gap: 34px;
  }
  .mine-category-section {
    display: grid;
    gap: 14px;
    min-width: 0;
    scroll-margin-top: calc(var(--topbar-height) + 16px);
  }
  .mine-category-header {
    position: relative;
    min-height: 68px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: 0;
    background: var(--soft);
    box-shadow: none;
  }
  .mine-category-heading {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .mine-category-heading-text-only {
    flex: 1 1 auto;
  }
  .mine-category-heading > div {
    min-width: 0;
  }
  .mine-category-heading h2 {
    font-family: var(--font-display);
    margin: 0 0 2px;
    color: var(--text);
    font-size: 17px;
    line-height: 1.2;
    letter-spacing: -.015em;
  }
  .mine-category-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.35;
  }
  .mine-category-count {
    min-width: 34px;
    min-height: 30px;
    padding: 0 9px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--card);
    color: var(--copy);
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .mine-section-empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 86px;
  }
  .mine-section-empty p {
    margin: 0;
    color: var(--muted);
  }
  /* Der Update-Composer bleibt als Formular im DOM, ist aber bis zum
     expliziten Update-Toggle weder sichtbar noch fokussierbar. So bleiben
     bereits eingegebene Texte und ausgewaehlte Medien beim Zuklappen erhalten. */
  .challenge-detail-page .challenge-stream-area > .create-update-panel.is-collapsed {
    display: none;
  }
  .create-update-panel.is-header-target {
    animation: update-composer-header-target .9s ease both;
  }
  @keyframes update-composer-header-target {
    0%,100% { border-color: rgba(255,255,255,.05); box-shadow: 0 24px 56px rgba(0,0,0,.42); }
    34% { border-color: var(--accent-glow); box-shadow: 0 0 0 4px var(--accent-glow),0 24px 56px rgba(0,0,0,.42); }
  }

  /* Umschalter für die persönliche Challenge-Darstellung. Der Zustand wird
     im Browser gespeichert, die Datenquelle bleibt in allen Ansichten gleich. */
  .mine-view-switcher {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--soft);
  }
  .mine-view-button {
    width: 38px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background-color .16s ease,color .16s ease,transform .16s ease;
  }
  .mine-view-button:hover {
    background: var(--soft-2);
    color: var(--text);
  }
  .mine-view-button:active {
    transform: scale(.94);
  }
  .mine-view-button.is-active {
    background: var(--accent-soft);
    color: var(--accent-deep);
    box-shadow: inset 0 0 0 1px var(--accent);
  }
  .mine-view-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .mine-challenge-list {
    display: grid;
    gap: 10px;
  }
  .mine-list-card {
    display: grid;
    gap: 12px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: var(--card);
    box-shadow: 0 12px 28px rgba(0,0,0,.16);
    cursor: pointer;
    transition: border-color .18s ease,background-color .18s ease,transform .18s ease,box-shadow .18s ease;
  }
  .mine-list-card:hover {
    border-color: var(--accent-glow);
    background: rgba(255,255,255,.055);
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(0,0,0,.22);
  }
  .mine-list-card:focus-visible {
    outline: 3px solid var(--accent-glow);
    outline-offset: 3px;
  }
  .mine-list-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
  }
  .mine-list-card-head h3 {
    font-family: var(--font-body);
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--text);
    font-size: 18px;
    line-height: 1.2;
  }
  .mine-list-owner {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
  }
  .mine-list-head-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 7px;
  }
  .mine-list-status {
    flex: 0 0 auto;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 0;
    color: var(--copy);
    font-size: 10.5px;
    font-weight: 700;
  }
  .mine-list-description {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--copy);
    font-size: 13.5px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
  }
  .mine-list-facts {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 14px;
    color: var(--muted);
    font-size: 11.5px;
  }
  .mine-list-facts span {
    position: relative;
  }
  .mine-list-facts span + span::before {
    content: '·';
    position: absolute;
    left: -9px;
    color: var(--line-strong);
  }

  /* Listenansichten zeigen dieselbe Challenge-Wertung wie die Karten. */
  .mine-list-vote {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .mine-list-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
  }
  .mine-list-vote .vote-control {
    margin-left: 0;
  }

  .favorites-overview-panel { display: grid; gap: 14px; }
  .favorites-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
  .favorites-heading h1 { margin-bottom: 4px; }
  .favorites-heading p { margin: 0; }
  .favorites-back-button {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--input);
    color: var(--text);
    cursor: pointer;
    transition: transform .16s ease,border-color .16s ease,background .16s ease;
  }
  .favorites-back-button:hover, .favorites-back-button:focus-visible { border-color: var(--favorite); background: color-mix(in srgb,var(--favorite) 10%,var(--input)); transform: translateX(-1px); }
  .favorites-back-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

  .favorites-content-switcher { width: 100%; }
  .favorites-content-switcher .segment-button { flex: 1 1 0; }
  .favorites-content-switcher .segment-button:disabled { opacity: .46; cursor: default; }
  .favorites-filter-grid {
    display: grid;
    grid-template-columns: minmax(220px,1.4fr) repeat(3,minmax(150px,.7fr));
    gap: 10px;
    align-items: end;
  }
  .favorites-select { display: grid; gap: 5px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
  .favorites-select select { width: 100%; min-height: 44px; border: 1px solid var(--line-strong); border-radius: 0; background: var(--input); color: var(--text); padding: 0 10px; }
  .favorites-reset-button {
    justify-self: start;
    min-height: 34px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
  }
  .favorites-reset-button:hover { color: var(--text); }
  .favorites-results { min-width: 0; }
  .favorites-challenge-grid { align-items: stretch; }

  .detail-timeline-overview .detail-timeline-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

}

@layer components {
  /* Light-Mode: Zurueck und Zeitleiste bleiben als eigene Ebene lesbar.
     Der Schatten entspricht exakt Material-Beispiel #29. */
  :root:not([data-theme="dark"]) .view-back-control,
  :root:not([data-theme="dark"]) .detail-timeline-trigger,
  :root:not([data-theme="dark"]) .detail-timeline-rail {
    border-color: rgba(10,10,10,.10);
    background: rgba(255,255,255,.96);
    box-shadow: rgba(0,0,0,.19) 0 10px 20px, rgba(0,0,0,.23) 0 6px 6px;
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
  }
  :root:not([data-theme="dark"]) .view-back-control {
    border-radius: 18px;
  }
  :root:not([data-theme="dark"]) .view-back-control:hover,
  :root:not([data-theme="dark"]) .view-back-control:focus-visible {
    transform: translateY(-1px);
    color: var(--text);
    background: var(--accent-soft);
    box-shadow: rgba(0,0,0,.19) 0 10px 20px, rgba(0,0,0,.23) 0 6px 6px;
  }
  :root:not([data-theme="dark"]) .detail-timeline-trigger {
    border-right: 1px solid rgba(10,10,10,.10);
    border-radius: 18px 0 0 18px;
  }
  :root:not([data-theme="dark"]) .detail-timeline-trigger:hover,
  :root:not([data-theme="dark"]) .detail-timeline-trigger:focus-visible {
    transform: translateY(calc(-50% - 1px));
    color: var(--text);
    background: var(--accent-soft);
  }
  :root:not([data-theme="dark"]) .detail-timeline-rail {
    border-color: rgba(10,10,10,.10);
    border-radius: 22px;
  }
  :root:not([data-theme="dark"]) .detail-timeline-rail:hover,
  :root:not([data-theme="dark"]) .detail-timeline-rail:focus-within {
    box-shadow: rgba(0,0,0,.19) 0 10px 20px, rgba(0,0,0,.23) 0 6px 6px;
  }
  :root:not([data-theme="dark"]) .detail-timeline-item:hover,
  :root:not([data-theme="dark"]) .detail-timeline-item:focus-visible {
    background: var(--accent-soft);
  }
}

/* ===== Challenge-Detail: kompakte Teilnehmersteuerung ===== */
.challenge-detail-controlbar {
  display: flex;
  width: 100%;
  margin: 20px 0 0;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-strong);
}
.challenge-detail-controlbar .challenge-detail-more-toggle {
  margin: 0;
}
.challenge-detail-more-toggle.challenge-detail-more-toggle-full {
  display: flex;
  width: 100%;
  justify-content: center;
  text-align: center;
}
.challenge-participant-meta {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
}
.challenge-participant-count-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  color: var(--accent-deep);
  flex: 0 0 auto;
}
.challenge-participant-count-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.challenge-participant-count-value {
  display: inline-flex;
  align-items: center;
  min-width: 1ch;
  color: var(--text);
  font-family: var(--font-data);
  font-size: 14px;
  font-weight: 720;
  line-height: 1;
}
.challenge-participant-joined-status {
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
  color: #84cc16;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}
.challenge-participant-joined-status[hidden] {
  display: none;
}
.participation-detail-actions {
  margin-top: 12px;
}
.participation-detail-actions.is-empty {
  display: none;
}
.participation-detail-actions .participation-join-card {
  margin-top: 0;
}
.participation-member-state {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

/* Teilnehmerübersicht: bewusst schlicht, durchsuchbar und sortierbar. */
.participant-directory-modal {
  width: min(620px, calc(100vw - 28px));
  max-height: min(760px, calc(100dvh - 28px));
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}
.participant-directory-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.participant-directory-head h2,
.participant-directory-head p {
  margin: 0;
}
.participant-directory-head p {
  margin-top: 4px;
}
.participant-directory-close {
  flex: 0 0 auto;
}
.participant-directory-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
}
.participant-directory-search,
.participant-directory-sort {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.participant-directory-search input,
.participant-directory-sort select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  background: var(--input);
  color: var(--text);
  padding: 0 12px;
  font: inherit;
  text-transform: none;
  letter-spacing: 0;
}
.participant-directory-list {
  min-height: 0;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}
.participant-directory-user {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
}
.participant-directory-user-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.participant-directory-user-copy strong,
.participant-directory-user-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.participant-directory-user-copy span {
  color: var(--muted);
  font-size: 12px;
}
.participant-directory-empty {
  margin: 0;
  padding: 24px 4px;
  color: var(--muted);
}

@layer components {
  .avatar-profile-trigger {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
  }
  .avatar-profile-trigger:hover .avatar,
  .avatar-profile-trigger:focus-visible .avatar {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  .avatar-profile-trigger:focus-visible { outline: none; }

  .public-profile-page,
  .observing-page {
    width: min(1180px,100%);
    margin: 0 auto;
  }
  .public-profile-card {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    align-items: center;
    gap: 24px;
    padding: 28px;
  }
  .public-profile-avatar {
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--soft);
    color: var(--text);
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 850;
    cursor: zoom-in;
    transition: width .2s ease,height .2s ease,border-radius .2s ease,transform .2s ease;
  }
  .public-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .public-profile-avatar.is-expanded {
    width: min(240px,54vw);
    height: min(240px,54vw);
    border-radius: 22px;
    cursor: zoom-out;
  }
  .public-profile-copy { min-width: 0; }
  .public-profile-label,
  .observing-kicker {
    color: var(--accent-deep);
    font-family: var(--font-data);
    font-size: 10px;
    font-weight: 760;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
  .public-profile-copy h1,
  .observing-head h1 { margin: 5px 0 8px; }
  .public-profile-username {
    margin: -4px 0 10px;
    color: var(--muted);
    font-family: var(--font-data);
    font-size: 13px;
  }
  .public-profile-bio { max-width: 68ch; margin: 0; line-height: 1.55; }
  .public-profile-bio.is-empty { color: var(--muted); }
  .public-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 15px;
    color: var(--muted);
    font-size: 13px;
  }
  .public-profile-section-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 12px; }
  .public-profile-section-head h2 { margin: 0; }
  .public-profile-load-more,
  .observing-load-more { width: 100%; margin-top: 14px; }
  .public-profile-empty,
  .observing-empty { grid-column: 1 / -1; padding: 28px; text-align: center; }

  .observing-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 28px;
  }
  .observing-head p { margin: 0; color: var(--muted); }
  .observing-head-icon {
    width: 70px;
    height: 58px;
    display: grid;
    place-items: center;
    color: var(--accent-deep);
    filter: drop-shadow(0 10px 18px var(--accent-glow));
  }
  .observing-head-icon svg { width: 64px; height: 54px; overflow: visible; }
}

