:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e6eaf0;
  --soft: #f8fafc;
  --brand: #287be8;
  --brand-dark: #125dcc;
  --radius-lg: 20px;
  --shadow: 0 18px 50px rgba(15, 23, 42, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; zoom: 0.8; }
body { margin: 0; min-width: 320px; background: #fff; color: var(--ink); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; overflow: hidden; }
.site-header { position: sticky; top: 0; z-index: 20; height: 72px; background: rgba(255,255,255,.94); border-bottom: 1px solid #eef1f5; backdrop-filter: blur(16px); }
.header-inner { max-width: 1400px; height: 100%; margin: 0 auto; padding: 0 34px; display: flex; align-items: center; gap: 34px; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: auto; }
.brand-mark { height: 46px; width: auto; object-fit: contain; flex: 0 0 auto; }
.primary-nav { display: flex; align-items: center; gap: 28px; height: 100%; margin-right: auto; }
.primary-nav a { position: relative; display: inline-flex; align-items: center; height: 100%; color: #273244; font-size: 14px; font-weight: 600; white-space: nowrap; }
.primary-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--brand); transform: scaleX(0); transition: transform .2s ease; }
.primary-nav a:hover, .primary-nav a.active { color: var(--brand-dark); }
.primary-nav a.active::after { transform: scaleX(1); }
.nav-chevron { width: 13px; margin-left: 5px; }
.header-actions { display: flex; align-items: center; gap: 15px; }
.global-search { width: 330px; height: 43px; border: 1px solid #dfe5ec; border-radius: 10px; display: flex; align-items: center; padding: 0 11px; color: #94a3b8; background: #fff; }
.global-search svg { width: 19px; flex: 0 0 auto; }
.global-search input { min-width: 0; width: 100%; border: 0; outline: 0; padding: 0 10px; color: var(--ink); background: transparent; font-size: 13px; }
.global-search kbd { padding: 4px 8px; border: 1px solid #e5e7eb; border-radius: 6px; background: #f8fafc; font-size: 11px; white-space: nowrap; }
.icon-button, .signin-button { border: 1px solid #e0e6ee; background: #fff; }
.icon-button { width: 43px; height: 43px; border-radius: 9px; display: grid; place-items: center; color: #182235; }
.icon-button:hover { border-color: #a8c8f4; color: var(--brand); }
.signin-button { height: 43px; padding: 0 17px; border-color: var(--brand); border-radius: 9px; color: #fff; background: var(--brand); font-size: 14px; font-weight: 700; box-shadow: 0 6px 14px rgba(40,123,232,.18); }
.signin-button:hover { background: var(--brand-dark); }
.hero { position: relative; background: linear-gradient(111deg, #f8fbff 3%, #f3f7fe 57%, #edf5ff 100%); }
.hero::before, .hero::after { content: ""; position: absolute; pointer-events: none; border-radius: 50%; filter: blur(1px); }
.hero::before { width: 380px; height: 380px; right: -100px; top: 20px; background: rgba(172, 215, 255, .2); }
.hero::after { width: 300px; height: 300px; right: 80px; bottom: -150px; background: rgba(210, 190, 255, .22); }
.hero-inner { position: relative; z-index: 1; max-width: 1400px; min-height: 420px; margin: 0 auto; padding: 48px 68px 40px; display: grid; grid-template-columns: 1fr 540px; gap: 58px; align-items: center; }
.eyebrow { margin: 0 0 12px; font-size: 21px; font-weight: 500; letter-spacing: -.3px; color: #334155; }
.hero-copy h1 { max-width: 650px; margin: 0; font-size: clamp(43px, 4.6vw, 60px); line-height: 1.06; letter-spacing: -3px; font-weight: 800; }
.gradient-text { color: #2f79e9; }
.hero-copy .lead { max-width: 580px; margin: 20px 0 23px; color: #657184; font-size: 17px; line-height: 1.62; }
.hero-search-row { display: flex; align-items: stretch; gap: 16px; max-width: 560px; }
.hero-search { flex: 1; height: 50px; border: 1px solid #d9e1eb; border-radius: 7px; background: #fff; display: flex; align-items: center; padding: 0 14px; box-shadow: 0 4px 16px rgba(50,76,108,.04); }
.hero-search svg { width: 20px; color: #64748b; flex: 0 0 auto; }
.hero-search input { width: 100%; min-width: 0; border: 0; outline: 0; padding-left: 12px; color: var(--ink); font-size: 14px; }
.eyedropper { width: 50px; border: 1px solid #d9e1eb; border-radius: 7px; display: grid; place-items: center; color: var(--brand); background: #fff; }
.eyedropper:hover { background: #eff6ff; }
.popular { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; color: #64748b; font-size: 13px; }
.popular-label { margin-right: 2px; }
.popular-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid #e5eaf1; border-radius: 999px; color: #475569; background: rgba(255,255,255,.7); font-size: 12px; font-weight: 600; }
.popular-pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dot, #3182f6); }
.popular-pill.green { --dot: #19a74a; } .popular-pill.red { --dot: #e11d48; } .popular-pill.purple { --dot: #984be9; }
.view-all { margin-left: 8px; color: var(--brand-dark); font-weight: 600; }
.picker-card { min-height: 326px; display: grid; grid-template-columns: 1.25fr .8fr; gap: 26px; padding: 17px; border: 1px solid #e8edf4; border-radius: var(--radius-lg); background: rgba(255,255,255,.88); box-shadow: var(--shadow); }
.picker-left { min-width: 0; }
.picker-right { display: grid; gap: 8px; min-width: 0; }
.color-stage { position: relative; height: 145px; overflow: hidden; border-radius: 7px; background: linear-gradient(to bottom, transparent, #000), linear-gradient(to right, #fff, #3b82f6); touch-action: none; }
.color-stage::after { content: ""; position: absolute; width: 17px; height: 17px; left: var(--stage-x, 67%); top: var(--stage-y, 38%); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(30,41,59,.25); transform: translate(-50%, -50%); }
.hue-slider { width: 100%; height: 11px; margin: 18px 0 16px; appearance: none; border-radius: 99px; background: linear-gradient(90deg, #f00 0%, #ff0 16.67%, #0f0 33.33%, #0ff 50%, #00f 66.67%, #f0f 83.33%, #f00 100%); }
.hue-slider::-webkit-slider-thumb { width: 20px; height: 20px; appearance: none; border: 3px solid #fff; border-radius: 50%; background: #287be8; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.hue-slider::-moz-range-thumb { width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: #287be8; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.value-stack { display: grid; gap: 7px; }
.value-row { display: grid; grid-template-columns: 38px 1fr 30px; align-items: center; gap: 6px; min-height: 30px; color: #526174; font-size: 12px; }
.value-row input { width: 100%; height: 30px; border: 1px solid #e3e8ef; border-radius: 6px; padding: 0 10px; outline: 0; color: #64748b; background: #fff; font-size: 12px; }
.copy-mini { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 5px; color: #4b5563; background: transparent; }
.copy-mini:hover { color: var(--brand); background: #eff6ff; }
.swatch-preview { min-height: 145px; display: flex; align-items: flex-end; justify-content: space-between; padding: 12px 10px; border-radius: 7px; background: #3b82f6; color: #fff; }
.swatch-preview span { font-size: 13px; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,.25); }
.favorite-button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; color: rgba(255,255,255,.9); background: rgba(15,23,42,.15); }
.favorite-button.is-favorite svg { fill: currentColor; }
.copy-hex { grid-column: 2; height: 41px; border: 0; border-radius: 6px; color: #fff; background: var(--brand); font-weight: 600; box-shadow: 0 7px 14px rgba(40,123,232,.19); }
.copy-hex:hover { background: var(--brand-dark); }

.copy-hex-wrapper {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: 2;
  height: 48px;
  background: #f1f5f9;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 4px 12px rgba(15,23,42,.06);
  transition: all .3s ease;
}
.copy-hex-wrapper:hover {
  background: #e2e8f0;
}
.copy-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #cbd5e1;
  width: 0%;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.copy-content-original {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 14px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 20;
}
.copy-content-confirmation {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #1e293b;
  font-weight: 700;
  font-size: 14px;
  opacity: 0;
  filter: blur(12px);
  transform: scale(1.08);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 10;
}
.copy-check-circle {
  width: 24px;
  height: 24px;
  background: #1e293b;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.copy-check-circle svg {
  width: 14px;
  height: 14px;
}
.copy-hex-wrapper.copied .copy-progress-bar {
  opacity: 1;
}
.copy-hex-wrapper.copied .copy-content-original {
  opacity: 0;
  filter: blur(12px);
  transform: scale(0.92);
  pointer-events: none;
}
.copy-hex-wrapper.copied .copy-content-confirmation {
  opacity: 1;
  filter: blur(0px);
  transform: scale(1);
}
.feature-strip { max-width: 1400px; margin: 0 auto; padding: 17px 68px 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px; }
.feature-card { min-height: 93px; display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid #e8ebef; border-radius: 12px; background: #fff; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.feature-card:hover { transform: translateY(-2px); border-color: #cfe0f8; box-shadow: 0 10px 22px rgba(15,23,42,.06); }
.feature-icon { width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: var(--feature-color); background: var(--feature-bg); }
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { margin: 0 0 5px; font-size: 14px; line-height: 1.2; }
.feature-card p { margin: 0; color: #697586; font-size: 12px; line-height: 1.42; }
.feature-arrow { margin-left: auto; color: #64748b; font-size: 18px; }
.catalog { border-top: 1px solid #eef1f4; background: #fff; }
.catalog-inner { max-width: 1400px; margin: 0 auto; padding: 29px 68px 70px; }
.catalog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.catalog-heading h2 { margin: 0; font-size: 23px; letter-spacing: -.5px; }
.count-badge { display: inline-flex; align-items: center; margin-left: 10px; padding: 5px 10px; border-radius: 999px; color: var(--brand-dark); background: #eaf3ff; font-size: 12px; font-weight: 600; vertical-align: middle; }
.sort-select { height: 41px; min-width: 134px; padding: 0 11px; border: 1px solid #e1e6ed; border-radius: 7px; outline: 0; color: #64748b; background: #fff; font-size: 12px; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 17px 0 28px; }
.filter-button { height: 28px; padding: 0 13px; border: 1px solid #e8ebef; border-radius: 999px; color: #3f4b5e; background: #fff; font-size: 12px; }
.filter-button:hover { border-color: #b4d0f4; color: var(--brand-dark); }
.filter-button.active { border-color: var(--brand); color: #fff; background: var(--brand); }
@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.color-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 23px 25px; }

/* CSS transition on .color-grid children for smooth fade-in and slide-up */
.color-grid > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
  will-change: opacity, transform;
}

.color-grid > *.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.color-grid > *:nth-child(1) { transition-delay: 15ms; }
.color-grid > *:nth-child(2) { transition-delay: 30ms; }
.color-grid > *:nth-child(3) { transition-delay: 45ms; }
.color-grid > *:nth-child(4) { transition-delay: 60ms; }
.color-grid > *:nth-child(5) { transition-delay: 75ms; }
.color-grid > *:nth-child(6) { transition-delay: 90ms; }
.color-grid > *:nth-child(7) { transition-delay: 105ms; }
.color-grid > *:nth-child(8) { transition-delay: 120ms; }
.color-grid > *:nth-child(9) { transition-delay: 135ms; }
.color-grid > *:nth-child(10) { transition-delay: 150ms; }
.color-grid > *:nth-child(11) { transition-delay: 165ms; }
.color-grid > *:nth-child(12) { transition-delay: 180ms; }
.color-grid > *:nth-child(13) { transition-delay: 195ms; }
.color-grid > *:nth-child(14) { transition-delay: 210ms; }
.color-grid > *:nth-child(15) { transition-delay: 225ms; }
.color-grid > *:nth-child(16) { transition-delay: 240ms; }
.color-grid > *:nth-child(17) { transition-delay: 255ms; }
.color-grid > *:nth-child(18) { transition-delay: 270ms; }

.color-card {
  overflow: hidden;
  border: 1px solid #e5e9ef;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15,23,42,.02);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s ease, box-shadow 0.18s ease;
}

@media (prefers-reduced-motion: reduce) {
  .color-grid > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.color-card.is-visible:hover,
.color-card:hover { transform: translateY(-3px); box-shadow: 0 13px 28px rgba(15,23,42,.1); }
.color-block { height: 82px; }
.color-card-body { padding: 11px 12px 12px; }
.color-card-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.color-card-name { overflow: hidden; margin: 0; color: #182235; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.card-fav-btn {
  position: relative;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  display: grid;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #f8fafc;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-fav-btn::after {
  content: '';
  position: absolute;
  inset: -8px;
}
.card-fav-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #ef4444;
  transform: scale(1.06);
}
.card-fav-btn:focus-visible {
  box-shadow: 0 0 0 2px #3b82f6;
}
.card-fav-btn.is-fav {
  background: #fef2f2;
  border-color: #fecaca;
  color: #ef4444;
}
.card-fav-btn.is-fav:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}
.card-fav-btn.animating {
  animation: heartPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes heartPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.35); }
  75% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.filter-saved {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ef4444;
}
.filter-saved:hover {
  border-color: #fca5a5;
  color: #dc2626;
}
.filter-saved.active {
  border-color: #ef4444;
  background: #ef4444;
  color: #fff;
}
.saved-count-pill {
  font-size: 11px;
  opacity: 0.9;
}
.filter-reset-btn {
  height: 28px;
  padding: 0 12px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  color: #dc2626;
  background: #fef2f2;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.18s ease;
  margin-left: 2px;
}
.filter-reset-btn:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
  transform: translateY(-1px);
}
.filter-reset-btn:active {
  transform: translateY(0);
}
.saved-banner-wrap {
  width: 100%;
}
.saved-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 22px;
  background: #fff5f5;
  border: 1px solid #fee2e2;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.05);
}
.saved-header-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #991b1b;
}
.saved-header-heart {
  color: #ef4444;
  font-size: 15px;
}
.saved-reset-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  background: #ffffff;
  border: 1px solid #fca5a5;
  border-radius: 7px;
  color: #dc2626;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.saved-reset-action-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2);
}
.saved-reset-action-btn:active {
  transform: scale(0.98);
}
.color-card-line { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: #64748b; font-size: 11px; line-height: 1.7; }
.color-card-line strong { color: #273244; font-weight: 500; }
.card-copy { width: 23px; height: 23px; display: grid; place-items: center; border: 0; border-radius: 5px; color: #5b6574; background: transparent; }
.card-copy:hover { color: var(--brand); background: #eff6ff; }
.card-copy svg { width: 15px; }
.empty-state { grid-column: 1 / -1; padding: 50px 20px; text-align: center; color: var(--muted); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 40; padding: 11px 15px; border-radius: 8px; color: #fff; background: #13213a; box-shadow: 0 12px 28px rgba(15,23,42,.2); font-size: 13px; opacity: 0; pointer-events: none; transform: translateY(12px); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.footer { padding: 32px 24px; border-top: 1px solid #eef1f4; color: #64748b; font-size: 14px; text-align: center; background: #ffffff; }
.footer-content-wrapper { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 1200px; margin: 0 auto; }
.footer-copyright { color: #64748b; font-size: 14px; }
.footer-brand-name { font-weight: 600; color: #334155; }
.footer-developer { color: #64748b; font-size: 14px; margin-bottom: 6px; }
.footer-dev-link { color: #334155; font-weight: 600; text-decoration: none; transition: color 0.2s; }
.footer-dev-link:hover { color: var(--brand); text-decoration: underline; }
.footer-links { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: nowrap; white-space: nowrap; }
.footer-links a { color: #475569; font-weight: 500; text-decoration: none; padding: 4px 8px; border-radius: 6px; transition: color 0.2s, background 0.2s; font-size: 14px; }
.footer-links a:hover { color: var(--brand); background: #f8fafc; }
.footer-dot { color: #cbd5e1; }

.page-view {
  display: none;
  max-width: 860px;
  margin: 40px auto 80px;
  padding: 48px 40px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}
.page-view.active {
  display: block;
}
#home-view.hidden {
  display: none;
}
.page-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #334155;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  text-decoration: none;
  margin-bottom: 24px;
  cursor: pointer;
  transition: all 0.2s;
}
.page-back-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.page-bottom-nav {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-start;
}
.page-bottom-nav .page-back-btn {
  margin-bottom: 0;
}
.page-content h1 {
  font-size: 30px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
}
.page-date {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 24px;
}
.page-content h2 {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 24px 0 8px;
}
.page-content p {
  font-size: 15px;
  line-height: 1.7;
  color: #334155;
  margin: 0 0 16px;
}
.page-content ul {
  margin: 0 0 16px 20px;
  color: #334155;
  line-height: 1.7;
}
.page-content li {
  margin-bottom: 6px;
}

@media (min-width: 768px) {
  .more-overlay {
    align-items: center;
  }
  .more-sheet {
    border-radius: 24px;
    max-width: 440px;
  }
}
@media (max-width: 1180px) {
  .header-inner { padding: 0 24px; gap: 20px; } .brand { min-width: 205px; font-size: 26px; } .primary-nav { gap: 16px; } .global-search { width: 240px; }
  .hero-inner { grid-template-columns: 1fr 470px; padding: 42px 40px 38px; gap: 30px; } .feature-strip, .catalog-inner { padding-left: 40px; padding-right: 40px; } .color-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .site-header { height: auto; } .header-inner { min-height: 70px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; } .primary-nav { order: 3; width: 100%; height: 36px; overflow-x: auto; gap: 24px; } .primary-nav a { height: 36px; } .header-actions { margin-left: auto; } .global-search { width: min(320px, 42vw); }
  .hero-inner { grid-template-columns: 1fr; } .picker-card { max-width: 610px; } .feature-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .header-inner { padding-left: 16px; padding-right: 16px; } .brand { min-width: unset; font-size: 24px; } .signin-button { padding: 0 11px; } .global-search { display: none; }
  .hero-inner { padding: 34px 18px 32px; } .hero-copy h1 { font-size: 43px; letter-spacing: -2px; } .hero-copy .lead { font-size: 15px; } .hero-search-row { gap: 8px; } .picker-card { grid-template-columns: 1fr; padding: 16px; }
  .picker-right { display: flex; align-items: stretch; gap: 14px; }
  .swatch-preview { flex: 1 1 auto; min-width: 0; min-height: 105px; height: 105px; padding: 16px 18px; border-radius: 14px; }
  .copy-hex-wrapper { flex: 0 0 56px; width: 56px; min-width: 56px; height: 105px; flex-shrink: 0; padding: 0; grid-column: auto; border-radius: 14px; background: #ffffff; border: 1px solid #e2e8f0; box-shadow: 0 4px 12px rgba(15,23,42,.06); }
  .copy-text-label { display: none; }
  .feature-strip { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 14px 18px; } .feature-card { min-height: 88px; padding: 11px; } .feature-card p { font-size: 11px; }
  .catalog-inner { padding: 27px 18px 55px; } .catalog-heading { align-items: flex-start; flex-direction: column; } .sort-select { width: 100%; } .color-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } .color-block { height: 75px; } .footer { padding: 28px 18px; }
  .footer-links { gap: 4px; }
  .page-view { margin: 20px 16px 60px; padding: 24px 18px; border-radius: 14px; }
}

/* Back to Top Floating Button */
.back-to-top-btn {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 48px;
  height: 48px;
  padding: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
  color: #3b82f6;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s, border-color 0.2s, color 0.2s;
}
.back-to-top-btn.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #2563eb;
  transform: translateY(-2px);
}
.back-to-top-btn:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}
@media (min-width: 768px) {
  .back-to-top-btn {
    bottom: 24px;
    right: 24px;
    width: 50px;
    height: 50px;
  }
}

/* More Menu & Content Modal */
.more-overlay, .content-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.more-overlay.open, .content-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.more-sheet, .content-modal-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 32px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
  transform: translateY(30px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}
.more-overlay.open .more-sheet, .content-modal-overlay.open .content-modal-card {
  transform: translateY(0);
}
.more-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.more-sheet-header h3 {
  margin: 0;
  font-size: 23px;
  font-weight: 700;
  color: #0f172a;
}
.more-close-btn, .content-modal-close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: #f1f5f9;
  color: #334155;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.more-close-btn:hover, .content-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.more-menu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.more-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  color: #1e293b;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}
.more-menu-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.more-item-icon {
  font-size: 18px;
  width: 24px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.more-item-label {
  flex: 1;
}
.more-item-arrow {
  color: #94a3b8;
  flex-shrink: 0;
}
.more-menu-item:hover .more-item-arrow {
  color: #0f172a;
}

.content-modal-overlay {
  align-items: center;
  padding: 16px;
}
.content-modal-card {
  border-radius: 20px;
  padding: 28px 24px;
  max-width: 600px;
}
.content-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 14px;
}
.content-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}
.content-modal-body {
  max-height: 70vh;
  overflow-y: auto;
  color: #334155;
  font-size: 14px;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .more-overlay {
    align-items: center;
    padding: 16px;
  }
  .more-sheet {
    border-radius: 24px;
    max-width: 440px;
    padding: 28px 24px;
  }
}
@media (max-width: 430px) {
  .footer-links {
    gap: 10px;
    font-size: 13px;
  }
}
@media (max-width: 360px) {
  .footer-links {
    gap: 8px;
    font-size: 12px;
  }
}

/* ========================================================
   COLOR MIX MODE STYLES (Full Page View)
   ======================================================== */

.color-mix-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: #ffffff;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.2s ease;
}

.color-mix-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.color-mix-card {
  width: 100%;
  min-height: 100%;
  max-width: 100%;
  max-height: none;
  background: #ffffff;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: visible;
  transform: none;
}

.color-mix-overlay.active .color-mix-card {
  transform: none;
}

/* Header */
.color-mix-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #eef2f6;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.color-mix-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.color-mix-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #334155;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  transition: all 0.15s ease;
}

.color-mix-back-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.color-mix-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.color-mix-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #7c3aed;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 3px;
}

.color-mix-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.4px;
}

.color-mix-subtitle {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.color-mix-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-mix-saved-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.color-mix-saved-trigger:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.color-mix-saved-trigger strong {
  color: #7c3aed;
}

.color-mix-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  background: #f1f5f9;
  border: 0;
  border-radius: 50%;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.color-mix-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Main Content Layout (Full Page View) */
.color-mix-content {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  padding: 24px 24px 60px;
  overflow: visible;
  max-height: none;
  flex: 1 0 auto;
}

.color-mix-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mix-panel-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
}

.mix-block-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mix-label {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

/* 1. Counter Control */
.mix-counter-ctrl {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 3px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.mix-counter-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
}

.mix-counter-btn:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
}

.mix-counter-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.mix-counter-value {
  min-width: 80px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  user-select: none;
}

/* 2. Color Selection Slots */
.mix-slots-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mix-random-base-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  color: #7c3aed;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mix-random-base-btn:hover {
  background: #ede9fe;
  border-color: #c4b5fd;
  color: #6d28d9;
}

.mix-slots-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mix-slot-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 6px 10px 6px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.mix-slot-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.mix-slot-label-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mix-slot-num {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mix-slot-color-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mix-slot-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mix-slot-swatch {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.mix-slot-hex {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.mix-slot-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}

/* 3. Primary Action Button */
.mix-generate-row {
  margin-top: 4px;
}

.mix-primary-generate-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 50px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #090d16;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 24px -4px rgba(124, 58, 237, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  isolation: isolate;
}

.mix-primary-generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -2px rgba(124, 58, 237, 0.55), 0 0 20px rgba(99, 102, 241, 0.35);
  border-color: rgba(255, 255, 255, 0.3);
}

.mix-primary-generate-btn:active {
  transform: translateY(1px) scale(0.99);
}

.smoky-button__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

.smoky-button__copy {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.mix-primary-generate-btn .mix-dice-icon {
  font-size: 18px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* Right Side: Generated Palette Main Section */
.color-mix-main {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #eef2f6;
  border-radius: 16px;
  padding: 20px;
  min-height: 400px;
}

/* 16. Empty State */
.mix-empty-state {
  margin: auto;
  text-align: center;
  padding: 40px 20px;
  max-width: 320px;
}

.mix-empty-icon {
  font-size: 44px;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.08));
}

.mix-empty-state h3 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 700;
  color: #0f172a;
}

.mix-empty-state p {
  margin: 0;
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

/* Single Result UI Layout */
.mix-result-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.mix-single-result-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px -6px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Large Smooth Gradient Preview Area */
.mix-gradient-stage {
  position: relative;
  min-height: 310px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 24px;
  background-size: 200% 200%;
  transition: background 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  color: #ffffff;
}

.mix-gradient-stage.theme-dark {
  color: #ffffff;
}

.mix-gradient-stage.theme-light {
  color: #0f172a;
}

/* Top Flow Header */
.mix-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 2;
  position: relative;
}

.mix-stage-hex-flow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #ffffff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.mix-stage-counter {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Left & Right Navigation Arrows */
.mix-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 23, 42, 0.4);
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 3;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.mix-nav-arrow:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.7);
  transform: translateY(-50%) scale(1.08);
}

.mix-nav-arrow:active:not(:disabled) {
  transform: translateY(-50%) scale(0.96);
}

.mix-nav-arrow:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

.mix-nav-prev {
  left: 16px;
}

.mix-nav-next {
  right: 16px;
}

/* Center Generated Color Name & Single HEX Pill */
.mix-stage-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin: auto 0;
  padding: 10px 48px;
  z-index: 2;
  position: relative;
}

.mix-stage-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.mix-stage-color-name {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1.15;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.mix-stage-hex-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  padding: 6px 16px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-weight: 700;
  font-size: 14px;
}

.mix-stage-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  display: inline-block;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

/* Under the Result Area: Specs and Actions */
.mix-result-details {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #ffffff;
}

/* Specs Grid: HEX, RGB, HSL */
.mix-specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.mix-spec-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s ease;
}

.mix-spec-box:hover {
  border-color: #cbd5e1;
}

.mix-spec-title {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.mix-spec-val-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.mix-spec-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mix-spec-copy-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #475569;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.mix-spec-copy-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

/* Actions Row: Copy HEX, Generate Again, Favorite */
.mix-result-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mix-btn-copy-hex {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  flex: 1;
  min-height: 44px;
  height: 44px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.mix-btn-copy-hex:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
  border-color: rgba(255, 255, 255, 0.18);
}

.mix-btn-copy-hex:active {
  transform: translateY(1px);
}

/* Copy Progress Fill (animates across the button background) */
.mix-copy-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.45) 0%, rgba(124, 58, 237, 0.55) 100%);
  opacity: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.mix-btn-copy-hex.is-copied .mix-copy-progress {
  opacity: 1;
}

/* Original Content (Blurs & Scales Down upon Copy) */
.mix-copy-original {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  opacity: 1;
  filter: blur(0px);
  transform: scale(1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  z-index: 2;
}

.mix-btn-copy-hex.is-copied .mix-copy-original {
  opacity: 0;
  filter: blur(12px);
  transform: scale(0.92);
  pointer-events: none;
  z-index: 0;
}

/* Confirmation Content (Blurs In & Checks Mark Animates) */
.mix-copy-confirm {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  opacity: 0;
  filter: blur(12px);
  transform: scale(1.08);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 3;
}

.mix-btn-copy-hex.is-copied.show-confirmation .mix-copy-confirm {
  opacity: 1;
  filter: blur(0px);
  transform: scale(1);
}

.mix-copy-check-circle {
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.mix-copy-check-svg {
  width: 12px;
  height: 12px;
  color: #0f172a;
}

.mix-copy-check-path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.25s;
}

.mix-btn-copy-hex.is-copied.show-confirmation .mix-copy-check-path {
  stroke-dashoffset: 0;
}

.mix-copy-confirm-text {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.mix-btn-generate-again {
  flex: 1;
  min-height: 44px;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.mix-btn-generate-again:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.mix-btn-generate-again:active {
  transform: translateY(1px);
}

.mix-btn-fav-single {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  background: #fdf2f8;
  border: 1px solid #fbcfe8;
  color: #db2777;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.mix-btn-fav-single:hover {
  background: #fce7f3;
  color: #be185d;
  transform: scale(1.06);
}

.mix-btn-fav-single.is-fav {
  background: #fce7f3;
  color: #e11d48;
  border-color: #f43f5e;
}

.mix-btn-fav-single.is-fav svg {
  fill: currentColor;
}

.mix-btn-fav-single.animating {
  animation: mixHeartPulse 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes mixHeartPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

@media (max-width: 640px) {
  .mix-specs-grid {
    grid-template-columns: 1fr;
  }
  .mix-stage-color-name {
    font-size: 26px;
  }
  .mix-gradient-stage {
    min-height: 270px;
    padding: 16px;
  }
  .mix-stage-hex-flow {
    font-size: 12px;
    padding: 5px 10px;
  }
  .mix-result-actions {
    flex-wrap: wrap;
  }
  .mix-btn-copy-hex,
  .mix-btn-generate-again {
    width: 100%;
    flex: none;
  }
}

/* Color Picker Popover/Modal */
.mix-picker-overlay,
.mix-saved-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mix-picker-overlay.active,
.mix-saved-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mix-picker-card,
.mix-saved-card {
  width: 100%;
  max-width: 520px;
  max-height: 82vh;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mix-picker-header,
.mix-saved-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eef2f6;
  background: #fafcff;
}

.mix-picker-header h3,
.mix-saved-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

.mix-picker-sub,
.mix-saved-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: #64748b;
}

.mix-picker-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  background: #f1f5f9;
  border: 0;
  border-radius: 50%;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.mix-picker-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.mix-picker-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  color: #94a3b8;
}

.mix-picker-search-wrap input {
  flex: 1;
  border: 0;
  outline: none;
  font-size: 14px;
  color: #0f172a;
  background: transparent;
}

.mix-picker-categories {
  display: flex;
  gap: 6px;
  padding: 10px 20px;
  overflow-x: auto;
  border-bottom: 1px solid #f1f5f9;
  background: #fbfcfe;
  scrollbar-width: none;
}

.mix-picker-categories::-webkit-scrollbar {
  display: none;
}

.mix-picker-cat-btn {
  white-space: nowrap;
  min-height: 28px;
  padding: 0 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mix-picker-cat-btn.active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #ffffff;
}

.mix-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 14px 20px;
  overflow-y: auto;
  max-height: 380px;
}

.mix-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.mix-picker-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.mix-picker-swatch {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.mix-picker-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mix-picker-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mix-picker-hex {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  color: #64748b;
}

/* Saved Palettes Modal List */
.mix-saved-list {
  padding: 16px 20px;
  overflow-y: auto;
  max-height: 460px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mix-saved-empty {
  text-align: center;
  padding: 36px 12px;
  color: #64748b;
  font-size: 14px;
}

.mix-saved-card-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.mix-saved-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mix-saved-date {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.mix-saved-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mix-saved-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.mix-saved-load-btn {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #7c3aed;
}

.mix-saved-load-btn:hover {
  background: #ede9fe;
}

.mix-saved-copy-btn {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #334155;
}

.mix-saved-copy-btn:hover {
  background: #e2e8f0;
}

.mix-saved-del-btn {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #e11d48;
}

.mix-saved-del-btn:hover {
  background: #ffe4e6;
}

.mix-saved-strips {
  display: flex;
  height: 32px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.mix-saved-strip-color {
  flex: 1;
  height: 100%;
}

.mix-saved-hexes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mix-saved-hex-pill {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  color: #475569;
}

/* ========================================================
   RESPONSIVE OPTIMIZATIONS (360px - 768px)
   ======================================================== */

@media (max-width: 768px) {
  .color-mix-content {
    grid-template-columns: 1fr;
    padding: 18px 16px 44px;
    gap: 20px;
    max-height: none;
    overflow: visible;
  }

  .color-mix-card {
    max-height: none;
    height: auto;
    min-height: 100%;
  }

  .mix-palette-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .mix-card-swatch {
    height: 84px;
  }

  .mix-picker-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .color-mix-overlay {
    padding: 0;
  }

  .color-mix-card {
    max-height: none;
    height: auto;
    min-height: 100%;
    border-radius: 0;
    border: 0;
  }

  .color-mix-header {
    padding: 12px 14px;
  }

  .color-mix-header-left {
    gap: 10px;
  }

  .color-mix-back-btn {
    min-height: 36px;
    padding: 0 10px;
    font-size: 12.5px;
  }

  .color-mix-header h2 {
    font-size: 19px;
  }

  .color-mix-content {
    padding: 14px 12px 36px;
    gap: 16px;
    max-height: none;
    overflow: visible;
  }

  .mix-panel-block {
    padding: 12px;
  }

  .mix-counter-value {
    min-width: 65px;
    font-size: 13px;
  }

  .mix-palette-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .mix-card-swatch {
    height: 76px;
  }

  .mix-card-body {
    padding: 10px 8px;
  }

  .mix-card-name {
    font-size: 12px;
  }

  .mix-card-hex {
    font-size: 11.5px;
  }

  .mix-card-rgb {
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  .color-mix-header h2 {
    font-size: 18px;
  }

  .color-mix-saved-trigger span {
    font-size: 12px;
  }

  .mix-palette-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .mix-card-swatch {
    height: 68px;
  }
}

/* ==========================================================================
   Recently Viewed Section
   ========================================================================== */
.recently-viewed {
  border-top: 1px solid #eef1f4;
  background: #f8fafc;
  padding: 32px 0 36px;
}

.recently-viewed-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 68px;
}

.recently-viewed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.recently-viewed-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.recently-viewed-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eaf3ff;
  color: var(--brand, #2d7ae9);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.recently-viewed-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.recently-viewed-count-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}

.recently-viewed-subtitle {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: #64748b;
  font-weight: 400;
}

.recently-viewed-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.recently-viewed-clear-btn {
  height: 32px;
  padding: 0 13px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.recently-viewed-clear-btn:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
  transform: translateY(-1px);
}

.recently-viewed-clear-btn:active {
  transform: translateY(0);
}

.recently-viewed-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.recent-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  cursor: pointer;
  outline: none;
}

.recent-card:hover {
  transform: translateY(-3px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.recent-card:focus-visible {
  border-color: var(--brand, #2d7ae9);
  box-shadow: 0 0 0 3px rgba(45, 122, 233, 0.2);
}

.recent-swatch-area {
  position: relative;
  width: 100%;
  height: 68px;
  overflow: hidden;
}

.recent-single-swatch {
  width: 100%;
  height: 100%;
  transition: transform 0.25s ease;
}

.recent-card:hover .recent-single-swatch {
  transform: scale(1.04);
}

.recent-palette-bar {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.25s ease;
}

.recent-card:hover .recent-palette-bar {
  transform: scale(1.04);
}

.recent-palette-slice {
  flex: 1;
  height: 100%;
}

.recent-type-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 2;
}

.recent-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.68);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease, transform 0.15s ease;
  z-index: 3;
}

.recent-card:hover .recent-delete-btn,
.recent-card:focus-within .recent-delete-btn {
  opacity: 1;
}

.recent-delete-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.recent-body {
  padding: 11px 13px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  background: #ffffff;
}

.recent-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.recent-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.recent-hex-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.recent-dots-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

.recent-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.recent-action-btn {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.recent-action-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
}

.recent-empty-card {
  grid-column: 1 / -1;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 36px 24px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
}

.recent-empty-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recent-empty-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #334155;
}

.recent-empty-desc {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  max-width: 420px;
  line-height: 1.5;
}

/* Curated Palettes Modal */
.palettes-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
}

.palettes-overlay.active {
  display: grid;
}

.palettes-card {
  background: #ffffff;
  width: 100%;
  max-width: 860px;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: palettesModalIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes palettesModalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.palettes-header {
  padding: 20px 24px;
  border-bottom: 1px solid #eef1f4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  background: #f8fafc;
}

.palettes-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f3eafe;
  color: #9850de;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}

.palettes-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.palettes-sub {
  margin: 3px 0 0;
  font-size: 13px;
  color: #64748b;
}

.palettes-grid {
  padding: 20px 24px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.palette-item-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  display: flex;
  flex-direction: column;
}

.palette-item-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.palette-item-strip {
  height: 64px;
  display: flex;
  width: 100%;
}

.palette-item-strip-slice {
  flex: 1;
  height: 100%;
  position: relative;
  cursor: pointer;
  transition: flex 0.2s ease;
}

.palette-item-strip-slice:hover {
  flex: 1.5;
}

.palette-item-details {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.palette-item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.palette-item-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.palette-item-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 999px;
}

.palette-item-colors-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.palette-item-color-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.palette-item-color-pill:hover {
  border-color: var(--brand, #2d7ae9);
  color: var(--brand, #2d7ae9);
}

.palette-item-color-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.palette-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.palette-item-btn {
  flex: 1;
  height: 32px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.palette-item-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.palette-item-btn.primary {
  background: var(--brand, #2d7ae9);
  border-color: var(--brand, #2d7ae9);
  color: #ffffff;
}

.palette-item-btn.primary:hover {
  background: var(--brand-dark, #1a63cc);
}

/* Responsive adjustments for Recently Viewed */
@media (max-width: 1200px) {
  .recently-viewed-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .recently-viewed-inner {
    padding: 0 24px;
  }
  .recently-viewed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .palettes-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .recently-viewed-inner {
    padding: 0 16px;
  }
  .recently-viewed-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .recently-viewed-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .recently-viewed-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ==========================================================================
   Google AdSense Responsive Display Ad Slot Styles
   ========================================================================== */
.ad-slot-section {
  width: 100%;
  max-width: 1400px;
  margin: 16px auto 20px;
  padding: 0 68px;
  box-sizing: border-box;
  clear: both;
}

.ad-slot-container {
  display: block;
  position: relative;
  text-align: center;
  background: #fbfcfe;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  padding: 10px 14px 14px;
  box-sizing: border-box;
  min-height: 0;
  transition: opacity 0.25s ease;
}

.ad-slot-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.ad-slot-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
  line-height: 1;
  user-select: none;
}

/* AdSense Slot container responsive sizing */
.ad-slot-container ins.adsbygoogle {
  display: block;
  margin: 0 auto;
  min-height: 90px;
  width: 100%;
}

/* If AdSense marks the ad as unfilled or AdBlock hides it, prevent empty broken boxes */
.ad-slot-section:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
  display: none !important;
}

ins.adsbygoogle[data-ad-status="unfilled"] {
  display: none !important;
}

@media (max-width: 1100px) {
  .ad-slot-section {
    padding: 0 40px;
    margin: 14px auto 18px;
  }
}

@media (max-width: 768px) {
  .ad-slot-section {
    padding: 0 18px;
    margin: 10px auto 14px;
  }
  .ad-slot-container {
    padding: 8px 10px 10px;
    border-radius: 10px;
  }
  .ad-slot-container ins.adsbygoogle {
    min-height: 50px;
  }
}



