/* ==========================================================================
   Capsule — App styles (consumes tokens.css)
   --------------------------------------------------------------------------
   Base elements, Bootstrap token-mapping, the shared app-shell/nav, and the
   component styles shared across the pages (cards, chips, pills, gallery,
   forms, detail key/values, new-item steps). Class NAMES match the existing
   templates 1:1 so the restyle does not change structure or behaviour.
   ========================================================================== */

/* --- Self-hosted typeface (Inter variable, latin) ----------------------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2");
}

/* --- Map our tokens onto Bootstrap's CSS variables ---------------------- */
:root {
  --bs-body-bg: var(--c-bg);
  --bs-body-color: var(--c-text);
  --bs-body-font-family: var(--font-sans);
  --bs-border-color: var(--c-border);
  --bs-border-radius: var(--radius);
  --bs-border-radius-sm: var(--radius-sm);
  --bs-border-radius-lg: var(--radius-lg);
  --bs-link-color: var(--c-accent);
  --bs-link-color-rgb: var(--c-accent-rgb);
  --bs-link-hover-color: var(--c-accent-hover);
  --bs-link-hover-color-rgb: 52, 90, 80;
  --bs-primary: var(--c-accent);
  --bs-primary-rgb: var(--c-accent-rgb);
}

/* The one accent drives the primary action + the success action stays a
   calmer green so admin save buttons harmonise with the palette. */
.btn-primary {
  --bs-btn-bg: var(--c-accent);
  --bs-btn-border-color: var(--c-accent);
  --bs-btn-hover-bg: var(--c-accent-hover);
  --bs-btn-hover-border-color: var(--c-accent-hover);
  --bs-btn-active-bg: var(--c-accent-hover);
  --bs-btn-active-border-color: var(--c-accent-hover);
  --bs-btn-disabled-bg: var(--c-accent);
  --bs-btn-disabled-border-color: var(--c-accent);
}
.btn-success {
  --bs-btn-bg: var(--c-success);
  --bs-btn-border-color: var(--c-success);
  --bs-btn-hover-bg: #356b4d;
  --bs-btn-hover-border-color: #356b4d;
  --bs-btn-active-bg: #356b4d;
  --bs-btn-active-border-color: #356b4d;
  --bs-btn-disabled-bg: var(--c-success);
  --bs-btn-disabled-border-color: var(--c-success);
}

/* --- Base elements ------------------------------------------------------ */
body {
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  letter-spacing: var(--ls-heading);
}
.muted { color: var(--c-text-muted); }
.mono { font-family: var(--font-mono); }
.meta-small { font-size: var(--fs-sm); }

/* Accessible focus for custom interactive elements (chips, thumbs, switch) */
.filter-chip:focus-visible,
.gallery-thumbs button:focus-visible,
.user-switch a:focus-visible,
.app-nav__link:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* ======================================================================== */
/* App shell / top navigation (base.html)                                    */
/* ======================================================================== */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-xs);
}
.app-nav__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: var(--nav-height);
  flex-wrap: wrap;
}
.app-nav__brand {
  font-weight: var(--fw-bold);
  font-size: var(--fs-md);
  letter-spacing: var(--ls-heading);
  color: var(--c-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.app-nav__brand .app-nav__dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--c-accent);
  display: inline-block;
}
.app-nav__links { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.app-nav__link {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--c-text-muted);
  text-decoration: none;
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--touch-target);
}
.app-nav__link:hover { background: var(--c-surface-2); color: var(--c-text); }
.app-nav__link.active { color: var(--c-accent); background: var(--c-accent-subtle); }
.app-nav__spacer { margin-left: auto; }

/* Karen / Andreas segmented user switcher */
.user-switch {
  display: inline-flex;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-pill);
  padding: 2px;
  background: var(--c-surface);
}
.user-switch a {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--c-text-muted);
  text-decoration: none;
  line-height: 1;
  min-height: var(--touch-target);
  display: inline-flex;
  align-items: center;
}
.user-switch a.active { background: var(--c-accent); color: var(--c-accent-contrast); }

/* ======================================================================== */
/* Filter toolbar (index)                                                    */
/* ======================================================================== */
.topbar {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: var(--nav-height);
  z-index: 1020;
  box-shadow: var(--shadow-xs);
}
.brand-title { letter-spacing: var(--ls-heading); }
.user-nav .btn { border-radius: var(--radius-pill); padding: 6px 16px; }

.pill {
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-xs);
  border: 1px solid var(--c-border);
  background: var(--c-surface-2);
  color: var(--c-text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-chip {
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  border: 1px solid var(--c-border-strong);
  background: var(--c-surface);
  color: var(--c-text);
  display: inline-flex;
  align-items: center;
  min-height: var(--touch-target);   /* mobile-first touch target */
}
.filter-chip:hover { border-color: var(--c-accent-border); }
.filter-chip.active {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: var(--c-accent-contrast);
}

.chips-row {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  padding-bottom: 6px;
}
.chips-row .filter-chip { display: inline-block; }

/* Compact filter bar: a slim sticky bar (counts + one category control +
   Filter toggle + admin) keeps the grid in view; the secondary filters
   (Context/Review) live in a collapsible, non-sticky panel below it. */
.topbar .form-select { min-height: var(--touch-target); }
.filter-toggle {
  min-height: var(--touch-target);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filter-panel {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-xs);
}
/* W3 (Paket E): Tag-Legende im Filter-Panel. */
.tag-legend-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 12px;
  row-gap: 6px;
  align-items: start;
}
.tag-legend-list dt { margin: 0; }
.tag-legend-list dd { margin: 0; }

/* ======================================================================== */
/* Item cards (index grid)                                                   */
/* ======================================================================== */
.item-card {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  height: 100%;
  position: relative;
  /* W1-Stufe-1 (Paket E3, Entscheid 18): 260+ Karten in einem DOM — Off-Screen-
     Karten ueberspringen Layout/Paint; contain-intrinsic-size reserviert die
     Platzhalter-Hoehe (auto = zuletzt gerenderte Groesse wird gemerkt, kein Springen). */
  content-visibility: auto;
  contain-intrinsic-size: auto 300px;
}
@media (min-width: 768px) {
  .item-card { contain-intrinsic-size: auto 340px; }   /* Thumb 220px + Textblock */
}
.item-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
/* Mobile-first thumbnail heights (kept from T8). */
.thumb {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: var(--c-surface);
}
@media (min-width: 768px) {
  .thumb { height: 220px; }
}

.admin-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  z-index: 5;
}
.admin-actions .btn {
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  line-height: 1;
  min-width: var(--touch-target);
  min-height: var(--touch-target);
}
/* F3 (Paket E): Mehrfachauswahl-Checkbox in der Karte (Touch-Ziel, sitzt wie die
   Admin-Buttons ueber dem stretched-link) + die Sammel-Zuweisungs-Leiste. */
.admin-actions .bulk-check {
  width: 1.6rem;
  height: 1.6rem;
  margin: auto 0;
  background-color: var(--c-surface);
  border-color: var(--c-border-strong);
  cursor: pointer;
}
.bulk-bar {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface-2);
}

/* ======================================================================== */
/* Modal gallery (index)                                                     */
/* ======================================================================== */
.modal-img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: var(--c-surface);
}

/* ======================================================================== */
/* Detail + edit page                                                        */
/* ======================================================================== */
.cardx {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--c-surface);
}
.hero-img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: var(--c-surface);
}
.kv { font-size: var(--fs-sm); }
.kv .k { color: var(--c-text-muted); }
.kv .v { font-weight: var(--fw-semibold); }

/* Detail multi-image carousel + thumbnail strip (T-Img3) */
.item-gallery { background: var(--c-surface); }
.item-gallery .carousel-item img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: var(--c-surface);
}
.item-gallery .carousel-control-prev,
.item-gallery .carousel-control-next { width: 10%; }
.item-gallery .carousel-control-prev-icon,
.item-gallery .carousel-control-next-icon {
  background-color: rgba(31, 33, 35, 0.45);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  background-size: 1.4rem;
}
.item-gallery .carousel-indicators { margin-bottom: 0.5rem; }
.item-gallery .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(31, 33, 35, 0.45);
}
.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.75rem;
}
.gallery-thumbs button {
  border: 2px solid transparent;
  padding: 0;
  background: none;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
}
.gallery-thumbs button.active { border-color: var(--c-accent); }
.gallery-thumbs img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  display: block;
}

/* ======================================================================== */
/* New-item flow (admin_new_item)                                            */
/* ======================================================================== */
.card-pad {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.preview-img {
  width: 100%;
  max-height: 50vh;
  object-fit: contain;
  background: var(--c-surface);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
}
.btn-touch { min-width: var(--touch-target); min-height: var(--touch-target); }
.step-label {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  background: var(--c-surface-2);
  color: var(--c-text-muted);
}
.step-label.done { background: var(--c-success); color: #fff; }
.step-label.active { background: var(--c-accent); color: var(--c-accent-contrast); }
.field-suggested { background: #fff8e9; border-color: #f0d28a; }

/* ======================================================================== */
/* Feature hub (Paket C): start page tiles                                   */
/* ======================================================================== */
.hub-tile {
  display: block;
  height: 100%;
  min-height: var(--touch-target);
  padding: var(--space-5);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--c-text);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
a.hub-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: var(--c-text);
}
a.hub-tile:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}
.hub-tile__icon {
  font-size: var(--fs-2xl);
  line-height: 1;
  color: var(--c-accent);
  margin-bottom: var(--space-3);
}
.hub-tile--disabled {
  opacity: 0.55;
  box-shadow: none;
}
.hub-tile--disabled .hub-tile__icon { color: var(--c-text-muted); }

/* ======================================================================== */
/* KI-Assistent — chat interface (T6). Consumes tokens only; mobile-first.    */
/* ======================================================================== */
.chat-thread { display: flex; flex-direction: column; gap: var(--space-2); }
.chat-empty {
  background: var(--c-surface-2);
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.chat-msg--user { display: flex; justify-content: flex-end; }
.chat-msg--user .chat-bubble {
  background: var(--c-accent-subtle);
  border: 1px solid var(--c-accent-border);
  border-right: 3px solid var(--c-accent);           /* E3: Nutzer rechts, mit Akzent */
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  line-height: var(--lh-base);
  max-width: 85%;
}
.chat-msg--assistant { display: block; width: 100%; }
.chat-msg--assistant.card-pad { padding: var(--space-4); }   /* E3: Bubble-Padding nach Token */
.chat-text { white-space: pre-wrap; word-break: break-word; line-height: var(--lh-base); }
/* E3 (Tranche 2): serverseitig gerendertes Mini-Markdown (markdown_lite) */
.chat-text--md { white-space: normal; }
.chat-text--md p { margin: 0 0 var(--space-2); }
.chat-text--md p:last-child, .chat-text--md ul:last-child, .chat-text--md ol:last-child { margin-bottom: 0; }
.chat-text--md ul, .chat-text--md ol { margin: 0 0 var(--space-2); padding-left: 1.25rem; }
.chat-text--md li { margin: var(--space-1) 0; }
.chat-text--md .md-h2 { font-size: var(--fs-md); font-weight: var(--fw-semibold); letter-spacing: var(--ls-heading); margin: var(--space-3) 0 var(--space-2); }
.chat-text--md .md-h3 { font-size: var(--fs-base); font-weight: var(--fw-semibold); margin: var(--space-3) 0 var(--space-1); }
.chat-text--md .md-h2:first-child, .chat-text--md .md-h3:first-child { margin-top: 0; }
.chat-text--md strong { font-weight: var(--fw-semibold); }
.chat-text--md a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 2px; }
.chat-rationale {
  background: var(--c-surface-2);
  border-left: 4px solid var(--c-accent);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  color: var(--c-text);
}
/* dezente Tool-Aktivität */
.tool-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
}
.tool-chip .bi { color: var(--c-accent); }
/* E3 (Tranche 2): Werkzeug-Aufrufe eines Turns als EINE aufklappbare Sammelzeile */
.tool-group { align-self: flex-start; max-width: 100%; }
.tool-group__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 32px;
  padding: 4px 12px;
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.tool-group__toggle:hover { color: var(--c-text); background: var(--c-surface); }
.tool-group__toggle:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.tool-group__toggle .bi:first-child { color: var(--c-accent); }
.tool-group__chev { transition: transform 0.15s ease; }
.tool-group.is-open .tool-group__chev { transform: rotate(90deg); }
.tool-group__list { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
/* inline generated image (gated serve path only) */
.chat-gen-img {
  max-width: 100%;
  width: 320px;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  display: block;
}
.chat-attach-img {
  max-width: 220px;
  max-height: 220px;
  margin-top: var(--space-2);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  display: block;
}
/* composer + staged attachments */
.chat-composer.drag { outline: 2px dashed var(--c-accent); outline-offset: 4px; }
.chat-attach-row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.chat-attach-thumb {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
}
.chat-attach-thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); }
.chat-attach-rm { border: 1px solid var(--c-border-strong); background: var(--c-surface); border-radius: var(--radius-sm); }
.chat-rename-input { max-width: 100%; }
/* generated-image affordance (AS-fix): clickable thumbnail (fullscreen) + download */
figure.chat-gen { margin: 0 0 var(--space-2) 0; }
.chat-gen a { display: inline-block; }
.chat-img-dl { margin-top: var(--space-2); }
.chat-img-error {
  padding: var(--space-3);
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--radius-sm);
  background: var(--c-surface-2);
}

/* ======================================================================== */
/* KI-Assistent — Layout (Paket E3, Tranche 1). Tokens only.                */
/* Lesespalte (~74ch, zentriert), Composer als sticky Dock unten, Chat-      */
/* Verlauf als Overlay-Panel von links (Default zu, reiner JS-Zustand).      */
/* ======================================================================== */
.berater-page { max-width: 1100px; }
.chat-column {
  max-width: 74ch;
  margin: 0 auto;
  width: 100%;
}
.composer-dock {
  position: sticky;
  bottom: 0;
  z-index: 10;
  padding: var(--space-3) 0 var(--space-3);
  background: linear-gradient(to bottom, rgba(250, 250, 249, 0) 0%, var(--c-bg) var(--space-3));
}
.composer-dock .chat-composer { padding: var(--space-4); }
.history-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1039;                       /* unter dem Panel, ueber der App-Nav (1030) */
  background: rgba(31, 33, 35, 0.35);
}
.history-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  width: min(360px, 90vw);
  overflow-y: auto;
  padding: var(--space-4);
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  box-shadow: var(--shadow-lg);
}
.history-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  min-height: var(--touch-target);
}
.history-list { display: flex; flex-direction: column; }

/* --- Chatliste im Verlauf-Panel (Paket E3, Tranche 3) ---------------------- */
.chat-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
  min-height: var(--touch-target);
  border-bottom: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 0 var(--c-accent);
}
.chat-row.is-active { box-shadow: inset 3px 0 0 var(--c-accent); background: var(--c-accent-subtle); }
.chat-row__title {
  flex: 1 1 auto;
  min-width: 0;
  padding: var(--space-1) 0;
  text-align: left;
  font: inherit;
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
  color: var(--c-text);
  background: transparent;
  border: 0;
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}
.chat-row__title:hover { color: var(--c-accent); }
.chat-row__title:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: var(--radius-sm); }
.chat-row__actions, .chat-row__confirm { display: inline-flex; align-items: center; gap: var(--space-1); flex: 0 0 auto; }
.chat-row__confirm { gap: var(--space-2); }
.chat-row__confirm-text { font-size: var(--fs-xs); color: var(--c-danger); font-weight: var(--fw-medium); }
.icon-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--c-text-muted);
  cursor: pointer;
  line-height: 1;
}
.icon-btn:hover { background: var(--c-surface-2); color: var(--c-text); }
.icon-btn:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.icon-btn.is-on { color: var(--c-accent); }
.icon-btn--danger:hover, .icon-btn--danger:focus-visible { color: var(--c-danger); border-color: var(--c-danger); background: var(--c-surface); }

/* ======================================================================== */
/* Item-Pflege (Auftrag G): Bilder verwalten + Analyse-Diff (item_detail,      */
/* admin_item_reanalyze) — Tokens only, keine Nebenaesthetik.                */
/* ======================================================================== */
.image-care-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-3);
}
.image-care-card {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.image-care-card.is-main { border-color: var(--c-accent-border); background: var(--c-accent-subtle); }
.image-care-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
  background: var(--c-surface-2);
}
.image-care-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
}
.image-care-actions .icon-btn { border-color: var(--c-border); }
.image-care-actions .icon-btn:disabled { opacity: 0.35; cursor: default; }
.image-care-delete summary { list-style: none; display: inline-flex; align-items: center; min-height: 32px; }
.image-care-delete summary::-webkit-details-marker { display: none; }
.image-care-confirm {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding: var(--space-2);
  border: 1px solid var(--c-danger);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
}
.image-care-upload { padding-top: var(--space-2); border-top: 1px dashed var(--c-border); }

.reanalyze-diff td, .reanalyze-diff th { vertical-align: top; }
.reanalyze-diff .diff-old { color: var(--c-text-muted); text-decoration: line-through; }
.reanalyze-diff .diff-new { font-weight: var(--fw-semibold); }
.reanalyze-diff tr.is-protected td { background: var(--c-surface-2); color: var(--c-text-muted); }
.reanalyze-diff tr.is-conflict td { background: rgba(185, 132, 43, 0.10); }
.reanalyze-raw pre { max-height: 22rem; overflow: auto; font-size: var(--fs-xs); background: var(--c-surface-2); padding: var(--space-3); border-radius: var(--radius-sm); }
