/** ChallengeFlow: 04-controls.css */
@layer components {
  /* Buttons und Bedienelemente */
  .danger-button.small {
    padding: 4px 8px;
  }
  .small-control {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 11.5px;
  }
  .icon-button.edit-action {
    color: var(--muted);
  }
  .icon-button.edit-action:hover {
    color: var(--text);
    background: var(--soft);
  }
  .challenge-favorite-button {
    min-height: 31px;
    padding: 5px 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid color-mix(in srgb,var(--favorite) 58%,var(--line));
    border-radius: 0;
    background: color-mix(in srgb,var(--card) 88%,var(--favorite) 12%);
    color: var(--favorite);
    font-size: 10.5px;
    font-weight: 760;
    line-height: 1;
    letter-spacing: .02em;
    white-space: nowrap;
    text-shadow: none;
    cursor: pointer;
    transition: background-color .16s ease,color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease;
  }
  .challenge-favorite-button svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    fill: transparent;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linejoin: round;
    transition: fill .16s ease,transform .16s ease;
  }
  .challenge-favorite-button:hover, .challenge-favorite-button:focus-visible {
    background: color-mix(in srgb,var(--favorite) 18%,var(--card));
    border-color: var(--favorite);
    outline: none;
    transform: translateY(-1px);
  }
  .challenge-favorite-button.is-active {
    border-color: var(--favorite);
    background: var(--favorite);
    color: var(--favorite-ink);
    box-shadow: 0 0 0 2px color-mix(in srgb,var(--favorite) 18%,transparent),0 7px 18px color-mix(in srgb,var(--favorite) 22%,transparent);
  }
  .challenge-favorite-button.is-active svg { fill: currentColor; }
  .challenge-favorite-button[data-favorite-active="true"] span { font-weight: 820; }
  .challenge-favorite-button.is-compact { min-height: 27px; padding: 4px 7px; font-size: 9.5px; gap: 5px; }
  .challenge-favorite-button.is-compact svg { width: 13px; height: 13px; }
  .challenge-favorite-button.is-overlay {
    border-color: color-mix(in srgb,var(--favorite) 78%,#fff 22%);
    background: rgba(8,9,12,.64);
    color: color-mix(in srgb,var(--favorite) 78%,#fff 22%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .challenge-favorite-button.is-overlay.is-active {
    background: var(--favorite);
    color: var(--favorite-ink);
  }
  .icon-button span {
    filter: grayscale(1) opacity(.75);
    font-size: 14px;
  }
  .icon-button.send span {
    filter: none;
  }
  .icon-button.is-liked span {
    filter: none;
  }
  .world-icon-button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 0;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.94);
    color: #0a0a0a;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform .18s ease,background-color .18s ease,color .18s ease,box-shadow .18s ease;
  }
  .world-icon-button:hover {
    transform: translateY(-1px);
    background: #fff;
  }
  .world-icon-button:active {
    transform: scale(.96);
  }
  .world-icon-button svg {
    width: 20px;
    height: 20px;
    display: block;
    overflow: visible;
  }
  .world-icon-button circle, .world-icon-button path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .world-icon-button.is-active {
    color: #fff;
    background: var(--accent);
    border-color: transparent;
    box-shadow: 0 10px 28px rgba(0,102,204,.35);
  }
  /* Der Lichtschalter liegt direkt auf der Weltansicht. Die Trefferfläche bleibt
     bequem groß, sichtbar ist aber nur eine kleine, ruhige Glasfläche. */
  .world-lighting-button {
    position: relative;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.78);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .world-lighting-button::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 50%;
    background: rgba(5,8,14,.48);
    transition: background-color .16s ease,border-color .16s ease,transform .16s ease;
  }
  .world-lighting-button svg {
    position: relative;
    z-index: 1;
    width: 15px;
    height: 15px;
    stroke-width: 1.65;
  }
  .world-lighting-button:hover {
    transform: none;
    background: transparent;
    color: #fff;
  }
  .world-lighting-button:hover::before {
    background: rgba(5,8,14,.70);
    border-color: rgba(255,255,255,.28);
  }
  .world-lighting-button:active { transform: none; }
  .world-lighting-button:active::before { transform: scale(.94); }
  .world-lighting-button.is-active {
    border-color: transparent;
    background: transparent;
    color: #ffd36a;
    box-shadow: none;
  }
  .world-lighting-button.is-active::before {
    background: rgba(255,190,72,.10);
    border-color: rgba(255,211,106,.28);
  }
  .feed-autocomplete input::-webkit-search-cancel-button, .feed-autocomplete input::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
  }
  button, input, textarea, select {
    font: inherit;
    font-family: inherit;
  }
  .primary-action, .pill-button, .ghost-button, .danger-button, .filter-chip {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    font-weight: 600;
    letter-spacing: -.01em;
    transition: background-color .18s ease,border-color .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease;
  }
  .primary-action:active, .pill-button:active, .ghost-button:active, .danger-button:active {
    transform: scale(.975);
  }
  .primary-action.small {
    min-height: 38px;
    padding: 0 16px;
    font-size: 13px;
  }
  .ghost-button.small {
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
  }
  .badge {
    font-family: var(--font-data);
    display: inline-flex;
    border-radius: 0;
    color: var(--accent);
    padding: 5px 10px;
    background: var(--accent-soft);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .01em;
    font-variant-numeric: tabular-nums;
  }
  .badge.ghost {
    background: var(--soft);
    color: var(--muted);
  }
  .actionbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  .icon-button:active {
    transform: scale(.95);
  }
  .icon-button-symbol {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    filter: none;
  }
  .icon-button em {
    font-style: normal;
    font-family: var(--font-data);
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: var(--icon-button-count-color, currentColor);
  }
  .icon-button.send:hover {
    background: var(--accent-deep);
  }
  .icon-button.is-liked .ui-icon {
    fill: currentColor;
  }
  .icon-button.is-liked em {
    color: var(--icon-button-count-color);
  }
  .update-card>.actionbar {
    padding: 12px 2px 2px;
    gap: 6px;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
  }
  /* Aktionsbuttons behalten eine feste Breite. Dadurch verschieben sich
     Kommentar, Öffnen und Challenge-Link nicht, wenn ein Zähler wächst. */
  .update-card > .actionbar .icon-button,
  .update-detail-card > .actionbar .icon-button {
    flex: 0 0 auto;
    width: auto;
    min-width: 56px;
    justify-content: center;
    padding-inline: 10px;
  }
  .update-card > .actionbar .icon-button em,
  .update-detail-card > .actionbar .icon-button em {
    width: 3ch;
    text-align: left;
    font-variant-numeric: tabular-nums;
  }
  .update-card.is-challenge-stream-layout > .actionbar .challenge-favorite-button.is-actionbar {
    flex: 0 0 auto;
    width: 56px;
    min-width: 56px;
    height: 40px;
    min-height: 40px;
    justify-content: center;
  }
  .update-card.is-challenge-stream-layout > .actionbar .challenge-favorite-button.is-actionbar svg {
    width: 18px;
    height: 18px;
  }
  .logout-button {
    width: 100%;
    justify-content: center;
    display: flex;
    min-height: 44px;
  }
  .segmented-control {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border-radius: 0;
    background: var(--soft);
  }
  .segment-button {
    min-height: 36px;
    padding: 0 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #3a3a3a;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -.01em;
    transition: background-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease;
  }
  .segment-button:hover {
    background: rgba(255,255,255,.56);
    color: var(--text);
  }
  .segment-button:active {
    transform: scale(.97);
  }
  .ghost-button, .pill-button, .primary-action, .danger-button, .segment-button, .filter-chip, .overlay-close, .timeline-toggle, .media-arrow {
    font-weight: 600;
  }
  .primary-action {
    border: none;
    border-radius: 0;
    font-weight: 800;
    padding: 0 19px;
    box-shadow: none;
    font-size: 14px;
    background: var(--accent);
    color: #fff;
  }
  .primary-action:hover {
    background: var(--accent-deep);
  }
  .pill-button {
    border-radius: 0;
    font-weight: 700;
    padding: 0 16px;
    font-size: 13px;
    background: #e8ecff;
    color: var(--accent-deep);
    border: 1px solid rgba(0,38,196,.10);
  }
  .pill-button:hover {
    background: #d5ddff;
    color: var(--accent-deep);
  }
  .ghost-button {
    border-radius: 0;
    font-weight: 700;
    padding: 0 16px;
    border: 1px solid var(--line);
    font-size: 13px;
    box-shadow: 0 1px 1px rgba(0,0,0,.02);
    background: #fff;
    color: #0a0a0a;
    border-color: rgba(0,0,0,.18);
  }
  .ghost-button:hover {
    background: #0a0a0a;
    color: #000;
    border-color: rgba(0,0,0,.28);
  }
  .danger-button {
    border: none;
    border-radius: 0;
    font-weight: 700;
    min-height: 34px;
    padding: 0 13px;
    font-size: 12px;
    color: #7d0016;
    background: #fff0f1;
  }
  .danger-button:hover {
    background: #ffe1e4;
  }
  .filter-chip, .segment-button {
    color: #0a0a0a;
    background: #f4f4f4;
  }
  .filter-chip:hover, .segment-button:hover {
    color: #0a0a0a;
    background: #d3d5cc;
  }
  .segment-button.active {
    color: #fff;
    background: #0a0a0a;
    box-shadow: 0 1px 2px rgba(0,0,0,.12),0 6px 18px rgba(0,0,0,.08);
  }
  .icon-button {
    --icon-button-count-color: currentColor;
    display: flex;
    align-items: center;
    font-size: 14px;
    min-width: 40px;
    min-height: 40px;
    padding: 0 12px;
    gap: 6px;
    border: 0;
    border-radius: 0;
    transition: background-color .18s ease,color .18s ease,transform .18s ease;
    color: #0a0a0a;
    background: #f4f4f4;
  }
  .icon-button:hover {
    color: #111;
    background: #d3d5cc;
  }
  .icon-button.is-liked {
    border-color: rgba(239,68,68,.4);
    border: 0;
    color: #7d0016;
    background: #ffe9eb;
  }
  .icon-button.is-leave-action {
    border: 0;
    color: #7d0016;
    background: #ffe9eb;
  }
  .icon-button.is-leave-action:hover {
    color: #7d0010;
    background: #ffd8dc;
  }
  .participation-action-button.is-pending {
    opacity: .58;
    cursor: wait;
  }
  .participation-reminder-button {
    width: 52px;
    min-width: 52px;
    height: 52px;
    min-height: 52px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    box-shadow: none;
    transition: color .16s ease, background-color .16s ease, transform .16s ease;
  }
  .participation-reminder-button:hover,
  .participation-reminder-button:focus-visible {
    background: var(--soft);
    color: var(--accent);
    outline: none;
  }
  .participation-reminder-button:active {
    transform: scale(.96);
  }
  .participation-reminder-button-icon {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
  }
  .participation-reminder-button-icon .ui-icon {
    width: 28px;
    height: 28px;
  }
  .icon-button.send {
    flex: 0 0 auto;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    font-size: 15px;
    width: 40px;
    height: 40px;
    min-height: 40px;
    box-shadow: none;
    color: #fff;
    background: var(--accent);
  }
  .challenge-detail-primary-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  .challenge-detail-actions .icon-button {
    min-width: 48px;
    min-height: 46px;
    padding: 0 14px;
    gap: 7px;
  }
  .challenge-detail-actions .challenge-favorite-button.is-actionbar {
    width: 48px;
    min-width: 48px;
    height: 46px;
    min-height: 46px;
    padding: 0;
  }
  .challenge-detail-vote-row {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
  .challenge-detail-actions .icon-button-symbol,
  .challenge-detail-actions .ui-icon {
    width: 20px;
    height: 20px;
  }
  .challenge-detail-actions .vote-control {
    min-height: 46px;
  }
  .challenge-detail-actions .vote-button {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    font-size: 16px;
  }
  .challenge-detail-actions .vote-score {
    min-width: 42px;
    padding: 0 8px;
    font-size: 13px;
  }
  .world-link-button {
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    padding: 0;
    display: inline-grid;
    place-items: center;
  }
  .world-link-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .challenge-card .actionbar {
    margin-top: auto;
    flex-wrap: wrap;
  }

  .vote-control {
    --vote-score-color: var(--text);
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--card);
    color: var(--text);
  }
  .vote-control.is-compact { min-height: 34px; }
  .vote-button {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    line-height: 1;
  }
  .vote-control.is-compact .vote-button { width: 32px; min-width: 32px; min-height: 32px; }
  .vote-control.is-pending { opacity: .66; }
  /* Eigene Challenges können nicht bewertet werden. Die Pfeile wirken
     deaktiviert; die Gesamtwertung selbst behaelt ihre inhaltliche
     Positiv-/Negativfarbe, weil sie auch fuer den Ersteller Information ist. */
  .vote-control.is-owner-readonly {
    opacity: .72;
  }
  .vote-control.is-owner-readonly .vote-button {
    color: var(--muted);
    cursor: default;
  }
  .vote-control.is-owner-readonly .vote-score {
    cursor: default;
  }
  .vote-button:hover, .vote-button:focus-visible { background: var(--soft); color: var(--text); outline: none; }
  /* Aktive Votes zeigen die Entscheidung direkt am Pfeil. Ein zweiter Klick
     entfernt den Vote im Backend; beim anschließenden Re-Render verschwindet
     is-active automatisch und der Pfeil fällt auf den neutralen Zustand zurück. */
  .vote-button.vote-up.is-active {
    background: transparent;
    color: var(--vote-up);
  }
  .vote-button.vote-down.is-active {
    background: transparent;
    color: var(--danger);
  }
  .vote-score {
    min-width: 36px;
    padding: 0 7px;
    text-align: center;
    font-family: var(--font-data);
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    transition: color .16s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
  }
  .vote-score-emoji {
    flex: 0 0 auto;
    font-size: 12px;
    line-height: 1;
    transform: translateY(-0.5px);
  }
  .vote-score-value {
    display: inline-block;
    min-width: 1ch;
  }
  /* Das Vorzeichen wird bewusst nicht als +/− ausgeschrieben: Farbe und
     Feuer/Schneemann transportieren die Richtung, die Zahl bleibt ein Betrag. */
  .vote-score,
  .vote-score.is-positive,
  .vote-score.is-negative {
    color: var(--vote-score-color);
  }
  /* Gesamtwertung: ein Zeichen fuer die Richtung, eine Zahl fuer die
     Menge. Die Farbe wird aus Stimmungslage und Stimmenzahl berechnet und
     als Variable mitgegeben; hier steht nur, wie hell sie sein darf. */
  .ranking-badge {
    --rank-hue: 0;
    --rank-sat: 0%;
    --rank-light: 34%;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    border: 0;
    background: transparent;
    color: var(--text);
    padding: 2px 0;
    font-family: var(--font-data);
    font-size: 12px;
    font-weight: 700;
  }
  .ranking-badge-mark {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    fill: hsl(var(--rank-hue) var(--rank-sat) var(--rank-light));
    color: hsl(var(--rank-hue) var(--rank-sat) var(--rank-light));
  }
  .ranking-badge b {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
  }
  .ranking-badge.is-compact { padding: 0; font-size: 11px; }
  .ranking-badge.is-compact .ranking-badge-mark { width: 13px; height: 13px; }
  /* Ohne eine einzige abgegebene Stimme existiert visuell keine Ranking-Anzeige.
     Das Element bleibt nur als DOM-Anker vorhanden, damit der erste Vote ohne
     komplettes Karten-Rendering gezielt eingeblendet werden kann. */
  .ranking-badge.is-empty { display: none; }

  /* Spracheingabe: Mic und Undo liegen dezent innerhalb des Feldes. Die
     Wrapper-Klasse wird zentral per JavaScript auch an dynamische Formulare gesetzt. */
  .voice-input-shell {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
  }
  .voice-input-shell > input.voice-input-field,
  .voice-input-shell > textarea.voice-input-field {
    width: 100%;
    padding-right: 70px;
  }
  /* In bestehenden Flex-/Grid-Composer bleibt der Wrapper genau das eine
     Feld, das vorher direkt an dieser Stelle lag. So ändert die Erweiterung
     weder Spaltenbreite noch Editorhöhe. */
  .comment-input-wrap > .voice-input-shell {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 100%;
  }
  .update-inline-composer > .voice-input-shell.is-textarea {
    height: 100%;
    min-height: 0;
  }
  .voice-input-controls {
    position: absolute;
    top: 50%;
    right: 7px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transform: translateY(-50%);
    pointer-events: none;
  }
  .voice-input-shell.is-textarea .voice-input-controls {
    top: 8px;
    transform: none;
  }
  .voice-input-button {
    position: relative;
    width: 27px;
    height: 27px;
    min-width: 27px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--card) 88%, transparent);
    color: var(--muted);
    opacity: .78;
    cursor: pointer;
    pointer-events: auto;
  }
  .voice-input-button:hover,
  .voice-input-button:focus-visible {
    background: var(--soft);
    color: var(--text);
    opacity: 1;
    outline: 1px solid var(--line-strong);
    outline-offset: 1px;
  }
  .voice-input-button .ui-icon {
    width: 14px;
    height: 14px;
  }
  .voice-input-button:disabled {
    cursor: default;
    opacity: .28;
  }
  .voice-input-mic.is-listening {
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 10%, var(--card));
    opacity: 1;
  }
  .voice-input-mic.is-listening::after {
    content: '';
    position: absolute;
    width: 27px;
    height: 27px;
    border: 1px solid currentColor;
    border-radius: 50%;
    animation: voice-input-pulse 1.35s ease-out infinite;
    pointer-events: none;
  }
  @keyframes voice-input-pulse {
    from { transform: scale(.82); opacity: .48; }
    to { transform: scale(1.35); opacity: 0; }
  }

}

@layer components {
  /* Beobachten ist eine eigene persistente Beziehung. Auf Karten sitzt die
     Aktion kompakt oben rechts; in der Detailansicht bleibt sie eine breite
     primaere Aktion wie „Mitmachen“. */
  .challenge-watch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    box-shadow: none;
    transition: color .16s ease, background-color .16s ease, border-color .16s ease, transform .16s ease;
  }
  .challenge-watch-button.is-corner {
    min-height: 27px;
    max-width: 172px;
    padding: 4px 7px;
    border: 1px solid color-mix(in srgb,var(--favorite) 78%,#fff 22%);
    background: rgba(8,9,12,.64);
    color: color-mix(in srgb,var(--favorite) 78%,#fff 22%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font: inherit;
    font-family: var(--font-data);
    font-size: 9.5px;
    font-weight: 760;
    line-height: 1;
    letter-spacing: .02em;
    white-space: nowrap;
  }
  .challenge-watch-button.is-corner:hover,
  .challenge-watch-button.is-corner:focus-visible {
    background: color-mix(in srgb,var(--favorite) 18%,rgba(8,9,12,.82));
    border-color: var(--favorite);
    color: var(--favorite);
    outline: none;
    transform: translateY(-1px);
  }
  .challenge-watch-button.is-corner.is-active {
    background: var(--favorite);
    border-color: var(--favorite);
    color: var(--favorite-ink);
    box-shadow: 0 0 0 2px color-mix(in srgb,var(--favorite) 18%,transparent),0 7px 18px color-mix(in srgb,var(--favorite) 22%,transparent);
  }
  .challenge-watch-button.is-corner.is-active:hover,
  .challenge-watch-button.is-corner.is-active:focus-visible {
    background: var(--favorite);
    color: var(--favorite-ink);
  }
  .challenge-watch-button.is-corner:active { transform: scale(.985); }
  .challenge-watch-detail-action {
    margin: 0;
    padding: 24px 18px 18px;
    background: var(--card);
  }
  /* In der Challenge-Detailansicht ist Beobachten bewusst dieselbe
     primaere Aktion wie „Mitmachen“. Farbe, Radius, Typografie und Hover
     kommen deshalb direkt von .primary-action/.participation-join-primary. */
  .challenge-watch-button.is-detail {
    width: 100%;
    min-height: 50px;
    gap: 8px;
  }
  .challenge-watch-button.is-detail:not(.is-active):hover,
  .challenge-watch-button.is-detail:not(.is-active):focus-visible {
    background: var(--accent-deep);
    border-color: var(--accent-deep);
    color: var(--accent-ink);
  }
  /* Im aktiven Zustand ist Beobachten keine primaere Startaktion mehr,
     sondern dieselbe ruhige Ruecknahme-Aktion wie „Nicht mehr mitmachen“. */
  .challenge-watch-button.is-detail.is-active {
    min-height: 38px;
    background: transparent;
    border-color: var(--danger);
    color: var(--text);
  }
  .challenge-watch-button.is-detail.is-active:hover,
  .challenge-watch-button.is-detail.is-active:focus-visible {
    background: color-mix(in srgb,var(--danger) 8%,transparent);
    border-color: var(--danger);
    color: var(--text);
  }
  .challenge-watch-button.is-detail:focus-visible {
    outline: 3px solid var(--accent-glow);
    outline-offset: 2px;
  }
  .challenge-watch-icon {
    width: 13px;
    height: 13px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    color: currentColor;
  }
  .challenge-watch-icon svg { width: 13px; height: 13px; overflow: visible; }

  /* Favoriten auf Challenge-Karten sind Teil der kleinen Actionbar und
     ersetzen dort den redundanten „Challenge oeffnen“-Button. */
  .challenge-favorite-button.is-actionbar {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    box-shadow: none;
  }
  .challenge-favorite-button.is-actionbar svg {
    width: 17px;
    height: 17px;
  }
  .challenge-favorite-button.is-actionbar:hover,
  .challenge-favorite-button.is-actionbar:focus-visible {
    border: 0;
    background: var(--soft);
    color: var(--favorite);
    box-shadow: none;
    transform: none;
  }
  .challenge-favorite-button.is-actionbar.is-active {
    border: 0;
    background: transparent;
    color: var(--favorite);
    box-shadow: none;
  }
}

