/* ============================================================
   ColorDuo – ColorHunt layout match (inspected from colorhunt.co)
   ============================================================ */

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

html {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: rgba(0, 0, 0, 0.9);
  -webkit-font-smoothing: antialiased;
  background: #fff;
  height: 100%;
}

body {
  height: 100%;
  overflow: hidden;
  background: #fff;
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; outline: none; }
button:focus-visible,
a:focus-visible,
.hamburger:focus-within {
  outline: 2px solid #777;
  outline-offset: 3px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── HEADER (58px total, like colorhunt) ───────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: #fff;
  padding: 10px 0;
}

.header__wrap {
  max-width: 1700px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 38px;
}

.header__left {
  min-width: 200px;
  width: 200px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header__logo {
  display: flex;
  align-items: center;
  position: relative;
  height: 38px;
  overflow: hidden;
  width: 160px;
}

.header__logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
  margin-left: 6px;
}


.header__logo-text {
  margin-left: 4px;
  font-size: 20px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.9);
  white-space: nowrap;
  line-height: 1;
}

.header__center {
  flex: 1;
  min-width: 0;
  padding: 0 20px;
  position: relative;
}

/* SEARCH – 38px tall, pill radius 40px, full middle width */

.search-box {
  display: flex;
  align-items: center;
  flex-wrap: nowrap; /* tags never wrap – they scroll sideways */
  gap: 4px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 40px;
  height: 38px;
  min-height: 38px;
  padding: 0 12px 0 34px;
  position: relative;
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
  cursor: text;
  transition: border-color 0.15s;
}

.search-box:hover { border-color: #dadada; }
.search-box:focus-within { border-color: #dadada; }

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.2s;
}

.search-box:focus-within .search-icon,
.search-box.has-tags .search-icon { opacity: 0; }
.search-box.has-tags { padding-left: 1px; }

.search-tags-container {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  flex: 0 1 auto;       /* shrinks when full, then scrolls */
  min-width: 0;
  max-width: 100%;
  height: 100%;
  margin-top: 0px;
  overflow-x: auto;     /* overflow tags are hidden – scroll left/right */
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
  cursor: grab;
}
.search-tags-container::-webkit-scrollbar { display: none; }
.search-tags-container.dragging { cursor: grabbing; user-select: none; }
.search-tags-container.fade-right { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); }
.search-tags-container.fade-left { -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px); mask-image: linear-gradient(90deg, transparent, #000 22px); }
.search-tags-container.fade-left.fade-right { -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent); }

.search-tag {
  display: inline-flex;
  align-items: center;
  height: 30px;
  margin-left: 3px;
  background-image: linear-gradient(90deg, #F4F4F4 0%, #EFEFEF 100%);
  border: none;
  padding: 0 12px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.9);
  text-transform: capitalize;
  white-space: nowrap;
  flex-shrink: 0;       /* a tag never gets squashed */
  font-family: 'Poppins', -apple-system, sans-serif;
}

.search-tag.has-color-dot {
  padding-left: 28px;
  position: relative;
}

.search-tag .color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  position: absolute;
  left: 8px;
  flex-shrink: 0;
  background-color: var(--tag-color, #ccc);
}

.search-tag .remove {
  margin-left: 8px;
  margin-right: -5px;
  padding-left: 8px;
  border-left: 1px solid #e5e5e5;
  color: #999;
  cursor: pointer;
  font-size: 12px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  user-select: none;
}

.search-tag .remove:hover {
  color: #333;
}

.search-clear {
  display: none;
  flex: 0 0 auto;       /* fixed at the right end of the bar, never moves or shrinks */
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 26px;
  margin-left: auto;    /* always pinned to the far right of the bar */
  padding: 0 0 0 8px;
  border: none;
  border-left: 1px solid #e5e5e5;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  color: #929292;
  opacity: 0.8;
  transition: color 0.2s, opacity 0.3s;
}
.search-clear:hover { opacity: 1; color: #333; }
.search-box.has-tags .search-clear { display: flex; }

.header__search-input {
  flex: 1 0 70px;       /* always stays visible next to the tags */
  min-width: 70px;
  height: 36px;
  background: transparent;
  border: none;
  font-size: 14px;
  font-family: inherit;
  color: #000;
  outline: none;
  position: relative;
  z-index: 1;
}
.header__search-input::placeholder { color: #aaa; }

/* With tags: the input only takes the width of what is typed, so the
   clear button sits right after the tags (and pins to the right edge when they overflow) */
.search-box.has-tags .header__search-input {
  flex: 0 0 auto;
  min-width: 0;
  width: 6px;
}

/* SEARCH DROPDOWN – matches filterWindow */
.search-dropdown {
  position: absolute;
  top: 38px;
  left: 0;
  right: 0;
  width: calc(100% - 20px);
  margin: 10px auto 0;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  opacity: 0;
  transform: scaleY(0.95);
  transform-origin: center top;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.search-dropdown.open {
  opacity: 1;
  transform: scaleY(1);
  height: auto;
  overflow: visible;
  pointer-events: auto;
}

.search-dropdown__section { padding: 22px; }
.search-dropdown__title {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.9);
}
.search-dropdown__line {
  height: 1px;
  width: 100%;
  background-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, #000 50%, rgba(0,0,0,0) 100%);
  opacity: 0.1;
}
.search-dropdown__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.dropdown-tag {
  display: inline-flex;
  align-items: center;
  position: relative;
  height: 34px;
  margin: 0 4px 4px 0;
  padding: 0 14px;
  border: 1px solid #ececec;
  border-radius: 40px;
  font-size: 12px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.9);
  background: #fff;
  cursor: pointer;
  text-transform: capitalize;
  transition: color 0.2s, opacity 0.2s;
}
.dropdown-tag:hover { color: #000; }
.dropdown-tag:hover::after {
  content: ' ';
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0.02;
  border-radius: 40px;
  pointer-events: none;
}
.dropdown-tag--color { padding-left: 28px; padding-right: 12px; }
.dropdown-tag-dot {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 100%;
}

/* HEADER RIGHT */
.header__right {
  min-width: 340px;
  max-width: 340px;
  width: 340px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 112px;
  flex-shrink: 0;
}

/* Create Button */
.btn-shine {
  height: 38px;
  padding: 0 22px;
  margin-right: 15px;
  color: #797777;
  background: #fff;
  font-weight: 600;
  font-size: 14px;
  border: 1.2px solid #ececec;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-shine:hover {
  background-color: #f7f7f7;
}

.hamburger {
  cursor: pointer;
  position: relative;
}

.hamburger input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  opacity: 0;
}

.hamburger svg {
  height: 2em;
  transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.line {
  fill: none;
  stroke: black;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition:
    stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
    stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.line-top-bottom {
  stroke-dasharray: 12 63;
}

.hamburger input:checked + svg {
  transform: rotate(-45deg);
}

.hamburger input:checked + svg .line-top-bottom {
  stroke-dasharray: 20 300;
  stroke-dashoffset: -32.42;
}

.header__line {
  position: fixed;
  top: 58px;
  left: 0;
  width: 100%;
  height: 1px;
  background-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, #000 50%, rgba(0,0,0,0) 100%);
  opacity: 0.1;
  pointer-events: none;
}

/* ─── DROPDOWN MENU ───────────────────────────────────────────── */
.dropdown-menu {
  position: fixed;
  top: 55px;
  right: 20px;
  width: 170px;
  background-color: #ffffff;
  border-radius: 0 0 12px 12px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 8px;
  z-index: 100;
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.dropdown-menu.open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #333333;
  text-decoration: none;
  text-align: left;
  box-sizing: border-box;
  transition: background-color 0.15s ease;
}

.dropdown-item:hover {
  background-color: #f7f7f7;
}

.dropdown-item.active {
  background-color: #f2f2f2;
  font-weight: 500;
}

.dropdown-divider {
  height: 1px;
  background-color: #f0f0f0;
  margin: 6px 0;
}

/* ─── LAYOUT – left 200 | page flex | right 340 ─────────────── */
.layout {
  display: flex;
  align-items: flex-start;
  max-width: 1700px;
  margin: 0 auto;
  padding-top: 70px;
  height: 100vh;
  overflow: hidden;
}

/* ─── LEFT SIDEBAR – min-width 200px (colorhunt) ────────────── */
.left-sidebar {
  min-width: 200px;
  width: 200px;
  padding: 0 20px;
  height: 100%;
  /*height: calc(100vh - 90px);*/
  overflow-y: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}
.left-sidebar::-webkit-scrollbar { width: 0; display: none; }

.sidebar__main-nav {
  display: flex;
  flex-direction: column;
}

.left-line {
  height: 1.5px;
  margin: 3px 0px;
  width: 100%;
  background-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, #000 45%, rgba(0,0,0,0) 100%);
  opacity: 0.1;
}

.sidebar__link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: 100%;
  max-width: 160px;
  height: 42px;
  padding: 0 18px;
  margin-bottom: 6px;
  font-size: 17px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.9);
  opacity: 0.8;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.2s, opacity 0.2s;
}
.sidebar__link:hover { color: #000; opacity: 1; }
.sidebar__link:hover::after {
  content: ' ';
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0.02;
  border-radius: 10px;
  pointer-events: none;
}
.sidebar__link.active {
  background-image: linear-gradient(90deg, #f4f4f4 0%, #efefef 100%);
  color: #000;
  opacity: 1;
  border-color: transparent;
  font-weight: 400;
}
.sidebar__link--main svg {
  width: 22px;
  height: 22px;
  margin-left: -6px;
  margin-right: 4px;
  flex-shrink: 0;
  opacity: 0.85;
}
.sidebar__link.active svg { opacity: 0.9; }

/* Tags – exact colorhunt .button.small.tag */
.sidebar__categories {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}

.sidebar__link--cat {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 160px;
  height: 30px;
  padding: 0 14px 0 16px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.9);
  opacity: 0.8;
  border: 0;
  border-radius: 40px;
  text-transform: capitalize;
  background: transparent;
}
.sidebar__link--cat:hover {
  opacity: 1;
  background: transparent;
  color: #000;
}
.sidebar__link--cat.active {
  background-image: linear-gradient(90deg, #f4f4f4 0%, #efefef 100%);
  opacity: 1;
  color: #000;
  font-weight: 400;
}

/* Fade deeper tags like colorhunt until hover */
.sidebar__categories .sidebar__link--cat:nth-child(n+8) { opacity: 0.7; }
.sidebar__categories .sidebar__link--cat:nth-child(n+9) { opacity: 0.6; }
.sidebar__categories .sidebar__link--cat:nth-child(n+10) { opacity: 0.5; }
.sidebar__categories .sidebar__link--cat:nth-child(n+11) { opacity: 0.4; }
.sidebar__categories .sidebar__link--cat:nth-child(n+12) { opacity: 0.3; }
.sidebar__categories .sidebar__link--cat:nth-child(n+13) { opacity: 0.2; }
.sidebar__categories .sidebar__link--cat:nth-child(n+14) { opacity: 0.1; }
.sidebar__categories .sidebar__link--cat:nth-child(n+15) { opacity: 0; }
.sidebar__categories:hover .sidebar__link--cat { opacity: 0.8; }
.sidebar__categories:hover .sidebar__link--cat:hover,
.sidebar__categories .sidebar__link--cat.active { opacity: 1; }

/* ─── MAIN FEED – only scroll region ────────────────────────── */
.main-feed {
  flex: 1;
  min-width: 0;
  height: 100%; 
  /*height: calc(100vh - 90px);*/
  overflow-y: auto;
  overflow-x: hidden;
  padding: 5px 20px 30px;
  scrollbar-width: None;
}

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

/* PALETTE CARD – color block slightly shorter than square */
.palette {
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.palette--enter {
  animation-name: paletteItemReveal;
  animation-duration: 0.4s;
  animation-fill-mode: both;
  animation-delay: calc(var(--card-index, 0) * 30ms);
}
@keyframes paletteItemReveal {
  0% { opacity: 0; }
}
.palette__colors {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1 / 0.72;
  display: flex;
  flex-direction: row;
  position: relative;
  margin-bottom: 14px;
}
.palette__color {
  flex: 1;
  height: 100%;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 0;
  justify-content: flex-start;
}

@keyframes paletteColorReveal {
  from { flex-basis: 20%; }
  to { flex-basis: 53.2%; }
}
.palette__colors .palette__color:first-child {
  flex: 0 0 53.2%;
}
.palette__colors .palette__color:last-child {
  flex: 1 1 auto;
}
.grid .palette:nth-child(-n+9) .palette__color:first-child {
  animation: paletteColorReveal 0.5s ease-out both;
}

.palette__hex-hover {
  opacity: 0;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.15);
  color: #fff;
  transition: opacity 0.2s;
  pointer-events: auto;
  cursor: pointer; 
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
}

.palette__hex-hover.copied {
  padding: 4px 14px;
  font-size: 12px;
}

.palette__color:hover .palette__hex-hover { opacity: 1; }

.palette__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
}
.palette__like-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  font-size: 14px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.9);
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #ececec;
  background: #fff;
}

.palette__like-btn.liked,
.detail__action-btn#detail-like-btn.liked { background: #eee; }
.palette__like-btn:hover,
.detail__action-btn#detail-like-btn:hover { background: #f2f2f2; }
.palette__like-btn:active,
.detail__action-btn#detail-like-btn:active { background: #f2f2f2; }
.palette__like-btn.liked { color: #000000; }
.palette__like-btn.liked svg { fill: #0a0909; stroke: #040404; }
.palette__time { font-size: 13px; color: #999; }

/* ─── DETAIL VIEW ───────────────────────────────────────────── */

.ad-slot-Detail{
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0px;
  margin-top: 20px;
} 

.detail-view { width: 100%; max-width: 700px; margin: 0 auto 60px; }
.detail__palette {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 0.64;
  max-height: 500px;
  margin: 40px auto 0;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
}

.detail__palette--enter {
  animation: paletteItemReveal 0.4s ease-out both;
}
.detail__color { flex: 1; height: 100%; }
.detail__palette .detail__color:first-child { flex: 0 0 53.2%; }
.detail__palette .detail__color:first-child {
  animation: paletteColorReveal 0.5s ease-out both;
}


.detail__actions {
  width: 100%;
  max-width: 478px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
  position: relative;
}
.detail__action-btn {
  display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 400; color: #333;
  height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid #ececec; background: #fff;
  position: relative; transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}
.detail__action-btn.liked { color: #e74c3c; }
.detail__action-btn.liked svg { fill: #e74c3c; stroke: #e74c3c; }
.detail__action-btn:hover { background: #f2f2f2; border-color: #ddd; }
.detail__action-btn:focus-visible {
  background: #f2f2f2;
  border-color: #ddd;
  outline: 2px solid #777;
  outline-offset: 2px;
}
.detail__action-btn:active { transform: scale(0.96); }
.detail__action-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  left: 50%;
  padding: 6px 10px;
  border-radius: 6px;
  background: #111;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 0.15s, transform 0.15s;
}
.detail__action-btn:not(.liked):hover:not([data-tooltip=""])::after,
.detail__action-btn:not(.liked):focus-visible:not([data-tooltip=""])::after,
.detail__action-btn.show-tooltip::after { opacity: 1; transform: translate(-50%, 0); }

.detail__time { font-size: 13px; color: #999; margin-left: auto; }

.detail__colors-info {
  width: 100%;
  padding-top: 10px;
  margin: 0 auto 50px;
}
.detail__color-swatches,
.detail__color-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(520px, 100%);
  margin: 10px auto;
  align-items: center;
  justify-items: center;
}
.detail__color-swatches {
  height: 30px;
}
.detail__color-swatch {
  display: block;
  width: 60px;
  height: 25px;
  border-radius: 5px;
}
.detail__color-line {
  height: 1px;
  width: 100%;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #000 50%, rgba(0, 0, 0, 0) 100%);
  opacity: 0.1;
}
.detail__color-line:nth-child(2) { height: 0.5px; }
.detail__color-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 6px 10px;
  border-radius: 10px;
  background: #fff;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}
.detail__color-value:hover { background: #f7f7f7; }
.detail__color-value .copied {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #222;
  color: #fff;
  border-radius: 10px;
  animation: copied 1.7s both;
}
@keyframes copied {
  from { opacity: 1; }
  to { opacity: 1; }
}


.detail__tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding-bottom: 40px; }
.detail__tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 400; color: #555;
  height: 34px; padding: 0 14px; border-radius: 40px; border: 1px solid #ececec; cursor: pointer;
}
.detail__tag:hover { color: #111; }
.detail__tag-dot { width: 14px; height: 14px; border-radius: 50%; }

.detail__more { border-top: 1px solid #f0f0f0; padding-top: 40px; }
.detail__more-title { font-size: 18px; font-weight: 500; text-align: center; margin-bottom: 30px; display: flex; align-items: center; justify-content: center; gap: 10px; }

/* ─── RIGHT SIDEBAR – 340px, stable ─────────────────────────── */
.right-sidebar {
  min-width: 340px;
  max-width: 340px;
  width: 340px;
  padding: 0 20px;
  height: 100%;
  /*height: calc(100vh - 80px);*/
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.right-meta { max-width: 240px; }
.right-sidebar #view-title {
  font-size: 18px;
  font-weight: 500;
  margin: 0;
  line-height: 140%;
  color: rgba(0, 0, 0, 0.9);
  max-width: 240px;
}
.right-sidebar #view-subtitle {
  font-size: 12px;
  font-weight: 400;
  margin: 10px 0 0;
  line-height: 140%;
  color: rgba(0, 0, 0, 0.9);
  max-width: 240px;
}

.right-line {
  height: 1px;
  margin: 16px 0;
  width: 100%;
  background-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, #000 50%, rgba(0,0,0,0) 100%);
  opacity: 0.1;
}


.right-collection { margin-bottom: 24px; display: none; }
.right-collection.visible { display: block; }
.right-collection__header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.right-collection__header h3 { font-size: 18px; font-weight: 500; color: #111; }
.right-collection__header a { font-size: 13px; font-weight: 500; color: #888; padding-right: 2px; transition: color 0.2s; }
.right-collection__header a:hover { color: #111; }

.right-collection__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mini-palette {
  width: 100%; aspect-ratio: 1.2; border-radius: 5px; overflow: hidden; display: flex; cursor: pointer;
}
.mini-palette .color-band { flex: 1; height: 100%; }
.mini-palette .color-band:first-child { flex: 0 0 53.2%; }

.ad-slot {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

/* ─── STATIC CONTENT PAGES (About / Terms / Privacy) ───────── */
.static-page {
  max-width: 600px;
  margin: 0 auto;
  padding-top: 20px;
  padding-bottom: 60px;
  color: rgba(0, 0, 0, 0.9);
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
.static-page.center { text-align: center; }
.static-page .logo-image {
  width: 160px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.static-page h1.title {
  font-size: 18px;
  font-weight: 500;
  line-height: 140%;
  margin: 40px 0 0;
}
.static-page h2,
.static-page .subtitle {
  font-size: 18px;
  font-weight: 450;
  line-height: 140%;
  margin: 35px 0 0;
}
.static-page p {
  font-size: 12px;
  font-weight: 400;
  line-height: 140%;
  margin: 10px 0;
}
.static-page ul {
  font-size: 12px;
  font-weight: 400;
  line-height: 140%;
  margin: 12px 0;
  padding-left: 20px;
}
.static-page li { margin: 4px 0; }
.static-page a { color: rgba(0, 0, 0, 0.9); text-decoration: underline; }

/* ─── WAVY DIVIDER – first color has a wavy right edge, second color sits underneath ─── */
:root {
  --wave-mask: url("/assets/wave.svg");
}
.palette__colors .palette__color:first-child,
.detail__palette .detail__color:first-child,
.mini-palette .color-band:first-child {
  position: relative;
  z-index: 1;
  -webkit-mask-image: var(--wave-mask);
  mask-image: var(--wave-mask);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.palette__colors .palette__color:last-child,
.detail__palette .detail__color:last-child,
.mini-palette .color-band:last-child {
  margin-left: -6%;
}
/* keep the hex pills centred in the visible part of each color */
.palette__colors .palette__color:first-child .palette__hex-hover { left: calc(50% - 3%); }
.palette__colors .palette__color:last-child .palette__hex-hover { left: calc(50% + 2.6%); }

/* ─── RESPONSIVE ────────────────────────────────────────────── */

@media (max-width: 1200px) {

  .right-sidebar { display: none; }
  .header__right { min-width: auto; width: auto; max-width: none; }
  .btn-shine { display: none; }
}

@media (max-width: 900px) {

  .left-sidebar { min-width: 170px; width: 170px; }
  .header__left { min-width: 170px; width: 170px; }
  .sidebar__link { font-size: 16px; }
  .header__logo-text { display: none; }
}

@media (max-width: 750px) {

  body { overflow: auto; }
  .layout { height: auto; overflow: visible; flex-direction: column; align-items: stretch; padding-top: 60px; }
  .header__left { min-width: 50px; width: auto; padding: 0 8px; }
  .header__logo { width: 50px; }
  .header__center { padding: 0 10px; }
  .header__right { padding: 0 8px; min-width: auto; width: auto; }

  /* Keep primary navigation fixed at the bottom on mobile. */
  .left-sidebar {
    position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0;
    width: 100%; min-width: 0; height: auto; overflow: visible;
    padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid #ececec;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  }
  .sidebar__main-nav { flex-direction: row; gap: 6px; }
  .sidebar__categories { display: none; }
  .sidebar__link--main {
    flex: 1 1 0; min-width: 0; width: auto; max-width: none;
    height: 38px; margin-bottom: 0; padding: 0 8px;
    justify-content: center; gap: 6px;
    font-size: 15px; white-space: nowrap; border-radius: 40px;
  }
  .sidebar__link--main:hover::after { border-radius: 40px; }
  .sidebar__link--main svg { width: 18px; height: 18px; margin: 0; }
  .main-feed { height: auto; overflow: visible; padding: 12px 12px calc(100px + env(safe-area-inset-bottom)); }
  .palette__colors { aspect-ratio: 1 / 0.6; min-height: 145px; }
  .search-dropdown.open { transform: translateX(-50%) scaleY(1); }
  .search-dropdown { width: calc(100vw - 100px); left: 50%; transform: translateX(-50%) scaleY(0.95); }
}

@media (max-width: 600px) {
  .palette__colors { min-height: 120px; }

  .left-sidebar { padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); }
  .sidebar__main-nav { gap: 4px; }
  .sidebar__link--main { height: 36px; padding: 0 4px; gap: 5px; font-size: 14px; }
  .sidebar__link--main svg { width: 17px; height: 17px; }
}

@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

  /* icon above label so all four buttons fit on small phones */
  .sidebar__main-nav { gap: 4px; }
  .sidebar__link--main {
    flex-direction: column; gap: 3px; height: 54px; padding: 6px 2px;
    font-size: 12px; border-radius: 14px;
  }
  .sidebar__link--main:hover::after { border-radius: 14px; }
  .sidebar__link--main svg { width: 20px; height: 20px; }
}

/* ─── CREATE PAGE (/create) ─────────────────────────────────── */
.create {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 0 80px;
  text-align: center;
}
.create__title {
  font-size: 18px;
  font-weight: 500;
  line-height: 140%;
  color: rgba(0, 0, 0, 0.9);
}
.create__subtitle {
  font-size: 12px;
  font-weight: 400;
  line-height: 140%;
  margin-top: 10px;
  color: rgba(0, 0, 0, 0.9);
}

/* palette preview – two colors with the same wavy divider as the cards */
.create__palette {
  width: 100%;
  max-width: 350px;
  aspect-ratio: 1 / 0.67;
  margin: 40px auto 0;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  background: #fff;
}
.create__color {
  flex: 1;
  height: 100%;
  position: relative;
  cursor: pointer;
  transition: background-color 0.15s;
}
.create__color:first-child {
  flex: 0 0 53.2%;
  z-index: 1;
  -webkit-mask-image: var(--wave-mask);
  mask-image: var(--wave-mask);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.create__color:last-child { margin-left: -6%; }

/* color picker – same width as the palette */
.create__picker {
  width: 100%;
  max-width: 350px;
  margin: 20px auto 0;
  padding: 16px 18px 6px;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fff;
  display: none;
}

.create__picker.visible {
  display: block;
}

.create__bars { display: flex; flex-direction: column; gap: 16px; }
.create__bar {
  -webkit-appearance: none;
  appearance: none;
  width: 94%;
  height: 14px;
  margin: 0 auto;
  border-radius: 14px;
  background: var(--track, #eee);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  outline: none;
  cursor: pointer;
}
.create__bar::-webkit-slider-runnable-track { height: 14px; background: transparent; border-radius: 14px; }
.create__bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  margin-top: -5px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: var(--thumb, #fff);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}
.create__bar:active::-webkit-slider-thumb { transform: scale(1.12); }
.create__bar::-moz-range-track { height: 14px; background: transparent; border-radius: 14px; }
.create__bar::-moz-range-thumb {
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: var(--thumb, #fff);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.25);
}
.create__bar:focus-visible { outline: 2px solid rgba(0, 0, 0, 0.25); outline-offset: 3px; }

.create__hex {
  display: block;
  width: 90px;
  height: 30px;
  margin: 14px auto 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  text-align: center;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.9);
  outline: none;
  transition: background 0.2s;
}
.create__hex:hover, .create__hex:focus { background: #f7f7f7; }

/* tag bar – reuses the header search bar styles */
.create__tags {
  position: relative;
  width: 80%;
  margin: 30px auto 0;
  text-align: left;
}
.create__tags .search-box:not(.has-tags) { padding-left: 14px; }
.create__tags .search-dropdown {
  top: 38px;
  left: 0;
  width: calc(100% - 20px);
  transform: scaleY(0.95);
}
.create__tags .search-dropdown.open { transform: scaleY(1); }
.create__empty { display: none; padding: 22px; font-size: 12px; color: #999; text-align: center; }

.create__suggest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  margin: 12px auto 0;
  padding: 7px 12px;
  border-radius: 12px;
  background: #fafafa;
  text-align: left;
}
.create__suggest[hidden] { display: none; }
.create__suggest-label { font-size: 13px; color: rgba(0, 0, 0, 0.9); margin-right: 4px; }
.create__suggest .search-tag { cursor: pointer; }
.create__suggest .search-tag:hover { filter: brightness(0.97); }

.create__hint {
  min-height: 16px;
  margin-top: 16px;
  font-size: 12px;
  color: #999;
}
.create__hint.is-error { color: #e74c3c; }

.create__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  margin-top: 18px;
  padding: 0 20px;
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.9);
  transition: background 0.2s, opacity 0.2s;
}
.create__submit[hidden] { display: none; }
.create__submit:not([hidden]) { animation: createSubmitIn 0.25s ease-out both; }
.create__submit:hover { background: #f7f7f7; }
.create__submit:disabled { opacity: 0.6; cursor: default; }
@keyframes createSubmitIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 750px) {
  .create { padding-top: 12px; padding-bottom: 60px; }
  .create__palette { margin-top: 28px; }
  .create__tags { width: 100%; max-width: 440px; }
  .create__suggest { max-width: 440px; }
  .create__tags .search-dropdown { left: 0; width: calc(100% - 20px); transform: scaleY(0.95); }
  .create__tags .search-dropdown.open { transform: scaleY(1); }
  .create__tags .search-dropdown__section { padding: 16px; }
}

@media (max-width: 600px) {
  .create__title { font-size: 17px; }
  .create__palette { margin-top: 24px; max-width: 320px; }
  .create__picker { max-width: 320px; padding: 14px 14px 4px; }

  /* bigger touch targets on the sliders */
  .create__bar { width: 96%; height: 16px; }
  .create__bar::-webkit-slider-runnable-track { height: 16px; }
  .create__bar::-moz-range-track { height: 16px; }
  .create__bar::-webkit-slider-thumb { width: 28px; height: 28px; margin-top: -6px; }
  .create__bar::-moz-range-thumb { width: 28px; height: 28px; }

  /* 16px inputs stop iOS Safari from zooming the page on focus */
  .create__hex { height: 34px; font-size: 16px; }
  .create__tags .header__search-input { font-size: 16px; }

  /* long dropdown scrolls inside itself instead of running off the screen */
  .create__tags .search-dropdown.open { max-height: min(50vh, 360px); overflow-y: auto; }
}

@media (max-width: 480px) {
  .create { padding-bottom: 48px; }
  .create__subtitle { padding: 0 8px; }
  .create__palette, .create__picker { max-width: 100%; }
  .create__chip { bottom: 12px; padding: 3px 8px; font-size: 11px; }
  .create__tags { max-width: none; }
  .create__suggest { max-width: none; padding: 8px 10px; }
  .create__tags .search-dropdown__section { padding: 14px; }
  .create__tags .dropdown-tag { height: 36px; font-size: 13px; }
  .create__submit { width: 100%; height: 44px; }
}