.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-width: 28px;
  padding: 0 6px;
  border-radius: 6px;
  color: currentColor;
  opacity: .55;
  transition: opacity .12s ease, background-color .12s ease;
}
.icon-btn:hover { opacity: 1; background-color: rgba(0,0,0,.06); }
.dark .icon-btn:hover { background-color: rgba(255,255,255,.08); }
.icon-btn.active { opacity: 1; color: #b45309; }

.popover {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  background: var(--pop-bg, #fff);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 10px;
  width: 168px;
}
.dark .popover { --pop-bg: #1c1a17; border-color: rgba(255,255,255,.08); box-shadow: 0 8px 24px rgba(0,0,0,.4); }

.pop-btn {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,.06);
  transition: background-color .12s ease;
}
.dark .pop-btn { background: rgba(255,255,255,.08); }
.pop-btn:hover { background: rgba(0,0,0,.12); }
.dark .pop-btn:hover { background: rgba(255,255,255,.14); }

.theme-swatch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(0,0,0,.04);
  opacity: .75;
  text-align: left;
}
.theme-swatch:hover { opacity: 1; background: rgba(0,0,0,.08); }
.dark .theme-swatch { background: rgba(255,255,255,.05); }
.dark .theme-swatch:hover { background: rgba(255,255,255,.1); }
.theme-swatch.active { opacity: 1; outline: 1.5px solid #b45309; background: rgba(180,83,9,.1); }
.swatch-bar { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

#source { caret-color: #b45309; }
#source::placeholder { color: rgba(0,0,0,.25); }
.dark #source::placeholder { color: rgba(255,255,255,.25); }

.frame-chip {
  flex-shrink: 0;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  background: rgba(0,0,0,.05);
  opacity: .6;
  transition: opacity .12s ease, background-color .12s ease;
}
.dark .frame-chip { background: rgba(255,255,255,.06); }
.frame-chip:hover { opacity: 1; }
.frame-chip.active { opacity: 1; background: rgba(180,83,9,.15); color: #b45309; font-weight: 600; }
