/* Kaptain Stream update review (collection/update-review.js): closed one-line groups, two calm choices per item.
   Used in the wizard and in Profile Studio, so every token has a fallback for pages without the site theme. */
.ur-summary,
.ur-caught-up { margin: 0 0 12px; font-size: 0.92rem; color: var(--text-secondary, #b4bac6); }
.ur-caught-up { color: var(--accent, #00f5a0); font-weight: 600; }
.ur-group {
  margin: 0 0 8px;
  border: 1px solid var(--border-hover, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.ur-group > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.ur-group > summary::-webkit-details-marker { display: none; }
.ur-group > summary::after {
  content: '';
  width: 7px;
  height: 7px;
  margin-left: 4px;
  border-right: 2px solid var(--text-muted, #8b93a3);
  border-bottom: 2px solid var(--text-muted, #8b93a3);
  transform: rotate(45deg);
  transition: transform var(--transition-fast, 0.15s cubic-bezier(0.2, 0, 0, 1));
}
.ur-group[open] > summary::after { transform: rotate(225deg); }
.ur-group-title { flex: 1; }
.ur-count {
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-subtle, rgba(0, 245, 160, 0.14));
  color: var(--accent, #00f5a0);
  font-size: 0.75rem;
  text-align: center;
}
.ur-group[data-ur-group='conflict'] .ur-count,
.ur-group[data-ur-group='new'] .ur-count { background: rgba(245, 166, 35, 0.14); color: #f5a623; }
.ur-list { list-style: none; margin: 0; padding: 0 8px 8px; max-height: 260px; overflow-y: auto; }
.ur-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.05));
  font-size: 0.85rem;
}
.ur-label { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ur-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ur-where { color: var(--text-muted, #8b93a3); font-size: 0.75rem; }
.ur-choices { display: flex; gap: 6px; flex: none; }
.ur-choice {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border-hover, rgba(255, 255, 255, 0.12));
  background: transparent;
  color: var(--text-secondary, #b4bac6);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background var(--transition-fast, 0.15s cubic-bezier(0.2, 0, 0, 1)), color var(--transition-fast, 0.15s cubic-bezier(0.2, 0, 0, 1)), border-color var(--transition-fast, 0.15s cubic-bezier(0.2, 0, 0, 1));
}
.ur-choice:hover { border-color: var(--accent, #00f5a0); color: var(--text-primary, #f4f5f7); }
.ur-choice[aria-pressed='true'] { background: var(--accent-subtle, rgba(0, 245, 160, 0.14)); border-color: var(--accent, #00f5a0); color: var(--accent, #00f5a0); }
.ur-choice:focus-visible { outline: 2px solid var(--accent, #00f5a0); outline-offset: 2px; }
.ur-banner {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(245, 166, 35, 0.3);
  background: rgba(245, 166, 35, 0.08);
  font-size: 0.85rem;
  line-height: 1.5;
}
.ur-banner p { margin: 0 0 10px; }
.ur-note { margin: 10px 0 0; font-size: 0.8rem; color: var(--text-muted, #8b93a3); }
.ur-actions { display: flex; gap: 10px; margin-top: 18px; }
.ur-actions .wiz-primary { flex: 2; }
.ur-actions .wiz-secondary { flex: 1; }
@media (max-width: 480px) {
  .ur-item { flex-wrap: wrap; }
  .ur-choices { width: 100%; }
  .ur-choice { flex: 1; min-height: 44px; }
}

/* ---- The final Update screen (KaptainUpdateReview.doneHtml), in the wizard and in Studio's modal ----
   Same language as the wizard's Done card: a centred result, then quiet uppercase-titled cards. */
.ud { display: flex; flex-direction: column; gap: 14px; }
.ud-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 4px 0 2px; }
.ud-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  border-radius: 50%;
  color: var(--accent, #00f5a0);
  background: color-mix(in srgb, var(--accent, #00f5a0) 10%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--accent, #00f5a0) 35%, transparent);
}
.ud-mark svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ud[data-ud-state='stopped'] .ud-mark {
  color: var(--warning, #f5a623);
  background: color-mix(in srgb, var(--warning, #f5a623) 10%, transparent);
  border-color: color-mix(in srgb, var(--warning, #f5a623) 40%, transparent);
}
.ud-title {
  margin: 0;
  font: 800 clamp(1.5rem, 3vw, 1.9rem) / 1.1 'Outfit', 'Inter', sans-serif;
  letter-spacing: -0.02em;
  color: var(--text-primary, #f4f5f7);
}
/* Focus is moved here so the result is read first; it is not something to act on, so no ring. */
.ud .ud-title:focus,
.ud .ud-title:focus-visible { outline: none !important; box-shadow: none; } /* beats the site-wide :focus-visible !important ring */
.ud-lede {
  margin: 8px 0 0;
  max-width: 42ch;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-secondary, #b4bac6);
  text-wrap: balance;
}
.ud-lede strong { color: var(--text-primary, #f4f5f7); font-weight: 600; }
.ud-sections { display: flex; flex-direction: column; gap: 10px; }
.ud-section {
  padding: 14px 16px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  background: color-mix(in srgb, var(--text-primary, #f4f5f7) 2.5%, transparent);
}
.ud-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font: 600 0.78rem / 1.2 'Inter', sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #8b93a3);
}
.ud-section[data-ud-section='same'] .ud-section-title { margin-bottom: 4px; }
.ud-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; color: var(--accent, #00f5a0); }
.ud-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ud-section[data-ud-section='kept'] .ud-icon,
.ud-section[data-ud-section='same'] .ud-icon { color: var(--text-muted, #8b93a3); }
.ud-section[data-ud-section='failed'] { border-color: color-mix(in srgb, var(--warning, #f5a623) 40%, transparent); background: color-mix(in srgb, var(--warning, #f5a623) 6%, transparent); }
.ud-section[data-ud-section='failed'] .ud-icon,
.ud-section[data-ud-section='failed'] .ud-section-title { color: var(--warning, #f5a623); }
.ud-count {
  margin-left: auto;
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-primary, #f4f5f7) 8%, transparent);
  color: var(--text-secondary, #b4bac6);
  font-size: 0.74rem;
  letter-spacing: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.ud-names { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ud-names li {
  padding: 5px 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text-primary, #f4f5f7);
  overflow-wrap: anywhere;
}
.ud-names li + li { border-top: 1px solid color-mix(in srgb, var(--text-primary, #f4f5f7) 6%, transparent); }
.ud-section[data-ud-section='kept'] .ud-names li { color: var(--text-secondary, #b4bac6); }
.ud-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin-top: 2px;
  cursor: pointer;
  list-style: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent, #00f5a0);
  border-radius: 6px;
}
.ud-more > summary::-webkit-details-marker { display: none; }
.ud-more > summary::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--transition-fast, 0.15s cubic-bezier(0.2, 0, 0, 1));
}
.ud-more[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.ud-more[open] > summary { color: var(--text-muted, #8b93a3); }
.ud-more > summary:focus-visible { outline: 2px solid var(--accent, #00f5a0); outline-offset: 2px; }
.ud-line,
.ud-foot { margin: 0; font-size: 0.9rem; line-height: 1.45; color: var(--text-secondary, #b4bac6); }
.ud-foot { margin-top: 8px; color: var(--text-primary, #f4f5f7); font-weight: 500; }
.ud-actions { display: flex; }
.ud-actions .ud-done { width: 100%; min-height: 50px; justify-content: center; }
.ud-note-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
/* The wizard: the Done button sits in the screen's sticky footer, the summary scrolls above it. */
.ud-wiz > .ud-actions.wiz-done-footer { flex-direction: row; }
/* Studio's modal: the summary is the whole modal, its Done closes it. */
.ud-studio .ps-diff-body { padding: 26px 24px 0; }
.ud-studio .ud-actions { position: sticky; bottom: 0; padding: 14px 0 22px; background: linear-gradient(to top, var(--bg-card, #151923) 80%, transparent); }
@media (max-width: 580px) {
  .ud-studio .ps-diff-body { padding: 22px 18px 0; }
  .ud-studio .ud-actions { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .ud-more > summary::after { transition: none; }
}
/* The final screen has one action. The floating "View my collection" pill would be a second, and on a phone it sat on Done. */
html:has(.ud) .kcv-pill { display: none; }
