.skills-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skills-global {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skills-global-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.skills-global-stats > div {
  padding: 14px 15px;
  border: 1px solid var(--settings-card-border);
  border-radius: 10px;
  background: var(--settings-card-bg);
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.04);
}

.skills-global-stats strong {
  display: block;
  color: var(--settings-text-primary);
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.4px;
}

.skills-global-stats span {
  display: block;
  margin-top: 4px;
  color: var(--settings-text-secondary);
  font-size: 11px;
}

.skills-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--settings-bg);
  border-radius: 10px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.collection-view,
.obsidian-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.collection-targets,
.discover-root-list {
  flex: 1;
}

.collection-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
}

.collection-card {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 136px;
  padding: 14px;
  border: 1px solid var(--settings-card-border);
  border-radius: 8px;
  background: var(--settings-card-bg);
}

.collection-card__main {
  min-width: 0;
}

.collection-card__name {
  color: var(--settings-text-primary);
  font-size: 14px;
  font-weight: 750;
}

.collection-card__desc {
  margin-top: 4px;
  color: var(--settings-text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.collection-card__chips,
.collection-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.collection-card__chips span {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--settings-bg);
  color: var(--settings-text-secondary);
  font-size: 10px;
  font-weight: 650;
}

.collection-card__actions {
  flex: 0 0 92px;
  align-content: flex-start;
  justify-content: flex-end;
  margin-top: 0;
}

.collection-import-box {
  margin-top: 2px;
}

.collection-import-textarea {
  min-height: 96px;
  resize: vertical;
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 11px;
}

.collection-skill-picker {
  max-height: 260px;
  overflow-y: auto;
}

.collection-agent-note {
  color: var(--settings-text-tertiary);
  font-size: 11px;
}

.obsidian-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.4fr);
  gap: 12px;
}

.obsidian-vault-list,
.obsidian-skill-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.obsidian-vault-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--settings-card-border);
  border-radius: 8px;
  background: var(--settings-card-bg);
  color: var(--settings-text-primary);
  text-align: left;
  cursor: pointer;
}

.obsidian-vault-card:hover,
.obsidian-vault-card--active {
  border-color: var(--settings-accent);
  box-shadow: 0 6px 18px rgba(20, 31, 56, 0.08);
}

.obsidian-vault-card span,
.obsidian-vault-card code {
  color: var(--settings-text-secondary);
  font-size: 11px;
}

.obsidian-vault-card code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-hero__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.central-bundle-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.central-bundle-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--settings-card-border);
  border-radius: 8px;
  background: var(--settings-card-bg);
  color: var(--settings-text-primary);
  text-align: left;
}

.central-bundle-card:hover,
.central-bundle-card--active {
  border-color: var(--settings-accent);
  box-shadow: 0 6px 18px rgba(20, 31, 56, 0.08);
}

.central-bundle-card span,
.central-bundle-card code {
  overflow: hidden;
  color: var(--settings-text-secondary);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.central-bundle-card__main {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.discover-select {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  color: var(--settings-text-secondary);
  font-size: 11px;
}

.skills-tab {
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--settings-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  background: none;
  font-family: inherit;
}

.skills-tab:hover {
  color: var(--settings-text-primary);
}

.skills-tab--active {
  background: var(--settings-card-bg);
  color: var(--settings-text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.skills-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.skills-search {
  flex: 1;
  padding: 7px 12px;
  background: var(--settings-card-bg);
  border: 1px solid var(--settings-card-border);
  border-radius: 8px;
  color: var(--settings-text-primary);
  font-size: 13px;
  outline: none;
  font-family: inherit;
}

.skills-search::placeholder {
  color: var(--settings-text-tertiary);
}

.skills-search:focus {
  border-color: var(--settings-accent);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.skills-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.skills-filter-spacer {
  width: 8px;
  flex: 0 0 auto;
}

.skills-chip {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--settings-text-secondary);
  cursor: pointer;
  border: 1px solid var(--settings-card-border);
  background: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.skills-chip:hover {
  color: var(--settings-text-primary);
  border-color: #c7c7cc;
}

.skills-chip--active {
  background: var(--settings-accent);
  color: #fff;
  border-color: var(--settings-accent);
}

.skills-group-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--settings-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 12px 0 6px;
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.skills-list--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.skill-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 74px;
  grid-template-rows: minmax(82px, auto) 28px auto;
  column-gap: 12px;
  row-gap: 8px;
  min-height: 184px;
  padding: 14px;
  border: 1px solid var(--settings-card-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.78)),
    var(--settings-card-bg);
  cursor: pointer;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.025);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.skill-card:hover {
  border-color: color-mix(in srgb, var(--settings-accent) 34%, var(--settings-card-border));
  background: #fff;
  box-shadow: 0 8px 22px rgba(20, 31, 56, 0.08);
  transform: translateY(-1px);
}

.skill-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #007aff, #5ac8fa);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 6px 14px rgba(0, 122, 255, 0.16);
}

.skill-card__icon--plugin {
  background: linear-gradient(135deg, #5856d6, #af52de);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 6px 14px rgba(88, 86, 214, 0.16);
}

.skill-card__icon--mcp {
  background: linear-gradient(135deg, #0a84ff, #30d158);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 6px 14px rgba(10, 132, 255, 0.16);
}

.skill-card__info {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 0;
}

.skill-card__name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.skill-card__name {
  min-width: 0;
  overflow: hidden;
  color: var(--settings-text-primary);
  font-size: 14px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-card__version,
.skill-card__update {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--settings-bg);
  color: var(--settings-text-secondary);
  font-size: 10px;
  font-weight: 750;
}

.skill-card__update {
  background: rgba(255, 149, 0, 0.12);
  color: #a15c00;
}

.skill-card__desc {
  margin-top: 4px;
  color: var(--settings-text-secondary);
  font-size: 12px;
  line-height: 1.38;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.skill-card__agent-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  max-height: 50px;
  overflow: hidden;
}

.skill-card__agent-tags span,
.skill-card__agent-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 128px;
  min-height: 21px;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--platform-color, #888) 24%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--platform-color, #888) 12%, transparent);
  color: color-mix(in srgb, var(--platform-color, #888) 70%, #111);
  font-size: 10px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-card__agent-tags i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--platform-color, #888);
}

.skill-card__agent-more {
  border-color: var(--settings-card-border);
  background: var(--settings-bg);
  color: var(--settings-text-secondary);
}

.skill-card__platforms {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  gap: 3px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-self: start;
  max-height: 44px;
  overflow: hidden;
}

.skill-card__platform-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  background: var(--settings-bg);
  color: var(--settings-text-tertiary);
  opacity: 0.35;
  transition: all 0.15s ease;
  cursor: default;
  user-select: none;
  letter-spacing: 0;
}

.skill-card__platform-icon--active {
  opacity: 1;
  color: var(--platform-color, var(--settings-text-primary));
  background: color-mix(in srgb, var(--platform-color, #888) 12%, transparent);
}

.skill-card__toggle {
  width: 36px;
  height: 20px;
  grid-column: 3;
  grid-row: 2;
  justify-self: end;
  align-self: center;
  border-radius: 10px;
  background: var(--settings-toggle-off);
  position: relative;
  cursor: pointer;
  border: none;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

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

.skill-card__toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.skill-card__toggle--on::after {
  transform: translateX(16px);
}

.skill-card__bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-self: flex-end;
  gap: 10px;
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px solid color-mix(in srgb, var(--settings-separator) 72%, transparent);
  color: var(--settings-text-tertiary);
  font-size: 10px;
  font-family: 'SF Mono', Menlo, monospace;
}

/* Detail slider */
.skill-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
}

.skill-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

.skill-detail-panel {
  position: relative;
  width: 440px;
  max-width: 90vw;
  height: 100%;
  background: var(--settings-card-bg);
  border-left: 1px solid var(--settings-card-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.08);
}

.skill-detail-panel--files {
  width: min(920px, 92vw);
}

.skill-detail-panel__header {
  padding: 20px 16px 12px;
  border-bottom: 1px solid var(--settings-separator);
}

.skill-detail-panel__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--settings-text-primary);
}

.skill-detail-panel__desc {
  font-size: 13px;
  color: var(--settings-text-secondary);
  margin-top: 4px;
}

.skill-detail-panel__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.skill-detail-panel__meta span {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--settings-text-secondary) 12%, transparent);
  color: var(--settings-text-secondary);
  font-size: 12px;
  font-weight: 650;
}

.skill-detail-panel__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--settings-bg);
  border: none;
  color: var(--settings-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.skill-detail-panel__close:hover {
  background: rgba(0, 0, 0, 0.08);
}

.skill-detail-section {
  padding: 12px 16px;
  border-bottom: 1px solid var(--settings-separator);
}

.skill-detail-section__title {
  font-size: 11px;
  font-weight: 600;
  color: var(--settings-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.skill-detail-agent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.skill-install-card {
  margin: 10px 16px;
  padding: 12px;
  border: 1px solid var(--settings-card-border);
  border-radius: 12px;
  background: var(--settings-card-bg);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}

.skill-install-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.skill-install-card__name {
  color: var(--settings-text-primary);
  font-size: 15px;
  font-weight: 800;
}

.skill-install-card__sub {
  margin-top: 3px;
  color: var(--settings-text-secondary);
  font-size: 11px;
}

.skill-install-card__remove {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 59, 48, 0.32);
  border-radius: 8px;
  background: var(--settings-card-bg);
  color: var(--settings-danger);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.skill-install-card__remove:hover {
  background: rgba(255, 59, 48, 0.08);
}

.skill-install-card__list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.skill-location-row {
  width: 100%;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--settings-card-border);
  border-radius: 9px;
  background: color-mix(in srgb, var(--settings-bg) 42%, var(--settings-card-bg));
}

.skill-location-row--primary {
  border-color: color-mix(in srgb, var(--settings-accent) 30%, var(--settings-card-border));
  background: color-mix(in srgb, var(--settings-accent) 8%, var(--settings-card-bg));
}

.skill-location-row--disabled {
  opacity: 0.72;
}

.skill-location-row__check {
  width: 21px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #00c853;
  border-radius: 50%;
  color: #00c853;
  font-size: 13px;
  font-weight: 800;
}

.skill-location-row--disabled .skill-location-row__check {
  border-color: var(--settings-text-muted);
  color: var(--settings-text-muted);
}

.skill-location-row:hover .skill-location-row__path {
  color: var(--settings-accent);
}

.skill-location-row:focus-visible {
  outline: 2px solid rgba(0, 122, 255, 0.24);
  outline-offset: 2px;
  border-radius: 7px;
}

.skill-location-row__main {
  min-width: 0;
}

.skill-location-row__label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--settings-text-primary);
  font-size: 12px;
  font-weight: 850;
}

.skill-location-row__title-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.skill-location-row__primary-tag {
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--settings-accent) 14%, transparent);
  color: var(--settings-accent);
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
}

.skill-location-row__mode-tag {
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
}

.skill-location-row__mode-tag--symlink {
  background: #f0edff;
  color: #5856d6;
}

.skill-location-row__mode-tag--direct {
  background: #fff8e6;
  color: #956400;
}

.skill-location-row__disabled-tag {
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--settings-text-muted) 12%, transparent);
  color: var(--settings-text-muted);
  font-size: 10px;
  font-weight: 700;
}

.skill-location-row__path {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 2px;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--settings-text-secondary);
  cursor: pointer;
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 11px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-location-row__path:hover,
.skill-location-row__path:focus-visible {
  color: var(--settings-accent);
  outline: none;
}

.skill-location-row__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.skill-location-row__toggle,
.skill-location-row__remove {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--settings-card-border);
  border-radius: 7px;
  background: var(--settings-card-bg);
  color: var(--settings-danger);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
}

.skill-location-row__toggle {
  color: var(--settings-text-secondary);
}

.skill-location-row__toggle:hover {
  border-color: color-mix(in srgb, var(--settings-accent) 34%, var(--settings-card-border));
  color: var(--settings-accent);
}

.skill-location-row__remove:hover {
  border-color: rgba(255, 59, 48, 0.36);
  background: rgba(255, 59, 48, 0.08);
}

.skill-detail-agent-row__name {
  font-size: 13px;
  color: var(--settings-text-primary);
}

.skill-detail-install-target {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--settings-card-border);
  border-radius: 9px;
  background: var(--settings-card-bg);
}

.skill-install-more {
  margin: 10px 16px 14px;
  padding: 12px;
  border: 1px dashed color-mix(in srgb, var(--settings-card-border) 80%, var(--settings-text-secondary));
  border-radius: 12px;
}

.skill-detail-install-target__main {
  min-width: 0;
}

.skill-detail-install-target__main strong {
  display: block;
  color: var(--settings-text-primary);
  font-size: 12px;
}

.skill-detail-install-target__main button {
  display: block;
  width: 100%;
  margin-top: 3px;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--settings-text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-detail-install-target__main button:hover {
  color: var(--settings-accent);
}

.skill-detail-install-target select {
  height: 30px;
  border: 1px solid var(--settings-card-border);
  border-radius: 6px;
  background: var(--settings-card-bg);
  color: var(--settings-text-secondary);
  font: inherit;
  font-size: 11px;
}

.skill-detail-notice {
  margin: 10px 16px 0;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--settings-accent) 30%, var(--settings-card-border));
  border-radius: 8px;
  background: color-mix(in srgb, var(--settings-accent) 8%, var(--settings-card-bg));
  color: var(--settings-text-primary);
  font-size: 12px;
}

.skill-pack-join__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.skill-pack-join__row select {
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--settings-card-border);
  border-radius: 6px;
  background: var(--settings-card-bg);
  color: var(--settings-text-primary);
  font: inherit;
  font-size: 12px;
}

.skill-explanation {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-explanation__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.skill-explanation__meta {
  margin-top: 3px;
  color: var(--settings-text-tertiary);
  font-size: 11px;
}

.skill-explanation__actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}

.skill-explanation__body {
  padding: 11px 12px;
  border: 1px solid var(--settings-card-border);
  border-radius: 8px;
  background: #f7f7f8;
  color: var(--settings-text-primary);
  font-size: 12px;
  line-height: 1.55;
}

.skill-explanation__body p,
.skill-explanation__body ul,
.skill-explanation__body ol {
  margin: 0 0 8px;
}

.skill-explanation__body h3 {
  margin: 10px 0 6px;
  font-size: 13px;
  line-height: 1.25;
}

.skill-explanation__body h3:first-child {
  margin-top: 0;
}

.skill-explanation__body li {
  margin: 3px 0;
}

.skill-detail-info-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12px;
}

.skill-detail-info-row__label {
  color: var(--settings-text-secondary);
}

.skill-detail-info-row__value {
  color: var(--settings-text-primary);
}

.skill-detail-panel__footer {
  padding: 12px 16px;
  border-top: 1px solid var(--settings-separator);
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.skill-detail-tabs {
  display: flex;
  border-bottom: 1px solid var(--settings-separator);
  flex-shrink: 0;
}

.skill-detail-tab {
  flex: 1;
  height: 36px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--settings-text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

.skill-detail-tab--active {
  border-bottom-color: var(--settings-accent);
  color: var(--settings-accent);
}

.skill-detail-tab-body {
  flex: 1;
  overflow-y: auto;
}

.skill-detail-agent-row__mode {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--settings-bg);
  color: var(--settings-text-tertiary);
  font-weight: 600;
}

.skill-detail-empty {
  color: var(--settings-text-tertiary);
  font-size: 12px;
  padding: 8px 0;
}

/* File tree */
.file-tree {
  font-size: 12px;
  font-family: 'SF Mono', 'Menlo', monospace;
}

.file-tree-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 0;
  cursor: pointer;
  color: var(--settings-text-secondary);
  transition: color 0.1s;
}

.file-tree-item:hover {
  color: var(--settings-text-primary);
}

.file-tree-item--selected {
  color: var(--settings-text-primary);
  font-weight: 500;
}

.file-tree-item__icon {
  font-size: 11px;
  width: 14px;
  text-align: center;
}

.file-tree-children {
  padding-left: 16px;
}

.file-preview {
  max-height: 200px;
  overflow: auto;
  background: var(--settings-bg);
  border: 1px solid var(--settings-card-border);
  border-radius: 6px;
  padding: 8px;
  margin-top: 8px;
  font-size: 11px;
  font-family: 'SF Mono', 'Menlo', monospace;
  color: var(--settings-text-primary);
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.5;
}

/* Pack cards */
.pack-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 12px;
}

.pack-card {
  min-height: 150px;
  padding: 15px;
  background: var(--settings-card-bg);
  border: 1px solid var(--settings-card-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pack-card:hover {
  border-color: #c7c7cc;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.pack-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pack-card__name {
  font-size: 15px;
  font-weight: 750;
  color: var(--settings-text-primary);
}

.pack-card__desc {
  font-size: 12px;
  color: var(--settings-text-secondary);
  margin-top: 4px;
}

.pack-card__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.pack-card__skill-chip {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  background: var(--settings-bg);
  color: var(--settings-text-secondary);
}

.pack-card__agents {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.pack-card__agent-chip {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.08);
  color: var(--settings-accent);
  font-size: 10px;
  font-weight: 700;
}

/* Plugin / marketplace views */
.plugin-manager,
.market-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.plugin-manager-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.plugin-manager-stats > div {
  padding: 14px 15px;
  border: 1px solid var(--settings-card-border);
  border-radius: 10px;
  background: var(--settings-card-bg);
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.04);
}

.plugin-manager-stats strong {
  display: block;
  color: var(--settings-text-primary);
  font-size: 25px;
  line-height: 1;
  letter-spacing: -0.4px;
}

.plugin-manager-stats span {
  display: block;
  margin-top: 4px;
  color: var(--settings-text-secondary);
  font-size: 11px;
}

.plugin-manager-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plugin-manager-toolbar input {
  flex: 1;
  height: 32px;
  padding: 0 10px 0 28px;
  border: 1px solid var(--settings-card-border);
  border-radius: 7px;
  outline: none;
  color: var(--settings-text-primary);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.4'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E")
    no-repeat 9px center,
    var(--settings-card-bg);
  font: inherit;
  font-size: 12px;
}

.plugin-manager-toolbar input:focus {
  border-color: var(--settings-accent);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.14);
}

.mkt-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.mkt-tab {
  min-height: 29px;
  padding: 0 13px;
  border: 1px solid var(--settings-card-border);
  border-radius: 999px;
  background: var(--settings-card-bg);
  color: var(--settings-text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}

.mkt-tab:hover {
  border-color: var(--settings-accent);
  color: var(--settings-accent);
}

.mkt-tab.active {
  border-color: var(--settings-accent);
  background: var(--settings-accent);
  color: #fff;
}

.plugin-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.plugin-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--settings-card-border);
  border-radius: 10px;
  background: var(--settings-card-bg);
  color: var(--settings-text-primary);
  text-align: left;
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.plugin-card:hover {
  border-color: #c7c7cc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.plugin-card--button {
  width: 100%;
  cursor: pointer;
  font: inherit;
}

.plugin-card__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: linear-gradient(135deg, #5856d6, #af52de);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.plugin-card__icon--mcp {
  background: linear-gradient(135deg, #007aff, #5ac8fa);
}

.plugin-card__body {
  min-width: 0;
  flex: 1;
}

.plugin-card__name {
  color: var(--settings-text-primary);
  font-size: 14px;
  font-weight: 700;
}

.plugin-card__desc {
  margin-top: 3px;
  color: var(--settings-text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.plugin-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.plugin-card__chips span,
.plugin-card__tag {
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--settings-bg);
  color: var(--settings-text-secondary);
  font-size: 10px;
  font-weight: 700;
}

.plugin-card__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.market-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--settings-card-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.04);
}

.market-hero h3 {
  margin: 0;
  color: var(--settings-text-primary);
  font-size: 18px;
  letter-spacing: 0;
}

.market-hero p {
  max-width: 620px;
  margin: 4px 0 0;
  color: var(--settings-text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.market-hero__count {
  min-width: 52px;
  color: var(--settings-accent);
  font-size: 34px;
  font-weight: 800;
  text-align: right;
}

.market-sources {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--settings-card-border);
  border-radius: 10px;
  background: #fff;
}

.market-sources__form {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(220px, 1.3fr) auto;
  gap: 8px;
  align-items: center;
}

.market-sources__form input {
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--settings-card-border);
  border-radius: 8px;
  background: var(--settings-bg-secondary);
  color: var(--settings-text-primary);
  font: inherit;
  font-size: 12px;
}

.market-sources__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.market-sources__list span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--settings-card-border);
  border-radius: 999px;
  color: var(--settings-text-secondary);
  font-size: 11px;
}

.market-sources__list button {
  border: 0;
  background: transparent;
  color: var(--settings-danger);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
}

.install-form-textarea {
  min-height: 72px;
  padding-top: 8px;
  resize: vertical;
  line-height: 1.4;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.market-card {
  overflow: hidden;
  border: 1px solid var(--settings-card-border);
  border-radius: 11px;
  background: var(--settings-card-bg);
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.market-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.market-card__banner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.market-card__body {
  min-height: 108px;
  padding: 13px;
}

.market-card__name {
  color: var(--settings-text-primary);
  font-size: 14px;
  font-weight: 750;
}

.market-card__desc {
  margin-top: 4px;
  color: var(--settings-text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.market-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border-top: 1px solid var(--settings-separator);
}

.market-card__footer span {
  min-width: 0;
  overflow: hidden;
  color: var(--settings-text-tertiary);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-card__footer button {
  min-height: 27px;
  padding: 0 12px;
  border: 1px solid var(--settings-accent);
  border-radius: 7px;
  background: var(--settings-card-bg);
  color: var(--settings-accent);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.market-card__footer button:hover {
  background: var(--settings-accent);
  color: #fff;
}

.pack-card__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pack-create-card {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border: 1px dashed var(--settings-card-border);
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  color: var(--settings-text-tertiary);
  font-size: 13px;
  transition: all 0.15s ease;
}

.pack-create-card:hover {
  border-color: #c7c7cc;
  color: var(--settings-text-secondary);
}

.discover-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.discover-config {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--settings-card-border);
  border-radius: 10px;
  background: #fff;
}

.discover-config label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--settings-text-secondary);
  font-size: 12px;
  font-weight: 750;
}

.discover-config textarea,
.discover-config select {
  width: 100%;
  border: 1px solid var(--settings-card-border);
  border-radius: 8px;
  background: #f7f7f8;
  color: var(--settings-text-primary);
  font: inherit;
}

.discover-config textarea {
  min-height: 92px;
  padding: 10px;
  resize: vertical;
}

.discover-config select {
  min-height: 36px;
  padding: 0 9px;
}

.discover-config__actions {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 9px;
}

.discover-list {
  display: grid;
  gap: 10px;
}

.discover-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--settings-card-border);
  border-radius: 10px;
  background: #fff;
}

.discover-card__title {
  color: var(--settings-text-primary);
  font-size: 14px;
  font-weight: 800;
}

.discover-card__desc {
  margin-top: 4px;
  color: var(--settings-text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.discover-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.discover-card__meta span,
.discover-card__meta code {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: 6px;
  background: #f2f2f7;
  color: var(--settings-text-secondary);
  font-size: 11px;
  font-family: inherit;
}

.discover-card__meta code {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sync-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sync-overview > div {
  min-height: 74px;
  padding: 15px 16px;
  border: 1px solid var(--settings-card-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.04);
}

.sync-overview span {
  display: block;
  color: var(--settings-text-secondary);
  font-size: 12px;
}

.sync-overview strong {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  color: var(--settings-text-primary);
  font-size: 16px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* Sync view */
.sync-section {
  min-width: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--settings-card-border);
  border-radius: 10px;
  margin-bottom: 0;
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.04);
}

.sync-section--wide {
  grid-column: span 2;
}

.sync-section__title {
  font-size: 15px;
  font-weight: 750;
  color: var(--settings-text-primary);
  margin-bottom: 8px;
}

.sync-section__desc {
  font-size: 12px;
  color: var(--settings-text-secondary);
  margin-bottom: 12px;
}

.sync-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sync-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.sync-agent-row {
  flex-wrap: wrap;
}

.sync-input {
  flex: 1;
  padding: 6px 10px;
  background: var(--settings-card-bg);
  border: 1px solid var(--settings-card-border);
  border-radius: 6px;
  color: var(--settings-text-primary);
  font-size: 13px;
  outline: none;
  font-family: inherit;
}

.sync-input:focus {
  border-color: var(--settings-accent);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.sync-status {
  font-size: 12px;
  color: var(--settings-text-secondary);
  padding: 10px 12px;
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 122, 255, 0.06);
}

.sync-agent-select {
  padding: 6px 10px;
  background: var(--settings-card-bg);
  border: 1px solid var(--settings-card-border);
  border-radius: 6px;
  color: var(--settings-text-primary);
  font-size: 13px;
  outline: none;
  font-family: inherit;
}

.sync-arrow {
  padding: 0 4px;
  color: var(--settings-text-tertiary);
}

.sync-preview {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--settings-bg);
  color: var(--settings-text-secondary);
  font-size: 12px;
}

/* Dialogs */
.skills-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
}

.skills-dialog {
  width: 460px;
  max-width: 90vw;
  max-height: 80vh;
  background: var(--settings-card-bg);
  border-radius: 14px;
  border: 1px solid var(--settings-card-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

.skills-dialog__header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--settings-separator);
}

.skills-dialog__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--settings-text-primary);
}

.skills-dialog__body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.skills-dialog__footer {
  padding: 12px 20px;
  border-top: 1px solid var(--settings-separator);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.skills-btn {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--settings-card-border);
  background: var(--settings-card-bg);
  color: var(--settings-text-primary);
  font-family: inherit;
  transition: all 0.15s ease;
}

.skills-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: #c7c7cc;
}

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

.skills-btn--primary:hover {
  background: #0066d6;
}

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

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

.skills-btn--small {
  padding: 4px 10px;
  font-size: 12px;
}

/* Install dialog form */
.install-source-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.install-form-row {
  margin-bottom: 10px;
}

.install-form-label {
  font-size: 12px;
  color: var(--settings-text-secondary);
  margin-bottom: 4px;
  display: block;
}

.install-form-input {
  width: 100%;
  padding: 7px 10px;
  background: var(--settings-card-bg);
  border: 1px solid var(--settings-card-border);
  border-radius: 6px;
  color: var(--settings-text-primary);
  font-size: 13px;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}

.install-form-input:focus {
  border-color: var(--settings-accent);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.install-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.install-target-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  background: var(--settings-bg);
  border: 1px solid var(--settings-card-border);
  cursor: pointer;
  color: var(--settings-text-secondary);
  transition: all 0.15s ease;
}

.install-target-chip--selected {
  background: rgba(0, 122, 255, 0.1);
  border-color: rgba(0, 122, 255, 0.3);
  color: var(--settings-accent);
}

.install-mode-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.install-mode-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  background: var(--settings-bg);
  border: 1px solid var(--settings-card-border);
  cursor: pointer;
  color: var(--settings-text-secondary);
  transition: all 0.15s ease;
}

.install-mode-option--selected {
  background: rgba(0, 122, 255, 0.1);
  border-color: rgba(0, 122, 255, 0.25);
  color: var(--settings-accent);
}

.github-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.github-preview-message {
  margin-top: 7px;
  color: var(--settings-text-secondary);
  font-size: 12px;
}

.github-preview-list {
  max-height: 220px;
  display: grid;
  gap: 7px;
  margin-top: 9px;
  overflow: auto;
}

.github-preview-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: flex-start;
  padding: 9px;
  border: 1px solid var(--settings-card-border);
  border-radius: 8px;
  background: #fff;
  color: var(--settings-text-primary);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.github-preview-item--selected {
  border-color: color-mix(in srgb, var(--settings-accent) 44%, var(--settings-card-border));
  background: color-mix(in srgb, var(--settings-accent) 7%, #fff);
}

.github-preview-item > span {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--settings-card-border);
  border-radius: 5px;
  color: var(--settings-accent);
  font-size: 12px;
  font-weight: 800;
}

.github-preview-item strong,
.github-preview-item em,
.github-preview-item code {
  display: block;
  min-width: 0;
}

.github-preview-item strong {
  font-size: 12px;
  font-weight: 800;
}

.github-preview-item em {
  margin-top: 2px;
  color: var(--settings-text-secondary);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.github-preview-item code {
  margin-top: 5px;
  overflow: hidden;
  color: var(--settings-text-tertiary);
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Batch bar */
.skills-batch-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0, 122, 255, 0.08);
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 8px;
}

.skills-batch-bar__count {
  font-size: 13px;
  color: var(--settings-accent);
  font-weight: 500;
}

.skills-batch-select {
  min-width: 132px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid rgba(0, 122, 255, 0.22);
  background: rgba(255, 255, 255, 0.78);
  color: var(--settings-text-primary);
  font-size: 12px;
  outline: none;
}

.sync-conflicts {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 149, 0, 0.28);
  border-radius: 8px;
  background: rgba(255, 149, 0, 0.08);
}

.sync-conflicts__head,
.sync-conflicts__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sync-conflicts__head strong {
  color: var(--settings-text-primary);
  font-size: 13px;
}

.sync-conflicts__head span,
.sync-conflict-row span {
  color: var(--settings-text-secondary);
  font-size: 12px;
}

.sync-conflicts__list {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.sync-conflict-row {
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.56);
}

.sync-conflict-row strong {
  color: var(--settings-text-primary);
  font-size: 12px;
}

/* Empty state */
.skills-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--settings-text-tertiary);
}

.skills-empty__icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.skills-empty__text {
  font-size: 14px;
  color: var(--settings-text-secondary);
  margin-bottom: 4px;
}

.skills-empty__hint {
  font-size: 12px;
  color: var(--settings-text-tertiary);
}

/* Scanning spinner */
.skills-scanning {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  color: var(--settings-text-secondary);
  font-size: 13px;
}

@keyframes skills-spin {
  to { transform: rotate(360deg); }
}

.skills-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--settings-card-border);
  border-top-color: var(--settings-text-secondary);
  border-radius: 50%;
  animation: skills-spin 0.8s linear infinite;
}

/* ── Frontmatter Card ── */
.frontmatter-card {
  border-radius: 8px;
  border: 1px solid var(--settings-card-border);
  background: var(--settings-bg);
  padding: 12px;
}

.frontmatter-card__summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.frontmatter-card__summary-left {
  min-width: 0;
  flex: 1;
}

.frontmatter-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--settings-text-primary);
  word-break: break-all;
}

.frontmatter-card__desc {
  font-size: 12px;
  color: var(--settings-text-secondary);
  margin-top: 3px;
  line-height: 1.5;
}

.frontmatter-card__version {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  background: var(--settings-card-bg);
  border: 1px solid var(--settings-card-border);
  color: var(--settings-text-secondary);
}

.frontmatter-card__extra {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--settings-separator);
}

.frontmatter-card__toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--settings-text-tertiary);
  cursor: pointer;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.frontmatter-card__toggle:hover {
  color: var(--settings-text-secondary);
}

.frontmatter-card__chevron {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  transition: transform 0.15s ease;
}

.frontmatter-card__chevron--open {
  transform: rotate(90deg);
}

.frontmatter-card__fields {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.frontmatter-card__field {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 12px;
  gap: 12px;
}

.frontmatter-card__field-key {
  color: var(--settings-text-secondary);
  font-weight: 500;
  flex-shrink: 0;
}

.frontmatter-card__field-value {
  color: var(--settings-text-primary);
  text-align: right;
  word-break: break-all;
  min-width: 0;
}

/* ── Inline Confirm ── */
.inline-confirm {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.inline-confirm__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.inline-confirm__btn--idle {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: none;
  color: var(--settings-text-tertiary);
}

.inline-confirm__btn--idle:hover {
  color: var(--settings-danger);
  background: rgba(255, 59, 48, 0.08);
}

.inline-confirm__btn--idle:disabled {
  opacity: 0.4;
  cursor: default;
}

.inline-confirm__btn--danger {
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--settings-danger);
  background: rgba(255, 59, 48, 0.1);
}

.inline-confirm__btn--danger:hover {
  background: rgba(255, 59, 48, 0.18);
}

.inline-confirm__btn--danger:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ── File Tree ── */
.file-browser {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(360px, 1.28fr);
  gap: 12px;
}

.file-browser__tree {
  min-width: 0;
}

.file-browser:not(.file-browser--inspecting) {
  grid-template-columns: 1fr;
}

.file-inspector-panel {
  min-width: 0;
  overflow: hidden;
}

.file-tree-container {
  border-radius: 8px;
  border: 1px solid var(--settings-card-border);
  background: var(--settings-card-bg);
  overflow: hidden;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.025);
}

.file-tree-row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 6px;
  padding: 6px 8px;
  font-size: 12px;
  color: var(--settings-text-primary);
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  text-align: left;
  transition: background 0.1s ease;
}

.file-tree-row:hover {
  background: rgba(0, 0, 0, 0.04);
}

.file-tree-row--selected {
  background: rgba(0, 122, 255, 0.1);
  color: var(--settings-accent);
  font-weight: 700;
}

.file-tree-row__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--settings-text-tertiary);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.file-tree-row__chevron--open {
  transform: rotate(90deg);
}

.file-tree-row__icon {
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1;
}

.file-tree-row__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-tree-row__name--dir {
  font-weight: 500;
}

.file-tree-row__size {
  margin-left: auto;
  padding-right: 4px;
  font-size: 10px;
  color: var(--settings-text-tertiary);
  flex-shrink: 0;
}

/* ── File Content Viewer ── */
.file-viewer {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--settings-card-border);
  background: var(--settings-card-bg);
  box-shadow: 0 12px 26px rgba(20, 31, 56, 0.08);
}

.file-viewer-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--settings-separator);
  min-height: 36px;
}

.file-viewer-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: none;
  background: none;
  color: var(--settings-text-secondary);
  cursor: pointer;
  font-size: 16px;
  transition: color 0.1s, background 0.1s;
  flex-shrink: 0;
}

.file-viewer-back:hover {
  color: var(--settings-text-primary);
  background: rgba(0, 0, 0, 0.04);
}

.file-viewer-breadcrumb {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--settings-text-secondary);
  min-width: 0;
  overflow: hidden;
}

.file-viewer-breadcrumb__segment {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.file-viewer-breadcrumb__sep {
  margin: 0 3px;
  color: var(--settings-text-tertiary);
}

.file-viewer-breadcrumb__active {
  font-weight: 500;
  color: var(--settings-text-primary);
}

.file-viewer-mode-toggle {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: var(--settings-bg);
  padding: 2px;
  gap: 1px;
  flex-shrink: 0;
}

.file-viewer-mode-toggle__btn {
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  border: none;
  background: none;
  color: var(--settings-text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.file-viewer-mode-toggle__btn:hover {
  color: var(--settings-text-primary);
}

.file-viewer-mode-toggle__btn--active {
  background: var(--settings-accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.file-viewer-content {
  overflow: auto;
  max-height: 70vh;
}

.file-viewer-status {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-size: 13px;
  color: var(--settings-text-secondary);
  gap: 8px;
}

.file-viewer-warning {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--settings-warning);
  background: rgba(255, 149, 0, 0.08);
  border-bottom: 1px solid rgba(255, 149, 0, 0.15);
}

.file-viewer-source-wrap {
  overflow: auto;
}

.file-viewer-source {
  width: 100%;
  border-collapse: collapse;
  font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.6;
}

.file-viewer-source tr:hover {
  background: rgba(0, 0, 0, 0.03);
}

.file-viewer-source__line-no {
  width: 40px;
  padding: 0 8px 0 12px;
  text-align: right;
  vertical-align: top;
  color: var(--settings-text-tertiary);
  user-select: none;
  white-space: nowrap;
  font-size: 11px;
}

.file-viewer-source__code {
  padding: 0 16px 0 8px;
  white-space: pre;
  color: var(--settings-text-primary);
}

.file-viewer-preview {
  padding: 16px;
  font-size: 13px;
  color: var(--settings-text-primary);
  line-height: 1.6;
}

.file-viewer-preview h1,
.file-viewer-preview h2,
.file-viewer-preview h3 {
  margin: 16px 0 8px;
  color: var(--settings-text-primary);
}

.file-viewer-preview h1 { font-size: 20px; }
.file-viewer-preview h2 { font-size: 16px; }
.file-viewer-preview h3 { font-size: 14px; }

.file-viewer-preview p {
  margin: 8px 0;
}

.file-viewer-preview code {
  background: var(--settings-bg);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 12px;
  font-family: 'SF Mono', 'Menlo', monospace;
}

.file-viewer-preview pre {
  background: var(--settings-bg);
  border: 1px solid var(--settings-card-border);
  border-radius: 6px;
  padding: 12px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.5;
}

.file-viewer-preview pre code {
  background: none;
  padding: 0;
}

.file-viewer-preview ul,
.file-viewer-preview ol {
  padding-left: 20px;
  margin: 8px 0;
}

.file-viewer-preview li {
  margin: 4px 0;
}

.file-viewer-preview a {
  color: var(--settings-accent);
}

.file-viewer-preview blockquote {
  margin: 8px 0;
  padding: 4px 12px;
  border-left: 3px solid var(--settings-card-border);
  color: var(--settings-text-secondary);
}

.file-viewer-preview table {
  border-collapse: collapse;
  margin: 8px 0;
  width: 100%;
}

.file-viewer-preview th,
.file-viewer-preview td {
  border: 1px solid var(--settings-card-border);
  padding: 6px 10px;
  text-align: left;
  font-size: 12px;
}

.file-viewer-preview th {
  background: var(--settings-bg);
  font-weight: 600;
}

.file-viewer-preview hr {
  border: none;
  border-top: 1px solid var(--settings-separator);
  margin: 16px 0;
}

/* Frontmatter card in source view */
.file-viewer-frontmatter {
  margin: 12px 12px 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--settings-accent) 28%, var(--settings-card-border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--settings-accent) 5%, var(--settings-card-bg));
}

.file-viewer-frontmatter__name {
  color: var(--settings-text-primary);
  font-size: 14px;
  font-weight: 750;
}

.file-viewer-frontmatter__desc {
  margin-top: 4px;
  color: var(--settings-text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.file-viewer-frontmatter__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.file-viewer-frontmatter__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--settings-accent) 10%, transparent);
  color: var(--settings-text-secondary);
  font-size: 11px;
}

.file-viewer-frontmatter__chip em {
  font-style: normal;
  font-weight: 700;
  color: var(--settings-accent);
}

/* Skill description clamp + expand */
.skill-detail-panel__desc--clamped {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.skill-detail-panel__desc-toggle {
  display: inline;
  margin-left: 4px;
  border: none;
  background: none;
  color: var(--settings-accent);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  padding: 0;
}

@media (max-width: 760px) {
  .skills-global-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .file-browser {
    grid-template-columns: 1fr;
  }

  .skill-location-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }

  .skill-location-row__remove {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .plugin-manager-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skills-toolbar,
  .plugin-manager-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .skills-list--grid {
    grid-template-columns: 1fr;
  }

  .skill-detail-install-target {
    grid-template-columns: 1fr;
  }

  .plugin-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .plugin-card__actions {
    justify-content: flex-start;
  }

  .market-grid {
    grid-template-columns: 1fr;
  }

  .discover-config,
  .discover-card {
    grid-template-columns: 1fr;
  }
}
