.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  display: flex;
  justify-content: flex-end;
}

.settings-panel {
  width: min(420px, 100%);
  height: 100%;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  animation: slide-in-right 240ms ease-out;
  display: flex;
  flex-direction: column;
}

.settings-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
  padding-top: calc(var(--space-lg) + var(--safe-top));
}
.settings-panel__header h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}
.settings-panel__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.settings-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.settings-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.settings-segmented {
  display: flex;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}
.settings-segmented button {
  flex: 1;
  padding: var(--space-sm);
  border-radius: calc(var(--radius-md) - 4px);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.92rem;
  transition: all var(--t-fast);
}
.settings-segmented button.is-active {
  background: var(--text);
  color: var(--bg);
}

.settings-row-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  font-weight: 500;
  text-align: left;
}
.settings-row-btn__count {
  background: var(--accent);
  color: white;
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  font-size: 0.8rem;
  font-weight: 700;
}
.settings-row-btn--danger { color: var(--danger); }
.settings-row-btn--primary {
  background: var(--accent);
  color: white;
  font-weight: 700;
  justify-content: center;
}
.settings-row-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.settings-hint {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Watchlist modal */
.watchlist-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}
.watchlist-modal__panel {
  width: min(420px, 100%);
  max-height: 70vh;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--border);
  overflow-y: auto;
  animation: fade-in 240ms ease-out;
}
.watchlist-modal__panel h3 { margin-top: 0; }
.watchlist-modal__list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-md) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.watchlist-modal__list li {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm);
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
}
.watchlist-modal__list img {
  width: 46px;
  height: auto;
  border-radius: 4px;
}
.watchlist-modal__close {
  width: 100%;
  padding: var(--space-md);
  background: var(--accent);
  border-radius: var(--radius-pill);
  font-weight: 600;
}
