:root {
  color-scheme: dark;
  --bg-page: #0f172a;
  --bg-surface: #1e293b;
  --bg-raised: #334155;
  --bg-raised-hover: #475569;

  --text-primary: #e2e8f0;
  --text-body: #cbd5e1;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-faint: #475569;
  --text-ghost: #334155;

  --border-default: #334155;
  --border-strong: #475569;

  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.35);
  --accent-flash: rgba(96, 165, 250, 0.55);
  --accent-flash-fade: rgba(96, 165, 250, 0);
  --accent-violet: #a78bfa;
  --accent-violet-hover: #c4b5fd;
  --accent-cyan: #38bdf8;
  --accent-lime: #84cc16;

  --danger: #dc2626;
  --danger-hover: #ef4444;
  --danger-active: #b91c1c;
  --danger-text: #f87171;

  --warning-bg: #422006;
  --warning-text: #fde68a;
  --warning-border: #78350f;

  --star-fg: #fbbf24;
  --star-fg-hover: #fcd34d;
  --star-border: #b45309;
  --star-border-hover: #d97706;

  --opened-fg: #34d399;
  --opened-fg-hover: #6ee7b7;
  --opened-border: #065f46;
  --opened-border-hover: #047857;
  --opened-pulse: rgba(52, 211, 153, 0.8);
  --opened-pulse-fade: rgba(52, 211, 153, 0);

  --success: #22c55e;

  --on-accent: #ffffff;
  --thumb: #f8fafc;

  --shadow-sm: rgba(0, 0, 0, 0.3);
  --shadow-md: rgba(0, 0, 0, 0.35);
  --shadow-lg: rgba(0, 0, 0, 0.4);
  --shadow-xl: rgba(0, 0, 0, 0.5);
  --overlay: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] {
  color-scheme: light;
  --bg-page: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-raised: #e2e8f0;
  --bg-raised-hover: #cbd5e1;

  --text-primary: #0f172a;
  --text-body: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --text-ghost: #cbd5e1;

  --border-default: #e2e8f0;
  --border-strong: #94a3b8;

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #3b82f6;
  --accent-glow: rgba(37, 99, 235, 0.3);
  --accent-flash: rgba(59, 130, 246, 0.45);
  --accent-flash-fade: rgba(59, 130, 246, 0);
  --accent-violet: #7c3aed;
  --accent-violet-hover: #6d28d9;
  --accent-cyan: #0284c7;
  --accent-lime: #65a30d;

  --danger: #dc2626;
  --danger-hover: #ef4444;
  --danger-active: #b91c1c;
  --danger-text: #dc2626;

  --warning-bg: #fef3c7;
  --warning-text: #78350f;
  --warning-border: #fbbf24;

  --star-fg: #d97706;
  --star-fg-hover: #b45309;
  --star-border: #fcd34d;
  --star-border-hover: #f59e0b;

  --opened-fg: #047857;
  --opened-fg-hover: #065f46;
  --opened-border: #6ee7b7;
  --opened-border-hover: #34d399;
  --opened-pulse: rgba(5, 150, 105, 0.7);
  --opened-pulse-fade: rgba(5, 150, 105, 0);

  --success: #16a34a;

  --on-accent: #ffffff;
  --thumb: #ffffff;

  --shadow-sm: rgba(15, 23, 42, 0.08);
  --shadow-md: rgba(15, 23, 42, 0.12);
  --shadow-lg: rgba(15, 23, 42, 0.18);
  --shadow-xl: rgba(15, 23, 42, 0.22);
  --overlay: rgba(15, 23, 42, 0.4);
}

* {
  box-sizing: border-box;
}
html {
  scrollbar-gutter: stable;
}
html, body {
  height: 100%;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}
#root {
  height: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Top bar — frosted glass (scrollable list passes underneath when sticky) */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid color-mix(in oklab, var(--border-default) 55%, transparent);
  background: color-mix(in oklab, var(--bg-surface) 52%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (background: color-mix(in lab, red, blue)) {
  .topbar {
    background: rgba(30, 41, 59, 0.52);
    border-bottom-color: rgba(51, 65, 85, 0.55);
  }
}
.topbar-start {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.topbar-logo-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
}
.topbar-logo-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.topbar-search-filter {
  flex: 1;
  min-width: 0;
}
.topbar-search-filter.list-filter {
  min-height: 40px;
  padding: 0 10px;
}
@keyframes logo-wobble {
  0%, 100% { transform: rotate(0deg); }
  25%       { transform: rotate(-8deg); }
  75%       { transform: rotate(8deg); }
}
.topbar-logo {
  transition: transform 0.3s ease;
}
body:not(.suggesting) .topbar-logo-btn:hover .topbar-logo {
  animation: logo-wobble 1.5s ease-in-out 1;
}
.suggesting .topbar-logo {
  animation: logo-wobble 0.8s ease-in-out infinite;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
}
@media (max-width: 520px) {
  .topbar-right .legendum-btn {
    font-size: 11px;
    padding: 6px 8px;
    gap: 4px;
  }
  .topbar-right .legendum-icon {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }
}
.icon-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 1.5rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover {
  background: var(--bg-raised);
}

/* Legendum button */
.legendum-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}
.legendum-linked {
  background: var(--bg-raised);
  color: var(--text-primary);
}
.legendum-linked:hover {
  background: var(--bg-raised-hover);
}
.legendum-link {
  background: var(--accent);
  color: var(--on-accent);
}
.legendum-link:hover {
  background: var(--accent-hover);
}
.legendum-link:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.legendum-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  font-size: 11px;
  font-weight: 700;
}
.legendum-linked.low-credits {
  border: 2px solid var(--accent-lime);
}
.legendum-linked .legendum-icon {
  background: var(--bg-raised-hover);
}

/* Lists */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* List filter (also `.topbar-search-filter` in the top bar) */
.list-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0 12px;
  min-height: 44px;
  background: var(--bg-page);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.list-filter:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-glow);
}
.list-filter-icon {
  flex-shrink: 0;
  display: flex;
  color: var(--text-muted);
}
.list-filter-input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 10px 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.3;
  outline: none;
}
.list-filter-input::placeholder {
  color: var(--text-muted);
}
.list-filter-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.list-filter-clear {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0 -4px 0 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.list-filter-clear:hover {
  background: var(--bg-raised);
  color: var(--text-primary);
}
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-default);
  cursor: pointer;
  background: var(--bg-surface);
  min-height: 56px;
}
.list-item-content {
  flex: 1;
  min-width: 0;
}
.list-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 0;
}
.link-list-favicon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 4px;
  object-fit: contain;
}
.list-item-title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-list-suggested-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-violet);
  letter-spacing: 0.02em;
}
.list-item-meta {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Swipe row */
.row-wrap {
  list-style: none;
  margin: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border-default);
}
.row-slider {
  display: flex;
  width: 100%;
  transition: transform 0.15s ease-out;
  touch-action: pan-y;
}
.row-main {
  flex: 1;
  min-width: 100%;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.row-edit {
  flex-shrink: 0;
  width: 72px;
  padding: 0 8px;
  border: none;
  border-radius: 0;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.row-edit:hover {
  background: var(--accent-light);
}
.row-edit:active {
  background: var(--accent-hover);
}
.row-delete {
  flex-shrink: 0;
  width: 72px;
  padding: 0 8px;
  border: none;
  border-radius: 0;
  background: var(--danger);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.row-delete:hover {
  background: var(--danger-hover);
}
.row-delete:active {
  background: var(--danger-active);
}

/* Screens */
.offline-banner {
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--warning-text);
  background: var(--warning-bg);
  border-bottom: 1px solid var(--warning-border);
}
.screen {
  padding-bottom: 24px;
}
.screen-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-default);
}
.screen-header-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.header-icon-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  background: var(--bg-page);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.header-icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.screen-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}
/*
 * Destination URL + copy (tracking URL). Like todos `.webhook-url`: not full-bleed —
 * `screen-header-text` is a column; default flex stretch was widening the row. Use
 * `align-self: flex-start` + `width: fit-content; max-width: 100%` so the line hugs
 * content until a long URL hits the column edge, then ellipsis.
 */
.link-destination-line {
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 12px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  color: var(--text-muted);
  cursor: pointer;
}
.link-destination-line:hover {
  color: var(--text-secondary);
}
.link-destination-line:hover .link-destination-url {
  color: var(--text-secondary);
}
.link-destination-url {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-destination-copy-icon {
  flex-shrink: 0;
  display: inline-flex;
  color: inherit;
}
.copied-badge {
  font-size: 11px;
  color: var(--success);
}
.back-btn {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text-primary);
}
.back-btn:hover {
  background: var(--bg-raised-hover);
}

/* Forms */
.form {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* Stacked field: small label above control */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.form-field-switch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.form-field-switch-hint {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.35;
  flex: 1;
  min-width: 12rem;
}
.form-save-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
/* Natural width only — old flex-basis ~16rem forced a wrap on narrow but not tiny viewports */
.form-save-actions-private {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
}
.form-save-actions-private .form-field-label {
  margin: 0;
  flex-shrink: 0;
}
.form-private-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
  line-height: 0;
}
/* Sliding on/off (private link) */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--bg-raised);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.toggle-switch:hover {
  background: var(--bg-raised-hover);
}
.toggle-switch[aria-checked="true"] {
  background: var(--accent);
}
.toggle-switch[aria-checked="true"]:hover {
  background: var(--accent-hover);
}
.toggle-switch:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
.toggle-switch:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}
.toggle-switch:disabled:hover {
  background: var(--bg-raised);
}
.toggle-switch[aria-checked="true"]:disabled:hover {
  background: var(--accent);
}
.toggle-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--thumb);
  box-shadow: 0 1px 3px var(--shadow-md);
  transition: transform 0.2s ease;
  pointer-events: none;
}
.toggle-switch[aria-checked="true"] .toggle-switch-thumb {
  transform: translateX(20px);
}
.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-glow);
}
.input::placeholder {
  color: var(--text-muted);
}
.btn {
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: var(--accent);
  color: var(--on-accent);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* Busy: do not use disabled on Save — drops focus / scroll jank.
   Never use cursor: wait — its hotspot differs from pointer and feels like a jump. */
.btn[aria-busy="true"] {
  opacity: 0.75;
  cursor: pointer;
}
/* Stable inner label so centered text does not shift when copy changes */
.form-save-btn {
  position: relative;
  overflow: visible;
  min-width: 9rem;
  box-sizing: border-box;
  contain: layout style;
}
.form-save-btn-label {
  display: inline-block;
  min-width: 7.5em;
  text-align: center;
  position: relative;
  z-index: 1;
}
/* Glow on a pseudo-element only: no filter, no shadow on the button box — avoids jitter */
.form-save-btn.btn--saved-flash::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  pointer-events: none;
  z-index: 0;
  animation: form-save-glow 1.1s ease-out;
}
@keyframes form-save-glow {
  0% {
    box-shadow: 0 0 0 0 var(--accent-flash-fade);
  }
  35% {
    box-shadow: 0 0 14px 3px var(--accent-flash);
  }
  100% {
    box-shadow: 0 0 0 0 var(--accent-flash-fade);
  }
}
.btn-secondary {
  background: var(--bg-raised);
  color: var(--text-primary);
}
.btn-danger {
  background: var(--danger);
}

/* FAB */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--shadow-sm);
  z-index: 5;
}
.fab:active {
  background: var(--accent-hover);
}

/* Login */
.login-screen {
  max-width: 400px;
  margin: 0 auto;
  padding: 24px 16px;
  text-align: center;
}
.login-screen h1 {
  font-size: 24px;
  margin-bottom: 8px;
}
.login-screen p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.login-logo {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* Links list helper styles (extracted from inline styles) */
.list-item--no-border {
  border-bottom: none;
}
.list-item-content--indent {
  margin-left: 8px;
}
.list-section-heading {
  margin: 1rem 0 0.5rem;
  padding: 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.empty-state-hint {
  padding: 16px;
  color: var(--text-muted);
  text-align: center;
}
.form-error {
  color: var(--danger-text);
  font-size: 13px;
  margin: 0;
}
.form-button-row {
  display: flex;
  gap: 8px;
}

/* Drag handle */
.drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  flex-shrink: 0;
  cursor: grab;
  color: var(--text-faint);
  touch-action: none;
}
.drag-handle:active {
  cursor: grabbing;
}
.drag-handle svg {
  width: 14px;
  height: 14px;
}
.drag-handle--static {
  cursor: default;
  color: var(--text-ghost);
  opacity: 0.45;
  pointer-events: none;
}

/* Dragging overlay */
.drag-overlay {
  background: var(--bg-surface);
  border: 1px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 8px 24px var(--shadow-lg);
  opacity: 0.95;
}

/* Dialog */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px var(--shadow-xl);
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-default);
}
.dialog-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 6px;
}
.dialog-close:hover {
  background: var(--bg-raised);
  color: var(--text-primary);
}
.dialog-body {
  padding: 20px;
}
.dialog-edit-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dialog-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.dialog-footer--with-private {
  justify-content: space-between;
  flex-wrap: wrap;
}
.dialog-footer:not(.dialog-footer--with-private) {
  justify-content: flex-end;
}
.dialog-footer-private {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.dialog-footer-buttons {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.dialog-section {
  margin-bottom: 20px;
}
.dialog-section:last-child {
  margin-bottom: 0;
}
.dialog-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dialog-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.dialog-section-head h3 {
  margin: 0;
}
.dialog-section p {
  font-size: 14px;
  color: var(--text-body);
  margin: 0 0 8px;
  line-height: 1.5;
}
.dialog-section code {
  background: var(--bg-page);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--accent-cyan);
}
.dialog-code {
  background: var(--bg-page);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  color: var(--text-primary);
  overflow-x: auto;
  margin: 0;
  white-space: pre;
  line-height: 1.6;
}
.dialog-section a {
  color: var(--accent-violet);
  text-decoration: none;
}
.dialog-section a:hover,
.dialog-section a:focus-visible {
  color: var(--accent-violet-hover);
  text-decoration: underline;
}

/* Theme chooser (pill group, used in AboutDialog) */
.theme-chooser {
  display: inline-flex;
  padding: 2px;
  margin: 0;
  border: none;
  border-radius: 999px;
  background: var(--bg-raised);
  gap: 0;
  min-inline-size: 0;
}
.theme-chooser-option {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.theme-chooser-option:hover {
  color: var(--text-primary);
}
.theme-chooser-option[aria-pressed="true"] {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: 0 1px 3px var(--shadow-sm);
}

/* Home list row: padlock (if private) + star + open-in-new-tab */
.link-list-row-trail {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 14px;
  gap: 10px;
  padding-left: 4px;
}
.link-list-private-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
  line-height: 0;
  align-self: flex-start;
  margin-top: 7px;
}
/* Shared metrics for trailing icon buttons (star, open). Keep them in lockstep. */
.link-list-trail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  background: var(--bg-page);
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 0;
  flex-shrink: 0;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.link-list-trail-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* Star / open columns + metrics (same feint band as `.link-destination-line`) */
.link-list-trail-btn-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.link-list-trail-metric {
  font-size: 11px;
  line-height: 1;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-height: 11px;
}
.link-list-star-btn {
  font-size: 16px;
  line-height: 1;
}
.link-list-star-btn[aria-pressed="true"] {
  color: var(--star-fg);
  border-color: var(--star-border);
}
.link-list-star-btn[aria-pressed="true"]:hover {
  color: var(--star-fg-hover);
  border-color: var(--star-border-hover);
}
.link-list-open-btn[aria-pressed="true"] {
  color: var(--opened-fg);
  border-color: var(--opened-border);
}
.link-list-open-btn[aria-pressed="true"]:hover {
  color: var(--opened-fg-hover);
  border-color: var(--opened-border-hover);
}
@keyframes open-btn-pulse {
  0%   { box-shadow: 0 0 0 0 var(--opened-pulse); transform: scale(1); }
  50%  { box-shadow: 0 0 0 7px var(--opened-pulse-fade); transform: scale(1.18); }
  100% { box-shadow: 0 0 0 0 var(--opened-pulse-fade); transform: scale(1); }
}
.link-list-open-btn--pulse {
  animation: open-btn-pulse 0.45s ease-out;
}
