/* AgentBro — Settings UI Styles (macOS System Settings) */
/* Self-contained: does NOT rely on glass.css variables for colors */

/* ── Settings Color Tokens ── */
:root {
  --settings-bg: #f5f6fb;
  --settings-sidebar-bg: rgba(245, 247, 252, 0.84);
  --settings-content-bg: rgba(251, 252, 255, 0.74);
  --settings-card-bg: rgba(255, 255, 255, 0.78);
  --settings-card-border: rgba(40, 51, 77, 0.11);
  --settings-text-primary: #17191f;
  --settings-text-secondary: #7a8291;
  --settings-text-tertiary: #a9afbd;
  --settings-accent: #0a84ff;
  --settings-accent-strong: #0066f5;
  --settings-accent-soft: rgba(10, 132, 255, 0.12);
  --settings-accent-gradient: linear-gradient(135deg, #0a84ff 0%, #2563eb 62%, #6949ff 100%);
  --settings-toggle-on: #34C759;
  --settings-toggle-off: #e5e5ea;
  --settings-separator: rgba(33, 43, 66, 0.09);
  --settings-sidebar-active: #0a84ff;
  --settings-sidebar-hover: rgba(12, 24, 48, 0.055);
  --settings-shadow-soft: 0 12px 34px rgba(31, 41, 71, 0.09);
  --settings-shadow-card: 0 18px 45px rgba(31, 41, 71, 0.08), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  --settings-danger: #FF3B30;
  --settings-warning: #FF9500;
  --settings-status-active: #34C759;
  --settings-status-idle: #aeaeb2;
  --settings-status-error: #FF3B30;
  --settings-status-waiting: #FF9500;
}

/* ── Layout ── */
.settings-app {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 12%, rgba(10, 132, 255, 0.12), transparent 30%),
    radial-gradient(circle at 92% 4%, rgba(255, 149, 0, 0.10), transparent 26%),
    linear-gradient(145deg, #f7f8fc 0%, #fbfbfd 48%, #f2f5fb 100%);
  font-family: var(--font-sans), -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  color: var(--settings-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.settings-app::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: '';
  background:
    linear-gradient(rgba(255, 255, 255, 0.38) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.34) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.48), transparent 58%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.48), transparent 58%);
}

/* ── Sidebar ── */
.settings-sidebar {
  position: relative;
  z-index: 1;
  width: 248px;
  flex-shrink: 0;
  padding: 16px 14px;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(247, 248, 253, 0.74)),
    var(--settings-sidebar-bg);
  border-right: 1px solid rgba(40, 51, 77, 0.10);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.68) inset, 16px 0 42px rgba(31, 41, 71, 0.045);
  backdrop-filter: blur(24px) saturate(1.18);
  transition: width 0.18s ease, padding 0.18s ease;
}

.settings-sidebar--collapsed {
  width: 74px;
  padding: 16px 10px;
  overflow-x: hidden;
}

.settings-sidebar__brand {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 10px;
  align-items: stretch;
  width: 100%;
  margin: 0 0 18px;
}

.settings-sidebar__brand-home,
.settings-sidebar__collapse-toggle {
  display: flex;
  align-items: center;
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 22px;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 188, 66, 0.30), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 242, 249, 0.86));
  color: var(--settings-text-primary);
  cursor: pointer;
  font: inherit;
  line-height: 1;
  box-shadow: 0 14px 34px rgba(31, 41, 71, 0.09), 0 1px 0 rgba(255, 255, 255, 0.95) inset;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.settings-sidebar__brand-home {
  justify-content: flex-start;
  min-width: 0;
  padding: 8px 12px;
}

.settings-sidebar__collapse-toggle {
  justify-content: center;
  width: 54px;
  padding: 0;
}

.settings-sidebar__brand-home:hover,
.settings-sidebar__collapse-toggle:hover {
  border-color: rgba(10, 132, 255, 0.22);
  box-shadow: 0 18px 42px rgba(31, 41, 71, 0.12), 0 1px 0 rgba(255, 255, 255, 0.95) inset;
  transform: translateY(-1px);
}

.settings-sidebar__brand--contextual {
  margin-bottom: 16px;
}

.settings-sidebar__brand--contextual .settings-sidebar__brand-indicator {
  background: rgba(10, 132, 255, 0.12);
}

.settings-sidebar__collapse-toggle:hover .settings-sidebar__brand-indicator {
  background: var(--settings-accent-gradient);
  color: #ffffff;
}

.settings-sidebar__brand-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  overflow: hidden;
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(231, 235, 246, 0.88));
  box-shadow: 0 10px 22px rgba(22, 29, 49, 0.12), 0 1px 0 rgba(255, 255, 255, 0.98) inset;
}

.settings-sidebar__brand-mark::after {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #34c759;
  box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.14);
  content: '';
}

.settings-sidebar__collapse-logo {
  width: 32px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 6px 9px rgba(13, 20, 36, 0.16));
}

.settings-sidebar__brand-copy {
  display: flex;
  align-items: center;
  min-width: 0;
  margin-left: 12px;
  text-align: left;
}

.settings-sidebar__brand-title {
  overflow: hidden;
  color: var(--settings-text-primary);
  font-size: 17px;
  font-weight: 860;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-sidebar__brand-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.09);
  color: var(--settings-accent);
  font-size: 18px;
  font-weight: 700;
}

.settings-sidebar--collapsed .settings-sidebar__brand {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.settings-sidebar--collapsed .settings-sidebar__brand-home {
  display: none;
}

.settings-sidebar--collapsed .settings-sidebar__collapse-toggle {
  justify-content: center;
  width: 54px;
  min-height: 54px;
  padding: 0;
  margin-right: auto;
  margin-left: auto;
  border-radius: 18px;
}

.settings-sidebar--collapsed .settings-sidebar__brand-copy {
  display: none;
}

.settings-sidebar__group {
  margin-bottom: 6px;
}

.settings-sidebar__group-label {
  font-size: 11px;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--settings-text-secondary);
  padding: 12px 14px 7px;
}

.settings-sidebar__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 7px 10px;
  border-radius: 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 640;
  color: var(--settings-text-primary);
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
  border: none;
  background: transparent;
  line-height: 1.3;
}

.settings-sidebar__label-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-sidebar--collapsed .settings-sidebar__label-text,
.settings-sidebar--collapsed .settings-sidebar__group-label,
.settings-sidebar--collapsed .settings-sidebar__separator,
.settings-sidebar--collapsed .settings-capability-agent-list,
.settings-sidebar--collapsed .settings-capability-empty,
.settings-sidebar--collapsed .settings-capability-more,
.settings-sidebar--collapsed .settings-capability-nav button em {
  display: none;
}

.settings-sidebar--collapsed .settings-sidebar__item,
.settings-sidebar--collapsed .settings-capability-nav button {
  justify-content: center;
  width: 48px;
  min-height: 48px;
  padding: 0;
  margin: 0 auto;
}

.settings-sidebar--collapsed .settings-sidebar__group,
.settings-sidebar--collapsed .settings-capability-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.settings-sidebar--collapsed .settings-sidebar__icon,
.settings-sidebar--collapsed .settings-capability-nav__icon--colored {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 12px;
  font-size: 15px;
}

.settings-sidebar--collapsed .settings-capability-nav__icon {
  width: 32px;
  flex: 0 0 32px;
  font-size: 18px;
  text-align: center;
}

.settings-sidebar__item:hover {
  background: var(--settings-sidebar-hover);
  transform: translateX(2px);
}

.settings-sidebar__item--active {
  background: var(--settings-accent-gradient);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(10, 132, 255, 0.28), 0 1px 0 rgba(255, 255, 255, 0.28) inset;
}

.settings-sidebar__item--active:hover {
  background: var(--settings-accent-gradient);
}

.settings-sidebar__icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(18, 24, 40, 0.13), 0 1px 0 rgba(255, 255, 255, 0.26) inset;
}

.settings-sidebar__separator {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(40, 51, 77, 0.12), transparent);
  margin: 12px 14px;
}

.settings-sidebar--capability {
  padding: 16px 14px;
}

.settings-sidebar--capability .settings-sidebar__brand-home,
.settings-sidebar--capability .settings-sidebar__collapse-toggle {
  min-height: 58px;
}

.settings-capability-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-capability-nav button,
.settings-capability-agent,
.settings-capability-more {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--settings-text-primary);
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  font-weight: 660;
  line-height: 1.2;
  text-align: left;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.settings-capability-nav button:hover,
.settings-capability-agent:hover,
.settings-capability-more:hover {
  background: var(--settings-sidebar-hover);
  transform: translateX(2px);
}

.settings-capability-nav button.active {
  background: var(--settings-accent-gradient);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(10, 132, 255, 0.25), 0 1px 0 rgba(255, 255, 255, 0.25) inset;
}

.settings-capability-agent.active {
  background: rgba(10, 132, 255, 0.12);
  color: var(--settings-sidebar-active);
}

.settings-capability-nav__icon {
  width: 20px;
  flex: 0 0 20px;
  text-align: center;
}

.settings-capability-nav__icon--colored {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 8px 16px rgba(18, 24, 40, 0.13), 0 1px 0 rgba(255, 255, 255, 0.28) inset;
}

.settings-capability-nav button em {
  min-width: 24px;
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--settings-text-secondary);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
}

.settings-capability-nav button.active em {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.settings-capability-agent-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 8px;
}

.settings-capability-agent i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: #c7c7cc;
}

.settings-capability-agent--installed i {
  background: #34c759;
}

.settings-capability-agent--update i {
  background: #ff9500;
}

.settings-capability-agent span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-capability-agent em {
  max-width: 116px;
  overflow: hidden;
  color: var(--settings-text-tertiary);
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-capability-agent.active em {
  color: rgba(0, 122, 255, 0.55);
}

.settings-capability-empty {
  padding: 9px 12px;
  color: var(--settings-text-tertiary);
  font-size: 12px;
}

.settings-capability-more {
  color: var(--settings-text-secondary);
  border: 1px dashed rgba(40, 51, 77, 0.14);
  background: rgba(255, 255, 255, 0.28);
}

/* ── Settings Scrollbar ── */
.settings-scroll::-webkit-scrollbar {
  width: 6px;
}

.settings-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.settings-scroll::-webkit-scrollbar-thumb {
  background: rgba(55, 65, 86, 0.18);
  border-radius: 3px;
}

.settings-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(55, 65, 86, 0.28);
}

/* ── Content Panel ── */
.settings-content {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  padding: 70px 56px 46px;
  min-width: 0;
  background:
    radial-gradient(circle at 72% 0%, rgba(10, 132, 255, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.40), rgba(255, 255, 255, 0.16)),
    var(--settings-content-bg);
  backdrop-filter: blur(14px);
}

.settings-content--market {
  padding-right: 36px;
  padding-left: 36px;
}

.settings-content--market .settings-window-brand {
  left: 36px;
}

.settings-window-brand {
  position: absolute;
  top: 24px;
  left: 56px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  color: #525a67;
  font-size: 13px;
  font-weight: 820;
  letter-spacing: 0;
  pointer-events: none;
}

.settings-window-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 5px 12px rgba(31, 41, 71, 0.12);
}

.settings-window-brand__mark img {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}

.settings-window-brand__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.settings-window-brand__name {
  color: #525a67;
  font-size: 13px;
  font-weight: 860;
  letter-spacing: 0;
}

.settings-window-brand__slogan {
  color: var(--settings-text-secondary);
  font-size: 11px;
  font-weight: 620;
  letter-spacing: 0;
}

/* ── Close Button (settings-specific) ── */
.settings-close-btn {
  position: absolute;
  top: 26px;
  right: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 760;
  color: var(--settings-text-secondary);
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(40, 51, 77, 0.10);
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(31, 41, 71, 0.07), 0 1px 0 rgba(255, 255, 255, 0.76) inset;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  margin: 0;
}

.settings-close-btn:hover {
  background: #ffffff;
  color: var(--settings-text-primary);
  box-shadow: 0 12px 26px rgba(31, 41, 71, 0.10), 0 1px 0 rgba(255, 255, 255, 0.90) inset;
  transform: translateY(-1px);
}

.settings-update-pill {
  position: absolute;
  top: 26px;
  right: 120px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 720;
  color: #ffffff;
  background: linear-gradient(135deg, #2f80ff, #2bb37a);
  border: 0;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(47, 128, 255, 0.30), 0 1px 0 rgba(255, 255, 255, 0.36) inset;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  margin: 0;
  animation: settings-update-pill-pop 0.25s ease-out;
}

.settings-update-pill span[aria-hidden] {
  font-size: 14px;
  line-height: 1;
}

.settings-update-pill em {
  font-style: normal;
  opacity: 0.85;
  font-weight: 600;
}

.settings-update-pill:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 26px rgba(47, 128, 255, 0.40), 0 1px 0 rgba(255, 255, 255, 0.50) inset;
}

@keyframes settings-update-pill-pop {
  from { transform: translateY(-4px) scale(0.94); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.settings-mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 32px;
  padding: 0 12px;
  color: #1e2738;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(40, 51, 77, 0.11);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 760;
  box-shadow: 0 7px 18px rgba(31, 41, 71, 0.07), 0 1px 0 rgba(255, 255, 255, 0.76) inset;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.settings-mini-button:hover {
  background: #ffffff;
  border-color: rgba(10, 132, 255, 0.22);
  box-shadow: 0 10px 24px rgba(31, 41, 71, 0.10), 0 1px 0 rgba(255, 255, 255, 0.90) inset;
  transform: translateY(-1px);
}

.settings-mini-button--danger {
  color: #a32f2f;
  background: rgba(255, 255, 255, 0.70);
  border-color: rgba(255, 59, 48, 0.18);
}

.settings-mini-button--danger:hover {
  color: #8f1f1f;
  background: rgba(255, 245, 244, 0.94);
  border-color: rgba(255, 59, 48, 0.28);
}

.settings-mini-button:disabled {
  cursor: default;
  opacity: 0.52;
}

.settings-mini-button:disabled:hover {
  background: var(--settings-card-bg);
  border-color: var(--settings-card-border);
}

/* ── Section ── */
.setting-section {
  width: min(100%, 900px);
  margin-bottom: 32px;
}

.setting-section__header {
  margin-bottom: 24px;
  padding-right: 76px;
}

.setting-section__title {
  font-size: 34px;
  line-height: 1.08;
  font-weight: 860;
  color: var(--settings-text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.055em;
}

.setting-section__description {
  max-width: 680px;
  font-size: 16px;
  font-weight: 520;
  color: var(--settings-text-secondary);
  line-height: 1.45;
}

.setting-section__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.setting-section--compact {
  margin-bottom: 28px;
}

.setting-section--compact .setting-section__header {
  margin-bottom: 24px;
}

.setting-section--compact .setting-section__body {
  gap: 24px;
}

.setting-section--compact .setting-group__header {
  margin-bottom: 12px;
  padding-left: 10px;
}

.setting-section--compact .setting-group__label {
  padding-left: 0;
  color: var(--settings-text-primary);
  font-size: 15px;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: none;
}

.setting-section--compact .setting-group {
  padding: 6px;
}

.setting-section--compact .settings-card {
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 249, 253, 0.76)),
    var(--settings-card-bg);
  border-color: rgba(40, 51, 77, 0.10);
  border-radius: 22px;
  box-shadow: var(--settings-shadow-card);
}

.setting-section--compact .setting-row {
  min-height: 64px;
  padding: 12px 20px;
}

.setting-section--compact .setting-row__label {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.25;
}

.setting-section--compact .setting-row__description {
  margin-top: 5px;
  color: #808899;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.setting-section--compact .setting-row__control {
  margin-left: 24px;
}

.setting-section--compact .glass-dropdown__trigger {
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(31, 41, 71, 0.06), 0 1px 0 rgba(255, 255, 255, 0.82) inset;
}

.setting-section--compact .glass-slider {
  min-width: 220px;
}

.surface-mode-segmented {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 12px;
  background: #eef0f5;
  padding: 4px;
}

.surface-mode-segmented__option {
  min-width: 70px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #8a93a3;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.surface-mode-segmented__option:hover {
  color: #1f2328;
}

.surface-mode-segmented__option--active {
  border-color: #dfe3ea;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 3px rgba(0, 25, 126, 0.08);
}

.island-settings-section .color-theme-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.island-settings-section .color-theme-card {
  min-width: 0;
  padding: 8px;
  border-width: 1px;
  border-radius: 16px;
  font-family: inherit;
  text-align: left;
}

.island-settings-section .color-theme-card__preview {
  margin-bottom: 8px;
}

.island-settings-section .color-theme-card__swatch {
  height: 54px;
  border-radius: 12px;
}

.island-settings-section .color-theme-card__swatch-card {
  top: 0;
  left: 50%;
  right: auto;
  width: min(76%, 130px);
  height: 24px;
  transform: translateX(-50%);
  border-radius: 0 0 12px 12px;
}

.island-settings-section .color-theme-card__swatch-dot {
  right: 14px;
  bottom: 12px;
  width: 7px;
  height: 7px;
}

.island-settings-section .color-theme-card__label {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.island-settings-section .color-theme-card__tag {
  display: block;
  text-align: center;
}

/* ── Group ── */
.settings-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(250, 251, 254, 0.76)),
    var(--settings-card-bg);
  border: 1px solid var(--settings-card-border);
  border-radius: 22px;
  overflow: visible;
  box-shadow: var(--settings-shadow-card);
  backdrop-filter: blur(18px) saturate(1.18);
}

.settings-card:has(.glass-dropdown__trigger--open) {
  position: relative;
  z-index: 40;
}

.setting-group {
  padding: 6px 20px;
}

.setting-group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-left: 10px;
}

.setting-group__label {
  font-size: 12px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--settings-text-secondary);
}

.setting-group__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Row ── */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  min-height: 62px;
  border-radius: 14px;
  transition: background 0.14s ease, padding-left 0.14s ease, padding-right 0.14s ease;
}

.setting-row + .setting-row {
  border-top: 1px solid var(--settings-separator);
}

.setting-row:hover {
  background: rgba(255, 255, 255, 0.44);
  padding-right: 10px;
  padding-left: 10px;
}

.setting-section--compact .setting-row:hover {
  padding-right: 20px;
  padding-left: 20px;
}

.setting-row__info {
  flex: 1;
  min-width: 0;
}

.setting-row__label {
  font-size: 15px;
  font-weight: 720;
  color: var(--settings-text-primary);
  letter-spacing: -0.01em;
}

.setting-row__description {
  font-size: 13px;
  font-weight: 510;
  color: var(--settings-text-secondary);
  margin-top: 5px;
  line-height: 1.35;
}

.setting-row__control {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 16px;
}

/* ── Toggle (iOS/macOS style) ── */
.toggle {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background 0.2s ease;
  outline: none;
}

.toggle--off {
  background: var(--settings-toggle-off);
}

.toggle--on {
  background: var(--settings-toggle-on);
}

.toggle__knob {
  position: absolute;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 0 1px rgba(0, 0, 0, 0.1);
}

/* ── Dropdown (macOS native style) ── */
.glass-dropdown {
  position: relative;
  display: inline-block;
}

.glass-dropdown:has(.glass-dropdown__trigger--open) {
  z-index: 41;
}

.glass-dropdown__trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: #ffffff;
  border: 1px solid var(--settings-card-border);
  border-radius: 6px;
  color: var(--settings-text-primary);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  min-width: 120px;
  transition: border-color 0.15s ease;
}

.glass-dropdown__trigger:hover {
  border-color: #c7c7cc;
}

.glass-dropdown__trigger--open {
  border-color: var(--settings-accent);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.glass-dropdown__label {
  flex: 1;
  text-align: left;
}

.glass-dropdown__arrow {
  font-size: 10px;
  color: var(--settings-text-secondary);
  transition: transform 0.15s ease;
}

.glass-dropdown__arrow--open {
  transform: rotate(180deg);
}

.glass-dropdown__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 42;
  background: #ffffff;
  border: 1px solid var(--settings-card-border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06);
  padding: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.glass-dropdown__option {
  padding: 6px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  color: var(--settings-text-primary);
  transition: background 0.1s ease;
}

.glass-dropdown__option:hover {
  background: rgba(0, 0, 0, 0.04);
}

.glass-dropdown__option--selected {
  background: var(--settings-accent);
  color: #ffffff;
}

.glass-dropdown__option--selected:hover {
  background: var(--settings-accent);
}

/* ── Slider (macOS style) ── */
.glass-slider {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}

.glass-slider__input {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(
    to right,
    var(--settings-accent) 0%,
    var(--settings-accent) var(--slider-fill, 50%),
    #d1d1d6 var(--slider-fill, 50%),
    #d1d1d6 100%
  );
}

.glass-slider__input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2), 0 0 1px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.glass-slider__input::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.glass-slider__input::-webkit-slider-thumb:active {
  transform: scale(1.05);
}

.glass-slider__value {
  font-size: 12px;
  color: var(--settings-text-secondary);
  min-width: 36px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ── Shortcut Table ── */
.shortcuts-table {
  width: 100%;
}

.shortcuts-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  min-height: 48px;
}

.shortcuts-row + .shortcuts-row {
  border-top: 1px solid var(--settings-separator);
}

.shortcuts-row__action {
  min-width: 0;
  font-size: 14px;
  font-weight: 620;
  color: var(--settings-text-primary);
}

.shortcuts-row__meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}

.shortcuts-row__keys {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  min-width: 92px;
  max-width: 220px;
  color: var(--settings-text-secondary);
  font-size: 12px;
}

.shortcuts-row__keys kbd {
  display: inline-block;
  min-width: 28px;
  padding: 3px 8px;
  background: rgba(245, 247, 252, 0.86);
  border: 1px solid rgba(133, 142, 163, 0.18);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 680;
  color: var(--settings-text-secondary);
  line-height: 1.35;
  text-align: center;
}

.shortcuts-row__edit {
  background: none;
  border: none;
  color: var(--settings-accent);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
  transition: background 0.15s ease;
}

.shortcuts-row__edit:hover {
  background: rgba(0, 122, 255, 0.08);
}

.shortcuts-row__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.shortcuts-row__clear {
  color: var(--settings-text-secondary);
}

.shortcuts-row__recording {
  padding: 4px 12px;
  background: rgba(0, 122, 255, 0.08);
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 999px;
  color: var(--settings-accent);
  font-size: 12px;
  font-weight: 700;
  animation: pulse-border-light 1.5s ease-in-out infinite;
}

.shortcuts-row__off {
  color: var(--settings-text-tertiary);
  font-size: 12px;
  font-weight: 650;
}

.shortcuts-row__conflict {
  color: #ff3b30;
}

.shortcuts-advanced {
  border-top: 1px solid var(--settings-separator);
}

.shortcuts-advanced__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 0;
  background: none;
  border: 0;
  color: var(--settings-text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  text-align: left;
}

.shortcuts-advanced__toggle:hover {
  color: var(--settings-text-primary);
}

.shortcuts-advanced__count {
  color: var(--settings-text-tertiary);
  font-size: 12px;
  font-weight: 650;
}

.shortcuts-table--advanced {
  border-top: 1px solid var(--settings-separator);
}

.shortcut-global-control {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.shortcut-global-control__input {
  width: min(260px, 42vw);
  min-width: 210px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.shortcut-status {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.shortcut-status--error {
  color: #b42318;
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.18);
}

@keyframes pulse-border-light {
  0%, 100% { border-color: rgba(0, 122, 255, 0.2); }
  50% { border-color: rgba(0, 122, 255, 0.5); }
}

/* ── Agent Hook Row ── */
.agent-hook-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  min-height: 44px;
}

.agent-hook-row + .agent-hook-row,
.setting-row + .agent-hook-row,
.agent-hook-row + .setting-row {
  border-top: 1px solid var(--settings-separator);
}

.agent-hook-row__status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.agent-hook-row__status--connected {
  background: var(--settings-status-active);
  box-shadow: 0 0 6px var(--settings-status-active);
}

.agent-hook-row__status--disconnected {
  background: var(--settings-status-idle);
}

.agent-hook-row__label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--settings-text-primary);
}

.agent-hook-row__path {
  display: block;
  font-size: 11px;
  color: var(--settings-text-secondary);
  opacity: 0.7;
  margin-top: 2px;
}

.agent-hook-row__remove {
  background: none;
  border: none;
  color: var(--settings-text-secondary);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0.5;
}

.agent-hook-row__remove:hover {
  opacity: 1;
  background: rgba(255, 80, 80, 0.15);
  color: #ff5050;
}

/* ── Engine Add Button ── */
.engine-add-btn {
  display: block;
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  background: none;
  border: 1px dashed var(--settings-separator);
  border-radius: 8px;
  color: var(--settings-text-secondary);
  font-size: 13px;
  cursor: pointer;
}

.engine-add-btn:hover {
  border-color: var(--settings-text-secondary);
  color: var(--settings-text-primary);
}

/* ── Engine Add Form ── */
.engine-add-form {
  padding: 12px;
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--settings-separator);
  border-radius: 8px;
}

.engine-add-form__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.engine-add-form__row label {
  font-size: 12px;
  color: var(--settings-text-secondary);
  min-width: 80px;
}

.engine-add-form__row .glass-input {
  flex: 1;
}

.engine-add-form__path-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.engine-add-form__path-input .glass-input {
  flex: 1;
}

.engine-add-form__status {
  font-size: 11px;
  white-space: nowrap;
}

.engine-add-form__status--valid {
  color: var(--settings-status-active);
}

.engine-add-form__status--invalid {
  color: #ff5050;
}

.engine-add-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.engine-add-form__cancel,
.engine-add-form__submit {
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  border: none;
}

.engine-add-form__cancel {
  background: rgba(255, 255, 255, 0.05);
  color: var(--settings-text-secondary);
}

.engine-add-form__submit {
  background: var(--settings-status-active);
  color: #fff;
}

.engine-add-form__submit:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ── Sound Event Row ── */
.sound-event-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 168px) 34px auto;
  align-items: center;
  column-gap: 14px;
  min-height: 58px;
  padding: 12px 16px;
  border-radius: 14px;
  transition: background 0.14s ease;
}

.sound-event-row + .sound-event-row {
  border-top: 1px solid var(--settings-separator);
}

.sound-event-row:hover {
  background: rgba(255, 255, 255, 0.46);
}

.sound-event-row--custom {
  grid-template-columns: minmax(0, 1fr) auto;
}

.sound-import-status {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.sound-import-status--success {
  color: var(--settings-status-active);
  background: rgba(52, 199, 89, 0.12);
}

.sound-import-status--error {
  color: var(--settings-danger);
  background: rgba(255, 59, 48, 0.12);
}

.sound-event-row__label {
  display: flex;
  align-items: center;
  min-width: 0;
  font-size: 14px;
  font-weight: 560;
  line-height: 1.3;
  color: var(--settings-text-primary);
  overflow-wrap: anywhere;
}

.sound-event-row__play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0 0 0 2px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #a8afbd;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sound-event-row__play:hover {
  border-color: rgba(10, 132, 255, 0.14);
  background: rgba(10, 132, 255, 0.08);
  color: var(--settings-accent);
  transform: translateY(-1px);
}

/* ── SSH Host Card ── */
.ssh-host-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 0;
  min-height: 62px;
  min-width: 0;
}

.ssh-host-card + .ssh-host-card {
  border-top: 1px solid var(--settings-separator);
}

.ssh-host-card__info {
  flex: 1;
  min-width: 0;
}

.ssh-host-card__name {
  font-size: 15px;
  color: var(--settings-text-primary);
  font-weight: 720;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0;
}

.ssh-host-card__host {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
  font-size: 13px;
  color: var(--settings-text-secondary);
  font-family: 'SF Mono', 'Menlo', monospace;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.ssh-host-card__target {
  min-width: 0;
}

.ssh-host-card__error {
  color: #c53030;
  font-family: var(--font-sans), -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  font-weight: 650;
}

.ssh-host-card__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.ssh-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-sans), -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  font-weight: 720;
  white-space: nowrap;
}

.ssh-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #9aa1ae;
  box-shadow: 0 0 0 3px rgba(154, 161, 174, 0.14);
}

.ssh-status--connected {
  color: #16823a;
}

.ssh-status--connected .ssh-status__dot {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.ssh-status--connecting {
  color: #0b6cb8;
}

.ssh-status--connecting .ssh-status__dot {
  background: #0a84ff;
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.14);
}

.ssh-status--failed {
  color: #c53030;
}

.ssh-status--failed .ssh-status__dot {
  background: #ff3b30;
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.14);
}

.ssh-host-card--import {
  padding: 14px 4px;
}

.ssh-host-card--import .settings-mini-button {
  min-width: 76px;
}

.ssh-empty-state {
  padding: 18px 8px;
}

.ssh-empty-state__title {
  color: #9aa1ae;
  font-size: 14px;
  font-weight: 650;
}

.ssh-empty-state__text {
  margin-top: 4px;
  color: #a8afba;
  font-size: 12px;
  line-height: 1.45;
}

.ssh-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
}

.ssh-import-list {
  margin: -6px 0;
  max-height: min(520px, 48vh);
  overflow-y: auto;
  padding-right: 4px;
}

.ssh-host-card__remove {
  background: none;
  border: none;
  color: var(--settings-text-tertiary);
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.ssh-host-card__remove:hover {
  color: var(--settings-danger);
}

.ssh-host-card__remove:disabled {
  cursor: default;
  opacity: 0.45;
}

.ssh-host-card__notice {
  width: 100%;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: var(--font-size-xs, 11px);
  line-height: 1.4;
}

.ssh-host-card__notice--success {
  color: #2e7d32;
  background: #e8f5e9;
}

.ssh-host-card__notice--error {
  color: #c62828;
  background: #ffebee;
}

/* ── Hook badge on button ── */
.ssh-hook-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--settings-accent, #007aff);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.settings-mini-button--active {
  background: var(--settings-hover, rgba(0, 0, 0, 0.06));
}

.settings-mini-button--sm {
  font-size: var(--font-size-xs, 11px);
  padding: 3px 10px;
  min-height: unset;
}

/* ── Hooks Panel (inline under host card) ── */
.ssh-hooks-panel {
  width: 100%;
  padding: 10px 14px;
  background: var(--settings-card-bg, rgba(0, 0, 0, 0.02));
  border-radius: 8px;
  border: 1px solid var(--settings-separator, rgba(0, 0, 0, 0.06));
}

.ssh-hooks-panel__header {
  font-size: var(--font-size-xs, 11px);
  color: var(--settings-tertiary, #888);
  margin-bottom: 8px;
}

.ssh-hooks-panel__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ssh-hooks-panel__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}

.ssh-hooks-panel__agent-name {
  flex: 1;
  font-size: var(--font-size-sm, 13px);
  font-weight: 500;
  font-family: var(--font-mono);
}

.ssh-hooks-panel__status {
  font-size: var(--font-size-xs, 11px);
  color: var(--settings-tertiary, #888);
}

.ssh-hooks-panel__status--installed {
  color: #2e7d32;
}

.ssh-probe-panel {
  width: 100%;
  padding: 10px 14px;
  background: var(--settings-card-bg, rgba(0, 0, 0, 0.02));
  border-radius: 8px;
  border: 1px solid var(--settings-separator, rgba(0, 0, 0, 0.06));
}

.ssh-probe-panel__list {
  display: grid;
  gap: 6px;
}

.ssh-probe-panel__row {
  display: grid;
  grid-template-columns: 10px minmax(112px, 0.4fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  font-size: var(--font-size-sm, 13px);
}

.ssh-probe-panel__status {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #9aa1ae;
}

.ssh-probe-panel__status--ok {
  background: #22c55e;
}

.ssh-probe-panel__status--warn {
  background: #f59e0b;
}

.ssh-probe-panel__status--error {
  background: #ff3b30;
}

.ssh-probe-panel__label {
  min-width: 0;
  color: var(--settings-text-primary);
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ssh-probe-panel__detail {
  min-width: 0;
  color: var(--settings-text-secondary);
  font-family: 'SF Mono', 'Menlo', monospace;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .ssh-host-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .ssh-host-card__actions,
  .ssh-add-form {
    width: 100%;
  }

  .ssh-add-form {
    grid-template-columns: 1fr;
  }
}

/* ── Warning Card ── */
.warning-card {
  padding: 12px 16px;
  background: #FFF8E1;
  border: 1px solid #FFE082;
  border-radius: 10px;
  margin-bottom: 16px;
}

.warning-card__title {
  font-size: 14px;
  font-weight: 500;
  color: #F57C00;
  margin-bottom: 4px;
}

.warning-card__text {
  font-size: 13px;
  color: var(--settings-text-secondary);
  line-height: 1.5;
}

.warning-card__text code {
  color: var(--settings-text-primary);
  background: rgba(0, 0, 0, 0.04);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 12px;
}

/* ── Color Theme Cards ── */
.color-theme-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.color-theme-card {
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid var(--settings-card-border);
  background: var(--settings-bg);
  transition: all 0.15s ease;
  text-align: center;
}

.color-theme-card:hover {
  border-color: #c7c7cc;
}

.color-theme-card--active {
  border-color: var(--settings-accent);
  background: rgba(0, 122, 255, 0.05);
}

.color-theme-card__preview {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.color-theme-card__swatch {
  width: 100%;
  height: 36px;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.color-theme-card__swatch-card {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  height: 16px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.color-theme-card__swatch-dot {
  position: absolute;
  bottom: 4px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.color-theme-card__label {
  font-size: 11px;
  color: var(--settings-text-primary);
  font-weight: 500;
  line-height: 1.3;
}

.color-theme-card__tag {
  font-size: 9px;
  color: var(--settings-text-secondary);
  margin-top: 1px;
}

/* ── About Section ── */
.about-header {
  text-align: center;
  padding: 24px 0;
  margin-bottom: 16px;
}

.about-header__icon {
  display: block;
  width: 96px;
  height: 72px;
  margin: 0 auto 10px;
  object-fit: contain;
}

.about-header__name {
  font-size: 22px;
  font-weight: 700;
  color: var(--settings-text-primary);
}

.about-header__slogan {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--settings-text-secondary);
}

.about-header__version {
  font-size: 13px;
  color: var(--settings-text-secondary);
  margin-top: 6px;
}

.about-logo-meaning {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: var(--space-sm) 0;
}

.about-logo-meaning img {
  width: 72px;
  height: 54px;
  flex: 0 0 auto;
  object-fit: contain;
}

.about-logo-meaning div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.about-logo-meaning strong {
  color: var(--settings-text-primary);
  font-size: var(--font-size-md);
}

.about-logo-meaning span {
  color: var(--settings-text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.55;
}

/* ── First Run Welcome ── */
.first-run-overlay {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(18, 22, 31, 0.42);
  backdrop-filter: blur(14px);
}

.first-run-dialog {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: min(680px, 92vw);
  max-height: min(760px, 88vh);
  overflow-y: auto;
  border: 1px solid rgba(30, 41, 59, 0.13);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 250, 252, 0.97));
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.24), 0 1px 0 rgba(255, 255, 255, 0.95) inset;
  padding: 28px;
}

.first-run-dialog__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--settings-text-primary);
  font-size: 13px;
  font-weight: 800;
}

.first-run-dialog__brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.first-run-dialog__header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.first-run-dialog__eyebrow {
  color: var(--settings-accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.first-run-dialog__header h1,
.first-run-dialog__section h2 {
  margin: 0;
  color: var(--settings-text-primary);
  letter-spacing: 0;
}

.first-run-dialog__header h1 {
  font-size: 30px;
  font-weight: 820;
  line-height: 1.14;
}

.first-run-dialog__header p,
.first-run-dialog__section p {
  margin: 0;
  color: var(--settings-text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.first-run-dialog__section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 18px;
  border: 1px solid rgba(33, 43, 66, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.first-run-dialog__section h2 {
  margin-bottom: 5px;
  font-size: 15px;
  font-weight: 760;
}

.first-run-surface {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #eef0f5;
}

.first-run-surface__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 112px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #778092;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.first-run-surface__option:hover {
  color: var(--settings-text-primary);
}

.first-run-surface__option--active {
  border-color: #dfe3ea;
  background: #ffffff;
  color: var(--settings-text-primary);
  box-shadow: 0 1px 4px rgba(0, 25, 126, 0.09);
}

.first-run-surface__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(10, 132, 255, 0.10);
  color: var(--settings-accent-strong);
  font-size: 12px;
  font-weight: 850;
}

.first-run-dialog__error {
  padding: 10px 12px;
  border: 1px solid rgba(255, 59, 48, 0.18);
  border-radius: 10px;
  background: rgba(255, 59, 48, 0.08);
  color: #b42318;
  font-size: 13px;
  line-height: 1.45;
}

.first-run-dialog__footer {
  display: flex;
  justify-content: flex-end;
}

.first-run-dialog__button {
  min-width: 128px;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--settings-accent);
  border-radius: 11px;
  background: var(--settings-accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 760;
}

.first-run-dialog__button:disabled {
  cursor: wait;
  opacity: 0.7;
}

@media (max-width: 760px) {
  .first-run-overlay {
    padding: 18px;
  }

  .first-run-dialog {
    gap: 18px;
    padding: 22px;
  }

  .first-run-dialog__header h1 {
    font-size: 26px;
  }

  .first-run-dialog__section {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .first-run-surface {
    width: 100%;
  }

  .first-run-surface__option {
    flex: 1 1 0;
    min-width: 0;
  }

  .first-run-dialog__footer,
  .first-run-dialog__button {
    width: 100%;
  }
}

/* ── Settings-scoped overrides for shared glass-* components ── */
/* These override glass.css styles only inside .settings-app */

.settings-app .glass-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(249, 250, 254, 0.74)),
    var(--settings-card-bg);
  border: 1px solid var(--settings-card-border);
  border-radius: 18px;
  box-shadow: var(--settings-shadow-soft);
}

.settings-app .glass-card:hover {
  background: var(--settings-card-bg);
  transform: none;
  box-shadow: none;
}

.settings-app .glass-btn {
  backdrop-filter: blur(14px) saturate(1.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.08);
  font-family: inherit;
  border-radius: 999px;
  font-weight: 760;
  letter-spacing: -0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.settings-app .glass-btn--primary {
  background: var(--settings-accent-gradient);
  color: #ffffff;
  border-color: rgba(10, 132, 255, 0.28);
  box-shadow: 0 10px 22px rgba(10, 132, 255, 0.22), 0 1px 0 rgba(255, 255, 255, 0.28) inset;
}

.settings-app .glass-btn--primary:hover {
  background: var(--settings-accent-gradient);
  border-color: rgba(10, 132, 255, 0.38);
  box-shadow: 0 14px 30px rgba(10, 132, 255, 0.28), 0 1px 0 rgba(255, 255, 255, 0.28) inset;
  transform: translateY(-1px);
}

.settings-app .glass-btn--secondary {
  background: rgba(255, 255, 255, 0.72);
  color: var(--settings-text-primary);
  border-color: rgba(40, 51, 77, 0.11);
  box-shadow: 0 7px 18px rgba(31, 41, 71, 0.07), 0 1px 0 rgba(255, 255, 255, 0.78) inset;
}

.settings-app .glass-btn--secondary:hover {
  background: #ffffff;
  border-color: rgba(10, 132, 255, 0.20);
  transform: translateY(-1px);
}

.settings-app .glass-btn--danger {
  background: rgba(255, 59, 48, 0.1);
  color: var(--settings-danger);
  border-color: rgba(255, 59, 48, 0.2);
}

.settings-app .glass-btn--danger:hover {
  background: rgba(255, 59, 48, 0.18);
}

.settings-app .glass-btn--ghost {
  background: transparent;
  color: var(--settings-text-secondary);
  border-color: transparent;
}

.settings-app .glass-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.62);
  color: var(--settings-text-primary);
}

.about-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: var(--space-sm) 0;
}

.settings-app .about-link-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.about-link-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.about-link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 4px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--settings-border, rgba(255, 255, 255, 0.06));
  color: var(--settings-text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.about-link-row:last-child {
  border-bottom: 0;
}

.about-link-row:hover {
  background: var(--settings-row-hover, rgba(0, 0, 0, 0.03));
}

.about-row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex: 0 0 auto;
  color: #fff;
}

.about-row-icon svg {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.about-link-row__label {
  flex: 1;
  font-size: 13px;
  color: var(--settings-text-primary);
}

.about-link-row__value {
  font-size: 12px;
  color: var(--settings-text-secondary);
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.about-link-row__value--accent {
  color: var(--settings-accent, #007AFF);
}

.about-row-arrow {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--settings-text-tertiary, rgba(255, 255, 255, 0.4));
}

.about-community-card {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 520px;
  padding: 14px;
  margin: 4px 0 var(--space-sm);
  border: 1px solid rgba(40, 51, 77, 0.11);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 10px 28px rgba(31, 41, 71, 0.08);
}

.about-community-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: transparent;
}

.about-community-popover {
  position: fixed;
  z-index: 9999;
  width: 380px;
  padding: 16px 18px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 18px 48px rgba(15, 22, 41, 0.22), 0 2px 8px rgba(15, 22, 41, 0.08);
  border: 1px solid rgba(40, 51, 77, 0.08);
  animation: about-community-pop-in 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes about-community-pop-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.about-community-popover__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.about-community-popover__header h3 {
  margin: 0;
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--settings-text-primary);
}

.about-community-popover__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: rgba(40, 51, 77, 0.06);
  color: var(--settings-text-secondary);
  cursor: pointer;
  transition: background 120ms ease;
}

.about-community-popover__close:hover {
  background: rgba(40, 51, 77, 0.12);
  color: var(--settings-text-primary);
}

.about-community-popover__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.about-community-popover__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.about-community-popover__item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(40, 51, 77, 0.08);
}

.about-community-popover__label {
  color: var(--settings-text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.about-community-card img {
  width: 132px;
  height: 132px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 12px;
  background: #fff;
}

.about-community-card div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.about-community-card strong {
  color: var(--settings-text-primary);
  font-size: var(--font-size-md);
}

.about-community-card span {
  color: var(--settings-text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

/* ── Update Dialog ── */
.update-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(18, 22, 31, 0.34);
  backdrop-filter: blur(10px);
}

.update-dialog {
  display: flex;
  flex-direction: column;
  width: min(720px, 92vw);
  max-height: min(760px, 86vh);
  overflow: hidden;
  border: 1px solid rgba(30, 41, 59, 0.12);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 255, 0.96));
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22), 0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

.update-dialog__header,
.update-dialog__footer {
  flex: 0 0 auto;
}

.update-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px 18px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.08);
}

.update-dialog__eyebrow {
  margin-bottom: 6px;
  color: var(--settings-text-secondary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.update-dialog__title {
  color: var(--settings-text-primary);
  font-size: 22px;
  font-weight: 760;
  line-height: 1.18;
}

.update-dialog__close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(30, 41, 59, 0.10);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.84);
  color: var(--settings-text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  line-height: 1;
}

.update-dialog__close:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.update-dialog__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.07);
  color: var(--settings-text-secondary);
  font-size: 14px;
}

.update-dialog__meta strong {
  color: var(--settings-text-primary);
  font-size: 18px;
}

.update-dialog__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 28px 26px;
  background: rgba(255, 255, 255, 0.58);
}

.update-dialog__markdown {
  color: #465064;
  font-size: 14px;
  line-height: 1.72;
}

.update-dialog__markdown h1,
.update-dialog__markdown h2,
.update-dialog__markdown h3 {
  margin: 22px 0 10px;
  color: var(--settings-text-primary);
  line-height: 1.28;
}

.update-dialog__markdown h1:first-child {
  margin-top: 0;
}

.update-dialog__markdown h1 {
  font-size: 20px;
}

.update-dialog__markdown h2 {
  font-size: 16px;
}

.update-dialog__markdown p {
  margin: 8px 0 14px;
}

.update-dialog__markdown ul,
.update-dialog__markdown ol {
  margin: 8px 0 16px;
  padding-left: 20px;
}

.update-dialog__markdown li {
  margin: 7px 0;
}

.update-dialog__markdown code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(10, 132, 255, 0.08);
  color: #205493;
  font-size: 0.92em;
}

.update-dialog__empty {
  color: var(--settings-text-secondary);
  font-size: 14px;
}

.update-dialog__status {
  flex: 0 0 auto;
  padding: 14px 28px;
  border-top: 1px solid rgba(30, 41, 59, 0.08);
  background: rgba(255, 255, 255, 0.76);
}

.update-dialog__progress,
.update-dialog__ready {
  padding: 14px 16px;
  border: 1px solid rgba(10, 132, 255, 0.14);
  border-radius: 12px;
  background: rgba(10, 132, 255, 0.06);
}

.update-dialog__status .update-dialog__progress + .update-dialog__ready,
.update-dialog__status .update-dialog__ready + .update-dialog__ready {
  margin-top: 10px;
}

.update-dialog__progress-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--settings-text-primary);
  font-size: 13px;
  font-weight: 650;
}

.update-dialog__progress-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.12);
}

.update-dialog__progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--settings-accent-gradient);
  transition: width 0.18s ease;
}

.update-dialog__ready {
  color: #135f3c;
  border-color: rgba(52, 199, 89, 0.18);
  background: rgba(52, 199, 89, 0.08);
  font-size: 13px;
}

.update-dialog__command {
  display: block;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--settings-text-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.update-dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 28px;
  border-top: 1px solid rgba(30, 41, 59, 0.08);
  background: rgba(247, 249, 253, 0.94);
}

.update-dialog__button {
  min-width: 92px;
  padding: 9px 16px;
  border: 1px solid rgba(30, 41, 59, 0.12);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--settings-text-primary);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
}

.update-dialog__button--primary {
  border-color: var(--settings-accent);
  background: var(--settings-accent);
  color: #fff;
}

.update-dialog__button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.update-mini {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 260;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 240px;
  padding: 12px 14px;
  border: 1px solid rgba(30, 41, 59, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 255, 0.96));
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.2), 0 1px 0 rgba(255, 255, 255, 0.95) inset;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.update-mini:hover {
  border-color: var(--settings-accent);
}

.update-mini__label {
  color: var(--settings-text-primary);
  font-size: 13px;
  font-weight: 650;
}

.update-mini__track {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.12);
}

.update-mini__bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--settings-accent-gradient);
  transition: width 0.18s ease;
}

.update-mini__bar--indeterminate {
  width: 36%;
  animation: update-mini-indeterminate 1.2s ease-in-out infinite;
}

@keyframes update-mini-indeterminate {
  0% { margin-left: -36%; }
  100% { margin-left: 100%; }
}

.settings-app .glass-input {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(40, 51, 77, 0.12);
  border-radius: 12px;
  color: var(--settings-text-primary);
  box-shadow: 0 7px 18px rgba(31, 41, 71, 0.05), 0 1px 0 rgba(255, 255, 255, 0.75) inset;
  font-family: inherit;
}

.settings-app .glass-input::placeholder {
  color: var(--settings-text-tertiary);
}

.settings-app .glass-input:focus {
  border-color: var(--settings-accent);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.14), 0 7px 18px rgba(31, 41, 71, 0.05);
}

/* ── Back Button ── */
.settings-back {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 10;
}

/* ── Credits ── */
.credits-list {
  font-size: 13px;
  color: var(--settings-text-secondary);
  line-height: 1.8;
}

/* ── Description Card ── */
.description-card {
  padding: 12px 16px;
  background: var(--settings-bg);
  border: 1px solid var(--settings-card-border);
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--settings-text-secondary);
  line-height: 1.5;
}

/* ── Trial Banner ── */
.trial-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px;
  background: #FFF8E1;
  border-top: 1px solid #FFE082;
  font-size: 11px;
  overflow: hidden;
}

.trial-banner__text {
  color: #F57C00;
  font-weight: 500;
}

.trial-banner__dismiss {
  background: none;
  border: none;
  color: var(--settings-text-tertiary);
  cursor: pointer;
  font-size: 10px;
  padding: 2px;
  border-radius: 3px;
  transition: color 0.15s ease;
}

.trial-banner__dismiss:hover {
  color: var(--settings-text-secondary);
}

/* ── Hook Management ── */
.hook-actions-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.hook-error-card {
  padding: 12px 16px;
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.2);
  border-radius: 14px;
  font-size: 12px;
  color: var(--settings-danger);
  margin-bottom: 12px;
  line-height: 1.4;
  box-shadow: 0 10px 24px rgba(255, 59, 48, 0.06);
}

.hook-notice-card {
  padding: 12px 16px;
  background: rgba(52, 199, 89, 0.08);
  border: 1px solid rgba(52, 199, 89, 0.2);
  border-radius: 14px;
  font-size: 12px;
  color: var(--settings-status-active);
  margin-bottom: 12px;
  line-height: 1.4;
  box-shadow: 0 10px 24px rgba(52, 199, 89, 0.06);
}

.hook-empty {
  padding: 12px 0;
  color: var(--settings-text-tertiary);
  font-size: 13px;
  text-align: center;
}

.hook-doctor-intro {
  color: var(--settings-text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.hook-doctor-report {
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.hook-doctor-check {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(40, 51, 77, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.hook-doctor-check > strong {
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hook-doctor-check--ok > strong {
  color: var(--settings-status-active);
}

.hook-doctor-check--info > strong {
  color: var(--settings-text-secondary);
}

.hook-doctor-check--warn > strong {
  color: #f59e0b;
}

.hook-doctor-check--error > strong {
  color: var(--settings-danger);
}

.hook-doctor-check__body {
  min-width: 0;
}

.hook-doctor-check__label {
  color: var(--settings-text-primary);
  font-size: 12px;
  font-weight: 720;
}

.hook-doctor-check__detail,
.hook-doctor-check__suggestion {
  color: var(--settings-text-secondary);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.hook-doctor-check__suggestion {
  margin-top: 4px;
}

.hook-tool-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  margin: 8px 0;
  padding: 14px 16px;
  border: 1px solid rgba(40, 51, 77, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 255, 0.68));
  box-shadow: 0 10px 24px rgba(31, 41, 71, 0.055), 0 1px 0 rgba(255, 255, 255, 0.85) inset;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.hook-tool-row + .hook-tool-row {
  border-top: 1px solid rgba(40, 51, 77, 0.08);
}

.hook-tool-row:hover {
  border-color: rgba(10, 132, 255, 0.16);
  box-shadow: 0 16px 32px rgba(31, 41, 71, 0.08), 0 1px 0 rgba(255, 255, 255, 0.92) inset;
  transform: translateY(-1px);
}

.hook-tool-row__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.96), rgba(240, 244, 253, 0.74));
  box-shadow: 0 10px 22px rgba(31, 41, 71, 0.11), 0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

.platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.platform-icon--image {
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.42) inset;
}

.platform-icon--glyph {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--settings-text-primary);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.hook-tool-row__info {
  flex: 1;
  min-width: 0;
}

.hook-tool-row__name {
  font-size: 16px;
  font-weight: 820;
  color: var(--settings-text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hook-tool-row__custom-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.14);
  color: #4f46e5;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  padding: 3px 8px;
}

.hook-tool-row__path {
  font-size: 13px;
  color: var(--settings-text-tertiary);
  font-family: 'SF Mono', 'Menlo', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 5px;
}

.usage-provider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--settings-border);
}

.usage-provider-row:first-of-type {
  border-top: none;
}

.usage-provider-row__main {
  min-width: 0;
  flex: 1;
}

.usage-provider-row__title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.usage-provider-row__title span {
  color: var(--settings-text-primary);
  font-size: 14px;
  font-weight: 600;
}

.usage-provider-row__title strong {
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: var(--settings-text-secondary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 8px;
}

.usage-provider-row__detail {
  font-size: 11px;
  color: var(--settings-text-secondary);
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-provider-row__path {
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 10px;
  color: var(--settings-text-tertiary);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.usage-provider-row__actions {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.hook-status-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 820;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.58) inset;
}

.hook-status-badge--installed {
  background: rgba(52, 199, 89, 0.12);
  color: var(--settings-status-active);
  border: 1px solid rgba(52, 199, 89, 0.25);
}

.hook-status-badge--not_installed {
  background: rgba(174, 174, 178, 0.12);
  color: var(--settings-text-secondary);
  border: 1px solid rgba(174, 174, 178, 0.25);
}

.hook-status-badge--needs_reinstall {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.hook-status-badge--settings_corrupted {
  background: rgba(255, 59, 48, 0.1);
  color: var(--settings-danger);
  border: 1px solid rgba(255, 59, 48, 0.2);
}

.hook-status-badge--error {
  background: rgba(255, 59, 48, 0.1);
  color: var(--settings-danger);
  border: 1px solid rgba(255, 59, 48, 0.2);
}

.hook-tool-row__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.hook-tool-row__actions .glass-btn {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.hook-options-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 20, 24, 0.42);
  backdrop-filter: blur(10px);
}

.hook-options-dialog {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  background: var(--settings-surface, #fff);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.24);
}

.hook-options-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--settings-separator);
}

.hook-options-avatar {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--settings-bg);
}

.hook-options-header h3 {
  margin: 0;
  color: var(--settings-text-primary);
  font-size: 22px;
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: 0;
}

.hook-options-header p {
  margin: 6px 0 0;
  color: var(--settings-text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.hook-options-scroll {
  min-height: 0;
  overflow: auto;
  padding: 16px 24px 0;
}

.hook-options-category-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--settings-card-border);
  border-radius: 12px;
  background: var(--settings-bg);
}

.hook-options-category-row {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.hook-options-category-row:hover {
  background: var(--settings-surface, #fff);
}

.hook-options-category-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(142, 142, 147, 0.14);
  color: var(--settings-text-secondary);
  font-size: 16px;
  font-weight: 850;
}

.hook-options-category-copy,
.hook-options-event-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.hook-options-category-copy strong,
.hook-options-event-copy strong {
  overflow: hidden;
  color: var(--settings-text-primary);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hook-options-category-copy span,
.hook-options-event-copy span {
  overflow: hidden;
  color: var(--settings-text-secondary);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hook-options-indicator {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(142, 142, 147, 0.22);
  color: transparent;
  font-size: 22px;
  font-weight: 900;
}

.hook-options-indicator--on {
  background: #34c759;
  color: #fff;
}

.hook-options-indicator--mixed {
  background: #ffcc00;
  color: #4d3a00;
}

.hook-options-advanced {
  margin-top: 16px;
  padding-bottom: 18px;
}

.hook-options-advanced summary {
  display: flex;
  align-items: center;
  min-height: 32px;
  color: var(--settings-text-primary);
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.hook-options-event-groups {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.hook-options-event-group {
  overflow: hidden;
  border: 1px solid var(--settings-card-border);
  border-radius: 10px;
  background: var(--settings-surface, #fff);
}

.hook-options-event-group-title {
  padding: 12px 14px 7px;
  color: var(--settings-text-secondary);
  font-size: 12px;
  font-weight: 850;
}

.hook-options-event-row {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border: 0;
  border-top: 1px solid var(--settings-separator);
  background: var(--settings-surface, #fff);
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.hook-options-event-row-toggle {
  display: contents;
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  text-align: left;
}

.hook-options-event-row:hover {
  background: var(--settings-bg);
}

.hook-options-event-row .hook-options-indicator {
  width: 30px;
  height: 30px;
  font-size: 19px;
}

.hook-options-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 24px;
  border-top: 1px solid var(--settings-separator);
  background: var(--settings-surface, #fff);
}

.hook-options-footer > span {
  min-width: 0;
  color: var(--settings-text-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.hook-options-warning {
  color: var(--settings-danger) !important;
  font-weight: 750;
}

.hook-options-footer > div {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.hook-options-cancel,
.hook-options-save {
  min-width: 86px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.hook-options-cancel {
  border: 1px solid var(--settings-card-border);
  background: var(--settings-surface, #fff);
  color: var(--settings-text-primary);
}

.hook-options-save {
  border: 1px solid var(--settings-accent);
  background: var(--settings-accent);
  color: #fff;
}

.hook-options-cancel:disabled,
.hook-options-save:disabled {
  opacity: 0.55;
  cursor: default;
}

.setting-section--compact .agent-hook-row,
.setting-section--compact .hook-tool-row {
  min-height: 76px;
  padding: 14px 16px;
}

.setting-section--compact .agent-hook-row__label,
.setting-section--compact .hook-tool-row__name {
  font-size: 16px;
  font-weight: 820;
}

.setting-section--compact .agent-hook-row__path,
.setting-section--compact .hook-tool-row__path {
  margin-top: 5px;
  font-size: 12px;
}

.setting-section--compact .engine-add-btn {
  margin: 12px 20px;
  width: calc(100% - 40px);
  min-height: 40px;
}

/* ── Island Overview ── */
.overview-showcase {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}

.overview-hero {
  position: relative;
  min-height: 134px;
  padding: 14px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--settings-card-border);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(36, 47, 66, 0.08);
}

.overview-hero__wallpaper {
  position: absolute;
  inset: 14px;
  overflow: hidden;
  background:
    linear-gradient(135deg, #133a78 0 22%, transparent 22%),
    linear-gradient(135deg, #138be0 22% 43%, transparent 43%),
    linear-gradient(105deg, rgba(250, 139, 92, 0.85) 48%, rgba(250, 210, 128, 0.8) 70%, rgba(87, 158, 223, 0.95) 100%);
  border-radius: 18px;
}

.overview-hero__wallpaper::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, transparent 0 36%, rgba(255, 255, 255, 0.22) 36% 39%, transparent 39%),
    linear-gradient(72deg, transparent 0 54%, rgba(255, 255, 255, 0.18) 54% 58%, transparent 58%),
    linear-gradient(112deg, transparent 0 66%, rgba(255, 255, 255, 0.16) 66% 70%, transparent 70%);
}

.overview-hero__stripe {
  position: absolute;
  inset: auto;
  display: block;
}

.overview-hero__brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 8px;
}

.overview-live-pill__icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: contain;
}

.overview-live-pill {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: min(50%, 500px);
  min-width: 340px;
  margin: 0 auto;
  padding: 13px 18px;
  color: #ffffff;
  background: #050506;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.overview-live-pill__mark {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(180deg, #704cff 0 35%, #f043d7 35% 68%, #ffbc24 68% 100%);
  border-radius: 8px;
}

.overview-live-pill__copy {
  min-width: 0;
}

.overview-live-pill__copy strong,
.overview-live-pill__copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-live-pill__copy strong {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

.overview-live-pill__copy span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  font-weight: 650;
}

.overview-live-pill__count {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.overview-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.overview-mode-card {
  display: grid;
  gap: 10px;
  min-height: 116px;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  background: #ffffff;
  border: 1.5px solid var(--settings-card-border);
  border-radius: 18px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.overview-mode-card:hover {
  border-color: #bfc4d1;
  transform: translateY(-1px);
}

.overview-mode-card--active {
  border-color: #7b75ff;
  box-shadow: 0 12px 26px rgba(70, 69, 255, 0.1);
}

.overview-mode-card__island {
  position: relative;
  display: block;
  width: min(100%, 240px);
  height: 38px;
  background: #050506;
  border-radius: 8px 8px 18px 18px;
}

.overview-mode-card__island::before {
  position: absolute;
  top: 16px;
  left: 22px;
  width: 76px;
  height: 8px;
  content: "";
  background: linear-gradient(90deg, #3167ff, #49e3e9);
  border-radius: 999px;
}

.overview-mode-card strong {
  color: #050506;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.2;
}

.overview-mode-card__description {
  color: #858c9c;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.overview-mode-custom {
  display: grid;
  grid-column: 1 / -1;
  gap: 4px;
  padding: 12px 14px;
  background: rgba(123, 117, 255, 0.06);
  border: 1px solid rgba(123, 117, 255, 0.14);
  border-radius: 12px;
}

.overview-mode-custom strong {
  color: #4a48d7;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.overview-mode-custom span {
  color: #707889;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.overview-section-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: end;
  margin: 2px 6px 12px;
}

.overview-section-heading h3 {
  margin: 0;
  color: var(--settings-text-primary);
  font-size: 17px;
  font-weight: 850;
  letter-spacing: 0;
}

.overview-section-heading p {
  margin: 0;
  color: #858c9c;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: right;
}

@media (max-width: 980px) {
  .settings-content {
    padding-right: 34px;
    padding-left: 34px;
  }

  .settings-window-brand {
    left: 34px;
  }

  .settings-sidebar {
    width: 228px;
  }

  .overview-live-pill {
    width: min(78%, 560px);
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .settings-content {
    padding: 66px 24px 36px;
  }

  .settings-window-brand {
    top: 22px;
    left: 24px;
  }

  .settings-sidebar {
    width: 210px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .setting-section__title {
    font-size: 28px;
  }

  .setting-row,
  .hook-tool-row,
  .usage-provider-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .setting-row__control {
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 12px;
    margin-left: 0;
  }

  .shortcut-global-control {
    justify-content: flex-start;
    width: 100%;
  }

  .shortcut-global-control__input {
    flex: 1 1 220px;
    width: 100%;
    min-width: 0;
  }

  .shortcuts-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 8px;
  }

  .shortcuts-row__meta {
    justify-content: space-between;
    width: 100%;
  }

  .shortcuts-row__keys,
  .shortcuts-row__recording {
    justify-self: start;
    justify-content: flex-start;
    max-width: 100%;
  }

  .shortcuts-row__actions {
    justify-content: flex-end;
    width: 100%;
  }

  .overview-mode-grid,
  .overview-section-heading {
    grid-template-columns: 1fr;
  }

  .overview-section-heading p {
    text-align: left;
  }

  .overview-live-pill {
    width: calc(100% - 12px);
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 15px 16px;
  }

  .hook-options-overlay {
    align-items: stretch;
    padding: 12px;
  }

  .hook-options-dialog {
    max-height: calc(100vh - 24px);
  }

  .hook-options-header,
  .hook-options-scroll,
  .hook-options-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hook-options-category-row {
    grid-template-columns: 40px minmax(0, 1fr) 32px;
  }

  .hook-options-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .hook-options-footer > div {
    justify-content: flex-end;
  }
}

/* ── Focus-visible accessibility ── */
.toggle:focus-visible {
  outline: 2px solid var(--settings-accent);
  outline-offset: 2px;
}

.glass-dropdown__trigger:focus-visible {
  outline: 2px solid var(--settings-accent);
  outline-offset: 2px;
}

.settings-sidebar__item:focus-visible {
  outline: 2px solid var(--settings-accent);
  outline-offset: -2px;
}

.settings-sidebar__collapse-toggle:focus-visible,
.settings-capability-nav button:focus-visible,
.settings-capability-agent:focus-visible,
.settings-capability-more:focus-visible,
.settings-close-btn:focus-visible,
.settings-mini-button:focus-visible {
  outline: 2px solid var(--settings-accent);
  outline-offset: 2px;
}

.shortcuts-row__edit:focus-visible {
  outline: 2px solid var(--settings-accent);
  outline-offset: 2px;
}

/* ── Pet Picker ── */
.pet-picker-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 16px 16px;
}

.pet-picker-block__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pet-picker-block__title {
  font-size: 15px;
  font-weight: 720;
  color: var(--settings-text-primary);
  letter-spacing: -0.01em;
}

.pet-picker-block__desc {
  font-size: 13px;
  font-weight: 510;
  color: var(--settings-text-secondary);
  line-height: 1.35;
}

.pet-picker {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.pet-picker__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pet-picker__group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--settings-text-secondary);
  opacity: 0.7;
  padding-left: 2px;
}

.pet-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  width: 100%;
}

.pet-picker__card {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 12px;
  border: 2px solid var(--settings-card-border);
  background: var(--settings-bg);
  color: inherit;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, transform 120ms ease;
  text-align: center;
  font: inherit;
}

.pet-picker__card:hover {
  border-color: #c7c7cc;
  transform: translateY(-1px);
}

.pet-picker__card--active {
  border-color: var(--settings-accent);
  background: rgba(0, 122, 255, 0.05);
}

.pet-picker__card--auto .pet-picker__thumb--auto {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  color: var(--settings-accent);
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.18), rgba(0, 122, 255, 0.04));
  border-radius: 12px;
  width: 56px;
  height: 56px;
}

.pet-picker__thumb {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.04);
  overflow: hidden;
  image-rendering: pixelated;
}

.pet-picker__name {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.pet-picker__empty {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  font-size: 11px;
  color: var(--settings-secondary-text);
  line-height: 1.5;
}

.theme-picker__pixel-icon {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 28px;
  height: 28px;
}

.theme-picker__pixel-icon > span {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--settings-accent, #007aff);
  opacity: 0.5;
}

.theme-picker__pixel-icon > span:nth-child(2) { opacity: 0.3; }
.theme-picker__pixel-icon > span:nth-child(3) { opacity: 0.2; }
.theme-picker__pixel-icon > span:nth-child(4) { opacity: 0.4; }

.theme-picker__pixel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  width: 36px;
  height: 36px;
}

.theme-picker__pixel-grid > span {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* ── AgentDefaultPetButton (Integration tab) ── */
.agent-default-pet {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.agent-default-pet__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(40, 51, 77, 0.1);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 255, 0.7));
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.agent-default-pet__btn:hover,
.agent-default-pet__btn--open {
  border-color: rgba(10, 132, 255, 0.4);
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.12);
}

.agent-default-pet__placeholder {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, rgba(40, 51, 77, 0.5));
  letter-spacing: 0.02em;
}

.agent-default-pet__popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: 360px;
  max-height: 420px;
  overflow-y: auto;
  padding: 14px 14px 10px;
  border-radius: 16px;
  border: 1px solid rgba(40, 51, 77, 0.1);
  background: var(--card-bg, #ffffff);
  box-shadow: 0 16px 40px rgba(31, 41, 71, 0.18), 0 2px 8px rgba(31, 41, 71, 0.08);
}

.agent-default-pet__popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.agent-default-pet__popover-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #1f2937);
}

.agent-default-pet__clear {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(40, 51, 77, 0.12);
  background: transparent;
  font-size: 11px;
  color: var(--text-secondary, rgba(40, 51, 77, 0.7));
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.agent-default-pet__clear:hover:not(:disabled) {
  background: rgba(10, 132, 255, 0.08);
  color: rgba(10, 132, 255, 1);
}

.agent-default-pet__clear:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
