@import "colors_and_type.css";

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(12, 21, 42, 0.95);
  backdrop-filter: blur(var(--blur-nav));
  border-bottom: var(--border-thin);
  z-index: 100;
  padding: 0.75rem 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--fg-1);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: opacity var(--dur-fast);
  cursor: pointer;
}

.nav-link:hover {
  opacity: 0.7;
}

.nav-sign-in {
  color: var(--primary-light);
  border: 1px solid var(--primary-light);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-xs);
  transition: all var(--dur-base);
}

.nav-sign-in:hover {
  background: var(--primary-light);
  color: var(--text-on-accent);
  opacity: 1;
}

/* ── Hamburger (mobile only) ─────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  order: -1;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg-1);
  border-radius: 2px;
  transition: transform var(--dur-base), opacity var(--dur-base);
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 640px) {
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(12, 21, 42, 0.98);
    border-bottom: var(--border-thin);
    padding: 0.5rem 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links .nav-link {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border-radius: 0;
  }

  .nav-links .nav-link:hover {
    background: var(--glass-bg);
    opacity: 1;
  }
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  padding: 2rem 1rem;
}

main {
  width: 90%;
  max-width: 800px;
  text-align: center;
  z-index: 10;
}

header {
  margin-bottom: 1rem;
}

header h1 {
  font-family: var(--font-display);
  font-size: 3.75rem;
  font-weight: var(--w-black);
  letter-spacing: var(--ls-tight);
  margin-bottom: 0.5rem;
}

header h1 span {
  color: var(--accent);
}

header p {
  opacity: 0.7;
  margin-bottom: 1rem;
  font-weight: 300;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--shadow-glass);
}

.tool-card {
  padding: 3rem;
  transition: transform var(--dur-slow) ease;
}

.upload-area {
  border: var(--border-dashed);
  border-radius: var(--radius-lg);
  padding: 3rem;
  cursor: pointer;
  transition: all var(--dur-slow) ease;
}

.upload-area:hover {
  border-color: var(--primary-light);
  background: rgba(255, 255, 255, 0.02);
}

.upload-area.dragging {
  border-color: var(--accent);
  transform: scale(1.02);
}

.icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

h2 {
  font-family: var(--font-display);
  font-weight: var(--w-semibold);
  margin-bottom: 0.5rem;
}

.hidden {
  display: none !important;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--glass-bg-hi);
  border-radius: var(--radius-pill);
  margin: 2rem 0 1rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--grad-progress);
  transition: width var(--dur-slow) ease;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: var(--w-semibold);
  margin: 1rem 0.5rem;
  cursor: pointer;
  border: none;
  transition: all var(--dur-slow) ease;
}

.btn-primary {
  background: var(--grad-primary);
  color: var(--text-on-accent);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(116, 72, 157, 0.4);
}

.btn-secondary {
  background: transparent;
  border: var(--border-thin);
  color: var(--fg-1);
}

.btn-secondary:hover {
  background: var(--glass-bg-hi);
}

footer {
  margin-top: 3rem;
  font-size: 0.8rem;
  opacity: 0.5;
}

/* Tool Selector Tabs */
.tool-selector {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  border-radius: var(--radius-pill);
  overflow: visible;
  padding: 0.5rem;
  gap: 0.5rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--fg-1);
  padding: 1rem 2rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: var(--w-semibold);
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: all var(--dur-slow);
  opacity: 0.7;
  flex: 1 1 auto;
}

.tab-btn:hover {
  opacity: 1;
}

.tab-btn.active {
  background: var(--primary);
  opacity: 1;
  box-shadow: 0 4px 15px rgba(116, 72, 157, 0.4);
}

/* Sub-upload area and inputs */
.settings-panel {
  background: var(--bg-input);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: left;
}

.settings-panel h3 {
  font-family: var(--font-display);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.settings-desc {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 1rem;
}

.sub-upload {
  padding: 1rem !important;
  margin-bottom: 1rem;
  border-width: 1px !important;
}

/* Children must not intercept drag events — drops would silently cancel
   because the child has no dragover/preventDefault handler */
.sub-upload * {
  pointer-events: none;
}

.sub-upload p {
  margin: 0;
  font-size: 0.9rem;
}

.file-name {
  display: block;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  color: var(--accent);
}

.input-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.input-group label {
  font-weight: var(--w-semibold);
  font-size: 0.9rem;
}

.glass-input {
  background: var(--glass-bg-hi);
  border: 1px solid var(--glass-border-hi);
  color: var(--fg-1);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  width: 80px;
  text-align: center;
  outline: none;
}

/* Ensure Dropdown Options have contrast */
select.glass-input {
  width: auto;
  min-width: 140px;
  cursor: pointer;
  text-align-last: center;
}

.glass-input option {
  background-color: var(--bg-app);
  color: var(--fg-1);
  padding: 10px;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  body {
    padding: 1.5rem 0.75rem;
  }

  header h1 {
    font-size: 2.25rem;
  }

  header p {
    margin-bottom: 1.5rem;
  }

  .tool-card {
    padding: 1.25rem;
  }

  .upload-area {
    padding: 1.5rem 1rem;
  }

  .tab-btn {
    padding: 0.75rem 0.75rem;
    font-size: 0.85rem;
  }

  .btn-primary,
  .btn-secondary {
    display: block;
    width: 100%;
    margin: 0.5rem 0;
    text-align: center;
  }

  .glass-input {
    width: 100px;
  }

  select.glass-input {
    width: 100%;
    min-width: unset;
  }

  .swatchset-cmyk-row {
    gap: 0.75rem;
  }

  .swatchset-num {
    width: 52px !important;
  }

  .settings-panel {
    padding: 1rem;
  }
}

/* ── Swatch Set Creator ──────────────────────────────────────────────── */
.swatchset-subhead {
  font-size: 0.9rem;
  font-weight: var(--w-semibold);
  margin-bottom: 0.5rem;
  margin-top: 0;
  opacity: 0.9;
}

.swatchset-cmyk-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.swatchset-cmyk-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.swatchset-cmyk-field label {
  font-size: 0.75rem;
  font-weight: var(--w-semibold);
  opacity: 0.8;
  letter-spacing: var(--ls-wide);
}

.swatchset-num {
  width: 60px !important;
  text-align: center;
}

.swatchset-radio-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.swatchset-radio-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.swatchset-radio-label input[type="radio"] {
  accent-color: var(--primary);
  cursor: pointer;
}

/* ── Pro CTA Section ──────────────────────────────────────────────────── */
.pro-cta {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  margin-bottom: 3rem;
  padding: 1.5rem 2.5rem;
  background: var(--grad-pro);
  border-radius: var(--radius-md);
  border: none;
  transition: all var(--dur-slow) ease;
  box-shadow: var(--shadow-pro);
  cursor: pointer;
}

.pro-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-pro-hi);
  opacity: 1;
}

.pro-cta-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: var(--w-black);
  letter-spacing: var(--ls-tight);
  color: var(--text-on-accent);
  margin-bottom: 0.25rem;
  line-height: 1;
}

.pro-cta-title span {
  color: var(--accent);
}

.pro-cta-sub {
  opacity: 0.95;
  font-weight: var(--w-regular);
  font-size: 0.9rem;
  color: var(--text-on-accent);
}

/* ── Auth Modal ──────────────────────────────────────────────────────────── */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(var(--blur-glass));
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 2.5rem 2rem;
  border-radius: 24px;
  text-align: center;
}

.auth-card h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: var(--w-black);
  margin-bottom: 0.4rem;
}

.auth-card p {
  opacity: 0.65;
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-input {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  text-align: left;
  border-radius: var(--radius-md);
}

.auth-submit {
  margin: 0.25rem 0 0;
  width: 100%;
  padding: 0.9rem;
}

.auth-toggle-text {
  font-size: 0.875rem;
  opacity: 0.7;
  margin-top: 0.25rem !important;
  margin-bottom: 0 !important;
}

.auth-toggle-link {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: var(--w-semibold);
}

.auth-error {
  color: var(--accent);
  font-size: 0.875rem;
  margin-top: 0.25rem !important;
  margin-bottom: 0 !important;
}

/* ── Sign-In Link ────────────────────────────────────────────────────────── */
.sign-in-bar {
  margin-top: 0.75rem;
  text-align: center;
}

.sign-in-link {
  font-size: 0.85rem;
  color: var(--fg-3);
  text-decoration: none;
  font-weight: var(--w-semibold);
  transition: color var(--dur-fast);
}

.sign-in-link:hover {
  color: var(--fg-1);
}

/* ── User Status Bar ─────────────────────────────────────────────────────── */
.user-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.user-info-text {
  font-size: 0.85rem;
  opacity: 0.7;
}

.btn-logout {
  background: transparent;
  border: var(--border-thin);
  color: var(--fg-1);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: var(--w-semibold);
  cursor: pointer;
  transition: all var(--dur-fast);
}

.btn-logout:hover {
  background: var(--glass-bg-hi);
}

/* ── Pro Badge on Tabs ───────────────────────────────────────────────────── */
.pro-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: var(--w-black);
  letter-spacing: var(--ls-wide);
  background: var(--grad-badge);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-xs);
  vertical-align: middle;
  margin-left: 0.35rem;
  line-height: 1.4;
}

/* ── Pro Upgrade Prompt ──────────────────────────────────────────────────── */
.pro-lock-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

#pro-upgrade-prompt {
  text-align: center;
  padding: 2rem 1rem;
}

#pro-upgrade-prompt h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

/* ── Vectorizer Result ─────────────────────────────────────────────────── */
.vec-preview-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.vec-preview-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.vec-preview-label {
  font-size: 0.75rem;
  font-weight: var(--w-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  opacity: 0.6;
}

.vec-preview-img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: var(--border-thin);
}

.vec-stats-bar {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0.75rem 0;
  margin-bottom: 0.75rem;
  border-top: var(--border-thin);
  border-bottom: var(--border-thin);
}

.vec-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.vec-stat-val {
  font-size: 1.1rem;
  font-weight: var(--w-bold);
}

.vec-stat-lbl {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  opacity: 0.55;
}

.vec-warnings {
  background: var(--status-fail-bg);
  border: 1px solid var(--status-fail-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.vec-type-badge {
  background: var(--grad-primary);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: var(--w-bold);
  letter-spacing: 0.02em;
}

.vec-tweak-panel {
  background: var(--bg-input);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  text-align: left;
}

.vec-tweak-label {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-bottom: 0.75rem;
}

.vec-tweak-panel .input-group {
  margin-bottom: 0.75rem;
}

.vec-actions {
  text-align: center;
}

.vec-advanced-toggle {
  background: transparent;
  border: var(--border-thin);
  color: var(--fg-2);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: var(--w-semibold);
  cursor: pointer;
  transition: all var(--dur-fast);
  margin-top: 0.75rem;
}

.vec-advanced-toggle:hover {
  background: var(--glass-bg);
  color: var(--fg-1);
}

.vec-advanced-panel {
  margin-top: 1rem;
}

.vec-slider-group {
  margin-bottom: 1rem;
}

.vec-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.vec-slider-label {
  font-size: 0.85rem;
  font-weight: var(--w-semibold);
}

.vec-slider-value {
  font-size: 0.8rem;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

.vec-slider-desc {
  font-size: 0.72rem;
  opacity: 0.45;
  margin-bottom: 0.35rem;
}

.vec-slider-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg-hi);
  outline: none;
}

.vec-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-light);
  cursor: pointer;
  border: 2px solid var(--text-on-accent);
}

.vec-slider-input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-light);
  cursor: pointer;
  border: 2px solid var(--text-on-accent);
}

@media (max-width: 500px) {
  .vec-preview-row {
    flex-direction: column;
  }
  .vec-stats-bar {
    gap: 1rem;
  }
}

/* ── PDF Shuffler ────────────────────────────────────────────────────────── */

.shuffler-file-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.shuffler-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  background: var(--glass-bg);
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast);
}

.shuffler-file-row:hover {
  background: var(--glass-bg-hi);
}

.shuffler-file-label {
  font-size: 0.9rem;
  font-weight: var(--w-medium);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.shuffler-file-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.75rem;
  flex-shrink: 0;
}

.shuffler-move-btn {
  background: transparent;
  border: var(--border-thin);
  color: var(--fg-1);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-fast);
}

.shuffler-move-btn:hover {
  border-color: var(--primary-light);
  background: var(--accent-muted);
}

.shuffler-remove-btn {
  background: transparent;
  border: var(--border-thin);
  color: var(--accent);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-fast);
}

.shuffler-remove-btn:hover {
  border-color: var(--accent);
  background: var(--status-fail-bg);
}

/* Validation results */
.shuffler-page-summary {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.shuffler-validation-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--glass-bg);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.shuffler-validation-error {
  border-left: 3px solid var(--accent);
}

.shuffler-val-name {
  font-weight: var(--w-medium);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.shuffler-val-pages {
  color: var(--fg-2);
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-left: 0.75rem;
}

.shuffler-val-error {
  color: var(--accent);
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-left: 0.75rem;
}

/* Single-page nudge */
.shuffler-nudge {
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: var(--accent-muted);
  border: 1px solid var(--glass-border-hi);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--fg-2);
}

.shuffler-nudge-link {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: var(--w-semibold);
}

.shuffler-nudge-link:hover {
  text-decoration: underline;
}

/* ─── Swatchset live preview (Phase 2B) ──────────────────────────────────── */

.swatchset-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(193, 53, 132, 0.16), rgba(131, 58, 180, 0.16));
  border: 1px solid rgba(193, 53, 132, 0.35);
  border-radius: 6px;
  font-size: 0.82rem;
  color: #f0d6e8;
}
.swatchset-callout-text strong { color: #ffb1d8; margin-right: 0.4em; }
.swatchset-callout-dismiss {
  background: transparent;
  border: none;
  color: #f0d6e8;
  opacity: 0.6;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 0.3rem;
}
.swatchset-callout-dismiss:hover { opacity: 1; }

.swatchset-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto 0.75rem;
}
.swatchset-preview-cell {
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.swatchset-preview-fill { flex: 1; min-height: 0; }
.swatchset-preview-cell .swatchset-preview-name,
.swatchset-preview-cell .swatchset-preview-cmyk {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 0.62rem;
  text-align: center;
  padding: 1px 2px;
  line-height: 1.2;
  font-family: 'Courier New', monospace;
}
.swatchset-preview-cell .swatchset-preview-name {
  font-weight: 700;
  font-size: 0.66rem;
  padding-top: 3px;
}
.swatchset-preview-cell .swatchset-preview-cmyk {
  padding-bottom: 3px;
  opacity: 0.85;
}
.swatchset-preview-cell.is-out-of-gamut {
  outline: 2px solid var(--warning);
  outline-offset: -2px;
}
.swatchset-gamut-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(255, 152, 0, 0.92);
  color: #1a1a1a;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
  line-height: 1.3;
  z-index: 1;
}

.swatchset-deltae-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-radius: 5px;
  margin: 0.25rem 0 0.5rem;
  border: 1px solid transparent;
  font-size: 0.82rem;
}
.swatchset-deltae-score {
  font-weight: 700;
  font-family: 'Courier New', monospace;
  white-space: nowrap;
}
.swatchset-deltae-message { flex: 1; text-align: right; opacity: 0.95; }

.swatchset-deltae-bar.band-match     { background: rgba(76,175,80,0.15);  border-color: rgba(76,175,80,0.4);  color: #b3e6b8; }
.swatchset-deltae-bar.band-close     { background: rgba(125,200,130,0.13); border-color: rgba(125,200,130,0.4); color: #cce8d0; }
.swatchset-deltae-bar.band-visible   { background: rgba(255,152,0,0.13);   border-color: rgba(255,152,0,0.45);  color: #ffd9a3; }
.swatchset-deltae-bar.band-significant { background: rgba(244,67,54,0.13);  border-color: rgba(244,67,54,0.45);  color: #ffb6b0; }

.swatchset-gamut-warning {
  font-size: 0.72rem;
  color: #ffd9a3;
  padding: 0.45rem 0.6rem;
  background: rgba(255, 152, 0, 0.08);
  border-left: 3px solid var(--warning);
  border-radius: 3px;
  margin-bottom: 0.85rem;
  line-height: 1.4;
}
.swatchset-gamut-warning[hidden] { display: none; }

@media (max-width: 480px) {
  .swatchset-preview-grid { max-width: 100%; }
  .swatchset-deltae-bar { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
  .swatchset-deltae-message { text-align: left; }
}
