:root {
  color-scheme: light;
  --main-card-surface: #fffefb;
  --cc-container-shell-surface:
    linear-gradient(135deg, rgba(255, 253, 249, 0.96), rgba(255, 247, 240, 0.94)),
    var(--main-card-surface);
  --main-surface: #f7eee6;
  --gallery-surface: #fdfaf5;
  --gallery-card-surface: #f9f1eb;
  --color-ivory-mist: #f4eddd;
  --color-floral-white: var(--main-surface);
  --color-sand-dune: #e9dfc8;
  --color-inner-surface: var(--main-surface);
  --color-card-paper: #f9f1eb;
  --color-floating-paper: var(--main-surface);
  --color-pitch-black: #171410;
  --color-ash-grey: #a7d1cd;
  --color-pearl-aqua: #b8d9d6;
  --color-celadon: #bdd2b1;
  --color-almond-silk: #f2cbb8;
  --color-peach-fuzz: #efb89a;
  --color-tangerine-dream: #d7b4a0;
  --color-golden-accent: #e5c65d;
  --color-pink: #e8bcc1;
  --color-purple: #d8c8e4;
  --cc-brand-ink: rgba(26, 25, 27, 0.96);
  --cc-avatar-border: rgba(26, 25, 27, 0.52);
  --cc-avatar-border-soft: rgba(26, 25, 27, 0.18);
  --color-text: var(--color-pitch-black);
  --color-peach: var(--color-peach-fuzz);
  --color-orange: var(--color-tangerine-dream);
  --color-text-muted: rgba(10, 9, 6, 0.55);
  --color-text-soft: rgba(10, 9, 6, 0.42);
  --color-line: #d9ccb6;
  --color-surface: var(--color-floral-white);
  --color-surface-strong: var(--color-inner-surface);
  --paper-border: #c9b89a;
  --paper-border-soft: #d9ccb6;
  --paper-border-strong: #b7a487;
  --medium-alcohol-accent: #9b95d4;
  --medium-alcohol-soft: color-mix(in srgb, var(--medium-alcohol-accent) 28%, var(--color-floral-white));
  --medium-acrylic-accent: #c97878;
  --medium-acrylic-soft: color-mix(in srgb, var(--medium-acrylic-accent) 30%, var(--color-floral-white));
  --medium-pencil-accent: #b8d4af;
  --medium-pencil-soft: color-mix(in srgb, var(--medium-pencil-accent) 30%, var(--color-floral-white));
  --medium-gel-accent: #8ec5e8;
  --medium-gel-soft: color-mix(in srgb, var(--medium-gel-accent) 30%, var(--color-floral-white));
  --medium-fine-line-accent: #d9c86f;
  --medium-fine-line-soft: color-mix(in srgb, var(--medium-fine-line-accent) 30%, var(--color-floral-white));
  --medium-generic-accent: #d8b38f;
  --medium-generic-soft: color-mix(in srgb, var(--medium-generic-accent) 28%, var(--color-floral-white));
  --medium-custom-accent: #f7c59f;
  --medium-custom-soft: color-mix(in srgb, var(--medium-custom-accent) 34%, var(--color-floral-white));
  --modal-field-border: color-mix(in srgb, var(--color-tangerine-dream) 34%, white);
  --modal-field-border-hover: color-mix(in srgb, var(--color-tangerine-dream) 46%, white);
  --modal-field-border-focus: color-mix(in srgb, var(--color-tangerine-dream) 58%, white);
  --button-border: #c9a58f;
  --paper-shadow:
    0 16px 32px rgba(60, 45, 25, 0.06),
    0 4px 10px rgba(60, 45, 25, 0.03);
  --paper-shadow-soft:
    0 10px 24px rgba(70, 55, 35, 0.05),
    0 2px 6px rgba(70, 55, 35, 0.04);
  --panel-surface: var(--gallery-surface);
  --tool-surface: var(--color-floating-paper);
  --card-surface: #f9f1eb;
  --panel-border: var(--paper-border-soft);
  --panel-shadow:
    0 10px 24px rgba(70, 55, 35, 0.05),
    0 2px 6px rgba(70, 55, 35, 0.04);
  --panel-radius: 18px;
  --shadow-lg: var(--paper-shadow);
  --shadow-md: var(--paper-shadow-soft);
  --shadow-sm: 0 6px 14px rgba(60, 45, 20, 0.05);
  --radius-xl: 16px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --max-width: 1440px;
  --brand-size: clamp(1.85rem, 2.25vw, 2.2rem);
  --hero-title-size: clamp(2.4rem, 6vw, 5.8rem);
  --font-title: "Inter", system-ui, sans-serif;
  --font-ui: "Inter", system-ui, sans-serif;
  --font-body: "Krub", "Inter", system-ui, sans-serif;
  --font-copy: var(--font-body);
  --font-display: "Fraunces", Georgia, serif;
  --shell-gutter: 10px;
  --card-pad-x: clamp(18px, 4vw, 58px);
  --card-pad-y: clamp(18px, 3vw, 28px);
  --layout-gap: clamp(12px, 2vw, 32px);
  --cc-control-height: 44px;
  --cc-dropdown-row-height: 44px;
  --cc-dropdown-row-gap: 2px;
  --cc-dropdown-max-rows: 12;
  --cc-dropdown-shell-padding: 16px;
  --cc-dropdown-list-max-height: calc(
    (var(--cc-dropdown-row-height) * var(--cc-dropdown-max-rows)) +
    (var(--cc-dropdown-row-gap) * (var(--cc-dropdown-max-rows) - 1))
  );
  --collection-frame-height: 612px;
  --gallery-panel-height: calc(100dvh - clamp(128px, 13vh, 160px));
  --gallery-panel-min-height: min(600px, calc(100dvh - 180px));
}

/* Mobile palette workspace: match the gallery typography and full-height colour rows. */
@media (max-width: 760px) {
  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) .site-shell,
  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) .cc-shell,
  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) .canvas-card,
  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) .cc-shell__surface {
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;
    overflow: hidden;
  }

  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) .canvas-card,
  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) .cc-shell__surface {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) .supplies-main {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    padding:
      16px
      18px
      calc(var(--supplies-mobile-footer-height) + env(safe-area-inset-bottom) + 10px);
    background: var(--cc-container-shell-surface);
    overflow: hidden;
  }

  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) .palettes-shell,
  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) .palettes-workspace {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    height: 100%;
    padding: 0;
    overflow: hidden;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) > .palette-editor {
    gap: clamp(8px, 2.5vw, 11px);
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__title-view {
    max-width: 11ch;
    font-family: var(--font-display);
    font-size: clamp(2.45rem, 13.2vw, 3.08rem);
    font-weight: 790;
    font-variation-settings: "SOFT" 80, "WONK" 0, "opsz" 72;
    letter-spacing: -0.028em;
    line-height: 0.9;
    color: rgba(28, 26, 28, 0.98);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__description-block {
    margin: 0;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__description-view {
    max-width: 26rem;
    font-size: clamp(0.9rem, 3.55vw, 1rem);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__header-actions {
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 clamp(3px, 1.2vw, 5px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__close.modal-button--icon {
    margin-left: 0 !important;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__medium-toggle {
    display: grid !important;
    place-items: center;
    flex: 0 0 44px;
    width: 44px !important;
    min-width: 44px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__medium-toggle::before {
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__medium-label,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__medium-chevron {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__stack-shell {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    height: auto;
    margin: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack {
    height: 100%;
    min-height: 0;
    max-height: none;
    border-radius: 12px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__item {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    container-type: size;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__overlay {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content max-content;
    align-items: center;
    gap: clamp(7px, 2.1vw, 10px);
    padding: clamp(10px, 4.2cqh, 16px) clamp(14px, 4.4vw, 18px);
    opacity: 0;
    pointer-events: none;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack.palette-stack--show-all .palette-stack__overlay,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__item:focus-within .palette-stack__overlay {
    opacity: 1;
    pointer-events: auto;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__info,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__hex-cell,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__actions {
    position: static;
    inset: auto;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__info {
    display: flex;
    max-width: none;
    min-width: 0;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__copy {
    gap: clamp(2px, 1.2cqh, 5px);
    min-width: 0;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__meta {
    display: inline-flex !important;
    max-width: 100%;
    color: var(--palette-hover-ink-muted, var(--palette-hover-ink, #fff8f0)) !important;
    font-family: var(--font-body);
    font-size: clamp(0.55rem, min(9.5cqh, 2.4vw), 0.72rem) !important;
    font-weight: 760;
    letter-spacing: 0.09em;
    line-height: 1;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__identity {
    display: grid;
    gap: clamp(1px, 1cqh, 4px);
    width: 100%;
    min-width: 0;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__marker-code {
    display: block !important;
    max-width: 100%;
    font-family: var(--font-title) !important;
    font-size: clamp(1.48rem, min(34cqh, 8.6vw), 2.25rem) !important;
    font-weight: 850 !important;
    letter-spacing: -0.035em !important;
    line-height: 0.95;
    text-overflow: clip;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__marker-name {
    display: block !important;
    max-width: 16ch;
    font-family: var(--font-title) !important;
    font-size: clamp(0.72rem, min(14cqh, 3.6vw), 1.02rem) !important;
    font-weight: 820 !important;
    letter-spacing: -0.035em !important;
    line-height: 1.02;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__hex-cell {
    display: flex;
    justify-content: flex-end;
    min-width: 5.6rem;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__hex {
    font-family: var(--font-title) !important;
    font-size: clamp(0.94rem, min(19cqh, 4.6vw), 1.28rem) !important;
    font-weight: 850 !important;
    letter-spacing: -0.02em !important;
    white-space: nowrap;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__actions {
    display: grid;
    grid-auto-flow: column;
    justify-content: end;
    column-gap: clamp(2px, 1.1vw, 5px);
    min-width: max-content;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__copy-button,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__icon-button,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__reorder-handle {
    display: inline-flex !important;
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
    opacity: 0.94;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__copy-button-icons,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__copy-icon,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__copy-tick,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__delete-icon {
    width: 17px;
    height: 17px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__reorder-icon {
    width: 5px;
    height: 18px;
    background-size: 5px 7px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer .gallery-footer-tray__button {
    min-height: 44px;
    padding: 0 clamp(12px, 3.4vw, 16px);
    font-size: clamp(0.82rem, 3.4vw, 0.94rem);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer [data-open-palette-modal] {
    width: 100%;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer [data-clone-palette],
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer [data-clear-palette] {
    width: auto;
    min-width: 72px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer [data-clone-palette] {
    min-width: 114px;
  }
}

@media (max-width: 760px) {
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card:not(.is-expanded) .pages-object__frame.palette-card__frame {
    position: relative !important;
    display: block !important;
    height: 100% !important;
    padding: 13px 14px 0 !important;
    overflow: hidden !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card:not(.is-expanded) .pages-object__summary {
    min-height: 0 !important;
    height: auto !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card:not(.is-expanded) .pages-object__content.palette-card__body {
    position: static !important;
    margin: 0 !important;
    padding-right: 30px !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card:not(.is-expanded) .pages-object__name {
    max-width: calc(100% - 34px) !important;
    margin: 0 !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card:not(.is-expanded) .pages-object__divider.palette-card__divider {
    position: absolute !important;
    top: auto !important;
    left: 14px !important;
    right: 14px !important;
    bottom: 70px !important;
    width: auto !important;
    margin: 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card:not(.is-expanded) .pages-object__meta.palette-card__meta {
    position: absolute !important;
    top: auto !important;
    right: 14px !important;
    bottom: 44px !important;
    left: 100px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    min-height: 24px !important;
    max-height: 24px !important;
    padding: 0 !important;
    overflow: hidden !important;
    transform: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card:not(.is-expanded) .pages-object__tag-list {
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    width: 100% !important;
    overflow: hidden !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card:not(.is-expanded) .pages-object__footer.palette-card__footer {
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card:not(.is-expanded) .pages-object__count.palette-card__count {
    position: absolute !important;
    top: auto !important;
    left: 14px !important;
    bottom: 44px !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    gap: 8px !important;
    width: auto !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 !important;
    white-space: nowrap !important;
    transform: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card:not(.is-expanded) .pages-object__swatch-field.palette-card__swatch-field {
    position: absolute !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    margin: 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card:not(.is-expanded) .pages-object__preview-swatches.palette-card__swatches {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 34px !important;
    min-height: 34px !important;
  }
}

/* Responsive cascade guide:
   - Desktop remains the source of truth at min-width: 761px.
   - Width breakpoints compress existing layouts before mobile collapse.
   - Height breakpoints tune gallery/workspace density without changing structure.
   - Future mobile-app rules should live in the placeholder section near the end of this file.
*/

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

html {
  scroll-behavior: smooth;
}

body[data-page="home"] {
  overflow: hidden;
}

body.is-dragging-page-pin {
  user-select: none;
  cursor: grabbing;
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  line-height: 1.5;
  color: var(--color-text);
  overflow-x: clip;
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 173, 173, 0.34), transparent 34%),
    radial-gradient(circle at 86% 8%, rgba(172, 167, 220, 0.36), transparent 36%),
    linear-gradient(135deg, #f8dce9 0%, #eadfff 48%, #f6dbe8 100%);
  background-attachment: fixed;
}

img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

img[hidden] {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"])),
:where(textarea),
:where(select) {
  width: 100%;
  min-width: 0;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: #fffefb;
  border: 1px solid var(--paper-border);
  color: var(--color-text);
  box-sizing: border-box;
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease,
    background-color 200ms ease;
}

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"])),
:where(select) {
  height: 38px;
}

textarea {
  min-height: 96px;
  padding-top: 10px;
  padding-bottom: 10px;
  resize: vertical;
  line-height: 1.45;
}

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"])):focus,
:where(textarea):focus,
:where(select):focus {
  outline: none;
  border-color: color-mix(in srgb, var(--color-tangerine-dream) 56%, var(--paper-border-strong));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-peach-fuzz) 42%, transparent);
}

:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]))::placeholder,
:where(textarea)::placeholder {
  color: rgba(10, 9, 6, 0.42);
  opacity: 1;
}

button {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.site-shell {
  position: relative;
  min-height: 100svh;
  padding: 0 var(--shell-gutter);
  overflow-x: clip;
}

.ambient {
  display: none;
  position: fixed;
  width: 24rem;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.45;
  pointer-events: none;
}

.ambient--one {
  top: -8rem;
  left: -6rem;
  background: color-mix(in srgb, var(--color-pink) 62%, white);
}

.ambient--two {
  right: -8rem;
  bottom: 10%;
  background: color-mix(in srgb, var(--color-purple) 62%, white);
}

.canvas-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--max-width);
  height: 100dvh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 var(--card-pad-x) var(--card-pad-y);
  border-radius: 0;
  background: var(--main-surface);
  border: 1px solid var(--paper-border-strong);
  box-shadow: var(--paper-shadow);
  overflow: hidden;
}

.canvas-card > main,
.cc-main {
  flex: 1 1 auto;
  min-height: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--layout-gap);
  isolation: isolate;
  width: calc(100% + (2 * var(--card-pad-x)));
  margin-left: calc(var(--card-pad-x) * -1);
  margin-right: calc(var(--card-pad-x) * -1);
  padding: clamp(12px, 2vw, 16px) clamp(14px, 2.4vw, 30px) 6px;
  margin-bottom: clamp(18px, 3vw, 24px);
  background: var(--main-surface);
  border: 0;
  backdrop-filter: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: clamp(-14px, -0.9vw, -8px);
  white-space: nowrap;
  justify-self: start;
}

.brand-mark__script {
  font-family: "Inter", system-ui, sans-serif;
  font-size: var(--brand-size);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.9;
  color: var(--color-text);
}

.brand-mark__word {
  font-family: "Inter", system-ui, sans-serif;
  font-size: var(--brand-size);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.9;
  text-transform: none;
  color: var(--color-text);
}

.site-nav {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2vw, 28px);
  min-width: 0;
  transform: translate(-50%, -50%);
  width: max-content;
  text-align: center;
  pointer-events: auto;
}

.site-nav a,
.header-link,
.mobile-panel a {
  position: relative;
  white-space: nowrap;
}

.mobile-panel a {
  color: var(--color-text-muted);
}

.mobile-panel a {
  font-size: clamp(0.95rem, 1vw, 1rem);
}

.site-nav a.is-active,
.cc-nav__link--active,
.header-link.is-active,
.mobile-panel a.is-active {
  color: var(--color-text);
  font-weight: 600;
}

.site-nav a::after,
.header-link::after,
.mobile-panel a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: rgba(47, 41, 53, 0.22);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.header-link:hover::after,
.mobile-panel a:hover::after {
  transform: scaleX(1);
}

.site-nav a.is-active::after,
.cc-nav__link--active::after,
.header-link.is-active::after,
.mobile-panel a.is-active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.8vw, 16px);
  justify-self: end;
}

.header-link {
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: rgba(255, 246, 241, 0.84);
  box-shadow: var(--shadow-sm);
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--color-text);
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-panel {
  display: none;
  margin: -18px 0 26px auto;
  width: min(280px, 100%);
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 245, 238, 0.94);
  border: 1px solid rgba(47, 41, 53, 0.12);
  box-shadow: var(--shadow-md);
}

.mobile-panel.is-open {
  display: grid;
  gap: 18px;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--layout-gap);
}

.section-block {
  padding: clamp(64px, 9vw, 108px) 0;
}

.section-block--soft {
  position: relative;
}

.section-block--soft::before {
  content: "";
  position: absolute;
  inset: 38px 0;
  border-radius: var(--radius-xl);
  background: var(--main-surface);
  z-index: 0;
}

.section-block--soft > * {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  align-items: start;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(14px, 2.4vw, 40px);
  padding-top: clamp(2px, 0.8vw, 8px);
  padding-bottom: clamp(8px, 1.8vw, 20px);
}

.hero-copy {
  grid-column: 1 / span 6;
  grid-row: 1;
  min-width: 0;
  max-width: 42rem;
  padding: clamp(6px, 1.5vw, 18px) 0 0 clamp(2px, 0.8vw, 10px);
  position: relative;
  z-index: 2;
}

.home-main {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 1vw, 12px);
  min-height: 0;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--color-purple) 58%, var(--color-pink) 42%);
  font-weight: 700;
  padding-left: 10px;
}

.eyebrow--soft {
  color: var(--color-text-soft);
}

.hero-footer-quote {
  align-self: center;
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: color-mix(
    in srgb,
    color-mix(in srgb, var(--color-purple) 62%, var(--color-pink) 38%) 84%,
    var(--color-text)
  );
  text-align: center;
}

.hero-footer-quote::before,
.hero-footer-quote::after {
  color: color-mix(in srgb, var(--color-pink) 58%, white);
  font-size: 1.15em;
}

.hero-footer-quote::before {
  content: "\" ";
}

.hero-footer-quote::after {
  content: " \"";
}

.hero h1 {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.9;
  text-wrap: balance;
}

.hero h1 {
  max-width: 10.9ch;
  font-size: var(--hero-title-size);
}

.hero-nowrap {
  white-space: nowrap;
}

.hero-text {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 44rem;
  margin: clamp(16px, 2vw, 24px) 0 0;
  padding-left: clamp(2px, 0.8vw, 10px);
}

.button,
.btn,
.cc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  line-height: 1.1;
  border: 1px solid var(--paper-border);
  font-weight: 600;
  letter-spacing: 0;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.button:hover,
.btn:hover,
.cc-button:hover {
  transform: translateY(-1px);
}

.button--ghost.is-added {
  background: color-mix(in srgb, var(--color-celadon) 64%, var(--color-floral-white));
  border-color: color-mix(in srgb, var(--color-celadon) 72%, var(--paper-border-strong));
  color: var(--color-text);
  box-shadow: 0 4px 10px rgba(60, 45, 20, 0.04);
}

.button--ghost.is-added:hover {
  background: color-mix(in srgb, var(--color-celadon) 74%, var(--color-floral-white));
  border-color: var(--paper-border-strong);
  box-shadow: var(--shadow-sm);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: clamp(12px, 2vw, 18px);
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
}

.hero-stats div {
  min-width: 0;
  padding: 18px 18px 16px;
  border-radius: 18px;
  background: var(--main-surface);
  border: 1px solid rgba(132, 119, 106, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 8px 18px rgba(129, 102, 78, 0.045);
  text-align: left;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.hero-stats div:hover {
  border-color: rgba(132, 119, 106, 0.16);
  background: var(--main-surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 10px 20px rgba(129, 102, 78, 0.05);
  transform: translateY(-1px);
}

.hero-stats dt {
  font-size: clamp(0.68rem, 0.75vw, 0.75rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(90, 86, 98, 0.62);
}

.hero-stats dd {
  margin: 12px 0 0;
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 4ch;
  line-height: 1;
  color: rgba(47, 41, 53, 0.96);
}

.hero-metrics {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 0;
}

.hero-visual {
  grid-column: 8 / span 5;
  grid-row: 1;
  position: relative;
  min-height: 0;
  display: grid;
  min-width: 0;
  align-items: start;
  justify-items: center;
  align-self: start;
  justify-self: center;
  padding-top: clamp(18px, 2.2vw, 30px);
  z-index: 1;
}

.palette-artwork {
  position: relative;
  display: grid;
  align-items: start;
  justify-items: center;
  width: min(100%, clamp(20rem, 24vw, 22rem));
  max-width: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: clamp(4px, 0.8vw, 8px) 0 0;
  background: transparent;
  box-shadow: none;
}

.palette-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(14px, 2vw, 24px);
  width: 100%;
  max-width: 100%;
  padding: 6px 0;
  justify-items: center;
}

.palette-selector {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  gap: clamp(10px, 1.3vw, 14px);
  width: fit-content;
  max-width: 100%;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.palette-selector__dot {
  position: relative;
  display: block;
  width: clamp(2rem, 2.8vw, 2.45rem);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.palette-selector__dot::after {
  content: attr(data-hex);
  position: absolute;
  left: 50%;
  top: calc(100% + 18px);
  transform: translateX(-50%) translateY(-6px);
  padding: 10px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-peach) 82%, white);
  color: var(--color-text);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 12px 22px rgba(130, 100, 123, 0.12);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.palette-selector__dot:hover {
  z-index: 3;
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 12px 18px rgba(130, 100, 123, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.palette-selector__dot:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.palette-artwork__stack {
  display: grid;
  gap: 0;
  width: 100%;
  margin-top: clamp(18px, 2vw, 28px);
}

.hero-swatch-art {
  position: relative;
  width: min(100%, 24rem);
  min-height: clamp(250px, 26vw, 320px);
  justify-self: center;
}

.hero-swatch-row {
  position: absolute;
  left: 0;
  pointer-events: none;
}

.hero-swatch-row--one {
  top: 0;
  width: 90%;
  transform: translateX(6px) rotate(-1.4deg);
}

.hero-swatch-row--two {
  top: 52px;
  width: 84%;
  transform: translateX(34px) rotate(1.7deg);
}

.hero-swatch-row--three {
  top: 104px;
  width: 94%;
  transform: translateX(0) rotate(-0.8deg);
}

.hero-swatch-row--four {
  top: 156px;
  width: 80%;
  transform: translateX(-18px) rotate(1.2deg);
}

.hero-swatch-row--five {
  top: 208px;
  width: 86%;
  transform: translateX(28px) rotate(-1.6deg);
}

.hero-swatch-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  height: clamp(34px, 3.8vw, 40px);
  overflow: hidden;
  border-radius: 999px;
  box-shadow:
    0 14px 28px rgba(130, 100, 123, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.hero-swatch-chip {
  display: block;
  min-width: 0;
  height: 100%;
}

.palette-card {
  display: grid;
  gap: 8px;
  transition:
    transform 220ms ease,
    opacity 220ms ease;
}

.palette-card--offset {
  transform: translate(18px, -4px);
}

.palette-card--narrow {
  transform: translate(-10px, -2px);
}

.palette-card--small-offset {
  transform: translate(28px, -6px);
}

.palette-card:hover {
  transform: translateY(-2px);
}

.palette-card--offset:hover {
  transform: translateX(18px) translateY(-2px);
}

.palette-card--narrow:hover {
  transform: translateX(-10px) translateY(-2px);
}

.palette-card--small-offset:hover {
  transform: translateX(28px) translateY(-2px);
}

.palette-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  min-height: clamp(36px, 4vw, 42px);
  border-radius: 999px;
  box-shadow:
    0 8px 18px rgba(130, 100, 123, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
  transition: box-shadow 220ms ease;
}

.palette-strip:hover {
  box-shadow:
    0 12px 20px rgba(130, 100, 123, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.palette-chip {
  position: relative;
  display: block;
  min-width: 0;
  transition: transform 180ms ease, filter 180ms ease;
}

.palette-chip::after {
  content: attr(data-hex);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%) translateY(6px);
  padding: 10px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-peach) 76%, white);
  color: var(--color-text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 12px 22px rgba(130, 100, 123, 0.12);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.palette-chip::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 5px);
  width: 12px;
  height: 12px;
  background: color-mix(in srgb, var(--color-peach) 76%, white);
  transform: translateX(-50%) rotate(45deg) translateY(6px);
  opacity: 0;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.palette-chip:hover {
  z-index: 3;
  transform: scaleY(1.04);
  filter: saturate(1.06);
}

.palette-chip:hover::after,
.palette-chip:hover::before {
  opacity: 1;
}

.palette-chip:hover::after {
  transform: translateX(-50%) translateY(0);
}

.palette-chip:hover::before {
  transform: translateX(-50%) rotate(45deg) translateY(0);
}

@keyframes hero-swatch-float-one {
  0%,
  100% { transform: translate(6px, 0) rotate(-1.4deg); }
  50% { transform: translate(12px, -4px) rotate(-0.6deg); }
}

@keyframes hero-swatch-float-two {
  0%,
  100% { transform: translate(34px, 0) rotate(1.7deg); }
  50% { transform: translate(28px, -5px) rotate(0.7deg); }
}

@keyframes hero-swatch-float-three {
  0%,
  100% { transform: translate(0, 0) rotate(-0.8deg); }
  50% { transform: translate(8px, -3px) rotate(0deg); }
}

@keyframes hero-swatch-float-four {
  0%,
  100% { transform: translate(-18px, 0) rotate(1.2deg); }
  50% { transform: translate(-10px, -4px) rotate(0.2deg); }
}

@keyframes hero-swatch-float-five {
  0%,
  100% { transform: translate(28px, 0) rotate(-1.6deg); }
  50% { transform: translate(18px, -5px) rotate(-0.6deg); }
}

.reveal {
  opacity: 0;
  transition:
    opacity 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
}

.hero-copy.reveal {
  transition-delay: 40ms;
}

.hero-visual.reveal {
  transition-delay: 140ms;
}

.hero-metrics.reveal {
  transition-delay: 240ms;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body[data-page="supplies"] .canvas-card {
  display: flex;
  flex-direction: column;
  padding-bottom: var(--card-pad-y);
}

body[data-page="palettes"] .canvas-card,
body[data-page="pages"] .canvas-card {
  display: flex;
  flex-direction: column;
  padding-bottom: var(--card-pad-y);
}

body[data-page="palettes"],
body[data-page="pages"],
body[data-page="supplies"] {
  --page-divider-color: rgba(205, 192, 177, 0.48);
}

/* DESKTOP */
body[data-page="pages"] .pages-workspace {
  display: grid;
  grid-template-columns: minmax(360px, 1.18fr) minmax(300px, 0.82fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  width: 100%;
  height: calc(var(--collection-frame-height) + 42px);
  max-height: calc(var(--collection-frame-height) + 42px);
  min-height: 0;
  overflow: visible;
}

body[data-page="pages"] .pages-workspace.supplies-collection {
  display: grid;
}

body[data-page="pages"] .pages-workspace > .pages-preview-panel,
body[data-page="pages"] .pages-workspace > .pages-object-tracker {
  flex: none;
  min-width: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  align-self: stretch;
}

.palettes-gallery-grid__empty {
  grid-column: 1 / -1;
  align-self: stretch;
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34vh;
  padding: 0;
  text-align: center;
}

.pages-gallery-grid__empty {
  grid-column: 1 / -1;
  align-self: stretch;
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34vh;
  padding: 0;
  text-align: center;
}

.palettes-gallery-grid__empty-panel,
.pages-gallery-grid__empty-panel {
  position: relative;
  overflow: hidden;
  width: min(100%, 36rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 36px;
  border-radius: var(--radius-md);
  text-align: center;
  background: var(--main-card-surface);
  border: 1px dashed var(--paper-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.palettes-gallery-grid__empty strong,
.pages-gallery-grid__empty strong {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 20ch;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1.35rem, 1.65vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--color-text);
}

.palettes-gallery-grid__empty p,
.pages-gallery-grid__empty p {
  position: relative;
  margin: 0;
  min-height: 0;
  width: 100%;
  max-width: none;
  text-align: center;
  color: var(--color-text-muted);
  font-size: clamp(1rem, 1.08vw, 1.12rem);
  line-height: 1.25;
}

.gallery-footer-tray {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 14px;
  row-gap: 0;
  width: 100%;
  margin-top: auto;
  padding: 5px var(--gallery-chrome-inset, 8px) 0;
  border-top: 1px solid var(--page-divider-color, rgba(205, 192, 177, 0.48));
  box-sizing: border-box;
}

.gallery-footer-tray__button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.gallery-footer-tray__button:hover,
.gallery-footer-tray__button:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--color-orange) 54%, var(--color-text));
  box-shadow:
    0 10px 16px rgba(130, 100, 123, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.gallery-footer-tray__button-copy {
  white-space: nowrap;
}

.gallery-footer-tray__helper {
  margin: 0;
  justify-self: end;
  max-width: none;
  white-space: nowrap;
  font-size: clamp(0.9rem, 1vw, 0.96rem);
  line-height: 1.2;
  color: rgba(47, 41, 53, 0.68);
}

.palettes-gallery-grid::-webkit-scrollbar {
  display: none;
}

.palette-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 7px;
  height: var(--supplies-card-height);
  min-height: var(--supplies-card-height);
  padding: 12px 14px 8px;
  border-radius: var(--radius-md);
  background: var(--card-surface);
  border: 1px solid var(--paper-border);
  box-shadow: var(--shadow-sm);
  transition:
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 260ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 220ms ease,
    filter 220ms ease;
  will-change: transform, box-shadow, filter;
}

.palette-card--medium-generic,
.palette-card--custom {
  --palette-accent: var(--color-tangerine-dream);
  --palette-accent-soft: var(--color-almond-silk);
  --palette-surface-top: var(--color-floral-white);
  --palette-surface-bottom: var(--color-almond-silk);
  --palette-pill-bg: var(--tool-surface);
  --palette-pill-border: var(--paper-border);
  --palette-pill-text: var(--color-text-muted);
  --palette-pill-text-strong: var(--color-text);
}

.palette-card::before {
  content: none;
}

.palette-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 12px 0 0 12px;
  background: var(--color-tangerine-dream);
  opacity: 0.82;
  pointer-events: none;
}

.palette-card:hover,
.palette-card:focus-visible {
  transform: none;
  background: var(--color-floral-white);
  box-shadow: var(--paper-shadow-soft);
  border-color: var(--paper-border-strong);
  filter: none;
}

.palette-card:hover::before,
.palette-card:focus-visible::before {
  opacity: 0;
  filter: brightness(1.02);
}

.palette-card:active {
  transform: none;
}

.palette-card.is-selected {
  border-color: var(--color-tangerine-dream);
  box-shadow:
    var(--paper-shadow-soft),
    0 0 0 3px color-mix(in srgb, var(--color-peach-fuzz) 42%, transparent);
}

.palette-card > * {
  position: relative;
  z-index: 1;
}

.palette-card__top {
  display: block;
  position: relative;
  min-height: 0;
}

.palette-card__meta {
  position: absolute;
  top: 2px;
  right: 0;
  display: flex;
  align-items: stretch;
  min-height: 24px;
  min-width: 0;
  justify-content: flex-end;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.palette-card__tag-list {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: fit-content;
  max-width: none;
  min-width: 0;
  flex-wrap: nowrap;
  position: absolute;
  top: 0;
  right: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.palette-card__body {
  display: block;
  min-width: 0;
  min-height: 0;
  padding-right: 0;
  margin: 2px 0 0;
  text-align: left;
}

.palette-card__body h2,
.palette-card__body h3 {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  letter-spacing: -0.045em;
}

.palette-card__body h2 {
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.16;
  font-weight: 600;
  color: rgba(47, 41, 53, 0.96);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.palette-card__body h3 {
  font-size: clamp(0.94rem, 1.05vw, 1.04rem);
  line-height: 1.16;
  font-weight: 600;
  color: rgba(47, 41, 53, 0.96);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.palette-card__brand {
  margin: 0;
  min-width: 0;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(47, 41, 53, 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.palette-card__swatches {
  display: flex;
  flex-direction: row;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  margin-top: auto;
  padding-top: 4px;
  border-top: 0;
}

.palette-card__swatches.swatch-row {
  display: flex;
  align-items: center;
  gap: 0;
  justify-content: center;
  flex-wrap: nowrap;
  align-content: stretch;
  flex-direction: row;
}

.palette-card__swatch {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  height: 16px;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

.palette-card__swatches .swatch-row__item {
  position: relative;
  width: auto;
  height: 16px;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  flex: 1 1 0;
  min-width: 0;
}

.palette-card__swatches .swatch-row__item--large {
  width: auto;
  height: 16px;
}

.supply-card__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--color-peach) 44%, var(--color-text));
  background: color-mix(in srgb, var(--color-peach) 54%, white);
  color: var(--color-text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.9rem;
  font-weight: 500;
  line-height: 1;
  box-shadow:
    0 10px 18px rgba(130, 100, 123, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.palette-editor {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 10px;
  overflow: visible;
}

.palette-editor__top,
.palette-editor__description-block,
.palette-editor__footer {
  flex-shrink: 0;
}

.palette-editor__top {
  position: relative;
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 2px;
}

.palette-editor__title-block {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.palette-editor__header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  margin-left: auto;
  padding-top: 2px;
}

body[data-page="palettes"] .palette-editor__header-actions .cc-filter__button {
  min-width: 0;
  min-height: var(--cc-control-height);
  height: var(--cc-control-height);
  padding: 0 17px 0 18px;
}

body[data-page="palettes"] .palette-editor__header-actions .cc-filter__button::before {
  content: "";
}

body[data-page="palettes"] .palette-editor__medium-toggle::before {
  -webkit-mask-image: url("./assets/icons/ui/colour-palette.svg");
  mask-image: url("./assets/icons/ui/colour-palette.svg");
}

body[data-page="palettes"] .palette-editor__visibility-toggle::before {
  -webkit-mask-image: url("./assets/icons/actions/view.svg");
  mask-image: url("./assets/icons/actions/view.svg");
}

body[data-page="palettes"] .palette-editor__medium-toggle {
  min-width: 104px !important;
}

body[data-page="palettes"] .palette-editor__visibility-toggle {
  min-width: 142px !important;
}

.palette-editor__title-view,
.palette-editor__description-view {
  min-width: 0;
  color: rgba(47, 41, 53, 0.96);
  cursor: default;
}

.palette-editor__title-view {
  max-width: 11ch;
  font-family: var(--font-title);
  font-size: clamp(2rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.86;
  color: #4d4a57;
}

.palette-editor__description-view {
  margin-top: 0;
  min-height: 0;
  width: 100%;
  max-width: none;
  text-align: center;
  font-size: clamp(1rem, 1.2vw, 1.08rem);
  line-height: 1.18;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.palette-editor__description-block {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
  width: 100%;
  margin-top: 0;
  margin-bottom: 8px;
}

.palette-editor__medium-filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.palette-editor__medium-filter.has-selection:not(.is-open) .palette-editor__medium-toggle {
  background: color-mix(in srgb, var(--color-peach-fuzz) 58%, white);
  border-color: color-mix(in srgb, var(--paper-border) 72%, transparent);
  color: var(--color-text);
  box-shadow: none;
}

.palette-editor__medium-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.palette-editor__medium-chevron {
  display: inline-flex;
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2.2px solid currentColor;
  border-bottom: 2.2px solid currentColor;
  opacity: 0.58;
  transform: translateY(-1px) rotate(45deg);
  transition: transform 160ms ease;
}

.palette-editor__medium-filter.is-open .palette-editor__medium-toggle {
  background: color-mix(in srgb, var(--color-peach-fuzz) 58%, white);
  border-color: color-mix(in srgb, var(--paper-border) 72%, transparent);
  color: var(--color-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.palette-editor__medium-filter.is-open .palette-editor__medium-chevron {
  transform: translateY(2px) rotate(225deg);
}

.palette-editor__medium-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1000;
  display: grid;
  width: min(300px, calc(100vw - 56px)) !important;
  min-width: min(300px, calc(100vw - 56px));
  max-height: min(var(--cc-dropdown-available-height, calc(100dvh - 32px)), calc(var(--cc-dropdown-list-max-height) + var(--cc-dropdown-shell-padding)));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: none;
}

.palette-editor__medium-menu::-webkit-scrollbar {
  display: none;
}

.palette-editor__medium-menu[hidden] {
  display: none;
}

.palette-editor__medium-option {
  white-space: nowrap;
}

.palette-editor__medium-option span {
  white-space: nowrap;
  text-transform: none;
}

.palette-editor__header-actions .modal-button--icon.modal-button {
  color: rgba(23, 20, 16, 0.72);
}

.palette-editor__visibility-toggle[aria-pressed="true"] {
  background: color-mix(in srgb, var(--color-peach-fuzz) 58%, white);
  border-color: color-mix(in srgb, var(--paper-border) 72%, transparent);
  color: var(--color-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.palette-editor__visibility-toggle[aria-pressed="true"]:hover,
.palette-editor__visibility-toggle[aria-pressed="true"]:focus-visible {
  background: color-mix(in srgb, var(--color-peach-fuzz) 66%, white);
  border-color: color-mix(in srgb, var(--paper-border) 78%, transparent);
}

.palette-editor__close.modal-button--icon span {
  font-size: 1.42rem;
  line-height: 1;
  transform: translateY(1px);
}

.palette-editor__stack-shell {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border-radius: 12px;
  margin-top: 2px;
}

.palette-stack {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0;
  position: relative;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  padding: 0;
  border-radius: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.palette-stack__item + .palette-stack__item {
  margin-top: -1px;
}

.palette-stack__item {
  position: relative;
  overflow: hidden;
  flex: 1 1 0;
  min-height: 0;
  border-radius: 0;
  background: var(--palette-colour);
  box-shadow: none;
  z-index: calc(100 - var(--stack-index, 0));
  transform: scale(1);
  transform-origin: center center;
  transition: transform 180ms ease, box-shadow 180ms ease;
  will-change: transform;
}

.palette-stack.is-reordering {
  user-select: none;
}

.palette-stack__item--more {
  background: linear-gradient(180deg, rgba(255, 248, 243, 0.96), rgba(247, 236, 230, 0.94));
}

.palette-stack__item.is-reorder-source {
  opacity: 0.34;
}

.palette-stack__item--drag-ghost {
  position: fixed;
  margin: 0;
  flex: none;
  border-radius: 10px;
  box-shadow:
    0 18px 34px rgba(47, 41, 53, 0.22),
    0 8px 18px rgba(47, 41, 53, 0.14);
  pointer-events: none;
  z-index: 4000;
  opacity: 0.98;
  transform: scale(1.015);
}

.palette-stack__item--drag-ghost .palette-stack__overlay {
  opacity: 1;
  pointer-events: none;
}

.palette-stack__overlay {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  background: transparent;
  color: var(--palette-hover-ink, rgba(255, 255, 255, 0.98));
  opacity: 0;
  pointer-events: none;
  transition: opacity 190ms ease;
}

.palette-stack__overlay--more {
  opacity: 1;
  display: grid;
  place-items: center;
  grid-template-rows: 1fr;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
    linear-gradient(180deg, rgba(34, 25, 31, 0.06), rgba(34, 25, 31, 0.14));
}

.palette-stack__more {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.palette-stack__more strong {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.palette-stack__more span {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.84;
}

.palette-stack__item:hover .palette-stack__overlay,
.palette-stack__item:focus-within .palette-stack__overlay {
  opacity: 1;
  pointer-events: auto;
}

.palette-stack.palette-stack--show-all .palette-stack__overlay {
  opacity: 1;
  pointer-events: auto;
}

.palette-stack__info {
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  max-width: min(52%, 240px);
  text-shadow: var(--palette-hover-text-shadow, 0 1px 2px rgba(0, 0, 0, 0.24));
}

.palette-stack__copy {
  display: grid;
  gap: 0;
  align-content: center;
}

.palette-stack__copy span,
.palette-stack__hex {
  margin: 0;
}

.palette-stack__copy strong {
  display: block;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  opacity: 0.98;
  color: var(--palette-hover-ink, rgba(255, 255, 255, 0.98));
  transition: opacity 160ms ease, transform 160ms ease, color 160ms ease;
  transform: scale(1);
  transform-origin: left center;
}

.palette-stack__meta {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--palette-hover-ink-muted, rgba(255, 255, 255, 0.72));
  transition: opacity 160ms ease, transform 160ms ease, color 160ms ease;
  transform: scale(1);
  transform-origin: left center;
}

.palette-stack__meta--alcohol {
  color: var(--palette-hover-ink-muted, rgba(255, 255, 255, 0.72));
}

.palette-stack__meta--acrylic {
  color: var(--palette-hover-ink-muted, rgba(255, 255, 255, 0.72));
}

.palette-stack__meta--pencil {
  color: var(--palette-hover-ink-muted, rgba(255, 255, 255, 0.72));
}

.palette-stack__meta--gel {
  color: var(--palette-hover-ink-muted, rgba(255, 255, 255, 0.72));
}

.palette-stack__meta--fine-line {
  color: var(--palette-hover-ink-muted, rgba(255, 255, 255, 0.72));
}

.palette-stack__meta--generic {
  color: var(--palette-hover-ink-muted, rgba(255, 255, 255, 0.72));
}

.palette-stack__actions {
  position: absolute;
  right: 12px;
  top: 0;
  bottom: 0;
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: flex-end;
  column-gap: 16px;
}

.palette-stack__hex {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: clamp(19px, 2.15vw, 24px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.06em;
  transition: opacity 160ms ease, transform 160ms ease, letter-spacing 160ms ease, color 160ms ease;
}

.palette-stack__copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--palette-hover-ink, rgba(255, 255, 255, 0.98));
  cursor: pointer;
  opacity: 0.96;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    color 180ms ease;
  will-change: transform;
}

.palette-stack__copy-button:hover,
.palette-stack__copy-button:focus-visible {
  opacity: 1;
  transform: scale(1.02);
}

.palette-stack__copy-button-icons {
  position: relative;
  display: block;
  width: 17px;
  height: 17px;
}

.palette-stack__copy-icon,
.palette-stack__copy-tick {
  position: absolute;
  inset: 0;
  display: block;
  background-color: currentColor;
  transition: opacity 180ms ease, transform 180ms ease, background-color 180ms ease;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.palette-stack__copy-icon {
  -webkit-mask-image: url("./assets/icons/actions/copy.svg");
  mask-image: url("./assets/icons/actions/copy.svg");
  opacity: 1;
  transform: scale(1);
}

.palette-stack__copy-tick {
  -webkit-mask-image: url("./assets/icons/actions/check.svg");
  mask-image: url("./assets/icons/actions/check.svg");
  opacity: 0;
  transform: scale(0.72);
}

.palette-stack__copy-button.is-copied {
  opacity: 1;
}

.palette-stack__copy-button.is-copied .palette-stack__copy-icon {
  opacity: 0;
  transform: scale(0.68);
}

.palette-stack__copy-button.is-copied .palette-stack__copy-tick {
  opacity: 1;
  transform: scale(1);
}

.palette-stack__icon-button,
.palette-stack__reorder-handle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--palette-hover-ink, rgba(255, 255, 255, 0.98));
  opacity: 0.96;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    color 180ms ease;
}

.palette-stack__icon-button {
  cursor: pointer;
}

.palette-stack__delete-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  transition: opacity 160ms ease, transform 160ms ease, background-color 160ms ease;
  -webkit-mask-image: url("./assets/icons/actions/delete.svg");
  mask-image: url("./assets/icons/actions/delete.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.palette-stack__reorder-handle {
  cursor: grab;
  touch-action: none;
  width: 20px;
  height: 20px;
}

.palette-stack__icon-button:hover,
.palette-stack__icon-button:focus-visible,
.palette-stack__reorder-handle:hover,
.palette-stack__reorder-handle:focus-visible {
  opacity: 1;
  color: var(--palette-hover-ink, rgba(255, 255, 255, 0.98));
  transform: scale(1.02);
}

.palette-stack__icon-button:active,
.palette-stack__reorder-handle.is-dragging,
.palette-stack__reorder-handle:active {
  transform: scale(0.96);
}

.palette-stack__reorder-handle.is-dragging,
.palette-stack__reorder-handle:active {
  cursor: grabbing;
}

.palette-stack__reorder-icon {
  display: block;
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background-image: radial-gradient(circle, currentColor 0 1.6px, transparent 1.8px);
  background-size: 4px 6px;
  background-position: center;
  background-repeat: repeat-y;
}

.palette-stack__item:hover,
.palette-stack__item:focus-within {
  transform: scale(1.008);
  z-index: calc(200 - var(--stack-index, 0));
}

body:not([data-page="palettes"]) .palette-stack__item:hover .palette-stack__copy strong,
body:not([data-page="palettes"]) .palette-stack__item:hover .palette-stack__meta,
body:not([data-page="palettes"]) .palette-stack__item:focus-within .palette-stack__copy strong,
body:not([data-page="palettes"]) .palette-stack__item:focus-within .palette-stack__meta {
  transform: scale(1.03);
  transform-origin: left center;
}

body:not([data-page="palettes"]) .palette-stack__item:hover .palette-stack__hex {
  letter-spacing: -0.05em;
  transform: scale(1.01);
}

.pages-preview-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  position: relative;
  flex: 3 1 0;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-width: none;
  overflow: visible;
  gap: 0;
}

.pages-preview-panel__view {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  gap: 0;
}

.pages-preview-panel__view[hidden],
.pages-preview-panel__gallery[hidden] {
  display: none !important;
}

[data-pages-preview-workspace][hidden] {
  display: none !important;
}

.pages-preview-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  flex-shrink: 0;
  min-height: 44px;
  margin-inline: 0;
}

.pages-preview-panel__header--preview {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 5;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  margin: 0;
  pointer-events: none;
}

.pages-preview-panel__toggle {
  position: static;
  min-width: 0;
  color: var(--color-text);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.pages-preview-panel__toggle--clear {
  background: rgba(255, 248, 243, 0.92);
  border-color: rgba(47, 41, 53, 0.08);
  padding: 0 16px;
}

.pages-preview-panel__toggle--clear:hover,
.pages-preview-panel__toggle--clear:focus-visible {
  background: rgba(255, 243, 236, 0.96);
  border-color: rgba(47, 41, 53, 0.12);
  box-shadow:
    0 10px 16px rgba(130, 100, 123, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.pages-preview-panel__toggle span {
  line-height: 1.1;
}

.pages-preview-panel:hover .pages-preview-panel__toggle,
.pages-preview-panel:focus-within .pages-preview-panel__toggle {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.pages-preview-panel__artwork {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
  padding: 0 2px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: default;
}

.pages-preview-panel__frame {
  position: relative;
  width: 100%;
  max-width: none;
  flex: 1 1 auto;
  align-self: stretch;
  min-height: 0;
  overflow: hidden;
  border-radius: 20px;
  cursor: crosshair;
  background:
    linear-gradient(180deg, rgba(255, 249, 244, 0.96), rgba(255, 239, 230, 0.82)),
    rgba(255, 249, 244, 0.92);
  border: 1px solid rgba(233, 150, 102, 0.18);
  box-shadow:
    0 18px 30px rgba(130, 100, 123, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.pages-preview-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  border-radius: inherit;
}

.pages-preview-card__image[hidden] {
  display: none;
}

.pages-preview-card__caption {
  display: none;
}

.pages-preview-panel__placeholder {
  margin: 0;
  max-width: 18ch;
  text-align: center;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.15;
  color: rgba(47, 41, 53, 0.62);
}

.pages-preview-panel__footer {
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1fr) auto;
  padding-top: 10px;
  padding-bottom: 0;
}

.pages-gallery-tile {
  --gallery-card-accent: var(--paper-border);
  --palette-accent-soft: var(--color-ash-grey);
  --palette-pill-bg: var(--tool-surface);
  --palette-pill-border: var(--paper-border);
  --palette-pill-text: var(--color-text-muted);
  --palette-pill-text-strong: var(--color-text);
  cursor: pointer;
}

.pages-gallery-tile__button {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.pages-gallery-tile__button:focus {
  outline: none;
}

.pages-gallery-tile__frame {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--tool-surface);
  box-shadow:
    inset 0 0 0 1px var(--paper-border),
    0 4px 10px rgba(60, 45, 20, 0.04);
}

.pages-gallery-tile__frame.is-image-pending {
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0) 28%, rgba(255, 255, 255, 0.38) 44%, rgba(255, 255, 255, 0) 60%),
    var(--tool-surface);
  background-size: 220% 100%, auto;
  animation: pages-gallery-image-pending 1.15s ease-in-out infinite;
}

.pages-gallery-tile__image-placeholder {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 252, 248, 0.34), rgba(255, 252, 248, 0)),
    color-mix(in srgb, var(--gallery-card-accent, var(--paper-border)) 13%, var(--tool-surface));
}

@keyframes pages-gallery-image-pending {
  from {
    background-position: 180% 0, 0 0;
  }

  to {
    background-position: -80% 0, 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pages-gallery-tile__frame.is-image-pending {
    animation: none;
  }
}

.pages-gallery-tile__frame::after {
  content: "";
  position: absolute;
  inset: 34% 0 0;
  background: linear-gradient(180deg, rgba(36, 30, 40, 0) 0%, rgba(36, 30, 40, 0.05) 34%, rgba(36, 30, 40, 0.42) 100%);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.pages-gallery-tile__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition:
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 220ms ease;
}

.pages-gallery-tile__title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 16px 12px;
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(24, 18, 29, 0.02) 0%, rgba(24, 18, 29, 0.16) 100%);
  border: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.28rem);
  font-weight: 700;
  line-height: 1.12;
  color: rgba(255, 252, 249, 0.96);
  text-align: center;
  text-shadow: 0 2px 10px rgba(24, 18, 29, 0.28);
  opacity: 0;
  transform: scale(0.985);
  transition:
    opacity 180ms ease,
    transform 220ms ease,
    background-color 220ms ease;
  pointer-events: none;
}

.pages-gallery-tile:hover .pages-gallery-tile__frame::after,
.pages-gallery-tile:focus-visible .pages-gallery-tile__frame::after,
.pages-gallery-tile:focus-within .pages-gallery-tile__frame::after {
  opacity: 1;
}

.pages-gallery-tile:hover .pages-gallery-tile__image,
.pages-gallery-tile:focus-visible .pages-gallery-tile__image,
.pages-gallery-tile:focus-within .pages-gallery-tile__image {
  transform: scale(1.018);
  filter: saturate(1.03) contrast(1.01);
}

.pages-gallery-tile:hover .pages-gallery-tile__title,
.pages-gallery-tile:focus-visible .pages-gallery-tile__title,
.pages-gallery-tile:focus-within .pages-gallery-tile__title {
  opacity: 1;
  transform: scale(1);
}

@keyframes pages-gallery-reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pages-pin-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.pages-pin {
  position: absolute;
  z-index: 2;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(83, 60, 48, 0.78);
  background: rgba(255, 248, 243, 0.96);
  box-shadow:
    0 10px 18px rgba(130, 100, 123, 0.16),
    0 0 0 3px rgba(255, 248, 243, 0.44);
  pointer-events: auto;
  touch-action: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.pages-pin::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  background: linear-gradient(180deg, #8f6656, #d79a7e);
}

.pages-pin::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.pages-pin__label {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 18ch;
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 248, 243, 0.92);
  border: 1px solid rgba(132, 119, 106, 0.12);
  box-shadow: 0 8px 18px rgba(130, 100, 123, 0.08);
  color: #5a5662;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px)) translateY(2px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.pages-pin:hover,
.pages-pin:focus-visible {
  transform: translate(-50%, -50%) scale(1.04);
  border-color: rgba(83, 60, 48, 0.94);
  box-shadow:
    0 12px 20px rgba(130, 100, 123, 0.2),
    0 0 0 4px rgba(255, 248, 243, 0.52);
}

.pages-pin:hover .pages-pin__label,
.pages-pin:focus-visible .pages-pin__label,
.pages-pin.is-active .pages-pin__label {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 10px));
}

.pages-pin.is-active {
  box-shadow:
    0 12px 22px rgba(130, 100, 123, 0.22),
    0 0 0 5px rgba(255, 233, 222, 0.78);
}

.pages-pin.is-draft {
  animation: pages-pin-pulse 1.6s ease-in-out infinite;
}

.pages-pin-editor {
  position: absolute;
  z-index: 6;
  display: block;
  width: min(176px, calc(100vw - 48px));
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  visibility: hidden;
  transform: none;
}

.pages-pin-editor.is-below {
  transform: none;
}

.pages-pin-editor::before {
  content: none;
}

.pages-pin-editor.is-below::before {
  content: none;
}

.pages-pin-editor__head {
  display: none;
}

.pages-pin-editor__eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(92, 88, 98, 0.58);
}

.pages-pin-editor__title {
  margin: 0;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  color: #4d4a57;
}

.pages-pin-editor__input {
  width: 100%;
  height: 22px;
  min-height: 22px;
  padding: 0 10px;
  font-size: 0.74rem;
  line-height: 22px;
  background: rgba(255, 248, 243, 0.96);
  border: 1px solid rgba(47, 41, 53, 0.08);
  border-radius: 14px;
  box-shadow: none;
}

.pages-pin-editor__actions {
  display: none;
}

.pages-object-list__empty,
.pages-object__empty {
  padding: 14px 16px 16px;
  color: rgba(92, 88, 98, 0.66);
  font-size: 0.9rem;
  line-height: 1.6;
}

.pages-object-list__empty--copy {
  margin: 0;
  margin-top: -8px;
  align-self: flex-start;
  padding: 0 2px 0;
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #888;
  font-size: 12px;
  line-height: 1.18;
  text-align: center;
}

.pages-object.is-active {
  border-color: var(--paper-border-strong);
  background: var(--color-floral-white);
}

.pages-object-tracker {
  display: flex;
  flex-direction: column;
  flex: 2 1 0;
  max-width: 40%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  gap: 18px;
  padding: 20px 20px 12px;
  border-radius: var(--panel-radius);
  background: var(--panel-surface);
  border: 1px solid var(--panel-border);
  box-shadow: var(--panel-shadow);
  align-self: stretch;
  overflow: hidden;
}

.pages-object-tracker::before {
  content: none;
}

.pages-object-tracker__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: 0;
  margin-bottom: 6px;
}

.pages-object-tracker__title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  width: min(100%, 20rem);
}

.pages-object-tracker__title-view {
  max-width: 11ch;
  font-family: var(--font-title);
  font-size: clamp(2rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.94;
  color: #4d4a57;
}

.pages-object-tracker .palette-editor__visibility-icon-image {
  width: 16px;
  height: 16px;
  opacity: 0.72;
}

.pages-object-tracker__shell {
  overflow: hidden;
  border-radius: 0;
}

.pages-object-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 4px 10px 0;
  scrollbar-width: none;
}

.pages-object-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.pages-object-list::-webkit-scrollbar-track {
  background: transparent;
}

.pages-object-list::-webkit-scrollbar-thumb {
  background: transparent;
}

.pages-object {
  --pages-object-divider-inset: 26px;
  position: relative;
  flex: 0 0 auto;
  border-radius: var(--radius-md);
  background: var(--card-surface);
  border: 1px solid var(--paper-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.pages-object:hover,
.pages-object:focus-within {
  border-color: var(--paper-border-strong);
  background: var(--color-floral-white);
  box-shadow: var(--paper-shadow-soft);
}

.pages-object__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding-right: 14px;
  cursor: pointer;
}

.pages-object__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  flex: 0 0 auto;
  justify-self: end;
  transform: translateY(-2px);
  align-self: center;
  color: #5a5662;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.pages-object__summary:hover ~ .pages-object__actions,
.pages-object__summary:focus-visible ~ .pages-object__actions,
.pages-object:hover .pages-object__actions,
.pages-object__actions:hover,
.pages-object__actions:focus-within,
.pages-object:focus-within .pages-object__actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.pages-object__action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
}

.pages-object__action:hover,
.pages-object__action:focus-visible {
  transform: translateY(-1px);
  background: var(--tool-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.pages-object__action--delete {
  min-width: 5.4em;
  opacity: 0.72;
}

.pages-object__action--delete:hover,
.pages-object__action--delete:focus-visible {
  opacity: 1;
}

.pages-object__action:active {
  transform: translateY(0);
}

.pages-object__action--delete.is-confirm {
  background: var(--color-almond-silk);
  border-color: var(--paper-border-strong);
  color: var(--color-text);
  opacity: 1;
}

.pages-object__summary {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  justify-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 50px;
  padding: 13px 0 11px 26px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
}

.pages-object__summary *,
.pages-object__name,
.pages-object__preview-swatches {
  cursor: pointer;
}

.pages-object__summary--collapsed {
  min-height: 0;
  gap: 4px;
  padding-bottom: 8px;
}

.pages-object__summary::before {
  content: none;
}

.pages-object__summary::after {
  content: "";
  position: absolute;
  top: 0;
  right: -18px;
  width: 18px;
  height: 100%;
}

.pages-object__preview-swatches {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
  width: auto;
  max-width: 100%;
  padding: 0;
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pages-object.is-expanded .pages-object__preview-swatches {
  display: none;
}

.pages-object:not(.is-expanded) .pages-object__preview-swatches {
  display: inline-flex;
}

.pages-object__preview-swatch {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 5px;
  border: 1px solid rgba(92, 88, 98, 0.13);
  box-shadow:
    0 1px 2px rgba(146, 123, 104, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.pages-object__summary--editing {
  cursor: text;
}

.pages-object__name-input {
  width: 100%;
  min-width: 0;
  height: 34px;
  min-height: 34px;
  padding: 0 10px;
  font-family: var(--font-title);
  font-size: 1.04rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  text-transform: none;
  line-height: 1.1;
  color: var(--color-text);
  background: var(--color-floral-white);
  border: 1px solid var(--paper-border);
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.pages-object__name-input::placeholder {
  color: var(--color-text-soft);
}

.pages-object__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-title);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.2;
  padding-bottom: 2px;
  color: var(--color-text);
}

.pages-object__pin-meta {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-text-soft);
  white-space: nowrap;
}

.pages-object__tags,
.pages-colour-row__roles {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.pages-object__details {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 280ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease;
}

.pages-object.is-expanded .pages-object__details {
  grid-template-rows: 1fr;
  opacity: 1;
}

.pages-object__details-inner {
  min-height: 0;
  overflow: hidden;
  padding: 0 12px 10px 14px;
  transform: translateY(-6px);
  opacity: 0;
  transition:
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease;
}

.pages-object.is-expanded .pages-object__details-inner {
  transform: translateY(0);
  opacity: 1;
}

.pages-colour-list {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 4px 0 0;
  list-style: none;
  border-left: 0;
}

.pages-colour-list::before {
  content: "";
  position: absolute;
  left: var(--pages-object-divider-inset);
  right: var(--pages-object-divider-inset);
  top: 0;
  height: 1px;
  background: var(--page-divider-color, rgba(205, 192, 177, 0.48));
}

.pages-colour-list--empty {
  padding-top: 2px;
}

.pages-colour-row {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) minmax(86px, auto);
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 8px 6px 8px 2px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  transition:
    background-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.pages-colour-row--empty {
  align-items: center;
  cursor: pointer;
  min-height: 42px;
  padding-top: 6px;
  padding-bottom: 6px;
  background: rgba(255, 250, 245, 0.58);
}

.pages-colour-row:hover,
.pages-colour-row:focus-within {
  background: rgba(255, 250, 245, 0.58);
  transform: translateY(-1px);
}

.pages-colour-row.is-highlighted {
  background: rgba(255, 248, 243, 0.72);
  box-shadow: 0 0 0 1px rgba(233, 150, 102, 0.12);
}

.pages-colour-row:not(:last-child)::after {
  content: "";
  position: absolute;
  left: var(--pages-object-divider-inset);
  right: var(--pages-object-divider-inset);
  bottom: 0;
  height: 1px;
  background: var(--page-divider-color, rgba(205, 192, 177, 0.48));
}

.pages-colour-row__swatch {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(92, 88, 98, 0.16);
  box-shadow:
    0 6px 10px rgba(146, 123, 104, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 0 0 3px rgba(255, 252, 248, 0.76);
}

.pages-colour-row__swatch--empty {
  position: relative;
  background:
    linear-gradient(135deg, rgba(250, 243, 235, 0.98), rgba(239, 230, 221, 0.92)),
    rgba(247, 239, 231, 0.98);
  border-style: dashed;
  border-color: rgba(132, 119, 106, 0.18);
}

.pages-colour-row__swatch--empty::before,
.pages-colour-row__swatch--empty::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 10px;
  height: 1.6px;
  border-radius: 999px;
  background: rgba(92, 88, 98, 0.58);
  transform: translate(-50%, -50%);
}

.pages-colour-row__swatch--empty::after {
  width: 1.6px;
  height: 10px;
}

.pages-colour-row__copy {
  position: relative;
  display: grid;
  gap: 0;
  min-width: 0;
}

.pages-colour-row__copy::after {
  content: "";
  position: absolute;
  top: 0;
  right: -18px;
  width: 18px;
  height: 100%;
}

.pages-colour-row__copy--empty .pages-colour-row__copy--empty-title {
  font-family: var(--font-title);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.04;
  color: #4b4757;
}

.pages-colour-row--empty:hover,
.pages-colour-row--empty:focus-within {
  background: rgba(255, 248, 243, 0.72);
}

.pages-object:not(.is-expanded) .pages-colour-row--empty {
  display: none;
}

.pages-colour-row__copy--empty {
  gap: 0;
}

.pages-colour-row__brand,
.pages-colour-row__code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pages-colour-row__brand {
  display: block;
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(92, 88, 98, 0.5);
}

.pages-colour-row__code {
  font-size: 0.92rem;
  font-weight: 700;
  color: #4f4a5b;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.pages-colour-row__headline {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 4px 4px;
  min-width: 0;
  overflow: hidden;
}

.pages-colour-row__dash {
  color: rgba(92, 88, 98, 0.42);
  font-size: 0.74rem;
  line-height: 1;
}

.pages-colour-row__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-title);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.04;
  color: #4f4a5b;
}

.pages-colour-row__side {
  position: relative;
  display: grid;
  grid-template-areas: "stack";
  align-items: center;
  justify-items: end;
  min-width: 0;
  min-height: 28px;
}

.pages-colour-row__roles {
  grid-area: stack;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  opacity: 1;
  pointer-events: none;
  transform: translateY(0);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.pages-colour-row__roles--block {
  margin-top: 1px;
  padding-right: 2px;
}

.pages-colour-row__actions {
  grid-area: stack;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.pages-colour-row:hover .pages-colour-row__actions,
.pages-colour-row__copy:hover ~ .pages-colour-row__side .pages-colour-row__actions,
.pages-colour-row__copy:focus-within ~ .pages-colour-row__side .pages-colour-row__actions,
.pages-colour-row__side:hover .pages-colour-row__actions,
.pages-colour-row__actions:hover,
.pages-colour-row__actions:focus-within,
.pages-colour-row:focus-within .pages-colour-row__actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.pages-colour-row:hover .pages-colour-row__roles,
.pages-colour-row__copy:hover ~ .pages-colour-row__side .pages-colour-row__roles,
.pages-colour-row__copy:focus-within ~ .pages-colour-row__side .pages-colour-row__roles,
.pages-colour-row__side:hover .pages-colour-row__roles,
.pages-colour-row:focus-within .pages-colour-row__roles {
  opacity: 0;
  transform: translateY(-2px);
}

.pages-colour-row__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(92, 88, 98, 0.18);
  background: rgba(255, 248, 243, 0.98);
  color: rgba(74, 70, 82, 0.92);
  box-shadow:
    0 4px 10px rgba(130, 100, 123, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition:
    transform 120ms ease,
    background-color 120ms ease,
    color 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease,
    opacity 120ms ease;
}

.pages-colour-row__action:hover,
.pages-colour-row__action:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 244, 234, 0.98);
  color: #373344;
  border-color: rgba(92, 88, 98, 0.28);
  box-shadow:
    0 6px 12px rgba(130, 100, 123, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.pages-colour-row__action:active {
  transform: translateY(0);
}

.pages-colour-row__action--delete {
  min-width: 5.2em;
  opacity: 1;
}

.pages-colour-row__action--delete.is-confirm {
  background: color-mix(in srgb, #f3d5d0 74%, white);
  border-color: rgba(180, 85, 67, 0.34);
  color: #8f3f2f;
  opacity: 1;
}

.pages-colour-row__action-icon {
  display: inline-flex;
  width: 13px;
  height: 13px;
  background-color: currentColor;
}

.pages-colour-row__action-icon--view {
  -webkit-mask-image: url("./assets/icons/actions/view.svg");
  mask-image: url("./assets/icons/actions/view.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.pages-colour-row__action-icon--edit {
  -webkit-mask-image: url("./assets/icons/mediums/pen-nib.svg");
  mask-image: url("./assets/icons/mediums/pen-nib.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.pages-colour-row__action-icon--delete {
  -webkit-mask-image: url("./assets/icons/actions/delete.svg");
  mask-image: url("./assets/icons/actions/delete.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

@media (max-width: 500px) {
  .pages-preview-panel {
    padding: 10px 12px 14px;
  }

  .pages-preview-panel__artwork {
    width: 100%;
  }

  .pages-preview-panel__frame {
    aspect-ratio: 1 / 1;
  }

  .pages-upload-modal__workspace {
    grid-template-columns: 1fr;
  }

  .pages-upload-modal__dropzone {
    min-height: 300px;
  }

  .pages-upload-modal__fields {
    grid-template-columns: 1fr;
  }

  .pages-pin-editor {
    width: min(176px, calc(100vw - 32px));
  }

  .pages-object-tracker__title-view {
    max-width: none;
  }

  .pages-object__summary {
    align-items: flex-start;
  }

  .pages-object__actions {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .pages-object__summary--collapsed {
    gap: 5px;
  }

  .pages-object__meta {
    justify-content: flex-end;
    max-width: none;
  }

  .pages-colour-row {
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: flex-start;
    gap: 6px 10px;
    min-height: 46px;
    padding: 7px 4px 7px 2px;
  }

  .pages-colour-row:not(:last-child)::after {
    left: var(--pages-object-divider-inset);
    right: var(--pages-object-divider-inset);
  }

  .pages-colour-row__swatch {
    grid-row: 1 / span 2;
    margin-top: 2px;
  }

  .pages-object__preview-swatches {
    max-width: calc(100vw - 104px);
  }

  .pages-colour-row__roles {
    grid-column: 2;
    justify-content: flex-start;
  }

  .pages-colour-row__side {
    grid-column: 2;
    min-height: 22px;
  }

  .pages-colour-row__roles {
    position: static;
    transform: none;
  }

  .pages-colour-row__actions {
    display: none;
  }

}

@keyframes pages-pin-pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.06);
  }
}

.palette-stack__empty {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 24px;
  background: transparent;
}

.palette-stack__blank-space {
  min-height: 100%;
}

.palette-stack__placeholder {
  display: none;
}

.palette-stack__empty-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 36rem);
  padding: 30px 36px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--paper-border-soft);
  background: var(--main-card-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  text-align: center;
}

.palette-stack__empty-message {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 20ch;
  color: var(--color-text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1.35rem, 1.65vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: center;
}

.palette-editor__footer {
  margin-top: auto;
  background: transparent;
  border-radius: 0;
  flex-shrink: 0;
}

.palette-editor__footer [data-clear-palette] {
  justify-self: end;
}

.palette-editor__footer-actions {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

body[data-page="palettes"] .palettes-gallery-workspace-footer [data-clone-palette] {
  grid-column: 2;
  justify-self: end;
}

@media (max-width: 767px) {
  body[data-page="palettes"] .palettes-gallery-workspace-footer [data-clone-palette] {
    grid-column: 1;
  }
}

.palette-editor__action-helper-wrap {
  position: relative;
  display: inline-flex;
  min-width: 0;
}

.palette-editor__action-helper-wrap--add {
  justify-self: start;
}

.palette-editor__action-helper-wrap--clear {
  justify-self: end;
}

.palette-editor__action-helper-wrap[data-read-only-action-helper]::after {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  z-index: 8;
  width: max-content;
  max-width: min(320px, 72vw);
  padding: 10px 12px;
  border: 1px solid rgba(47, 41, 53, 0.14);
  border-radius: 8px;
  background: rgba(255, 252, 247, 0.98);
  box-shadow: 0 12px 26px rgba(60, 45, 25, 0.14);
  color: var(--color-text);
  content: attr(data-read-only-action-helper);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.palette-editor__action-helper-wrap--add[data-read-only-action-helper]::after {
  right: auto;
  left: 0;
}

.palette-editor__action-helper-wrap[data-read-only-action-helper]:hover::after,
.palette-editor__action-helper-wrap[data-read-only-action-helper]:focus-within::after {
  opacity: 1;
  transform: translateY(0);
}

.cc-owner-action-helper {
  position: fixed;
  z-index: 1200;
  width: var(--owner-helper-width, max-content);
  max-width: min(320px, calc(100vw - 24px));
  padding: 10px 12px;
  border: 1px solid rgba(47, 41, 53, 0.14);
  border-radius: 8px;
  background: rgba(255, 252, 247, 0.98);
  box-shadow: 0 12px 26px rgba(60, 45, 25, 0.14);
  color: var(--color-text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.cc-owner-action-helper.is-visible {
  opacity: 1;
}

.palette-modal__dialog {
  width: min(100%, 1080px);
}

.supplies-modal.pages-upload-modal .pages-upload-modal__dialog {
  width: min(calc(100% - 32px), 560px);
  height: auto;
  min-height: 0;
  max-height: min(92vh, 680px);
  align-self: center;
}

.pages-upload-modal__head h2 {
  margin-bottom: 0;
}

.pages-upload-modal__head {
  align-items: center;
}

.pages-upload-modal__workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  min-height: 0;
  grid-template-rows: auto auto auto;
}

.pages-upload-modal__media,
.pages-upload-modal__details {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

.pages-upload-modal__media {
  align-content: start;
}

.page-image-controls,
.pages-upload-modal__image-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.pages-upload-modal__image-topline {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: center;
  gap: 8px;
}

.page-image-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 36px;
  padding: 3px;
  border: 1.5px solid color-mix(in srgb, var(--paper-border) 58%, transparent);
  border-radius: 12px;
  background: var(--main-card-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.page-image-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(38, 43, 51, 0.82);
  cursor: pointer;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
  padding: 0 11px;
  box-shadow: none;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.page-image-tab:hover,
.page-image-tab:focus-visible {
  background: color-mix(in srgb, var(--color-peach-fuzz) 28%, white);
  color: var(--color-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.page-image-tab:focus-visible {
  outline: 2px solid rgba(233, 150, 102, 0.4);
  outline-offset: 2px;
}

.page-image-tab:active {
  transform: translateY(1px);
}

.page-image-tab.is-active {
  background: color-mix(in srgb, var(--color-peach-fuzz) 58%, white);
  color: var(--color-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 2px 7px rgba(35, 32, 26, 0.035);
}

.page-image-tab.is-active:hover,
.page-image-tab.is-active:focus-visible {
  background: color-mix(in srgb, var(--color-peach-fuzz) 72%, white);
  color: var(--color-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 2px 7px rgba(35, 32, 26, 0.035);
}

.page-image-adjust-button {
  appearance: none;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border: 1.5px solid color-mix(in srgb, var(--paper-border) 58%, transparent);
  border-radius: 14px;
  background: var(--main-card-surface);
  color: rgba(23, 20, 16, 0.72);
  cursor: pointer;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1;
  box-shadow: none;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.page-image-adjust-button[hidden] {
  display: none;
}

.page-image-adjust-button:hover,
.page-image-adjust-button:focus-visible {
  background: color-mix(in srgb, var(--color-peach-fuzz) 28%, white);
  border-color: color-mix(in srgb, var(--color-peach-fuzz) 28%, transparent);
  color: var(--color-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 2px 7px rgba(35, 32, 26, 0.035);
}

.page-image-adjust-button:focus-visible {
  outline: 0;
}

.page-image-adjust-button:active {
  transform: none;
}

.page-image-adjust-button__icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask-image: url("./assets/icons/actions/crop.svg");
  mask-image: url("./assets/icons/actions/crop.svg");
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.page-image-adjust-button__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.page-image-helper {
  margin: 0;
  max-width: 38rem;
  color: rgba(43, 43, 47, 0.68);
  font-family: var(--font-copy, var(--font-body));
  font-size: clamp(0.9rem, 0.95vw, 1rem);
  font-weight: 500;
  line-height: 1.55;
  text-wrap: pretty;
}

.page-image-empty-state {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 22px;
  border: 1px dashed var(--paper-border-soft);
  border-radius: inherit;
  background: var(--main-card-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  color: var(--color-text-muted);
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(0.92rem, 1vw, 1rem);
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
}

.page-image-empty-state[hidden] {
  display: none;
}

.pages-preview-panel__frame.is-empty {
  border: 1px dashed var(--paper-border-soft);
  background: var(--main-card-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  cursor: default;
}

.pages-preview-panel__frame.is-empty .page-image-empty-state {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.pages-preview-panel__image-controls,
.pages-view-modal__image-controls {
  margin-bottom: 8px;
}

.pages-upload-modal__image-helper {
  width: 100%;
  max-width: none;
  padding: 0;
  text-align: left;
}

.pages-view-modal__image-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

body[data-page="pages"] .pages-view-modal__image-controls .page-image-helper {
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="pages"] .pages-preview-panel__image-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

body[data-page="pages"] .pages-preview-panel__image-controls .page-image-helper {
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .pages-upload-modal__image-topline,
  .pages-view-modal__image-controls {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .pages-upload-modal__image-helper {
    width: 100%;
  }

  body[data-page="pages"] .pages-preview-panel__image-controls {
    grid-template-columns: 1fr;
  }

  body[data-page="pages"] .pages-preview-panel__image-controls .page-image-helper {
    white-space: normal;
  }
}

.pages-upload-modal__details {
  align-content: start;
}

.pages-upload-modal__dropzone {
  position: relative;
  display: block;
  width: 100%;
  min-height: 156px;
  overflow: hidden;
  border-radius: 24px;
  border: 2px dashed #d9d0ca;
  background:
    linear-gradient(180deg, rgba(255, 250, 247, 0.76), rgba(255, 243, 236, 0.68)),
    rgba(255, 248, 243, 0.82);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.03);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  transition:
    transform 200ms ease,
    box-shadow 200ms ease,
  border-color 200ms ease,
    background-color 200ms ease;
}

.pages-upload-modal__file-input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  pointer-events: none;
}

.pages-upload-modal__dropzone:hover,
.pages-upload-modal__dropzone:focus-visible {
  transform: scale(1.007);
  border-color: color-mix(in srgb, var(--color-orange) 52%, rgba(47, 41, 53, 0.18));
  box-shadow:
    0 10px 18px rgba(130, 100, 123, 0.07),
    0 2px 8px rgba(0, 0, 0, 0.035);
  filter: brightness(1.022) saturate(1.03);
}

.pages-upload-modal__dropzone.is-dragging {
  border-color: rgba(233, 150, 102, 0.56);
  box-shadow:
    0 22px 34px rgba(130, 100, 123, 0.11),
    0 0 0 3px rgba(255, 205, 176, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.pages-upload-modal__dropzone.is-filled {
  padding: 10px;
}

.pages-upload-modal__preview-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: inherit;
}

.pages-upload-modal__preview-image[hidden] {
  display: none;
}

.pages-upload-modal__clear-image {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(74, 61, 51, 0.18);
  background: rgba(255, 252, 248, 0.9);
  color: rgba(47, 41, 53, 0.82);
  box-shadow: 0 6px 14px rgba(47, 41, 53, 0.1);
}

.pages-upload-modal__clear-image:hover,
.pages-upload-modal__clear-image:focus-visible {
  border-color: rgba(74, 61, 51, 0.28);
  background: rgba(255, 255, 255, 0.96);
  color: var(--color-text);
}

.pages-upload-modal__clear-image[hidden] {
  display: none;
}

.pages-upload-modal__dropzone-copy {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 100%;
  gap: 8px;
  padding: 12px;
  text-align: center;
  color: rgba(74, 70, 82, 0.88);
  pointer-events: none;
}

.pages-upload-modal__dropzone.is-filled .pages-upload-modal__dropzone-copy,
.pages-upload-modal__dropzone-copy[hidden] {
  display: none !important;
}

.pages-upload-modal__dropzone-copy strong {
  display: block;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pages-upload-modal__error {
  margin: 0;
  color: #9a5842;
  font-size: 0.78rem;
  font-weight: 600;
}

.pages-upload-modal__fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.pages-upload-modal__field {
  display: grid;
  gap: 0;
  min-width: 0;
}

.pages-upload-modal__field--full {
  grid-column: 1 / -1;
}

.pages-upload-modal__field span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(92, 88, 98, 0.62);
}

.pages-upload-modal__input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 248, 243, 0.95);
  border: 1px solid rgba(47, 41, 53, 0.08);
  box-shadow:
    0 6px 12px rgba(130, 100, 123, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.pages-upload-modal__input:focus {
  border-color: rgba(233, 150, 102, 0.42);
  box-shadow:
    0 0 0 3px rgba(255, 205, 176, 0.18),
    0 8px 14px rgba(130, 100, 123, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.66);
  background: rgba(255, 251, 248, 0.98);
}

.pages-upload-modal__actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  padding-top: 2px;
}

.palette-modal__top-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  min-width: 0;
}

.palette-modal__top-row .supplies-filterbar {
  width: auto;
  min-width: max-content;
  order: 0;
  flex-wrap: nowrap;
  gap: 8px;
}

body[data-page="palettes"] .palette-modal__top-row .cc-filter {
  width: auto;
  min-width: max-content;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 8px;
}

.palette-modal__swatches {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  order: 1;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 2px 0;
  overflow-x: visible;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.palette-modal__swatches::-webkit-scrollbar {
  display: none;
}

.palette-modal__swatch {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  border: 1px solid rgba(47, 41, 53, 0.08);
  box-shadow:
    0 6px 10px rgba(130, 100, 123, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.palette-modal__results {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 251, 248, 0.9);
  border: 1px solid rgba(47, 41, 53, 0.08);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  box-shadow:
    0 12px 22px rgba(92, 70, 88, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.palette-modal__results .search-results__grid {
  overflow: visible;
  padding-right: 4px;
}

.supplies-results .search-results__grid {
  overflow: visible;
  padding-right: 4px;
}

.palette-modal__results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.palette-modal__results-header p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: none;
}

.palette-modal__result-count {
  font-size: 0.74rem;
  font-weight: 700;
  color: rgba(47, 41, 53, 0.62);
}

.palette-modal__added-helper {
  flex: 0 0 auto;
  color: rgba(47, 41, 53, 0.58);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0;
  white-space: nowrap;
}

.palette-modal .search-result-card.is-added-card {
  opacity: 0.86;
}

.palette-modal .search-result-card.is-confirming-added {
  opacity: 1;
}

.palette-modal .search-result__button.modal-button.is-added:disabled {
  cursor: default;
  opacity: 1;
}

.palette-tag-modal[hidden] {
  display: none;
}

.palette-tag-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
}

.palette-tag-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(47, 41, 53, 0.22);
  backdrop-filter: blur(10px);
}

.palette-tag-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 250, 247, 0.98), rgba(255, 243, 236, 0.95)),
    rgba(255, 248, 243, 0.98);
  border: 1px solid rgba(47, 41, 53, 0.08);
  box-shadow:
    0 24px 60px rgba(92, 70, 88, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.palette-details-modal__dialog {
  width: min(100%, 520px);
}

.palette-tag-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.palette-tag-modal__head h3 {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.palette-tag-modal__head p {
  margin: 4px 0 0;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.palette-tag-modal__body {
  display: grid;
  gap: 12px;
}

.palette-tag-modal__tags-section {
  display: grid;
  gap: 10px;
}

.palette-tag-modal__section-head {
  display: grid;
  gap: 4px;
}

.palette-tag-modal__section-title {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(47, 41, 53, 0.88);
}

.palette-tag-modal__section-head p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.palette-tag-modal__list {
  display: grid;
  gap: 8px;
}

.palette-tag-modal__empty {
  display: grid;
  place-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 251, 248, 0.92);
  border: 1px dashed rgba(47, 41, 53, 0.1);
  color: var(--color-text-muted);
  font-size: 0.84rem;
  text-align: center;
}

.palette-tag-modal__tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.palette-tag-modal__tag-input {
  flex: 1 1 auto;
  min-width: 0;
}

.palette-tag-modal__tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 248, 243, 0.94);
  border: 1px solid rgba(47, 41, 53, 0.08);
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1;
}

.palette-tag-modal__add {
  display: flex;
  align-items: center;
  gap: 8px;
}

.palette-tag-modal__tag-input--add {
  flex: 1 1 auto;
}

.palette-tag-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.palette-details-modal__body {
  gap: 14px;
}

.palette-details-modal__field {
  display: grid;
  gap: 6px;
}

.palette-details-modal__field span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(92, 88, 98, 0.62);
}

.palette-details-modal__input,
.palette-details-modal__textarea {
  width: 100%;
  min-width: 0;
}

.palette-details-modal__input {
  height: 38px;
}

.palette-details-modal__textarea {
  min-height: 96px;
}

.palette-details-modal__actions {
  padding-top: 2px;
}

.pages-tag-modal__dialog {
  width: min(100%, 420px);
}

.pages-tag-modal__body {
  gap: 12px;
}

.pages-tag-modal__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pages-tag-modal__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1.5px solid color-mix(in srgb, var(--paper-border-soft) 76%, white);
  background: var(--main-card-surface);
  color: rgba(23, 20, 16, 0.68);
  font-size: clamp(0.84rem, 0.9vw, 0.92rem);
  font-weight: 700;
  letter-spacing: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 2px 7px rgba(35, 32, 26, 0.025);
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.pages-tag-modal__chip:hover,
.pages-tag-modal__chip:focus-visible {
  background: color-mix(in srgb, var(--color-peach-fuzz) 28%, white);
  border-color: color-mix(in srgb, var(--color-peach-fuzz) 28%, transparent);
  color: var(--color-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 2px 7px rgba(35, 32, 26, 0.035);
  outline: 0;
}

.pages-tag-modal__chip.is-active {
  background: color-mix(in srgb, var(--color-peach-fuzz) 58%, white);
  border-color: color-mix(in srgb, var(--color-peach-fuzz) 58%, transparent);
  color: var(--color-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.pages-tag-modal__chip.is-active:hover,
.pages-tag-modal__chip.is-active:focus-visible {
  background: color-mix(in srgb, var(--color-peach-fuzz) 66%, white);
  border-color: color-mix(in srgb, var(--color-peach-fuzz) 66%, transparent);
}

body[data-page="palettes"] .site-header,
body[data-page="supplies"] .site-header,
body[data-page="pages"] .site-header {
  margin-bottom: clamp(12px, 1.8vw, 18px);
}

.supplies-main {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 52px);
  flex: 1 1 auto;
  min-height: 0;
  padding: clamp(2px, 0.8vw, 8px) 0 14px;
}

.supplies-shell {
  grid-column: 1 / -1;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  padding: clamp(2px, 0.8vw, 10px) 0 0;
}

.supplies-collection {
  --supplies-grid-gap: 10px;
  --supplies-card-height: 118px;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, var(--gallery-visible-height)) auto;
  align-content: start;
  gap: clamp(14px, 1.8vw, 18px);
  align-self: stretch;
  width: 100%;
  height: var(--collection-frame-height);
  min-height: calc(var(--collection-frame-height) + 42px);
  max-height: none;
  overflow: visible;
  padding: clamp(16px, 2vw, 20px) clamp(16px, 2vw, 20px) 12px;
  border-radius: var(--panel-radius);
  background: var(--main-surface);
  border: 1px solid var(--panel-border);
  box-shadow: var(--panel-shadow);
}

body[data-page="supplies"] .supplies-collection {
  --supplies-grid-gap: 14px;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, var(--gallery-visible-height));
}

body[data-page="pages"] [data-pages-gallery-surface],
body[data-page="palettes"] .palettes-workspace.is-gallery-mode > .cc-gallery {
  grid-template-rows: auto minmax(0, var(--gallery-visible-height));
}

.supplies-add-button {
  flex-shrink: 0;
}

body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-gallery-actions-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 18px;
}

body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-gallery-actions-row .cc-filter {
  order: 0;
  min-width: 0;
}

body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-gallery-add-action {
  order: 1;
  justify-self: end;
  white-space: nowrap;
}

body[data-page="palettes"] .palettes-workspace.is-gallery-mode .palettes-gallery-workspace-footer,
body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery-add-action {
  display: none;
}

body[data-page="supplies"] .supplies-grid {
  grid-template-columns: repeat(3, minmax(0, var(--gallery-card-reference-width)));
  grid-auto-rows: var(--supplies-gallery-row-height, var(--collection-gallery-row-height));
  justify-content: center;
}

.supplies-grid-wrapper.is-editing .supplies-overview,
.supplies-grid-wrapper.is-editing .supplies-filterbar--owned {
  display: none;
}

.supplies-grid-wrapper.is-editing {
  grid-column: 1 / -1;
}

.supplies-collection.is-editing > .supplies-overview {
  display: none;
}

.supplies-collection.is-editing > .supplies-footer-tray {
  display: none;
}

.supplies-collection.is-editing {
  align-self: stretch;
  height: 100%;
  min-height: 0;
  gap: clamp(14px, 1.8vw, 18px);
}

.supplies-collection.is-editing > .supplies-grid-wrapper {
  margin-top: 0;
}

.supplies-filterbar--owned {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
}
.supplies-recent__chip {
  font-size: clamp(0.82rem, 0.9vw, 0.9rem);
}

.supplies-grid-wrapper {
  min-height: 0;
  align-self: stretch;
  grid-row: 2;
}

.supplies-grid-wrapper.is-populated {
  height: 100%;
  max-height: none;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0;
  scrollbar-width: none;
}

.supplies-grid-wrapper.is-populated.is-editing {
  height: 100%;
  max-height: none;
  min-height: 0;
  overflow: visible;
  padding-right: 0;
}

.supplies-grid-wrapper.is-editing .supplies-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--supplies-grid-gap);
  height: 100%;
  min-height: 0;
  align-content: stretch;
  align-items: stretch;
  grid-template-rows: minmax(0, 1fr);
}

.supplies-grid-wrapper.is-editing .supply-card--editor {
  grid-column: 1 / -1;
  justify-self: stretch;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

.supplies-grid-wrapper.is-populated::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.supplies-grid-wrapper.is-populated::-webkit-scrollbar-track {
  background: transparent;
}

.supplies-grid-wrapper.is-populated::-webkit-scrollbar-thumb {
  background: transparent;
}

.supplies-grid-wrapper.is-populated::-webkit-scrollbar-thumb:hover {
  background: transparent;
}

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

.supplies-footer-tray {
  grid-row: 3;
}

.supplies-grid[hidden],
.supplies-empty[hidden] {
  display: none;
}

.supplies-grid__empty-state {
  display: grid;
  align-content: center;
  justify-items: start;
  grid-column: 1 / -1;
  gap: 12px;
  min-height: var(--supplies-card-height);
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--tool-surface);
  border: 1px dashed var(--paper-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.supplies-grid__empty-state p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.supplies-grid__empty-action {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.82rem;
}

.supply-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 5px;
  height: var(--supplies-card-height);
  min-height: var(--supplies-card-height);
  padding: 12px 14px 8px;
  border-radius: var(--radius-md);
  background: var(--card-surface);
  border: 1px solid color-mix(in srgb, var(--supply-accent, var(--paper-border)) 24%, var(--paper-border));
  box-shadow: var(--shadow-sm);
  transition:
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 260ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 220ms ease,
    background 220ms ease,
    filter 220ms ease;
  will-change: transform, box-shadow, filter;
}

.supply-card--custom {
  background: color-mix(in srgb, var(--color-almond-silk) 44%, var(--color-floral-white));
}

.supply-card::before {
  content: none;
}

.supply-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 12px 0 0 12px;
  background: color-mix(in srgb, var(--supply-accent, var(--color-tangerine-dream)) 76%, var(--color-tangerine-dream));
  opacity: 0.82;
  pointer-events: none;
}

.supply-card:hover,
.supply-card:focus-within {
  transform: translateY(-1px);
  background: var(--color-floral-white);
  box-shadow: var(--paper-shadow-soft);
  border-color: color-mix(in srgb, var(--supply-accent, var(--paper-border-strong)) 34%, var(--paper-border-strong));
  filter: none;
}

.supply-card:hover::before,
.supply-card:focus-within::before {
  opacity: 0.78;
  filter: brightness(1.02);
}

.supply-card:active {
  transform: scale(0.995);
}

.supply-card[data-open-owned-supply] {
  cursor: pointer;
}

.supply-card > * {
  position: relative;
  z-index: 1;
}

.supply-card__top {
  display: block;
  position: relative;
  min-height: 0;
}

.supply-card__headline {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding-right: 0;
  padding-top: 4px;
}

.supply-card__eyebrow {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
  width: 100%;
  padding: 2px 82px 0 0;
  min-height: 24px;
}

.supply-card__meta {
  position: absolute;
  top: 2px;
  right: 0;
  display: flex;
  align-items: stretch;
  min-height: 24px;
  min-width: 0;
  justify-content: flex-end;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.supply-card__top-actions--editor-actions {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  flex-wrap: wrap;
  margin-top: 0;
}

.supply-card__top-actions--editor-actions .supply-card__action {
  min-width: 0;
  padding-inline: 14px;
  white-space: nowrap;
}

.supply-card--editor .supply-card__headline {
  gap: 1px;
}

.supply-card--editor .supply-card__eyebrow {
  padding-left: 0;
  padding-right: 0;
  min-height: 18px;
  gap: 6px;
}

.supply-card--editor .supply-card__body {
  margin-top: 0;
}

.supply-card--editor .supply-card__top-actions--editor-actions .supply-card__action {
  min-height: 36px;
  padding-inline: 16px;
  border-radius: 14px;
  font-size: 0.76rem;
  letter-spacing: 0.01em;
}

.supply-card--editor,
.supply-card--editor:hover,
.supply-card--editor:focus-within,
.supply-card--editor:active {
  transform: none;
  background:
    linear-gradient(180deg, rgba(255, 249, 228, 0.99), rgba(255, 240, 186, 0.95)),
    rgba(255, 248, 243, 0.94);
  box-shadow:
    0 5px 12px rgba(0, 0, 0, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
  border-color: color-mix(in srgb, var(--supply-accent, rgba(47, 41, 53, 0.12)) 38%, rgba(47, 41, 53, 0.08));
  filter: none;
}

.supply-card--editor:hover::before,
.supply-card--editor:focus-within::before,
.supply-card--editor:active::before {
  opacity: 0.92;
  filter: none;
}

.supply-card--editor .supply-card__action--capture {
  background: color-mix(in srgb, var(--supply-accent-soft, rgba(232, 188, 193, 0.18)) 80%, white);
  border-color: color-mix(in srgb, var(--supply-accent, rgba(47, 41, 53, 0.12)) 24%, rgba(47, 41, 53, 0.1));
  color: var(--supply-pill-text-strong, var(--color-text));
  box-shadow:
    0 10px 18px rgba(130, 100, 123, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.supply-card--editor .supply-card__action--capture:hover {
  background: inherit;
  box-shadow: inherit;
  filter: none;
  transform: none;
}

.supply-card--editor .supply-card__action--clear-image {
  background: rgba(255, 244, 243, 0.96);
  border-color: rgba(138, 78, 78, 0.18);
  color: #8a4e4e;
  box-shadow:
    0 8px 14px rgba(130, 100, 123, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.supply-card--editor .supply-card__action--clear-image:hover {
  background: inherit;
  box-shadow: inherit;
  filter: none;
  transform: none;
}

.supply-card--editor .supply-card__action:hover,
.supply-card--editor .supply-card__action:focus-visible,
.supply-card--editor .supply-card__action:active {
  background: inherit;
  box-shadow: inherit;
  filter: none;
  transform: none;
}

.supply-card--editor:hover .supply-card__meta,
.supply-card--editor:focus-within .supply-card__meta {
  opacity: 1;
  transform: none;
}

.supply-card--editor .supply-card__action--capture::before {
  content: "↗";
  margin-right: 6px;
  font-size: 0.95em;
  line-height: 1;
}

.supply-card--editor .supply-card__action--clear-image::before {
  content: "×";
  margin-right: 6px;
  font-size: 1.05em;
  line-height: 1;
}

.supply-card:hover .supply-card__meta,
.supply-card:focus-within .supply-card__meta {
  opacity: 0;
  transform: translateY(-1px) scale(0.96);
}

.supply-card__body {
  display: block;
  min-width: 0;
  min-height: 0;
  padding-right: 0;
  margin: 2px 0 0;
}

.supply-card__body h2,
.supply-card__body h3 {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  letter-spacing: -0.045em;
}

.supply-card__body h2 {
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.16;
  font-weight: 600;
  color: rgba(47, 41, 53, 0.96);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.supply-card__body h3 {
  font-size: clamp(0.94rem, 1.05vw, 1.04rem);
  line-height: 1.16;
  font-weight: 600;
  color: rgba(47, 41, 53, 0.96);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.supply-card__brand {
  margin: 0;
  min-width: 0;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(47, 41, 53, 0.62);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.supply-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--supply-accent, var(--paper-border)) 24%, var(--paper-border));
  background: color-mix(in srgb, var(--supply-accent-soft, var(--tool-surface)) 42%, var(--color-floral-white));
  color: var(--supply-pill-text, var(--color-text-soft));
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.supply-card__action:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--supply-accent-soft, var(--color-almond-silk)) 58%, var(--color-floral-white));
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.supply-card__action--capture,
.supply-card__action--close {
  min-width: auto;
  padding-inline: 12px;
  height: 28px;
  font-size: 0.68rem;
}

.supply-card__action--clear-image {
  min-width: auto;
  padding-inline: 12px;
  height: 28px;
  font-size: 0.68rem;
  color: var(--color-text);
  border-color: var(--paper-border-strong);
  background: var(--color-almond-silk);
}

.supply-card__action--capture-input {
  width: min(100%, 248px);
  height: 28px;
  padding: 2px;
  justify-content: stretch;
}

.supply-card__action--capture-input input {
  width: 100%;
  height: 100%;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  text-align: left;
}

.supply-card__action--capture-input input::placeholder {
  color: var(--color-text-soft);
  opacity: 1;
}

.supply-card__action--capture-input input:focus {
  outline: none;
}

.supply-card__supporting {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  align-items: stretch;
  width: 100%;
  min-height: 0;
  margin-top: auto;
  padding-top: 0;
}

.swatch-row {
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: flex-start;
  flex-wrap: wrap;
  align-content: flex-start;
  width: 100%;
}

.supply-card__swatches {
  width: 100%;
  min-height: 0;
  justify-content: space-between;
  gap: 0;
  overflow: hidden;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  flex-wrap: nowrap;
}

.supply-card__swatches--peek .swatch-row__item,
.supply-card__swatches--peek .swatch-row__item--large {
  width: 13px;
  height: 13px;
  margin-left: 0;
  flex: 0 0 13px;
}

.supply-card__swatches--peek.is-single .swatch-row__item,
.supply-card__swatches--peek.is-single .swatch-row__item--large {
  width: 100%;
  height: 13px;
  flex: 1 1 100%;
  border-radius: 999px;
}

.supply-card__swatches--peek .swatch-row__overflow {
  margin-left: 0;
}

.swatch-row__item {
  position: relative;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid rgba(47, 41, 53, 0.22);
  box-shadow:
    0 2px 4px rgba(130, 100, 123, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.swatch-row__item--large {
  width: 13px;
  height: 13px;
}

.swatch-row__overflow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 13px;
  padding: 0 6px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 248, 243, 0.94);
  border: 1px solid rgba(47, 41, 53, 0.08);
  font-size: 0.56rem;
  font-weight: 700;
  color: var(--color-text-soft);
}

.supply-card__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.supply-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 248, 243, 0.88);
  border: 1px solid rgba(47, 41, 53, 0.08);
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.supply-chip strong {
  color: var(--color-text);
}

.supplies-empty {
  display: grid;
  place-items: center;
  min-height: 34vh;
}

.supplies-empty__panel {
  position: relative;
  overflow: hidden;
  width: min(100%, 36rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 36px;
  border-radius: var(--radius-md);
  text-align: center;
  background: var(--main-card-surface);
  border: 1px dashed var(--paper-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.supplies-empty h2 {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 20ch;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1.35rem, 1.65vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--color-text);
}

.supplies-empty p {
  position: relative;
  margin: 0;
  min-height: 0;
  width: 100%;
  max-width: none;
  text-align: center;
  color: var(--color-text-muted);
  font-size: clamp(1rem, 1.08vw, 1.12rem);
  line-height: 1.25;
}

.supply-card--medium-alcohol {
  --supply-accent: var(--medium-alcohol-accent);
  --supply-accent-soft: var(--medium-alcohol-soft);
  --supply-surface-top: color-mix(in srgb, var(--medium-alcohol-soft) 68%, white);
  --supply-surface-bottom: color-mix(in srgb, var(--medium-alcohol-soft) 84%, white);
  --supply-pill-bg: color-mix(in srgb, var(--medium-alcohol-accent) 22%, white);
  --supply-pill-border: color-mix(in srgb, var(--medium-alcohol-accent) 42%, var(--paper-border-soft));
  --supply-pill-text: color-mix(in srgb, var(--medium-alcohol-accent) 64%, var(--color-text));
  --supply-pill-text-strong: color-mix(in srgb, var(--medium-alcohol-accent) 78%, var(--color-text));
}

.supply-card--medium-acrylic {
  --supply-accent: var(--medium-acrylic-accent);
  --supply-accent-soft: var(--medium-acrylic-soft);
  --supply-surface-top: color-mix(in srgb, var(--medium-acrylic-soft) 68%, white);
  --supply-surface-bottom: color-mix(in srgb, var(--medium-acrylic-soft) 84%, white);
  --supply-pill-bg: color-mix(in srgb, var(--medium-acrylic-accent) 22%, white);
  --supply-pill-border: color-mix(in srgb, var(--medium-acrylic-accent) 42%, var(--paper-border-soft));
  --supply-pill-text: color-mix(in srgb, var(--medium-acrylic-accent) 64%, var(--color-text));
  --supply-pill-text-strong: color-mix(in srgb, var(--medium-acrylic-accent) 78%, var(--color-text));
}

.supply-card--medium-pencil {
  --supply-accent: var(--medium-pencil-accent);
  --supply-accent-soft: var(--medium-pencil-soft);
  --supply-surface-top: color-mix(in srgb, var(--medium-pencil-soft) 68%, white);
  --supply-surface-bottom: color-mix(in srgb, var(--medium-pencil-soft) 84%, white);
  --supply-pill-bg: color-mix(in srgb, var(--medium-pencil-accent) 22%, white);
  --supply-pill-border: color-mix(in srgb, var(--medium-pencil-accent) 42%, var(--paper-border-soft));
  --supply-pill-text: color-mix(in srgb, var(--medium-pencil-accent) 64%, var(--color-text));
  --supply-pill-text-strong: color-mix(in srgb, var(--medium-pencil-accent) 78%, var(--color-text));
}

.supply-card--medium-gel {
  --supply-accent: var(--medium-gel-accent);
  --supply-accent-soft: var(--medium-gel-soft);
  --supply-surface-top: color-mix(in srgb, var(--medium-gel-soft) 68%, white);
  --supply-surface-bottom: color-mix(in srgb, var(--medium-gel-soft) 84%, white);
  --supply-pill-bg: color-mix(in srgb, var(--medium-gel-accent) 22%, white);
  --supply-pill-border: color-mix(in srgb, var(--medium-gel-accent) 42%, var(--paper-border-soft));
  --supply-pill-text: color-mix(in srgb, var(--medium-gel-accent) 64%, var(--color-text));
  --supply-pill-text-strong: color-mix(in srgb, var(--medium-gel-accent) 78%, var(--color-text));
}

.supply-card--medium-fine-line {
  --supply-accent: var(--medium-fine-line-accent);
  --supply-accent-soft: var(--medium-fine-line-soft);
  --supply-surface-top: color-mix(in srgb, var(--medium-fine-line-soft) 68%, white);
  --supply-surface-bottom: color-mix(in srgb, var(--medium-fine-line-soft) 84%, white);
  --supply-pill-bg: color-mix(in srgb, var(--medium-fine-line-accent) 22%, white);
  --supply-pill-border: color-mix(in srgb, var(--medium-fine-line-accent) 42%, var(--paper-border-soft));
  --supply-pill-text: color-mix(in srgb, var(--medium-fine-line-accent) 64%, var(--color-text));
  --supply-pill-text-strong: color-mix(in srgb, var(--medium-fine-line-accent) 78%, var(--color-text));
}

.supply-card--medium-generic {
  --supply-accent: var(--medium-generic-accent);
  --supply-accent-soft: var(--medium-generic-soft);
  --supply-surface-top: color-mix(in srgb, var(--medium-generic-soft) 68%, white);
  --supply-surface-bottom: color-mix(in srgb, var(--medium-generic-soft) 84%, white);
  --supply-pill-bg: color-mix(in srgb, var(--medium-generic-accent) 22%, white);
  --supply-pill-border: color-mix(in srgb, var(--medium-generic-accent) 42%, var(--paper-border-soft));
  --supply-pill-text: color-mix(in srgb, var(--medium-generic-accent) 64%, var(--color-text));
  --supply-pill-text-strong: color-mix(in srgb, var(--medium-generic-accent) 78%, var(--color-text));
}

.supply-card--custom {
  --supply-accent: var(--medium-custom-accent);
  --supply-accent-soft: var(--medium-custom-soft);
  --supply-surface-top: color-mix(in srgb, var(--medium-custom-soft) 68%, white);
  --supply-surface-bottom: color-mix(in srgb, var(--medium-custom-soft) 84%, white);
  --supply-pill-bg: color-mix(in srgb, var(--medium-custom-accent) 22%, white);
  --supply-pill-border: color-mix(in srgb, var(--medium-custom-accent) 52%, var(--paper-border-soft));
  --supply-pill-text: color-mix(in srgb, var(--medium-custom-accent) 64%, var(--color-text));
  --supply-pill-text-strong: color-mix(in srgb, var(--medium-custom-accent) 78%, var(--color-text));
}

.supply-card__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--color-peach) 44%, var(--color-text));
  background: color-mix(in srgb, var(--color-peach) 54%, white);
  color: var(--color-text);
  box-shadow:
    0 10px 18px rgba(130, 100, 123, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  font-size: 1.9rem;
  font-weight: 500;
  line-height: 1;
}

.supplies-modal[hidden] {
  display: none;
}

.supplies-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
}

.supplies-modal.is-closing .supplies-modal__dialog {
  animation: supplies-modal-out 220ms ease forwards;
}

.supplies-modal.is-closing .supplies-modal__backdrop {
  animation: supplies-backdrop-out 220ms ease forwards;
}

.supplies-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 254, 251, 0.48);
  backdrop-filter: blur(8px) saturate(0.72);
  animation: supplies-backdrop-in 240ms ease both;
}

.supplies-modal__dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  width: min(100%, 1000px);
  height: min(86vh, 760px);
  min-height: 660px;
  overflow: visible;
  padding: 22px;
  border-radius: var(--panel-radius);
  background: var(--gallery-surface);
  border: 1px solid var(--paper-border-soft);
  box-shadow:
    0 18px 44px rgba(35, 32, 26, 0.12),
    0 4px 12px rgba(35, 32, 26, 0.06);
  animation: supplies-modal-in 280ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.supplies-modal__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.supplies-modal__head h2 {
  margin: 2px 0 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1.55rem, 2.4vw, 1.95rem);
  letter-spacing: 0;
}

.supplies-modal__intro {
  margin: 6px 0 0;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.supplies-tabs {
  display: inline-flex;
  align-items: end;
  gap: 4px;
  margin-bottom: 0;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--paper-border);
}

.supplies-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px 2px;
  border-radius: 0;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
  transition:
    transform 160ms ease,
    color 200ms ease,
    border-color 180ms ease,
    opacity 180ms ease;
}

.supplies-tab:hover {
  color: var(--color-text);
}

.supplies-tab.is-active {
  background: transparent;
  border-color: var(--color-tangerine-dream);
  color: var(--color-text);
  opacity: 1;
}

.supplies-panel[hidden],
.supplies-filterdropdown[hidden],
.supplies-results[hidden] {
  display: none !important;
}

.supplies-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
}

.supplies-panel.is-active {
  animation: supplies-panel-in 240ms ease both;
}

.supplies-workspace,
.custom-workspace {
  position: relative;
  overflow: visible;
  align-content: start;
  gap: 14px;
  min-height: 0;
  height: 100%;
  padding: 16px;
  border-radius: var(--panel-radius);
  background: var(--color-floral-white);
  border: 1px solid var(--paper-border);
  box-shadow: var(--paper-shadow-soft);
}

.supplies-workspace::before,
.custom-workspace::before {
  content: none;
}

.supplies-workspace > *,
.custom-workspace > * {
  position: relative;
  z-index: 1;
}

.modal-section--tight {
  gap: 12px;
}

.modal-section {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: var(--panel-radius);
  background: var(--color-floral-white);
  border: 1px solid var(--paper-border);
  box-shadow: var(--paper-shadow-soft);
}

.modal-section__header h3 {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.modal-section__header p {
  margin: 6px 0 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.supplies-search {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  gap: 12px;
  min-height: 0;
  width: 100%;
}

.supplies-search.supplies-workspace {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.supplies-modal [data-supplies-panel="custom"] .custom-workspace {
  display: grid;
  align-content: start;
  justify-items: start;
  padding: clamp(22px, 4vh, 36px) clamp(24px, 4vw, 48px) 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.supplies-modal [data-supplies-panel="custom"] .modal-section__header {
  display: grid;
  gap: 7px;
  text-align: left;
}

.supplies-modal [data-supplies-panel="custom"] .modal-section__header h3 {
  font-size: clamp(1.2rem, 1.45vw, 1.36rem);
}

.supplies-modal [data-supplies-panel="custom"] .modal-section__header p {
  max-width: 58ch;
  font-size: clamp(1rem, 1.12vw, 1.08rem);
  line-height: 1.48;
}

.supplies-search__toolbar {
  display: grid;
  gap: 10px;
  position: sticky;
  top: 0;
  align-content: start;
  width: 100%;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 249, 245, 0.96);
  border: 1px solid rgba(47, 41, 53, 0.08);
  box-shadow:
    0 8px 18px rgba(130, 100, 123, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  z-index: 3;
  backdrop-filter: blur(12px);
}

.supplies-search__top-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.supplies-search__top-row .supplies-filterbar {
  order: 0;
}

.supplies-search__top-row .supplies-recent {
  margin-left: auto;
  order: 1;
  flex: 0 1 auto;
  justify-self: end;
}

.supplies-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  order: 2;
}

.supplies-search__input {
  order: 1;
}

.supplies-filterdropdown {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 8;
  display: grid;
  animation: filter-dropdown-in 120ms cubic-bezier(0.22, 0.9, 0.3, 1) both;
}

.supplies-results {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 251, 248, 0.9);
  border: 1px solid rgba(47, 41, 53, 0.08);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  box-shadow:
    0 12px 22px rgba(92, 70, 88, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.search-step {
  display: grid;
  gap: 14px;
}

.search-step__header h4 {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.02rem;
  letter-spacing: -0.03em;
}

.search-step__header p {
  margin: 6px 0 0;
  color: var(--color-text-muted);
  line-height: 1.6;
}

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

.search-step__grid--wrap {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.search-results__header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-height: 16px;
}

.search-results__header p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

.search-results__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow: auto;
  padding: 0 4px 0 0;
}

.search-result-card--medium-alcohol {
  --search-result-accent: var(--medium-alcohol-accent);
}

.search-result-card--medium-acrylic {
  --search-result-accent: var(--medium-acrylic-accent);
}

.search-result-card--medium-pencil {
  --search-result-accent: var(--medium-pencil-accent);
}

.search-result-card--medium-gel {
  --search-result-accent: var(--medium-gel-accent);
}

.search-result-card--medium-fine-line {
  --search-result-accent: var(--medium-fine-line-accent);
}

.search-result-card--medium-generic {
  --search-result-accent: var(--medium-generic-accent);
}

.search-result-card--medium-custom {
  --search-result-accent: var(--medium-custom-accent);
}

.search-result-card,
.search-card,
.search-set {
  --gallery-card-accent: var(--search-result-accent, var(--paper-border));
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 118px;
  padding: 10px;
  border-radius: 16px;
  background: #faf6f0;
  border: 1.5px solid color-mix(in srgb, var(--gallery-card-accent) 48%, var(--paper-border-soft));
  box-shadow:
    3px 5px 0 color-mix(in srgb, var(--gallery-card-accent) 18%, transparent),
    0 2px 10px color-mix(in srgb, var(--gallery-card-accent) 8%, rgba(60, 45, 20, 0.04));
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 220ms ease,
    background-color 220ms ease;
}

.search-result-card:hover,
.search-card:hover,
.search-set:hover {
  background: #faf6f0;
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--gallery-card-accent) 70%, var(--paper-border-strong));
  box-shadow:
    3px 5px 0 color-mix(in srgb, var(--gallery-card-accent) 26%, transparent),
    0 4px 16px color-mix(in srgb, var(--gallery-card-accent) 12%, rgba(60, 45, 20, 0.06));
}

.search-result-card:active,
.search-card:active,
.search-set:active {
  transform: translateY(-1px) scale(0.997);
}

.search-empty {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.custom-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: 12px;
  width: 100%;
}

.custom-block {
  display: grid;
  gap: 14px;
  align-content: start;
  width: min(100%, 620px);
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.search-marker {
  align-content: start;
}

.search-result__row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.search-marker__swatch {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(47, 41, 53, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}

.search-marker__swatch--small {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.search-marker__swatch--lifted {
  margin-top: 1px;
  box-shadow:
    0 10px 16px rgba(130, 100, 123, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.search-result__brand-logo {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(252, 249, 244, 0.99));
  border: 1px solid color-mix(in srgb, var(--paper-border) 72%, white);
  color: var(--supply-logo-ink, var(--color-text));
  box-shadow:
    0 8px 18px rgba(70, 55, 35, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.search-result__brand-logo--small {
  width: 40px;
  height: 40px;
}

.search-result__brand-logo--lifted {
  margin-top: 1px;
}

.search-result__brand-logo span {
  color: color-mix(in srgb, var(--search-result-accent, var(--color-text)) 66%, var(--color-text));
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.search-result__meta {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.search-result__eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.search-result__line {
  margin: 0;
  min-width: 0;
}

.search-result__line--brand {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(47, 41, 53, 0.6);
}

.search-result__line--title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--color-text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.search-result__line--meta {
  color: color-mix(in srgb, var(--color-purple) 42%, var(--color-text));
  font-size: 0.78rem;
  font-weight: 700;
}

.search-result__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 9px 0 7px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--search-pill-accent, var(--paper-border)) 45%, var(--paper-border-soft));
  background: color-mix(in srgb, var(--search-pill-accent, #c8c4e8) 26%, white);
  color: rgba(47, 41, 53, 0.82);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
}

.search-result__pill::before {
  content: "";
  display: block;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  background-color: rgba(47, 41, 53, 0.72);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 82%;
  mask-size: 82%;
}

.search-result__pill--alcohol {
  --search-pill-accent: var(--medium-alcohol-accent);
}

.search-result__pill--alcohol::before {
  -webkit-mask-image: url('./assets/icons/mediums/alcohol-marker.svg');
  mask-image: url('./assets/icons/mediums/alcohol-marker.svg');
}

.search-result__pill--acrylic {
  --search-pill-accent: var(--medium-acrylic-accent);
}

.search-result__pill--acrylic::before {
  -webkit-mask-image: url('./assets/icons/mediums/acrylic-marker.svg');
  mask-image: url('./assets/icons/mediums/acrylic-marker.svg');
}

.search-result__pill--pencil {
  --search-pill-accent: var(--medium-pencil-accent);
}

.search-result__pill--pencil::before {
  -webkit-mask-image: url('./assets/icons/mediums/colored-pencil.svg');
  mask-image: url('./assets/icons/mediums/colored-pencil.svg');
}

.search-result__pill--gel {
  --search-pill-accent: var(--medium-gel-accent);
}

.search-result__pill--fine-line {
  --search-pill-accent: var(--medium-fine-line-accent);
}

.search-result__pill--gel::before,
.search-result__pill--fine-line::before {
  -webkit-mask-image: url('./assets/icons/mediums/pen-nib.svg');
  mask-image: url('./assets/icons/mediums/pen-nib.svg');
}

.search-result__pill--generic {
  --search-pill-accent: var(--medium-generic-accent);
}

.search-result__pill--custom {
  --search-pill-accent: var(--medium-custom-accent);
}

.search-result__pill--generic::before {
  display: none;
}

.search-result__pill--custom::before {
  -webkit-mask-image: url('./assets/icons/ui/bookmark.svg');
  mask-image: url('./assets/icons/ui/bookmark.svg');
}

.search-result__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: auto;
}

.search-result__button {
  width: 100%;
  min-width: 0;
}

.button--primary.is-added {
  background: color-mix(in srgb, #d9f0dd 76%, white);
  border-color: rgba(62, 121, 76, 0.18);
  color: #2e6f3f;
  box-shadow: none;
}


.supplies-recent[hidden] {
  display: none;
}

.supplies-recent {
  display: flex;
  align-items: center;
  gap: 8px;
  order: 3;
  padding-top: 2px;
  flex-wrap: wrap;
}

.supplies-recent__label {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.supplies-recent__inline {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.supplies-recent__chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 246, 240, 0.96);
  border: 1px solid rgba(47, 41, 53, 0.08);
  color: var(--color-text);
  font-size: clamp(0.82rem, 0.9vw, 0.9rem);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.custom-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.field {
  display: grid;
  gap: 0;
  min-width: 0;
}

.field span {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.field input,
.field select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  font-size: 1.03rem;
}

.field select {
  cursor: pointer;
}

.field input[type="color"] {
  padding: 6px;
  min-height: 38px;
}

.custom-form__action {
  justify-self: start;
  min-width: 164px;
  min-height: 48px;
  margin-top: 10px;
  font-size: 1rem;
}

.supply-card--editor {
  grid-column: 1 / -1;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  padding: 12px 16px 14px;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--supply-surface-top, rgba(255, 251, 248, 0.98)) 90%, white),
      color-mix(in srgb, var(--supply-surface-bottom, rgba(255, 244, 239, 0.94)) 92%, white)
    ),
    rgba(255, 248, 243, 0.94);
  animation: supplies-card-in 360ms ease both;
}

.supply-card__top--editor {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: flex-start;
  column-gap: 12px;
  row-gap: 0;
  min-height: 0;
}

.supply-card--editor .supply-card__headline {
  grid-column: 1;
  align-self: start;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-left: 6px;
}

.supply-card__top-actions--editor-actions {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  margin-left: 0;
}

.supply-card__meta--editor {
  grid-column: 3;
  align-self: start;
  justify-self: end;
  position: static;
  margin-left: 0;
  margin-right: 6px;
  min-height: 18px;
}

.supply-card__editor-note {
  margin: 0;
  color: var(--color-text-soft);
  font-size: 0.78rem;
  line-height: 1.35;
}

.custom-set-editor-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 0;
  padding: 2px 0 0;
  border-radius: 16px;
  background: transparent;
  flex: 1 1 auto;
  align-self: stretch;
  min-height: 0;
  overflow: hidden;
}

.custom-set-editor-scroll {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 8px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  flex: 1 1 auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(186, 138, 121, 0.32) transparent;
  align-content: start;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0 4px 0 0;
  height: 100%;
  width: 100%;
}

.supply-card--editor:hover .supply-card__meta--editor,
.supply-card--editor:focus-within .supply-card__meta--editor {
  opacity: 1;
  transform: none;
}

.supply-card--editor .supply-card__meta--editor{
  transition: none;
}

.custom-set-editor-scroll::-webkit-scrollbar {
  width: 8px;
}

.custom-set-editor-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.custom-set-editor-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(186, 138, 121, 0.28);
}

.custom-set-editor-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(186, 138, 121, 0.42);
}

.custom-set-editor-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1.7fr) minmax(4.8rem, 0.78fr) 26px;
  gap: 6px;
  align-items: center;
  padding: 2px 7px 2px 4px;
  border: 1px solid rgba(47, 41, 53, 0.045);
  border-radius: 10px;
  background: rgba(255, 249, 245, 0.62);
  min-height: 34px;
  box-shadow: none;
}

.custom-set-editor-row.is-current {
  border-color: rgba(193, 154, 138, 0.16);
  background: rgba(255, 247, 243, 0.56);
}

.custom-set-editor-row.is-filled {
  opacity: 0.96;
}

.custom-set-editor-row__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  border: 1.5px solid var(--supply-pill-border, rgba(47, 41, 53, 0.08));
  background: var(--supply-pill-bg, rgba(255, 248, 243, 0.94));
  box-shadow:
    0 4px 10px rgba(130, 100, 123, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
  font-size: 0.69rem;
  font-weight: 800;
  color: var(--supply-pill-text-strong, color-mix(in srgb, var(--supply-pill-text, var(--color-text)) 96%, var(--color-text)));
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
  white-space: nowrap;
}

.custom-set-editor-field {
  min-width: 0;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 9px;
  background: rgba(255, 251, 248, 0.98);
  border: 1px solid rgba(47, 41, 53, 0.1);
  box-shadow: none;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(47, 41, 53, 0.94);
}

.custom-set-editor-field::placeholder {
  color: rgba(47, 41, 53, 0.5);
}

.custom-set-editor-field--name,
.custom-set-editor-field--code {
  background: rgba(255, 251, 248, 0.99);
}

.custom-set-editor-field--name {
  padding-left: 10px;
}

.custom-set-editor-field--code {
  padding-left: 8px;
  letter-spacing: 0.01em;
}

.custom-set-editor-swatch {
  width: 26px;
  height: 26px;
  justify-self: start;
  border-radius: 8px;
  border: 1px solid rgba(47, 41, 53, 0.12);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--swatch-color, #eadfdf) 85%, white), var(--swatch-color, #eadfdf));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8),
    0 1px 3px rgba(130, 100, 123, 0.08);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.custom-set-editor-swatch:hover,
.custom-set-editor-swatch:focus-visible {
  transform: translateY(-1px) scale(1.03);
  border-color: rgba(47, 41, 53, 0.2);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.82),
    0 6px 14px rgba(130, 100, 123, 0.14);
  outline: none;
}

.custom-set-color-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 6px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 250, 246, 0.94);
  border: 1px solid rgba(47, 41, 53, 0.08);
  box-shadow:
    0 14px 28px rgba(130, 100, 123, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.custom-set-color-picker__preview {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(47, 41, 53, 0.14);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.74),
    0 8px 18px rgba(130, 100, 123, 0.12);
}

.custom-set-color-picker__copy {
  flex: 1 1 220px;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.custom-set-color-picker__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(47, 41, 53, 0.64);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.custom-set-color-picker__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.custom-set-color-picker__text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(47, 41, 53, 0.68);
}

.custom-set-color-picker__native {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.custom-set-color-picker__native span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(47, 41, 53, 0.58);
}

.custom-set-color-picker__native input[type="color"] {
  width: 52px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(47, 41, 53, 0.12);
  border-radius: 12px;
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.76),
    0 6px 12px rgba(130, 100, 123, 0.08);
}

.custom-set-color-picker__native input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 4px;
}

.custom-set-color-picker__native input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 8px;
}

.custom-set-color-picker__done {
  align-self: flex-end;
}

.swatch-capture-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
}

.swatch-capture-modal[hidden] {
  display: none;
}

.swatch-capture-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 254, 251, 0.48);
  backdrop-filter: blur(8px) saturate(0.72);
  animation: supplies-backdrop-in 240ms ease both;
}

.swatch-capture-modal__dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  width: min(100%, 1000px);
  height: min(92dvh, 900px);
  min-height: min(760px, calc(100dvh - 36px));
  padding: 22px;
  border-radius: var(--panel-radius);
  background: var(--gallery-surface);
  border: 1px solid var(--paper-border-soft);
  box-shadow:
    0 18px 44px rgba(35, 32, 26, 0.12),
    0 4px 12px rgba(35, 32, 26, 0.06);
  overflow: hidden;
  animation: supplies-modal-in 280ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.swatch-capture-modal__head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  min-width: 0;
}

.swatch-capture-modal__head h2 {
  margin: 2px 0 0;
}

.swatch-capture-modal__copy {
  display: grid;
  gap: 0;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  justify-items: start;
}

.swatch-capture-modal__instruction {
  margin: 8px 0 0;
  max-width: none;
  color: var(--color-text-muted);
  line-height: 1.5;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.swatch-capture-modal__head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
  margin-left: auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  max-width: 100%;
}

.swatch-capture-change {
  white-space: nowrap;
  min-height: 40px;
  padding-inline: 14px;
  font-size: 0.84rem;
}

.swatch-capture-modal__progress {
  display: block;
  width: auto;
  margin: 0;
  color: rgba(47, 41, 53, 0.9);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  white-space: nowrap;
  width: 100%;
}

.swatch-capture-modal__toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 0;
}

.swatch-capture-change-slot {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}

.swatch-capture-modal__workspace {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.swatch-capture-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
  font-size: 0.84rem;
  white-space: nowrap;
}

.swatch-capture-action__icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: 0.95;
}

.swatch-capture-modal__control .swatch-capture-action__icon {
  width: 12px;
  height: 12px;
}

.swatch-capture-action--redo .swatch-capture-action__icon {
  transform: scaleX(-1);
}

.swatch-capture-modal__head-actions > * {
  flex: 0 0 auto;
}

.swatch-capture-modal__body {
  display: grid;
  min-width: 0;
  min-height: 0;
}

.swatch-capture-modal__field {
  flex: 1 1 auto;
  min-width: 0;
  justify-self: center;
  width: 100%;
}

.swatch-capture-modal__source {
  display: grid;
  grid-template-columns: max-content minmax(280px, 50%) max-content;
  justify-content: space-between;
  column-gap: 12px;
  align-items: stretch;
}

.swatch-capture-modal__source-actions {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 8px;
  justify-content: end;
  justify-self: end;
  align-items: stretch;
  min-width: 0;
}

.swatch-capture-modal__upload,
.swatch-capture-modal__clear-image {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--paper-border) 78%, transparent);
  background: rgba(255, 253, 249, 0.86);
  color: #26232e;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.swatch-capture-modal__upload input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.swatch-capture-modal__upload:hover,
.swatch-capture-modal__upload:focus-within,
.swatch-capture-modal__clear-image:hover,
.swatch-capture-modal__clear-image:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--color-coral) 42%, var(--paper-border));
  background: #fffefa;
  outline: none;
}

.swatch-capture-modal__upload {
  justify-self: start;
}

.swatch-capture-modal__clear-image {
  justify-self: end;
}

.swatch-capture-modal__field span {
  display: none;
}

.swatch-capture-modal__field input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
}

.swatch-capture-modal__field input::placeholder {
  color: rgba(47, 41, 53, 0.48);
}

.swatch-capture-modal__capture-input {
  width: min(100%, 248px);
  height: 28px;
  padding: 2px;
  justify-content: stretch;
}

.swatch-capture-modal__capture-input input {
  width: 100%;
  height: 100%;
  padding: 0 12px;
  border-radius: 14px;
  text-align: left;
}

.swatch-capture-modal__capture-input input::placeholder {
  color: rgba(47, 41, 53, 0.48);
  opacity: 1;
}

.swatch-capture-modal__capture-input input:focus {
  outline: none;
}

.swatch-capture-modal__error {
  margin: 0;
  width: min(100%, 600px);
  color: #8a4e4e;
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: left;
}

.swatch-capture-toolbar__lens {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.72);
  background-repeat: no-repeat;
  background-color: #fff;
  background-size: 100% 100%;
  background-position: center center;
  opacity: 1;
  box-shadow:
    0 12px 26px rgba(28, 20, 28, 0.16),
    0 0 0 1px rgba(47, 41, 53, 0.08);
  backdrop-filter: none;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 20px));
  transition: opacity 150ms ease;
}

.swatch-capture-stage {
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border-radius: var(--radius-md);
}

.swatch-capture-stage__frame {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: var(--radius-md);
  background: var(--color-inner-surface);
  border: 1px solid var(--paper-border-soft);
  box-shadow: inset 0 0 0 1px rgba(80, 65, 45, 0.08);
  scrollbar-width: none;
}

.swatch-capture-stage__actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: auto;
}

.swatch-capture-stage__actions .swatch-capture-action {
  cursor: pointer;
}

.swatch-capture-stage__frame::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.swatch-capture-modal:not(.has-image) .swatch-capture-stage__frame {
  display: none;
}

.swatch-capture-modal.has-image .swatch-capture-stage__frame,
.swatch-capture-modal.has-image .swatch-capture-stage__viewport {
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M6 18l4.5-4.5' fill='none' stroke='%232f2935' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M10 14 17 7' fill='none' stroke='%232f2935' stroke-width='2.25' stroke-linecap='round'/%3E%3Cpath d='M16.5 6.5l1.6-1.6 1.9 1.9-1.6 1.6' fill='none' stroke='%232f2935' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='5' cy='19' r='1.6' fill='%232f2935'/%3E%3C/svg%3E") 6 18,
    crosshair;
}

.swatch-capture-modal.has-image .swatch-capture-stage__frame:hover,
.swatch-capture-modal.has-image .swatch-capture-stage__viewport:hover {
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M6 18l4.5-4.5' fill='none' stroke='%232f2935' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M10 14 17 7' fill='none' stroke='%232f2935' stroke-width='2.25' stroke-linecap='round'/%3E%3Cpath d='M16.5 6.5l1.6-1.6 1.9 1.9-1.6 1.6' fill='none' stroke='%232f2935' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='5' cy='19' r='1.6' fill='%232f2935'/%3E%3C/svg%3E") 6 18,
    crosshair;
}

.swatch-capture-stage__viewport {
  position: relative;
  min-height: 100%;
  padding: 14px;
  cursor: inherit;
}

.swatch-capture-stage__viewport::before {
  content: none;
}

.swatch-capture-stage__image {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  border: 1px solid rgba(47, 41, 53, 0.22);
  user-select: none;
  -webkit-user-drag: none;
  margin: 0;
}

.swatch-capture-stage__canvas {
  position: absolute;
  inset: 14px;
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  opacity: 0;
  pointer-events: none;
}

.swatch-capture-stage__markers {
  position: absolute;
  inset: 14px;
  pointer-events: none;
  z-index: 2;
}

.swatch-capture-stage__marker {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.94);
  background: var(--pin-color);
  color: var(--pin-ink, var(--color-text));
  width: 54px;
  height: 54px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 10px 18px rgba(28, 20, 28, 0.16);
  pointer-events: auto;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  z-index: 3;
  animation: swatch-capture-pin-pop 220ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
  will-change: transform;
}

.swatch-capture-stage__marker:hover {
  transform: translate(-50%, -50%) scale(1.05);
  filter: saturate(1.04);
  box-shadow: 0 12px 20px rgba(28, 20, 28, 0.18);
}

.swatch-capture-stage__marker-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.92);
  background: #fff;
  color: var(--pin-ink, var(--color-text));
  box-shadow: none;
  font-size: 0.74rem;
  pointer-events: none;
}

body.is-dragging-swatch-marker .swatch-capture-stage__marker {
  cursor: grabbing;
}

body.is-dragging-swatch-marker .swatch-capture-stage__marker-index {
  cursor: grabbing;
}

.swatch-capture-stage__empty {
  position: absolute;
  inset: 10px;
  display: grid;
  place-content: center;
  place-items: center;
  gap: 10px;
  padding: 36px 24px;
  color: rgba(47, 41, 53, 0.48);
  text-align: center;
  line-height: 1.6;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 18px;
}

.swatch-capture-stage__empty::before {
  content: none;
}

.swatch-capture-modal.has-image .swatch-capture-stage__empty {
  display: none !important;
}

.swatch-capture-modal:not(.has-source) .swatch-capture-modal__source {
  display: none;
}

.swatch-capture-modal.has-source .swatch-capture-modal__source {
  opacity: 1;
  pointer-events: auto;
}

.swatch-capture-modal.is-replacing .swatch-capture-stage__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 250, 246, 0.56);
  backdrop-filter: blur(4px);
}

.swatch-capture-modal.is-loading .swatch-capture-modal__source {
  opacity: 0.42;
}

@keyframes swatch-capture-pin-pop {
  from {
    transform: translate(-50%, -50%) scale(0.72);
    opacity: 0.2;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button.is-owner-action-gated,
.button[aria-disabled="true"].is-owner-action-gated {
  opacity: 0.62;
  cursor: pointer;
}

.set-preview-card {
  display: grid;
  gap: 16px;
  min-height: 132px;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 248, 243, 0.98), rgba(255, 237, 229, 0.92)),
    rgba(255, 243, 236, 0.96);
  border: 1px solid rgba(47, 41, 53, 0.08);
}

.set-preview-card--search {
  min-height: 0;
}

.set-preview-card__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.set-preview-card__header h4 {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.18rem;
  letter-spacing: -0.03em;
}

.set-preview-card__header p {
  margin: 6px 0 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

.set-preview-card__empty {
  color: var(--color-text-muted);
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
  width: 100%;
}

.supplies-preview-modal[hidden] {
  display: none;
}

.supplies-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
}

.supplies-preview-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(47, 41, 53, 0.18);
  backdrop-filter: blur(12px);
}

.supplies-preview-modal__dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  width: min(100%, 760px);
  max-height: min(84vh, 760px);
  padding: 24px;
  border-radius: var(--panel-radius);
  background: var(--gallery-surface);
  border: 1px solid var(--paper-border-strong);
  box-shadow: var(--paper-shadow);
}

.supplies-preview-modal__head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
}

.supplies-preview-modal__head h3 {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.65rem;
  letter-spacing: -0.04em;
}

.supplies-preview-modal__body {
  display: grid;
  gap: 18px;
  min-height: 0;
}

.supplies-preview-modal__summary {
  display: block;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: var(--gallery-surface);
  border: 0;
  box-shadow: none;
}

.supplies-preview-modal__swatch {
  display: none;
}

.supplies-preview-modal__copy {
  display: grid;
  gap: 6px;
  min-width: 0;
  text-align: left;
}

.supplies-preview-modal__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.supplies-preview-modal__copy h4 {
  margin: 0;
  padding-bottom: 0;
  border-bottom: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1.18rem, 1.7vw, 1.42rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
}

.supplies-preview-modal__copy p {
  margin: 0;
  color: var(--color-text-muted);
}

.supplies-preview-modal__meta {
  display: inline-flex;
  align-items: center;
  margin: 0;
  color: rgba(28, 35, 42, 0.52);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.supplies-preview-modal__meta::after {
  content: none;
}

.supplies-preview-modal__detail {
  justify-self: start;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  color: color-mix(in srgb, var(--supply-accent, var(--color-text-muted)) 48%, var(--color-text-muted));
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.1;
}

.supplies-preview-modal__detail::before {
  content: none;
}

.supplies-preview-modal__copy > p:last-child {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  color: var(--color-text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.supplies-preview-modal__copy > p:last-child strong {
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.supplies-preview-modal.is-set-preview .supplies-preview-modal__summary {
  align-items: flex-start;
}

.supplies-preview-modal.is-set-preview .supplies-preview-modal__copy {
  gap: 11px;
}

.supplies-preview-modal.is-marker-preview .supplies-preview-modal__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0;
}

.supplies-preview-modal.is-marker-preview .supplies-preview-modal__summary {
  display: grid;
  grid-template-columns: clamp(54px, 7vw, 72px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(14px, 2vw, 20px);
  padding: 0;
}

.supplies-preview-modal.is-marker-preview .supplies-preview-modal__swatch {
  display: block;
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  margin-top: 2px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--paper-border-soft) 66%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.supplies-preview-modal.is-marker-preview .supplies-preview-modal__copy {
  grid-column: 2;
  grid-row: 1;
  gap: 10px;
  align-content: center;
  min-height: 0;
}

.supplies-preview-modal.is-marker-preview .supplies-preview-grid {
  display: none !important;
}

.supplies-preview-modal.is-marker-preview .supplies-preview-modal__meta {
  color: rgba(28, 35, 42, 0.58);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.supplies-preview-modal.is-marker-preview .supplies-preview-modal__copy h4 {
  max-width: 28rem;
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.supplies-preview-modal.is-marker-preview .supplies-preview-modal__copy > p:last-child {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 34px;
  margin-top: 2px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--paper-border) 66%, transparent);
  background: var(--main-card-surface);
  color: rgba(38, 43, 51, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}

.supplies-preview-modal.is-marker-preview .supplies-preview-modal__copy > p:last-child strong {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.supplies-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 18px 14px;
  min-height: 0;
  overflow: auto;
  padding: 2px 4px 2px 0;
}

.supplies-preview-grid__empty {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.supplies-preview-tile {
  display: grid;
  gap: 9px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.palette-preview-modal__dialog {
  grid-template-rows: auto minmax(0, 1fr);
  width: min(100%, 760px);
  max-height: min(84vh, 760px);
  padding: 24px;
  gap: 18px;
}

.palette-preview-modal__body {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
}

.palette-preview-modal__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

.palette-preview-modal__copy {
  flex: 1;
  gap: 6px;
  min-width: 0;
}

.palette-preview-modal__summary-copy {
  display: grid;
  gap: 6px;
}

.palette-preview-modal__copy h4 {
  font-size: 1.1rem;
}

.palette-preview-modal__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-self: flex-start;
  margin-left: auto;
  padding-top: 0;
  max-width: 220px;
}

.palette-preview-modal__stat {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 250, 246, 0.98);
  border: 1px solid rgba(47, 41, 53, 0.08);
  color: rgba(47, 41, 53, 0.72);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: default;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.palette-preview-modal__stat:hover {
  transform: translateY(-1px);
  background: rgba(255, 250, 246, 1);
  border-color: rgba(47, 41, 53, 0.12);
}

.palette-preview-modal__section {
  display: grid;
  gap: 8px;
  min-height: 0;
  padding: 10px 12px 12px;
  border-radius: 18px;
  background: rgba(255, 248, 243, 0.88);
  border: 1px solid rgba(47, 41, 53, 0.08);
}

.palette-preview-modal__section[hidden] {
  display: none !important;
}

.palette-preview-modal__section--page {
  gap: 10px;
}

.palette-preview-modal__section--page .palette-preview-page-list {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.palette-preview-modal__section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.palette-preview-modal__section-head h4,
.palette-preview-page__copy h5 {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  letter-spacing: -0.03em;
  color: rgba(47, 41, 53, 0.96);
}

.palette-preview-modal__section-head h4 {
  font-size: 0.96rem;
}

.palette-preview-modal__section-head p {
  margin: 0;
  color: rgba(47, 41, 53, 0.54);
  font-size: 0.78rem;
  font-weight: 700;
}

.palette-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(114px, 1fr));
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.palette-preview-tile {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 249, 246, 0.94);
  border: 1px solid rgba(47, 41, 53, 0.08);
  box-shadow: none;
}

.palette-preview-tile__swatch {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid rgba(47, 41, 53, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.palette-preview-tile__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.palette-preview-tile__brand,
.palette-preview-tile__code,
.palette-preview-tile__medium,
.palette-preview-page__copy p {
  margin: 0;
  color: rgba(47, 41, 53, 0.56);
}

.palette-preview-tile__copy > * {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.palette-preview-tile__code {
  font-size: 0.7rem;
  font-weight: 800;
  color: rgba(47, 41, 53, 0.86);
  letter-spacing: -0.02em;
}

.palette-preview-tile__brand {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: rgba(47, 41, 53, 0.6);
}

.palette-preview-tile__copy h5 {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.82rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: rgba(47, 41, 53, 0.96);
}

.palette-preview-tile__medium {
  font-size: 0.68rem;
  line-height: 1.1;
  letter-spacing: 0.02em;
  color: rgba(47, 41, 53, 0.5);
}

.palette-preview-page {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  width: 100%;
  text-align: left;
  appearance: none;
  cursor: pointer;
}

.palette-preview-page:hover .palette-preview-page__copy h5,
.palette-preview-page:focus-visible .palette-preview-page__copy h5 {
  color: rgba(47, 41, 53, 1);
}

.palette-preview-page:hover .palette-preview-page__thumb,
.palette-preview-page:focus-visible .palette-preview-page__thumb {
  box-shadow: 0 0 0 1px rgba(47, 41, 53, 0.08), 0 10px 18px rgba(130, 100, 123, 0.08);
}

.palette-preview-page__thumb {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 1.15 / 1;
  background: linear-gradient(135deg, rgba(247, 233, 226, 0.92), rgba(236, 228, 240, 0.9));
}

.palette-preview-page__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.palette-preview-page__thumb.is-empty {
  display: grid;
  place-items: center;
}

.palette-preview-page__placeholder {
  font-size: 0.9rem;
  font-weight: 850;
  color: rgba(47, 41, 53, 0.42);
}

.palette-preview-page__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.palette-preview-page__copy h5 {
  font-size: 0.84rem;
}

.palette-preview-page__copy p {
  font-size: 0.7rem;
}

.pages-view-modal__dialog {
  width: min(100%, 760px);
}

.pages-view-modal__body {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.pages-view-modal__summary {
  align-items: flex-start;
}

.pages-view-modal__copy {
  gap: 6px;
}

.pages-view-modal__copy h4 {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  color: rgba(47, 41, 53, 0.96);
}

.pages-view-modal__meta-line {
  margin: 0;
  color: rgba(47, 41, 53, 0.56);
  font-size: 0.8rem;
}

.pages-view-modal__stats {
  max-width: 220px;
}

.pages-view-modal__section--page {
  min-height: 0;
}

.pages-view-modal__image-shell {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 4;
  min-height: 0;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(247, 233, 226, 0.92), rgba(236, 228, 240, 0.9));
  border: 1px solid rgba(47, 41, 53, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    0 12px 24px rgba(130, 100, 123, 0.05);
}

.pages-view-modal__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center center;
}

.supplies-preview-tile__swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.supplies-preview-tile__label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.supplies-preview-tile__label strong,
.supplies-preview-tile__label span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplies-preview-tile__label strong {
  font-size: 0.94rem;
  line-height: 1.1;
}

.supplies-preview-tile__label span {
  color: var(--color-text-muted);
  font-size: 0.86rem;
  line-height: 1.15;
}

.supplies-preview-modal.is-set-preview {
  padding: clamp(18px, 3vw, 42px);
}

.supplies-preview-modal.is-set-preview .supplies-preview-modal__dialog {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 22px;
  width: min(100%, 900px);
  max-height: min(86vh, 840px);
  padding: clamp(28px, 3vw, 40px);
  overflow: hidden;
}

.supplies-preview-modal.is-set-preview .supplies-preview-modal__head {
  align-items: start;
}

.supplies-preview-modal.is-set-preview .supplies-preview-modal__head h3 {
  font-size: clamp(2.5rem, 4.4vw, 3.25rem);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.supplies-preview-modal.is-set-preview .supplies-preview-modal__body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 22px;
  min-height: 0;
  overflow: hidden;
}

.supplies-preview-modal.is-set-preview .supplies-preview-modal__summary {
  padding: 0 0 20px;
  border-bottom: 1px solid color-mix(in srgb, var(--paper-border-soft) 78%, transparent);
}

.supplies-preview-modal.is-set-preview .supplies-preview-modal__copy {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  gap: 14px 10px;
  align-items: center;
}

.supplies-preview-modal.is-set-preview .supplies-preview-modal__meta,
.supplies-preview-modal.is-set-preview .supplies-preview-modal__copy h4 {
  grid-column: 1 / -1;
}

.supplies-preview-modal.is-set-preview .supplies-preview-modal__meta {
  color: rgba(28, 35, 42, 0.58);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.supplies-preview-modal.is-set-preview .supplies-preview-modal__copy h4 {
  font-size: clamp(2.35rem, 4vw, 3rem);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.supplies-preview-modal.is-set-preview .supplies-preview-modal__detail,
.supplies-preview-modal.is-set-preview .supplies-preview-modal__copy > p:last-child {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin: 0;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--paper-border) 66%, transparent);
  background: var(--main-card-surface);
  color: rgba(38, 43, 51, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}

.supplies-preview-modal.is-set-preview .supplies-preview-modal__copy > p:last-child {
  gap: 4px;
}

.supplies-preview-modal.is-set-preview .supplies-preview-modal__copy > p:last-child strong {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.supplies-preview-modal.is-set-preview .supplies-preview-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(22px, 2.4vw, 30px) clamp(20px, 2.1vw, 28px);
  min-height: 0;
  overflow: auto;
  padding: 0 2px 2px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.supplies-preview-modal.is-set-preview .supplies-preview-grid::-webkit-scrollbar {
  display: none;
}

.supplies-preview-modal.is-set-preview .supplies-preview-tile {
  gap: 10px;
}

.supplies-preview-modal.is-set-preview .supplies-preview-tile__swatch {
  border-radius: 12px;
  box-shadow: none;
}

.supplies-preview-modal.is-set-preview .supplies-preview-tile__label {
  gap: 4px;
}

.supplies-preview-modal.is-set-preview .supplies-preview-tile__label strong {
  color: rgba(23, 20, 16, 0.96);
  font-size: 0.92rem;
  font-weight: 850;
  line-height: 1;
}

.supplies-preview-modal.is-set-preview .supplies-preview-tile__label span {
  color: rgba(38, 43, 51, 0.64);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.15;
}

.supplies-preview-modal.is-set-preview .modal-actions {
  display: none;
}

.marker-search {
  position: relative;
}

.marker-search__input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
}

.selected-marker__empty {
  color: var(--color-text-muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

@keyframes supplies-card-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes supplies-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes supplies-modal-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

@keyframes mobile-modal-screen-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes mobile-modal-screen-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes supplies-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes supplies-backdrop-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes supplies-panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes filter-dropdown-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1199px) {
  /* TABLET */
  .site-header {
    gap: clamp(12px, 1.8vw, 18px);
  }

  .site-nav {
    gap: clamp(10px, 1.5vw, 16px);
  }

  .hero {
    gap: clamp(18px, 2.4vw, 34px);
  }

  .hero-copy {
    grid-column: 1 / span 7;
  }

  .hero-visual {
    grid-column: 7 / -1;
    align-items: start;
    justify-items: start;
    justify-self: start;
    padding-top: clamp(8px, 1.2vw, 14px);
    padding-left: 0;
  }

  .palette-artwork {
    width: min(100%, 22rem);
    min-height: 0;
    margin: 0;
    padding-top: 0;
  }

  .palette-panel {
    width: 100%;
  }

  .palette-selector {
    gap: 10px;
    padding: 14px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 42rem;
  }

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

  .custom-layout {
    grid-template-columns: 1fr;
  }

  .search-results__grid {
    grid-template-columns: 1fr;
  }

  body[data-page="pages"] .pages-workspace {
    grid-template-columns: minmax(320px, 1.08fr) minmax(280px, 0.92fr);
  }

}

@media (max-width: 920px) {
  body[data-page="pages"] .pages-workspace {
    grid-template-columns: minmax(280px, 1fr) minmax(260px, 0.88fr);
    gap: 18px;
    height: calc(var(--collection-frame-height) + 42px);
    max-height: calc(var(--collection-frame-height) + 42px);
  }

  body[data-page="pages"] .pages-workspace.supplies-collection {
    height: calc(var(--collection-frame-height) + 42px);
    max-height: calc(var(--collection-frame-height) + 42px);
  }

  body[data-page="pages"] .pages-workspace > .pages-preview-panel,
  body[data-page="pages"] .pages-workspace > .pages-object-tracker {
    height: 100%;
    max-height: 100%;
  }

  .pages-preview-panel,
  .pages-object-tracker {
    width: 100%;
    max-width: none;
  }

  .pages-preview-panel {
    min-height: 320px;
  }

  .pages-object-tracker {
    min-height: 540px;
  }

  .pages-object-tracker__title-view {
    max-width: none;
  }

  .supplies-main {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .supplies-collection {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .supplies-shell {
    grid-column: 1 / -1;
    padding-left: 0;
  }

  .hero-copy {
    grid-column: 1 / span 7;
    max-width: 34rem;
  }

  .hero-visual {
    grid-column: 7 / -1;
    align-items: start;
    justify-items: start;
    justify-self: start;
    padding-top: clamp(8px, 1vw, 12px);
  }

  .palette-artwork {
    width: min(100%, 20rem);
    margin: 0;
  }

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

@media (max-width: 900px) {
  /* TABLET */
  body[data-page="pages"] .pages-workspace {
    grid-template-columns: minmax(260px, 0.98fr) minmax(240px, 0.88fr);
  }
}

@media (max-width: 767px) {
  /* MOBILE */
  .site-shell {
    padding: 0 var(--shell-gutter);
  }

  .canvas-card {
    height: 100svh;
    min-height: 100svh;
    border-radius: 0;
  }

  body[data-page="pages"] .canvas-card {
    height: 100svh;
    min-height: 100svh;
    overflow: visible;
  }

  .site-header {
    top: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    width: calc(100% + (2 * var(--card-pad-x)));
    margin-left: calc(var(--card-pad-x) * -1);
    margin-right: calc(var(--card-pad-x) * -1);
    padding: 10px clamp(12px, 4vw, 16px) 6px;
    margin-bottom: 18px;
    z-index: 70;
  }

  .site-nav,
  .header-link {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-panel {
    position: fixed;
    top: calc(var(--shell-gutter) + 58px);
    left: var(--shell-gutter);
    right: var(--shell-gutter);
    width: auto;
    margin: 0;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 245, 238, 0.96);
    border: 1px solid rgba(47, 41, 53, 0.12);
    box-shadow:
      0 22px 34px rgba(130, 100, 123, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(18px);
    z-index: 60;
    max-height: calc(100dvh - (2 * var(--shell-gutter)) - 74px);
    overflow: auto;
  }

  .mobile-panel.is-open {
    display: grid;
    gap: 16px;
  }

  .section-grid {
    grid-template-columns: 1fr;
    gap: clamp(18px, 5vw, 24px);
  }

  .home-main {
    min-height: auto;
  }

  .section-block {
    padding: 54px 0;
  }

  .section-block--soft::before {
    inset: 24px 0;
  }

  .hero {
    gap: clamp(18px, 5vw, 28px);
    padding-bottom: clamp(24px, 6vw, 36px);
  }

  .hero-copy,
  .hero-visual {
    grid-column: 1 / -1;
  }

  .hero h1 {
    max-width: 12ch;
    font-size: clamp(2.4rem, 6vw, 5.8rem);
  }

  .hero-nowrap {
    white-space: normal;
  }

  .hero-text {
    max-width: none;
    font-size: clamp(1rem, 4vw, 1.08rem);
    margin-top: 20px;
    padding-left: 0;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero-visual {
    justify-items: start;
    justify-self: start;
    padding-top: clamp(10px, 1.3vw, 16px);
    padding-left: clamp(8px, 1vw, 12px);
  }

  .palette-artwork {
    width: min(100%, 24rem);
    min-height: 0;
    margin: 0;
    padding: 8px 0 0;
  }

  .palette-panel {
    padding: 6px 0;
    gap: clamp(12px, 3.5vw, 18px);
  }

  .hero-swatch-art {
    width: min(100%, 21rem);
    min-height: 232px;
  }

  .hero-swatch-row--one {
    width: 88%;
  }

  .hero-swatch-row--two {
    top: 44px;
    width: 82%;
    transform: translateX(18px) rotate(1.7deg);
  }

  .hero-swatch-row--three {
    top: 88px;
    width: 92%;
  }

  .hero-swatch-row--four {
    top: 132px;
    width: 78%;
    transform: translateX(-10px) rotate(1.2deg);
  }

  .hero-swatch-row--five {
    top: 176px;
    width: 84%;
    transform: translateX(18px) rotate(-1.6deg);
  }

  .hero-swatch-strip {
    height: 32px;
  }

  .palette-selector {
    gap: 10px;
  }

  .palette-card {
    gap: 8px;
  }

  .palette-card--offset {
    transform: translateX(10px);
  }

  .palette-card--offset:hover {
    transform: translateX(10px) translateY(-2px);
  }

  .palette-card--narrow {
    transform: translateX(-6px);
  }

  .palette-card--narrow:hover {
    transform: translateX(-6px) translateY(-2px);
  }

  .palette-card--small-offset {
    transform: translateX(16px);
  }

  .palette-card--small-offset:hover {
    transform: translateX(16px) translateY(-2px);
  }

  .palette-strip {
    min-height: 36px;
  }

  .palette-chip::after {
    font-size: 0.7rem;
    padding: 8px 11px;
  }

  .button,
  .header-link {
    width: 100%;
  }

  .hero-footer-quote {
    margin-top: 8px;
    margin-bottom: 6px;
    font-size: 0.88rem;
    padding: 0 8px;
  }

  .button,
  .header-link {
    width: 100%;
  }

  .supplies-main {
    padding-top: 0;
  }

  .supplies-add-button {
    width: 100%;
  }

  body[data-page="pages"] .pages-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: auto;
    max-height: none;
    gap: 14px;
    padding: 14px;
    border-radius: 24px;
  }

  body[data-page="pages"] .pages-workspace > .pages-preview-panel,
  body[data-page="pages"] .pages-workspace > .pages-object-tracker {
    width: 100%;
    max-width: none;
    height: auto;
  }

  .gallery-footer-tray {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 6px var(--gallery-chrome-inset, 8px) 0;
  }

  .gallery-footer-tray__helper {
    max-width: none;
    white-space: normal;
  }

  .palette-editor {
    padding: 12px;
    border-radius: 22px;
  }

  .palette-editor__top {
    flex-direction: column;
    align-items: stretch;
  }

  .palette-editor__title-block,
  .palette-editor__description-block {
    gap: 8px;
  }

  .palette-editor__footer {
    flex-direction: column;
  }

  .palette-modal__results-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .supplies-collection {
    padding: 14px;
    border-radius: 24px;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .supplies-grid-wrapper.is-populated {
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
    padding-right: 0;
  }

  .supplies-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .supply-card {
    height: var(--supplies-card-height);
    min-height: var(--supplies-card-height);
    padding: 12px 14px 8px;
  }

  .supplies-modal {
    padding: 12px;
  }

  .supplies-modal__dialog {
    height: auto;
    min-height: 0;
    max-height: min(90vh, 920px);
    overflow: auto;
    padding: 20px;
    border-radius: 24px;
  }

  .supplies-modal__head {
    margin-bottom: 18px;
  }

  .supplies-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .supplies-tab {
    padding-inline: 12px;
  }

  .search-set__top,
  .search-results__header {
    flex-direction: column;
  }

  .search-step__grid,
  .search-results__grid,
  .custom-layout,
  .custom-form {
    grid-template-columns: 1fr;
  }

  .custom-form__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .custom-set-editor-row {
    grid-template-columns: auto minmax(0, 1.55fr) minmax(4.5rem, 0.82fr) 24px;
    gap: 5px;
    min-height: 32px;
    padding: 2px 6px 2px 4px;
  }

  .custom-set-editor-card {
    gap: 0;
  }

  .custom-set-editor-scroll {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .custom-set-editor-row__index {
    grid-column: 1;
    justify-self: start;
    width: 28px;
    min-width: 28px;
    height: 24px;
    padding: 0;
    font-weight: 800;
  }

  .supply-card--editor .supply-card__top-actions--editor-actions {
    width: 100%;
    justify-self: stretch;
    justify-content: center;
  }

  .supply-card--editor .supply-card__top-actions--editor-actions .supply-card__action {
    flex: 0 1 auto;
  }

  .modal-section {
    padding: 16px;
  }

  .supplies-workspace,
  .custom-workspace {
    height: auto;
    min-height: 0;
    padding: 18px;
  }

  .supplies-search {
    min-height: 0;
  }

  .swatch-capture-modal {
    padding: 10px;
  }

  .swatch-capture-modal__dialog {
    height: auto;
    min-height: 0;
    max-height: min(90vh, 920px);
    padding: 20px;
    gap: 14px;
    border-radius: 24px;
  }

  .swatch-capture-modal__head {
    flex-wrap: wrap;
    padding-right: 0;
  }

  .swatch-capture-modal__instruction {
    white-space: normal;
  }

  .swatch-capture-modal__toolbar {
    flex-wrap: wrap;
  }

  .swatch-capture-modal__close {
    margin-left: auto;
  }

  .swatch-capture-modal__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .swatch-capture-action {
    width: auto;
    padding-inline: 10px;
  }

  .swatch-capture-modal__head-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .swatch-capture-stage__frame {
    height: auto;
    max-height: 58vh;
  }

  .swatch-capture-stage__viewport {
    padding: 14px;
  }

  .swatch-capture-stage__markers,
  .swatch-capture-stage__canvas,
  .swatch-capture-stage__empty {
    inset: 14px;
  }

  .custom-set-editor-row.is-current {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .supplies-search__toolbar {
    width: 100%;
  }

  .supplies-results {
    width: 100%;
  }

  .modal-actions {
    flex-direction: column;
  }

  .supplies-preview-modal {
    padding: 12px;
  }

  .supplies-preview-modal__dialog {
    max-height: min(90vh, 840px);
    padding: 18px;
    border-radius: 24px;
  }

  .supplies-preview-modal__summary {
    min-height: 0;
    padding: 0;
  }

  .supplies-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .palette-preview-modal__body {
    grid-template-rows: auto auto auto;
  }

  .palette-preview-modal__summary {
    flex-direction: column;
    align-items: stretch;
  }

  .palette-preview-page {
    grid-template-columns: 1fr;
  }

  .palette-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .pages-view-modal__body {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .pages-view-modal__summary {
    align-items: flex-start;
  }

  .pages-view-modal__stats {
    max-width: none;
  }

}

@media (max-width: 500px) {
  .gallery-footer-tray__button {
    width: 100%;
    justify-content: center;
  }

  .palette-stack__hex {
    font-size: 0.82rem;
  }

  .supply-card__top {
    flex-direction: row;
    align-items: center;
  }

  .supply-card--editor .supply-card__top-actions--editor-actions {
    flex-wrap: wrap;
  }

  .supply-card__body {
    padding-right: 0;
  }

  .supply-card--editor {
    padding: 10px 12px 12px;
  }

  .supply-card__top--editor {
    column-gap: 10px;
  }

  .supplies-preview-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Paper studio visual system */
.canvas-card {
  background: var(--main-card-surface);
  border: 1px solid var(--paper-border);
  border-radius: 0;
  box-shadow:
    0 16px 32px rgba(60, 45, 25, 0.06),
    0 4px 10px rgba(60, 45, 25, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.pages-object-tracker,
.supplies-modal__dialog,
.supplies-preview-modal__dialog {
  background: var(--panel-surface);
  border: 1px solid var(--paper-border);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
}

.supplies-modal__dialog {
  background: var(--color-sand-dune);
  border-color: var(--paper-border-strong);
}

.supplies-collection {
  background: var(--gallery-surface);
  border-color: var(--paper-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 0 42px rgba(201, 184, 154, 0.12),
    0 16px 32px rgba(60, 45, 25, 0.04),
    0 4px 10px rgba(60, 45, 25, 0.025);
}

body[data-page="pages"] .pages-workspace.supplies-collection {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.supplies-workspace,
.custom-workspace,
.modal-section,
.supplies-search__toolbar,
.custom-set-editor-card,
.custom-set-editor-row,
.palette-stack__placeholder,
.pages-object__details-inner {
  background: var(--color-inner-surface);
  border: 1px solid var(--paper-border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--paper-shadow-soft);
}

.palette-card,
.supply-card,
.pages-object,
.pages-colour-row,
.supplies-result-card {
  background: var(--card-surface);
  border: 1px solid var(--paper-border);
  border-radius: 14px;
  box-shadow:
    0 10px 24px rgba(70, 55, 35, 0.05),
    0 2px 6px rgba(70, 55, 35, 0.04);
}

.palette-card:hover,
.supply-card:hover,
.supply-card:focus-within,
.pages-object:hover,
.pages-object:focus-within,
.supplies-result-card:hover {
  background: var(--color-card-paper);
  border-color: var(--paper-border-strong);
  box-shadow: var(--paper-shadow-soft);
  filter: none;
}

.palettes-gallery-grid__empty-panel,
.pages-gallery-grid__empty-panel,
.supplies-empty__panel {
  width: min(100%, 36rem);
  padding: 30px 36px;
  background: var(--main-card-surface);
  border: 1px dashed var(--paper-border-soft);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.supplies-grid__empty-state,
.pages-object-list__empty,
.pages-object__empty {
  width: min(100%, 28rem);
  padding: 22px 24px;
  background: var(--main-card-surface);
  border: 1px dashed var(--paper-border-soft);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
 .supply-card__action,
.custom-set-editor-row__index {
  border-radius: var(--radius-sm);
  border-color: var(--paper-border);
}
.supply-card__action{
  background: var(--color-floating-paper);
  color: var(--color-text);
  box-shadow: 0 4px 10px rgba(60, 45, 20, 0.04);
}

.palette-card::after,
.supply-card::after {
  width: 4px;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: var(--color-ash-grey);
  opacity: 0.82;
}

.pages-preview-panel__frame,
.swatch-capture-stage__frame {
  background: var(--color-inner-surface);
  border: 1px solid var(--paper-border-soft);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px rgba(80, 65, 45, 0.08);
}

.palette-card__body h2,
.palette-card__body h3,
.supply-card__body h2,
.supply-card__body h3,
.pages-object__name,
.palettes-gallery-grid__empty strong,
.pages-gallery-grid__empty strong,
.supplies-empty h2 {
  color: var(--color-text);
  letter-spacing: 0;
}

.palette-card__brand,
.supply-card__brand,
.pages-object__pin-meta,
.palettes-gallery-grid__empty p,
.pages-gallery-grid__empty p,
.supplies-empty p,
.supplies-modal__intro,
.modal-section__header p {
  color: var(--color-text-muted);
}

.brand-mark__script,
.palette-editor__title-view,
.pages-object-tracker__title-view,
.hero h1 {
  color: var(--color-text);
  letter-spacing: 0;
}

.supply-card__brand,
.palette-card__brand {
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.supply-card__body h2,
.supply-card__body h3,
.palette-card__body h2,
.palette-card__body h3 {
  font-family: var(--font-title);
  font-size: 1.42rem;
  font-weight: 700;
  line-height: 1.12;
}

.supply-card__swatches,
.palette-card__swatches {
  padding-top: 8px;
}

.swatch-row__item,
.swatch-row__item--large,
.palette-card__swatch,
.palette-modal__swatch {
  border-color: rgba(23, 20, 16, 0.28);
  box-shadow:
    0 1px 2px rgba(70, 55, 35, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.gallery-footer-tray,
.palette-editor__footer {
  border-top-color: var(--paper-border);
}

.gallery-footer-tray__helper {
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 1rem;
}

body[data-page="supplies"] .supplies-grid .supply-card {
  position: relative;
  overflow: hidden;
  padding: 6px;
  border-radius: 15px;
  background: #faf6f0;
  border: 1px solid color-mix(in srgb, var(--supply-accent, var(--paper-border)) 48%, var(--paper-border-soft));
  box-shadow:
    0 10px 22px rgba(60, 45, 25, 0.05),
    0 3px 8px rgba(60, 45, 25, 0.03);
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 220ms ease,
    background-color 220ms ease;
}

body[data-page="supplies"] .supplies-grid .supply-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 12px;
  border: 1px solid var(--gallery-surface);
  pointer-events: none;
  opacity: 0.95;
  transition: border-color 220ms ease, opacity 220ms ease;
}

body[data-page="supplies"] .supplies-grid .supply-card:hover,
body[data-page="supplies"] .supplies-grid .supply-card:focus-within {
  transform: translateY(-2px);
  background: #faf6f0;
  border-color: color-mix(in srgb, var(--supply-accent, var(--paper-border-strong)) 72%, var(--paper-border-strong));
  box-shadow:
    0 14px 28px rgba(60, 45, 25, 0.06),
    0 5px 12px rgba(60, 45, 25, 0.04);
}

body[data-page="supplies"] .supplies-grid .supply-card:hover::before,
body[data-page="supplies"] .supplies-grid .supply-card:focus-within::before {
  border-color: color-mix(in srgb, var(--paper-border) 72%, var(--supply-accent, var(--paper-border-soft)));
  opacity: 1;
}

body[data-page="supplies"] .supplies-grid .supply-card__frame {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-height: 100%;
  height: 100%;
  padding: 17px 17px 14px;
  border-radius: 14px;
  background: #faf6f0;
  border: 0;
  box-shadow: none;
}

body[data-page="supplies"] .supplies-grid .supply-card__header {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

body[data-page="supplies"] .supplies-grid .supply-card__logo {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(252, 249, 244, 0.99));
  border: 1px solid color-mix(in srgb, var(--paper-border) 72%, white);
  box-shadow:
    0 8px 22px rgba(70, 55, 35, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: var(--supply-logo-ink, var(--color-text));
  flex-shrink: 0;
}

body[data-page="supplies"] .supplies-grid .supply-card__logo span {
  font-family: var(--font-title);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: color-mix(in srgb, var(--supply-accent, var(--color-text)) 66%, var(--color-text));
}

body[data-page="supplies"] .supplies-grid .supply-card__heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body[data-page="supplies"] .supplies-grid .supply-card__eyebrow {
  position: static;
  width: auto;
  min-height: 0;
  padding: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

body[data-page="supplies"] .supplies-grid .supply-card__brand {
  margin: 0;
  color: rgba(47, 41, 53, 0.66);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

body[data-page="supplies"] .supplies-grid .supply-card__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--supply-accent, var(--color-ash-grey));
  border: 1.5px solid color-mix(in srgb, var(--supply-accent, var(--paper-border-strong)) 60%, white);
  color: white;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  box-shadow:
    0 4px 10px rgba(70, 55, 35, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  flex-shrink: 0;
}

body[data-page="supplies"] .supplies-grid .supply-card__status-mark {
  transform: translateY(-0.5px);
}

body[data-page="supplies"] .supplies-grid .supply-card__title {
  margin: 0;
  min-width: 0;
  font-family: var(--font-title);
  font-size: clamp(1.08rem, 1.4vw, 1.5rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.04em;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="supplies"] .supplies-grid .supply-card__divider {
  border-top: 1px dashed color-mix(in srgb, var(--paper-border) 74%, var(--paper-border-soft));
  opacity: 1;
  margin-top: 0;
}

body[data-page="supplies"] .supplies-grid .supply-card__meta {
  position: static;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  opacity: 1;
  transform: none;
}

body[data-page="supplies"] .supplies-grid .supply-card__editor-note {
  margin: 0;
  color: var(--color-text-muted);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.68rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

body[data-page="supplies"] .supplies-grid .supply-card__supporting {
  margin-top: auto;
  padding-top: 0;
}

body[data-page="supplies"] .supplies-grid .supply-card__footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 0;
  padding-top: 11px;
  border-top: 1px solid color-mix(in srgb, var(--paper-border) 58%, var(--paper-border-soft));
}

body[data-page="supplies"] .supplies-grid .supply-card__count {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  padding-right: 14px;
  border-right: 1px solid color-mix(in srgb, var(--paper-border) 55%, var(--paper-border-soft));
}

body[data-page="supplies"] .supplies-grid .supply-card__count strong {
  display: block;
  font-family: var(--font-title);
  font-size: 1.36rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

body[data-page="supplies"] .supplies-grid .supply-card__count span {
  display: block;
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body[data-page="supplies"] .supplies-grid .supply-card__swatches {
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  padding-top: 0;
}

body[data-page="supplies"] .supplies-grid .supply-card__swatches--peek .swatch-row__item,
body[data-page="supplies"] .supplies-grid .supply-card__swatches--peek .swatch-row__item--large {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

body[data-page="supplies"] .supplies-grid .supply-card__swatches--peek.is-single .swatch-row__item,
body[data-page="supplies"] .supplies-grid .supply-card__swatches--peek.is-single .swatch-row__item--large {
  width: 100%;
  height: 24px;
  flex: 1 1 100%;
  border-radius: 999px;
}

body[data-page="supplies"] .supplies-grid .swatch-row__item,
body[data-page="supplies"] .supplies-grid .swatch-row__item--large {
  border-color: rgba(23, 20, 16, 0.22);
  box-shadow:
    0 1px 2px rgba(70, 55, 35, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

body[data-page="supplies"] .supplies-grid .swatch-row__overflow {
  min-width: 34px;
  height: 34px;
  padding: 0 7px;
  border-radius: 999px;
  background: color-mix(in srgb, white 70%, var(--color-floral-white));
  border: 1px solid color-mix(in srgb, var(--supply-accent, var(--paper-border)) 38%, var(--paper-border-soft));
  color: var(--color-text-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

body[data-page="supplies"] .supplies-grid .supply-card__top-actions--editor-actions {
  position: static;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  justify-self: end;
  align-self: start;
  grid-column: 3;
  grid-row: 1;
  margin: 0;
}

body[data-page="supplies"] .supplies-grid .supply-card__top-actions--editor-actions .supply-card__action {
  min-height: 28px;
  padding-inline: 12px;
}

body[data-page="supplies"] .supplies-grid .supply-card__action {
  background: var(--color-floating-paper);
  border-color: var(--paper-border);
  color: var(--color-text);
  box-shadow: 0 4px 10px rgba(60, 45, 20, 0.04);
}

body[data-page="supplies"] .supplies-grid .supply-card__action:hover,
body[data-page="supplies"] .supplies-grid .supply-card__action:focus-visible {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--supply-accent-soft, var(--color-almond-silk)) 52%, var(--color-floral-white));
  border-color: color-mix(in srgb, var(--supply-accent, var(--paper-border)) 48%, var(--paper-border-strong));
  box-shadow: var(--paper-shadow-soft);
}

/* ============================================================
   Supplies Page — Visual Inspiration Match Pass
   ============================================================ */

/* Remove left accent bar — full card border carries the accent */
body[data-page="supplies"] .supplies-grid .supply-card::after {
  display: none;
}

/* Stronger, accent-colored border on the outer card */
body[data-page="supplies"] .supplies-grid .supply-card {
  border: 1.5px solid color-mix(in srgb, var(--supply-accent, var(--paper-border)) 48%, var(--paper-border-soft));
  border-radius: 16px;
  box-shadow:
    0 4px 16px rgba(60, 45, 20, 0.07),
    0 1px 4px rgba(60, 45, 20, 0.04);
}

body[data-page="supplies"] .supplies-grid .supply-card:hover,
body[data-page="supplies"] .supplies-grid .supply-card:focus-within {
  border-color: color-mix(in srgb, var(--supply-accent, var(--paper-border-strong)) 70%, var(--paper-border-strong));
  box-shadow:
    0 8px 24px rgba(60, 45, 20, 0.1),
    0 2px 8px rgba(60, 45, 20, 0.05);
}

/* Footer tray — subtle border-top */
body[data-page="supplies"] .supplies-footer-tray {
  padding-top: 11px;
}

/* Supply card heading — vertical alignment when logo is taller */
body[data-page="supplies"] .supplies-grid .supply-card__heading {
  padding-top: 6px;
}

/* Eyebrow row — compact gap */
body[data-page="supplies"] .supplies-grid .supply-card__eyebrow {
  gap: 8px;
}

/* =============================================================
   Supplies — Card Clipping Fix
   The @media (min-width: 768px) block forces grid-auto-rows to
   1/3 of the wrapper height (~183px), clipping swatches + count.
   These overrides restore a scrollable wrapper with auto-height cards.
   ============================================================= */

/* =============================================================
   Supplies — Inspiration Match Refinement
   Smaller logo · compact vertical · true pill medium tag · soft shadow
   ============================================================= */

/* Remove ::before inner border overlay — the 5px card padding gap + frame
   border already produce the inspiration's cream-mat-then-frame effect */
body[data-page="supplies"] .supplies-grid .supply-card::before {
  display: none;
}

/* Tight outer padding — 5px cream strip between card border and inner frame */
body[data-page="supplies"] .supplies-grid .supply-card {
  padding: 5px;
  box-shadow:
    0 2px 14px rgba(60, 45, 20, 0.06),
    0 1px 3px rgba(60, 45, 20, 0.03);
}

body[data-page="supplies"] .supplies-grid .supply-card:hover,
body[data-page="supplies"] .supplies-grid .supply-card:focus-within {
  box-shadow:
    0 6px 22px rgba(60, 45, 20, 0.09),
    0 2px 6px rgba(60, 45, 20, 0.04);
}

/* Logo: 54px — less dominant, matches inspiration proportions */
body[data-page="supplies"] .supplies-grid .supply-card__logo {
  width: 54px;
  height: 54px;
}

body[data-page="supplies"] .supplies-grid .supply-card__logo span {
  font-size: 1.28rem;
}

/* Header: narrower logo column, slightly tighter gap */
body[data-page="supplies"] .supplies-grid .supply-card__header {
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
}

/* Heading: small optical alignment for the smaller logo */
body[data-page="supplies"] .supplies-grid .supply-card__heading {
  padding-top: 3px;
}

/* Frame: tighter gap and padding for a more compact vertical feel */
body[data-page="supplies"] .supplies-grid .supply-card__frame {
  gap: 9px;
  padding: 14px 16px 14px;
  border-radius: 12px;
}

/* Divider: clean dashed line matching inspiration */
body[data-page="supplies"] .supplies-grid .supply-card__divider {
  border-top: 1px dashed color-mix(in srgb, var(--paper-border) 65%, transparent);
  opacity: 1;
}

/* =============================================================
   Supplies — Compact Pass 3
   Smaller badge · centred heading · compact pill · less tall cards
   ============================================================= */

/* Header: vertically centre heading column against logo circle */
body[data-page="supplies"] .supplies-grid .supply-card__header {
  align-items: center;
}

/* Heading: no top-pad offset needed when centre-aligned */
body[data-page="supplies"] .supplies-grid .supply-card__heading {
  padding-top: 0;
  gap: 3px;
}

/* Eyebrow: tighter gap so badge sits snug with the brand name */
body[data-page="supplies"] .supplies-grid .supply-card__eyebrow {
  gap: 5px;
}

/* Status badge: shrink from 28px → 18px so it reads as an inline tag */
body[data-page="supplies"] .supplies-grid .supply-card__status {
  width: 18px;
  height: 18px;
  font-size: 0.6rem;
  border-width: 1px;
  box-shadow: none;
}

/* Frame: one notch tighter for compact rhythm */
body[data-page="supplies"] .supplies-grid .supply-card__frame {
  gap: 8px;
}

/* =============================================================
   Supplies — Inspiration Accuracy Pass 5
   Hover-only delete · accent shadow · dashed swatch overflow
   ============================================================= */

/* Card: accent-coloured bottom-right shadow matching the inspiration */
body[data-page="supplies"] .supplies-grid .supply-card {
  box-shadow:
    3px 5px 0 color-mix(in srgb, var(--supply-accent, var(--paper-border)) 18%, transparent),
    0 2px 10px color-mix(in srgb, var(--supply-accent, var(--paper-border)) 8%, rgba(60, 45, 20, 0.04));
}

body[data-page="supplies"] .supplies-grid .supply-card:hover,
body[data-page="supplies"] .supplies-grid .supply-card:focus-within {
  box-shadow:
    3px 5px 0 color-mix(in srgb, var(--supply-accent, var(--paper-border)) 26%, transparent),
    0 4px 16px color-mix(in srgb, var(--supply-accent, var(--paper-border)) 12%, rgba(60, 45, 20, 0.06));
}

/* Swatch items: 22px — fits 8 swatches + overflow in the 3-col card width */
body[data-page="supplies"] .supplies-grid .supply-card__swatches--peek .swatch-row__item,
body[data-page="supplies"] .supplies-grid .supply-card__swatches--peek .swatch-row__item--large {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

/* Swatch overflow badge: dashed accent border + accent text colour */
body[data-page="supplies"] .supplies-grid .swatch-row__overflow {
  min-width: 22px;
  height: 22px;
  padding: 0 3px;
  font-size: 0.6rem;
  color: color-mix(in srgb, var(--supply-accent, var(--color-text-muted)) 85%, var(--color-text-muted));
  background: rgba(255, 255, 255, 0.78);
  border: 1.5px dashed color-mix(in srgb, var(--supply-accent, var(--paper-border)) 60%, var(--paper-border-soft));
}

/* =============================================================
   Supplies — Size Pass 4
   Smaller logo circle · smaller text to match inspiration proportions
   ============================================================= */

/* Logo: 46px — proportional to 3-column card width */
body[data-page="supplies"] .supplies-grid .supply-card__logo {
  width: 46px;
  height: 46px;
  box-shadow:
    0 4px 14px rgba(70, 55, 35, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body[data-page="supplies"] .supplies-grid .supply-card__logo span {
  font-size: 1.05rem;
}

/* Header column: match logo size */
body[data-page="supplies"] .supplies-grid .supply-card__header {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 11px;
}

/* Title: pull down to match inspiration scale */
body[data-page="supplies"] .supplies-grid .supply-card__title {
  font-size: clamp(0.96rem, 1.15vw, 1.22rem);
  letter-spacing: -0.03em;
}

/* Brand: fractionally smaller for better hierarchy */
body[data-page="supplies"] .supplies-grid .supply-card__brand {
  font-size: 0.67rem;
  letter-spacing: 0.15em;
}

/* =============================================================
   Supplies — Medium Pill Pass 6
   Simple tinted bg · dark icon + text · SVG via mask-image
   ============================================================= */

/* Final supplies-card layout override:
   no divider, more vertical room, title sits lower under the medium pill. */
body[data-page="supplies"] .supplies-grid .supply-card__divider {
  display: none;
}

body[data-page="supplies"] .supplies-grid .supply-card__header {
  min-height: 112px;
  align-items: stretch;
}

body[data-page="supplies"] .supplies-grid .supply-card__heading {
  height: 100%;
  justify-content: space-between;
}

body[data-page="supplies"] .supplies-grid .supply-card__header {
  min-height: 128px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 10px;
  align-items: center;
}

body[data-page="supplies"] .supplies-grid .supply-card__heading {
  display: contents;
}

body[data-page="supplies"] .supplies-grid .supply-card__logo {
  width: 58px;
  height: 58px;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
}

body[data-page="supplies"] .supplies-grid .supply-card__logo span {
  font-size: 1.18rem;
}

body[data-page="supplies"] .supplies-grid .supply-card__eyebrow {
  grid-column: 2;
  grid-row: 1;
  align-items: center;
  min-height: 28px;
  gap: 8px;
  align-self: center;
}

body[data-page="supplies"] .supplies-grid .supply-card__brand {
  font-size: 0.72rem;
}

body[data-page="supplies"] .supplies-grid .supply-card__status {
  width: 20px;
  height: 20px;
  font-size: 0.66rem;
}

body[data-page="supplies"] .supplies-grid .supply-card__title {
  grid-column: 1 / 3;
  grid-row: 2;
  align-self: center;
  justify-self: start;
  margin-top: 0;
  margin-left: 0;
  width: fit-content;
  max-width: 100%;
}

/* Final swatch spacing pass: spread the row across the available footer space. */
body[data-page="supplies"] .supplies-grid .supply-card__swatches {
  justify-content: space-between;
  gap: clamp(5px, 0.8vw, 11px);
  min-width: 0;
  width: 100%;
}

body[data-page="supplies"] .supplies-grid .supply-card__swatches .swatch-row__item,
body[data-page="supplies"] .supplies-grid .supply-card__swatches .swatch-row__item--large {
  width: clamp(18px, 2.15vw, 24px);
  height: clamp(18px, 2.15vw, 24px);
  flex: 0 0 auto;
}

body[data-page="supplies"] .supplies-grid .supply-card__swatches .swatch-row__overflow {
  flex: 0 0 auto;
}

/* Unify all card text with the nav-bar font stack. */
body[data-page="supplies"] .supplies-grid .supply-card,
body[data-page="supplies"] .supplies-grid .supply-card * {
  font-family: "Inter", system-ui, sans-serif;
}

/* Owned supply cards: medium pill lives under the brand/title stack. */
body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__header {
  min-height: 126px;
  grid-template-columns: 68px auto 1fr;
  align-items: start;
  column-gap: 14px;
  row-gap: 0;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__logo {
  width: 68px;
  height: 68px;
  align-self: start;
  margin-top: 2px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__logo span {
  font-size: 1.28rem;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 3px;
  padding-top: 8px;
  grid-column: 2;
  width: fit-content;
  max-width: 100%;
  justify-self: start;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__eyebrow {
  width: auto;
  max-width: 100%;
  padding: 0;
  gap: 8px;
  justify-content: flex-start;
  align-items: center;
  margin-top: 0;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__brand {
  color: rgba(47, 41, 53, 0.58);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__status {
  width: 20px;
  height: 20px;
  font-size: 0.66rem;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__title {
  margin-top: 0;
  width: fit-content;
  max-width: 100%;
  text-align: left;
  font-size: clamp(1.1rem, 1.28vw, 1.42rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__divider {
  display: block;
  margin-top: 3px;
  border-top: 1px dashed color-mix(in srgb, var(--paper-border) 74%, var(--paper-border-soft));
  opacity: 1;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  min-height: 0;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__footer {
  grid-template-columns: 1fr;
  padding-top: 6px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__swatches {
  grid-column: 1;
  padding-top: 0;
}

/* Pin the inspiration-style header layout so brand/title always sit beside the icon. */
body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__header {
  position: relative;
  display: block;
  min-height: 126px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__logo {
  position: absolute;
  left: 0;
  top: 2px;
  margin-top: 0;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__heading {
  position: absolute;
  left: 82px;
  top: 10px;
  display: block;
  width: calc(100% - 82px);
  max-width: calc(100% - 82px);
  padding-top: 0;
  text-align: left;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__eyebrow {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__brand,
body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__title {
  text-align: left;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__title {
  display: block;
  margin-top: 8px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__frame {
  gap: 0;
  padding: 15px 22px 10px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__header {
  position: relative;
  display: block;
  min-height: 72px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__logo {
  position: absolute;
  left: 0;
  top: 0;
  width: 60px;
  height: 60px;
  border: 1.5px solid rgba(178, 169, 156, 0.86);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(250, 247, 241, 0.99));
  box-shadow:
    0 6px 0 rgba(56, 48, 38, 0.09),
    0 11px 18px rgba(56, 48, 38, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__logo span {
  font-size: 1.48rem;
  font-weight: 700;
  letter-spacing: 0;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__heading {
  position: absolute;
  left: 82px;
  top: 12px;
  width: calc(100% - 82px);
  max-width: calc(100% - 82px);
  padding: 0;
  text-align: left;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__eyebrow {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  width: 100%;
  min-height: 24px;
  margin: 0;
  padding: 0;
  text-align: left;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__brand {
  margin: 0;
  color: rgba(28, 35, 42, 0.58);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__status {
  width: 19px;
  height: 19px;
  font-size: 0.62rem;
  transform: translateY(-1px);
  box-shadow:
    0 2px 6px color-mix(in srgb, var(--supply-accent, var(--paper-border)) 25%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__title {
  display: block;
  width: 100%;
  max-width: 24ch;
  margin: 11px 0 0;
  color: rgba(23, 20, 16, 0.96);
  font-size: clamp(1.06rem, 1.12vw, 1.22rem);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.08;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__divider {
  display: block;
  margin: 0 0 0 82px;
  border-top: 1.5px dashed rgba(190, 176, 156, 0.78);
  opacity: 1;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 47px;
  margin: 0;
  padding: 0 0 0 82px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__supporting {
  margin-top: auto;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__footer {
  container-type: inline-size;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  margin-top: 0;
  padding-top: 12px;
  border-top: 1.5px solid rgba(190, 176, 156, 0.7);
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__count {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  padding-right: 15px;
  border-right: 1.5px solid rgba(190, 176, 156, 0.68);
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__count strong {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__count span {
  margin-top: 2px;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__swatches {
  grid-column: 2;
  justify-content: space-between;
  gap: clamp(5px, 1.15cqw, 10px);
  min-width: 0;
  width: 100%;
  padding-top: 0;
  overflow: hidden;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__swatches .swatch-row__item,
body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__swatches .swatch-row__item--large {
  width: clamp(17px, 6.2cqw, 24px);
  height: clamp(17px, 6.2cqw, 24px);
  flex: 0 1 clamp(17px, 6.2cqw, 24px);
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__swatches .swatch-row__overflow {
  min-width: clamp(24px, 7cqw, 32px);
  height: clamp(24px, 7cqw, 32px);
  padding: 0 6px;
  border-style: solid;
  font-size: 0.72rem;
  font-weight: 500;
}

/* Button polish: neutral version of the medium-pill treatment. */
.button,
.btn,
.cc-button,
.button--primary,
.btn--primary,
.cc-button--primary,
.button--secondary,
.btn--secondary,
.cc-button--secondary,
.button--ghost,
.btn--ghost,
.cc-button--ghost {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border-width: 1.5px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
  box-shadow: none;
}

.button--primary,
.btn--primary,
.cc-button--primary {
  background: #ffdece;
  border-color: #efb69c;
  color: #171410;
  box-shadow:
    2px 3px 0 color-mix(in srgb, var(--paper-border) 56%, transparent),
    0 2px 8px rgba(35, 32, 26, 0.04);
}

.button--secondary,
.btn--secondary,
.cc-button--secondary,
.btn--ghost,
.cc-button--ghost {
  background: rgba(255, 252, 248, 0.74);
  border-color: rgba(203, 174, 151, 0.62);
  color: #171410;
  box-shadow:
    2px 3px 0 color-mix(in srgb, var(--paper-border) 56%, transparent),
    0 2px 8px rgba(35, 32, 26, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.button--ghost {
  background: color-mix(in srgb, var(--gallery-surface) 78%, white);
  border-color: color-mix(in srgb, var(--paper-border-soft) 82%, white);
  color: rgba(23, 20, 16, 0.76);
}

.button:hover,
.button:focus-visible,
.btn:hover,
.btn:focus-visible,
.cc-button:hover,
.cc-button:focus-visible {
  transform: translateY(-1px);
}

.button--primary:hover,
.button--primary:focus-visible,
.btn--primary:hover,
.btn--primary:focus-visible,
.cc-button--primary:hover,
.cc-button--primary:focus-visible {
  background: #ffc7ae;
  border-color: #e99b78;
  color: #171410;
  box-shadow:
    3px 4px 0 color-mix(in srgb, var(--paper-border) 62%, transparent),
    0 4px 12px rgba(35, 32, 26, 0.06);
}

.button--secondary:hover,
.button--secondary:focus-visible,
.btn--secondary:hover,
.btn--secondary:focus-visible,
.cc-button--secondary:hover,
.cc-button--secondary:focus-visible,
.btn--ghost:hover,
.btn--ghost:focus-visible,
.cc-button--ghost:hover,
.cc-button--ghost:focus-visible,
.button--ghost:hover,
.button--ghost:focus-visible {
  background: rgba(255, 249, 242, 0.9);
  border-color: rgba(190, 151, 124, 0.72);
  color: #171410;
  box-shadow:
    3px 4px 0 color-mix(in srgb, var(--paper-border) 62%, transparent),
    0 4px 12px rgba(35, 32, 26, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.button:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--paper-border-soft) 42%, transparent),
    0 5px 12px rgba(60, 45, 25, 0.045);
}

.button:disabled {
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

/* Center the medium pill in the space between the card dividers. */
body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__meta {
  flex: 1 1 auto;
  min-height: 0;
  align-items: center;
  justify-content: flex-start;
  padding-left: 82px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__supporting {
  flex: 0 0 auto;
  margin-top: 0;
}

/* Final card rhythm: give brand/title/divider/pill a calmer vertical spread. */
body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__header {
  min-height: 84px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__heading {
  top: 10px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__title {
  margin-top: 13px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__divider {
  margin-left: 82px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__meta {
  flex: 1 1 auto;
  min-height: 48px;
  padding-left: 82px;
}

/* Keep navigation, footer copy, and set names on one typographic voice. */
.brand-mark,
.brand-mark__script,
.brand-mark__word,
.site-nav a,
.mobile-panel a,
.gallery-footer-tray,
.gallery-footer-tray__helper,
.gallery-footer-tray__button-copy,
.palettes-gallery-panel__footer,
.palette-editor__footer,
.supply-card__title,
body[data-page="supplies"] .supplies-grid .supply-card__title,
body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__title,
.palette-card__body h2,
.palette-card__body h3,
.pages-gallery-tile__title {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--color-text);
}

.site-nav a {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: none;
  color: rgba(28, 35, 42, 0.58);
}

.mobile-panel a,
.gallery-footer-tray__helper {
  font-weight: 400;
}

/* Keep gallery surfaces just one warm tone off the card surface. */
.pages-preview-panel,
.pages-object-tracker,
.supplies-workspace,
.custom-workspace,
.modal-section,
.supplies-search__toolbar {
  background: var(--gallery-surface);
  border-color: var(--paper-border);
  box-shadow:
    3px 5px 0 color-mix(in srgb, var(--paper-border) 24%, transparent),
    0 3px 10px color-mix(in srgb, var(--paper-border) 18%, rgba(35, 32, 26, 0.035));
}

.supplies-modal__dialog,
.supplies-preview-modal__dialog,
.palette-modal__dialog,
.palette-preview-modal__dialog,
.pages-upload-modal__dialog,
.pages-view-modal__dialog {
  background: var(--gallery-surface);
}

.modal-section,
.supplies-result-card,
.custom-set-editor-card,
.custom-set-editor-row {
  background: var(--main-card-surface);
}

/* Sitewide button treatment: neutral medium-pill style. */
:where(
  .supplies-tab,
  .supply-card__action
) {
  background: color-mix(in srgb, var(--gallery-surface) 72%, var(--surface-card, white)) !important;
  border: 1.5px solid color-mix(in srgb, var(--paper-border) 58%, transparent) !important;
  border-radius: 14px !important;
  color: var(--color-text) !important;
  font-family: var(--font-body) !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
}

:where(
  .supplies-tab,
  .supply-card__action
):hover,
:where(
  .supplies-tab,
  .supply-card__action
):focus-visible {
  background: color-mix(in srgb, var(--gallery-surface) 56%, var(--surface-card, white)) !important;
  border-color: color-mix(in srgb, var(--paper-border) 56%, var(--color-tangerine-dream)) !important;
  color: var(--color-text) !important;
  box-shadow: 0 5px 12px rgba(35, 32, 26, 0.045) !important;
  outline: 0;
}

/* Modal reset: keep dialogs quiet, with fewer nested frames and lighter controls. */
.supplies-modal__dialog,
.supplies-preview-modal__dialog,
.palette-modal__dialog,
.palette-preview-modal__dialog,
.pages-upload-modal__dialog,
.pages-view-modal__dialog {
  background: var(--gallery-surface);
  border: 1px solid var(--paper-border-soft);
  box-shadow:
    0 18px 44px rgba(35, 32, 26, 0.12),
    0 4px 12px rgba(35, 32, 26, 0.06);
}

.supplies-modal .supplies-search__toolbar,
.supplies-modal .modal-section,
.palette-modal .modal-section,
.pages-upload-modal .modal-section {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.supplies-modal .supplies-search__toolbar,
.palette-modal .supplies-search__toolbar,
.pages-upload-modal .supplies-search__toolbar {
  gap: 11px;
  padding: 14px 0 0;
  border-radius: 0;
}

.supplies-modal .supplies-tabs {
  gap: 20px;
  width: 100%;
  margin-top: 2px;
  padding-bottom: 0;
  border-bottom: 1px solid var(--paper-border-soft);
}

.supplies-modal .supplies-tab,
.palette-modal .supplies-tab,
.pages-upload-modal .supplies-tab {
  min-height: 34px !important;
  padding: 0 0 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--color-text-muted) !important;
  box-shadow: none !important;
}

.supplies-modal .supplies-tab.is-active,
.palette-modal .supplies-tab.is-active,
.pages-upload-modal .supplies-tab.is-active {
  color: var(--color-text) !important;
  box-shadow: inset 0 -2px 0 var(--paper-border-strong) !important;
}

.supplies-modal .marker-search__input,
.palette-modal .marker-search__input,
.pages-upload-modal .marker-search__input {
  height: var(--cc-control-height);
  min-height: var(--cc-control-height);
  padding: 0 18px;
  border-radius: 12px;
  background: var(--main-card-surface) !important;
  border: 1.5px solid color-mix(in srgb, var(--paper-border) 58%, transparent) !important;
  color: rgba(23, 20, 16, 0.7);
  box-shadow: none !important;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: var(--cc-control-height);
}

.supplies-modal .marker-search__input:focus,
.palette-modal .marker-search__input:focus,
.pages-upload-modal .marker-search__input:focus {
  background: var(--main-card-surface) !important;
  border-color: color-mix(in srgb, var(--paper-border) 72%, transparent) !important;
  color: var(--color-text);
  box-shadow: none !important;
  outline: 0 !important;
}

.supplies-modal .cc-filter__button,
.palette-modal .cc-filter__button {
  justify-content: flex-start;
  min-width: 150px;
  gap: 8px;
}

.supplies-modal .cc-filter__button::after,
.palette-modal .cc-filter__button::after {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2.2px solid currentColor;
  border-bottom: 2.2px solid currentColor;
  opacity: 0.58;
  transform: translateY(-1px) rotate(45deg);
  transition: transform 160ms ease;
}

.supplies-modal .cc-filter__button.is-active::after,
.palette-modal .cc-filter__button.is-active::after {
  transform: translateY(2px) rotate(225deg);
}

.palette-modal .cc-filter__button[data-pages-colour-owned-toggle],
.palette-modal .cc-filter__button[data-palette-owned-toggle] {
  justify-content: flex-start;
  min-width: 0;
}

.palette-modal .cc-filter__button[data-pages-colour-owned-toggle]::after,
.palette-modal .cc-filter__button[data-palette-owned-toggle]::after {
  content: none;
}

/* Roomier desktop header: brand left, nav centered, account links right. */
@media (min-width: 768px) {
  .site-header {
    position: sticky;
    grid-template-columns: minmax(230px, 1fr) auto minmax(230px, 1fr);
    align-items: center;
    gap: clamp(16px, 1.8vw, 30px);
    width: calc(100% + (2 * var(--card-pad-x)));
    margin-left: calc(var(--card-pad-x) * -1);
    margin-right: calc(var(--card-pad-x) * -1);
    margin-bottom: clamp(8px, 1vw, 12px);
    padding: clamp(18px, 2.2vw, 26px) var(--card-pad-x);
    background: var(--cc-container-shell-surface);
    border: 0;
  }

  body[data-page="supplies"] .site-header,
  body[data-page="palettes"] .site-header,
  body[data-page="pages"] .site-header {
    margin-bottom: clamp(4px, 0.7vw, 8px);
  }

  .supplies-shell {
    padding-top: 0;
  }

  .brand-mark {
    grid-column: 1;
    justify-self: start;
    align-self: center;
  }

  .brand-mark__script,
  .brand-mark__word {
    font-size: clamp(1.95rem, 2.35vw, 2.3rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 0.95;
  }

  .site-nav {
    position: static;
    grid-column: 2;
    justify-self: center;
    align-self: center;
    transform: none;
    gap: clamp(14px, 1.45vw, 24px);
  }

  .site-nav a {
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: none;
    color: rgba(28, 35, 42, 0.58);
    line-height: 1;
  }

  .header-actions {
    grid-column: 3;
    justify-self: end;
    align-self: center;
    gap: clamp(16px, 1.8vw, 24px);
    transform: none;
  }

  .site-nav a::after,
  .header-link::after {
    bottom: -10px;
  }
}

body[data-page="palettes"] .palette-card__frame {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  min-height: 100%;
  height: 100%;
  padding: 15px 22px 10px;
  border-radius: 12px;
  background: #faf6f0;
}

body[data-page="palettes"] .palette-card__top {
  position: relative;
  display: block;
  min-height: 84px;
}

body[data-page="palettes"] .palette-card__logo {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--palette-accent, var(--paper-border)) 36%, var(--paper-border));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(250, 247, 241, 0.99));
  box-shadow:
    0 6px 0 rgba(56, 48, 38, 0.09),
    0 11px 18px rgba(56, 48, 38, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: color-mix(in srgb, var(--palette-accent, var(--color-text)) 72%, var(--color-text));
}

body[data-page="palettes"] .palette-card__logo span {
  display: block;
  font-size: 1.48rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

body[data-page="palettes"] .palette-card__eyebrow {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 24px;
  margin: 0;
}

body[data-page="palettes"] .palette-card__brand {
  display: inline-flex;
  min-height: 0;
  margin: 0;
  color: rgba(28, 35, 42, 0.58);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.1;
  text-transform: uppercase;
}

body[data-page="palettes"] .palette-card__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  background: var(--palette-accent, var(--paper-border));
  border: 1px solid color-mix(in srgb, var(--palette-accent, var(--paper-border-strong)) 58%, white);
  color: white;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  transform: translateY(-1px);
  box-shadow:
    0 2px 6px color-mix(in srgb, var(--palette-accent, var(--paper-border)) 25%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

body[data-page="palettes"] .palette-card__body {
  position: absolute;
  left: 82px;
  top: 10px;
  display: block;
  min-width: 0;
  width: calc(100% - 82px);
  max-width: calc(100% - 82px);
  margin: 0;
  padding: 0;
  text-align: left;
}

body[data-page="palettes"] .palette-card__body h2 {
  display: block;
  width: 100%;
  max-width: 24ch;
  margin: 13px 0 0;
  color: rgba(23, 20, 16, 0.96);
  font-size: clamp(1.06rem, 1.12vw, 1.22rem);
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.08;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="palettes"] .palette-card__divider {
  display: block;
  margin: 0 0 0 82px;
  border-top: 1px dashed color-mix(in srgb, var(--paper-border) 74%, var(--paper-border-soft));
  opacity: 1;
}

body[data-page="palettes"] .palette-card__meta {
  position: static;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-start;
  min-height: 48px;
  margin: 0;
  padding: 0 0 0 82px;
  opacity: 1;
  transform: none;
}

body[data-page="palettes"] .palette-card__tag-list {
  position: static;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

body[data-page="palettes"] .palette-card__solid-divider {
  display: none;
}

body[data-page="palettes"] .palette-card__footer {
  container-type: inline-size;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  margin-top: 0;
  padding-top: 12px;
  border-top: 1.5px solid rgba(190, 176, 156, 0.7);
}

body[data-page="palettes"] .palette-card__swatch-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page="palettes"] .palette-card__count {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  padding-right: 15px;
  border-right: 1.5px solid var(--paper-border);
}

body[data-page="palettes"] .palette-card__count strong {
  display: block;
  color: var(--color-text);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

body[data-page="palettes"] .palette-card__count span {
  display: block;
  margin-top: 2px;
  color: var(--color-text-muted);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

body[data-page="palettes"] .palette-card__swatches {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  gap: 0;
  min-width: 0;
  width: 100%;
  min-height: 24px;
  margin-top: 0;
  padding-top: 0;
  border: 0;
  overflow: hidden;
  border-radius: 999px;
  background: transparent;
}

body[data-page="palettes"] .palette-card__swatch-segment {
  display: block;
  flex: 1 1 0;
  min-width: 0;
  min-height: 24px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.cc-card-swatches.cc-card-swatches--supply .swatch-row__item,
.cc-card-swatches.cc-card-swatches--supply .swatch-row__item--large {
  border-color: rgba(23, 20, 16, 0.3);
  box-shadow:
    0 1px 2px rgba(70, 55, 35, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.cc-card-swatches--palette {
  position: relative;
}

.cc-card-swatches--palette::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border: 1.5px solid rgba(23, 20, 16, 0.24);
  border-radius: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

body[data-page="palettes"] .palette-card__swatch-segment--empty {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(190, 176, 156, 0.26) 0 8px,
      rgba(255, 255, 255, 0.34) 8px 16px
    ),
    color-mix(in srgb, var(--paper-border-soft) 34%, var(--color-floral-white));
  opacity: 0.72;
}

/* Desktop ellipsis action menus for Palettes and Supplies. */
@media (min-width: 761px) {
  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .palette-card.cc-card:has([data-palette-card-actions].is-open),
  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .supply-card.cc-card:has([data-supply-card-actions].is-open) {
    z-index: 40;
    overflow: visible;
  }

  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .palette-card.cc-card > .palette-card__frame > [data-palette-card-actions],
  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .supply-card.cc-card > .supply-card__frame > [data-supply-card-actions] {
    position: absolute;
    top: 10px;
    right: 14px;
    z-index: 50;
    display: block;
    width: auto;
    height: auto;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .palette-card.cc-card .palette-card__quick-action,
  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .supply-card.cc-card .supply-card__quick-action {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 34px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent !important;
    color: rgba(23, 20, 16, 0.92);
    box-shadow: none !important;
    cursor: pointer;
    filter: none !important;
    transform: none !important;
    transition: none !important;
  }

  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .palette-card.cc-card .palette-card__quick-action span,
  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .supply-card.cc-card .supply-card__quick-action span {
    display: block;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
  }

  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .palette-card.cc-card .palette-card__quick-action:hover,
  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .palette-card.cc-card .palette-card__quick-action:focus-visible,
  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .palette-card.cc-card [data-palette-card-actions].is-open .palette-card__quick-action,
  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .supply-card.cc-card .supply-card__quick-action:hover,
  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .supply-card.cc-card .supply-card__quick-action:focus-visible,
  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .supply-card.cc-card [data-supply-card-actions].is-open .supply-card__quick-action {
    background: transparent !important;
    outline: 0;
    transform: none !important;
  }

	  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .palette-card.cc-card .palette-card__action-menu,
	  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .supply-card.cc-card .supply-card__action-menu {
	    position: absolute;
	    top: calc(100% + 6px);
	    right: 0;
    z-index: 40;
    display: grid !important;
	    width: var(--cc-action-menu-width, 132px);
    padding: 6px;
    border: 1px solid color-mix(in srgb, var(--paper-border-soft) 72%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--main-card-surface) 94%, transparent);
    box-shadow:
      0 14px 28px rgba(56, 44, 35, 0.13),
      0 2px 8px rgba(56, 44, 35, 0.07);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px) scale(0.98);
    transform-origin: top right;
    transition:
      opacity 160ms ease,
      transform 160ms ease;
  }

  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .palette-card.cc-card [data-palette-card-actions].is-open .palette-card__action-menu,
  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .supply-card.cc-card [data-supply-card-actions].is-open .supply-card__action-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

	  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .palette-card.cc-card [data-palette-card-actions].is-open::after,
	  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .supply-card.cc-card [data-supply-card-actions].is-open::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 0;
	    width: var(--cc-action-menu-width, 132px);
    height: 8px;
    background: transparent;
  }

  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .palette-card.cc-card .palette-card__action-menu .palette-card__action-menu-item.palette-card__action-menu-item,
  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .supply-card.cc-card .supply-card__action-menu .supply-card__action-menu-item {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr) !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 9px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    height: auto !important;
    padding: 0 9px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--color-text) !important;
    font-family: var(--font-ui) !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    line-height: 1 !important;
    text-align: left !important;
  }

  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .palette-card.cc-card .palette-card__action-menu .palette-card__action-menu-item--delete,
  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .supply-card.cc-card .supply-card__action-menu .supply-card__action-menu-item--delete {
    color: color-mix(in srgb, #d93f3f 86%, var(--color-text)) !important;
  }

  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .palette-card.cc-card .palette-card__action-menu .palette-card__action-menu-item--delete.is-confirm,
  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .supply-card.cc-card .supply-card__action-menu .supply-card__action-menu-item--delete.is-confirm {
    background: color-mix(in srgb, #d93f3f 10%, transparent) !important;
  }

  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .palette-card.cc-card .palette-card__action-menu-icon {
    display: block;
    width: 17px;
    height: 17px;
    background: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
  }

  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .palette-card.cc-card .palette-card__action-menu-icon--view {
    -webkit-mask-image: url("./assets/icons/actions/view.svg");
    mask-image: url("./assets/icons/actions/view.svg");
  }

  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .palette-card.cc-card .palette-card__action-menu-icon--edit {
    -webkit-mask-image: url("./assets/icons/mediums/colored-pencil.svg");
    mask-image: url("./assets/icons/mediums/colored-pencil.svg");
  }

  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .palette-card.cc-card .palette-card__action-menu-icon--delete {
    -webkit-mask-image: url("./assets/icons/actions/delete.svg");
    mask-image: url("./assets/icons/actions/delete.svg");
  }
}

body[data-page="supplies"] .supply-card__action-menu-icon {
  display: block;
  width: 17px;
  height: 17px;
  background: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

body[data-page="supplies"] .supply-card__action-menu-icon--edit {
  -webkit-mask-image: url("./assets/icons/mediums/colored-pencil.svg");
  mask-image: url("./assets/icons/mediums/colored-pencil.svg");
}

body[data-page="supplies"] .supply-card__action-menu-icon:not(.supply-card__action-menu-icon--edit),
body[data-page="supplies"] .supply-card__action-menu-icon--delete {
  -webkit-mask-image: url("./assets/icons/actions/delete.svg");
  mask-image: url("./assets/icons/actions/delete.svg");
}

/* Desktop page cards: palette-card shell with the mobile page-card anatomy. */
@media (min-width: 761px) {
  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card {
    --gallery-card-accent: var(--page-card-accent, var(--paper-border));
    --page-card-preview-surface: color-mix(in srgb, var(--page-card-accent, var(--paper-border)) 11%, #fff8ec);
    --page-card-preview-border: color-mix(in srgb, var(--page-card-accent, var(--paper-border)) 26%, var(--paper-border));
    padding: 5px;
    border-radius: 16px;
    overflow: visible;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:nth-child(6n + 1) {
    --page-card-accent: #8fa1a0;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:nth-child(6n + 2) {
    --page-card-accent: #e7bdc3;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:nth-child(6n + 3) {
    --page-card-accent: #9fb8cc;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:nth-child(6n + 4) {
    --page-card-accent: #ddb96e;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:nth-child(6n + 5) {
    --page-card-accent: #f2cf7c;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:nth-child(6n + 6) {
    --page-card-accent: #d8b99d;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__button {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: max-content minmax(0, 1fr);
    grid-template-areas:
      "title"
      "thumb";
    align-content: stretch;
    align-items: stretch;
    row-gap: 11px;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 16px 22px 15px;
    border-radius: 12px;
    overflow: hidden;
    background: #faf6f0;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__content {
    display: contents;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__source {
    display: none;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__mobile-title {
    grid-area: title;
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0 46px;
    overflow: hidden;
    color: var(--color-text);
    font-family: var(--font-title);
    font-size: clamp(1.1rem, 1.2vw, 1.26rem);
    font-weight: 830;
    letter-spacing: -0.034em;
    line-height: 1.08;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__frame {
    grid-area: thumb;
    align-self: stretch;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--page-card-preview-border);
    border-radius: 8px;
    background: var(--page-card-preview-surface);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.7),
      0 6px 14px rgba(60, 45, 20, 0.035);
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__frame::after,
  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__title {
    display: none;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: none;
    filter: none;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:is(:hover, :focus-visible, :focus-within) .pages-gallery-tile__image {
    transform: scale(1.01);
    filter: saturate(1.02) contrast(1.01);
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__divider {
    display: none;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__footer {
    display: none;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__object-count {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    color: var(--color-text-muted);
    line-height: 0.92;
    text-transform: uppercase;
    white-space: nowrap;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__object-count strong {
    display: inline-block;
    color: var(--color-text);
    font-size: clamp(1.12rem, 1.35vw, 1.34rem);
    font-weight: 850;
    letter-spacing: -0.04em;
    line-height: 0.92;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__object-count span {
    display: inline-block;
    color: var(--color-text-muted);
    font-size: clamp(0.54rem, 0.64vw, 0.62rem);
    font-weight: 800;
    letter-spacing: 0.066em;
    line-height: 0.92;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card > .gallery-card__actions {
    top: 13px;
    right: 16px;
    z-index: 12;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card > .gallery-card__actions > * {
    display: none !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card > .gallery-card__actions > .pages-gallery-tile__quick-action {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 34px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(23, 20, 16, 0.92);
    box-shadow: none;
    cursor: pointer;
    transform: none;
    transition: none;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card > .gallery-card__actions > .pages-gallery-tile__quick-action span {
    display: block;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card > .gallery-card__actions.is-open > .pages-gallery-tile__quick-action,
  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card > .gallery-card__actions > .pages-gallery-tile__quick-action:hover,
  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card > .gallery-card__actions > .pages-gallery-tile__quick-action:focus-visible {
    background: transparent;
    outline: 0;
    transform: none;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card > .gallery-card__actions > .pages-gallery-tile__action-menu {
    display: grid !important;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 40;
    width: 132px;
    padding: 6px;
    border: 1px solid color-mix(in srgb, var(--paper-border-soft) 72%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--main-card-surface) 94%, transparent);
    box-shadow:
      0 14px 28px rgba(56, 44, 35, 0.13),
      0 2px 8px rgba(56, 44, 35, 0.07);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px) scale(0.98);
    transform-origin: top right;
    transition:
      opacity 160ms ease,
      transform 160ms ease;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card > .gallery-card__actions.is-open::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 0;
    width: 132px;
    height: 8px;
    background: transparent;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card > .gallery-card__actions.is-open > .pages-gallery-tile__action-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__action-menu .palette-card__action-menu-item.palette-card__action-menu-item {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr) !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 9px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    height: auto !important;
    padding: 0 9px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--color-text) !important;
    font-family: var(--font-ui) !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    line-height: 1 !important;
    text-align: left !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__action-menu .palette-card__action-menu-item span:not(.palette-card__action-menu-icon) {
    min-width: 0;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__action-menu .palette-card__action-menu-item:hover,
  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__action-menu .palette-card__action-menu-item:focus-visible {
    background: color-mix(in srgb, var(--page-card-accent, var(--paper-border)) 10%, transparent) !important;
    outline: 0;
    transform: none !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__action-menu .palette-card__action-menu-item--delete {
    color: color-mix(in srgb, #d93f3f 86%, var(--color-text)) !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__action-menu .palette-card__action-menu-item--delete.is-confirm {
    background: color-mix(in srgb, #d93f3f 10%, transparent) !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__action-menu .palette-card__action-menu-icon {
    display: block;
    width: 17px;
    height: 17px;
    background: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__action-menu .palette-card__action-menu-icon--view {
    -webkit-mask-image: url("./assets/icons/actions/view.svg");
    mask-image: url("./assets/icons/actions/view.svg");
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__action-menu .palette-card__action-menu-icon--edit {
    -webkit-mask-image: url("./assets/icons/mediums/colored-pencil.svg");
    mask-image: url("./assets/icons/mediums/colored-pencil.svg");
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__action-menu .palette-card__action-menu-icon--delete {
    -webkit-mask-image: url("./assets/icons/actions/delete.svg");
    mask-image: url("./assets/icons/actions/delete.svg");
  }
}

body[data-page="palettes"] .palette-stack__overlay {
  color: var(--palette-hover-ink, rgba(255, 255, 255, 0.98));
}

body[data-page="palettes"] .palette-stack__info {
  left: 14px;
  max-width: min(58%, 300px);
  color: var(--palette-hover-ink, rgba(255, 255, 255, 0.98));
}

body[data-page="palettes"] .palette-stack__copy {
  gap: 2px;
}

body[data-page="palettes"] .palette-stack__meta {
  color: var(--palette-hover-ink-soft, rgba(255, 255, 255, 0.88));
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0;
  opacity: 1;
}

body[data-page="palettes"] .palette-stack__copy strong {
  color: var(--palette-hover-ink, rgba(255, 255, 255, 0.98));
  font-size: clamp(0.96rem, 1.15vw, 1.1rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  opacity: 1;
}

body[data-page="palettes"] .palette-stack__actions {
  right: 14px;
  column-gap: 13px;
  color: var(--palette-hover-ink, rgba(255, 255, 255, 0.98));
}

body[data-page="palettes"] .palette-stack__hex {
  color: var(--palette-hover-ink, rgba(255, 255, 255, 0.98));
  font-size: clamp(1.14rem, 1.95vw, 1.38rem);
  font-weight: 750;
  opacity: 1;
}

body[data-page="palettes"] .palette-stack__copy-button-icons {
  width: 17px;
  height: 17px;
}

body[data-page="palettes"] .palette-stack__delete-icon {
  width: 16px;
  height: 16px;
}

/* =============================================================
   Typography pass
   Titles use Inter; smaller UI and body copy use Manrope.
   ============================================================= */
body {
  font-family: var(--font-body);
}

:where(
  p,
  li,
  a,
  button,
  input,
  textarea,
  select,
  label,
  small,
  dt,
  dd,
  figcaption,
  .button,
  .header-link,
  .site-nav a,
  .mobile-panel a,
  .hero-text,
  .hero-footer-quote,
  .gallery-footer-tray,
  .gallery-footer-tray__helper,
  .gallery-footer-tray__button-copy,
  .supplies-tab,
  .field,
  .field span,
  .search-empty,
  .search-result__line,
  .search-result__pill,
  .search-result__button,
  .marker-search__input,
  .palette-card__brand,
  .palette-card__eyebrow,
  .palette-card__meta,
  .palette-stack__meta,
  .palette-stack__hex,
  .palette-stack__copy-button,
  .palette-stack__icon-button,
  .pages-view-modal__meta-line,
  .pages-upload-modal__field,
  .pages-upload-modal__dropzone-copy,
  .pages-tag-modal__chip,
  .supply-card__brand,
  .supply-card__eyebrow,
  .supply-card__meta,
  .supply-card__action,
  .supply-card__count span,
  .supply-card__supporting,
  .supply-chip,
  .supplies-recent__chip,
  .supplies-preview-modal__eyebrow,
  .supplies-preview-modal__meta,
  .supplies-preview-modal__detail,
  .supplies-preview-tile__label p,
  .palette-preview-tile__brand,
  .palette-tag-modal__empty,
  .palette-tag-modal__tag-input,
  .palette-tag-modal__tag-remove,
  .palette-tag-modal__add-btn,
  .palette-details-modal__field,
  .swatch-capture-modal__copy,
  .swatch-capture-modal__field,
  .swatch-capture-action,
  .swatch-row__overflow
) {
  font-family: var(--font-body);
}

:where(
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  .brand-mark,
  .brand-mark__script,
  .brand-mark__word,
  [class*="__title"],
  [class*="-title"],
  [class*="__heading"],
  [class*="-heading"],
  .hero h1,
  .palette-card__body h2,
  .palette-card__body h3,
  .palette-editor__title-view,
  .pages-object-tracker__title-view,
  .pages-object-tracker__title-input,
  .pages-gallery-tile__title,
  .supply-card__title,
  .supply-card__logo span,
  .supplies-empty h2,
  .supplies-preview-modal__copy h4,
  .supplies-preview-tile__label h5,
  .palette-preview-page__copy h5,
  .palette-tag-modal__head h3,
  .palette-tag-modal__section-title,
  .modal-section__header h3,
  .supplies-modal__head h2,
  .supplies-preview-modal__head h3,
  .hero-stats dd,
  .palette-stack__copy strong,
  .palette-stack__copy strong span
) {
  font-family: var(--font-title);
}

/* Three-font system: Fraunces display, Krub copy, Inter interface. */
:where(
  p,
  li,
  figcaption,
  .hero-text,
  .search-empty,
  .palette-editor__description-view,
  .palettes-gallery-grid__empty p,
  .supplies-empty p,
  .swatch-capture-modal__copy,
  .pages-upload-modal__dropzone-copy
) {
  font-family: "Inter", system-ui, sans-serif;
}

:where(
  a,
  button,
  input,
  textarea,
  select,
  label,
  small,
  dt,
  dd,
  .button,
  .header-link,
  .site-nav a,
  .mobile-panel a,
  .brand-mark,
  .brand-mark__script,
  .brand-mark__word,
  .gallery-footer-tray__button-copy,
  .supplies-tab,
  .field span,
  .search-result__line,
  .search-result__pill,
  .search-result__button,
  .marker-search__input,
  .palette-card__brand,
  .palette-card__eyebrow,
  .palette-card__meta,
  .palette-stack__meta,
  .palette-stack__hex,
  .palette-stack__copy-button,
  .palette-stack__icon-button,
  .pages-view-modal__meta-line,
  .pages-upload-modal__field,
  .pages-tag-modal__chip,
  .supply-card__brand,
  .supply-card__eyebrow,
  .supply-card__meta,
  .supply-card__action,
  .supply-card__count span,
  .supply-chip,
  .supplies-recent__chip,
  .palette-preview-tile__brand,
  .palette-tag-modal__tag-input,
  .palette-tag-modal__tag-remove,
  .palette-tag-modal__add-btn,
  .palette-details-modal__field,
  .swatch-capture-modal__field,
  .swatch-capture-action,
  .swatch-row__overflow
) {
  font-family: var(--font-ui);
}

/* Palette editor strip labels: all hover text is Inter and scales with strip size. */
.palette-stack__item {
  container-type: size;
}

.palette-stack__overlay,
.palette-stack__info,
.palette-stack__copy,
.palette-stack__copy span,
.palette-stack__copy strong,
.palette-stack__meta,
.palette-stack__hex,
.palette-stack__more,
.palette-stack__more strong,
.palette-stack__more span {
  font-family: var(--font-title) !important;
}

.palette-stack__overlay {
  color: var(--palette-hover-ink, #ffffff);
}

.palette-stack__info {
  left: clamp(10px, 2.4cqw, 24px);
  max-width: min(68cqw, calc(100% - 190px));
  color: var(--palette-hover-ink, #ffffff);
  text-shadow: var(--palette-hover-text-shadow, none);
}

.palette-stack__copy {
  gap: clamp(2px, 2.4cqh, 6px);
}

.palette-stack__copy span,
.palette-stack__copy strong,
.palette-stack__hex,
.palette-stack__more strong,
.palette-stack__more span {
  color: var(--palette-hover-ink, #ffffff) !important;
}

.palette-stack__meta {
  color: var(--palette-hover-ink-soft, var(--palette-hover-ink, #ffffff)) !important;
  opacity: 0.58;
}

.palette-stack__copy strong {
  font-size: clamp(18px, min(36cqh, 4.2cqw), 34px);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  max-width: 100%;
}

.palette-stack__meta {
  font-size: clamp(10px, min(15cqh, 1.45cqw), 15px);
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1;
  max-width: 100%;
}

.palette-stack__hex {
  font-size: clamp(20px, min(32cqh, 2.8cqw), 32px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  opacity: 0.92;
}

.palette-stack__actions {
  right: clamp(10px, 2.4cqw, 24px);
  column-gap: clamp(10px, 2.2cqw, 22px);
}

.palette-stack__more strong {
  font-size: clamp(16px, min(34cqh, 4cqw), 34px);
  letter-spacing: 0;
  line-height: 1;
}

.palette-stack__more span {
  font-size: clamp(10px, min(16cqh, 1.7cqw), 16px);
  letter-spacing: 0;
}

/* Shared modal skin: soft paper surface with the compact Add Page treatment. */
.supplies-modal__backdrop,
.supplies-preview-modal__backdrop,
.palette-tag-modal__backdrop,
.swatch-capture-modal__backdrop {
  background: rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(12px);
}

.supplies-modal__dialog,
.supplies-preview-modal__dialog,
.palette-modal__dialog,
.palette-preview-modal__dialog,
.pages-upload-modal__dialog,
.pages-view-modal__dialog,
.palette-tag-modal__dialog,
.pages-tag-modal__dialog,
.palette-details-modal__dialog,
.swatch-capture-modal__dialog {
  background: var(--gallery-surface) !important;
  border: 1px solid var(--paper-border-soft) !important;
  border-radius: 20px !important;
  box-shadow:
    0 24px 58px rgba(35, 32, 26, 0.14),
    0 5px 14px rgba(35, 32, 26, 0.06) !important;
}

.supplies-modal__head,
.supplies-preview-modal__head,
.palette-tag-modal__head,
.swatch-capture-modal__head,
.pages-upload-modal__head {
  align-items: center;
}

.supplies-modal__head h2,
.supplies-preview-modal__head h3,
.palette-tag-modal__head h3,
.swatch-capture-modal__head h2,
.pages-upload-modal__head h2 {
  color: var(--color-text);
  font-family: var(--font-title) !important;
  font-size: clamp(1.8rem, 2.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.swatch-capture-modal__head {
  align-items: start;
}

body:is([data-page="palettes"], [data-page="pages"]) .preview-modal.supplies-preview-modal {
  padding: clamp(18px, 3vw, 42px);
}

body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__dialog {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 22px;
  width: min(100%, 900px);
  max-height: min(86vh, 840px);
  padding: clamp(28px, 3vw, 40px);
  overflow: hidden;
}

body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__header {
  align-items: flex-start;
}

body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__heading {
  display: grid;
  gap: 10px;
  min-width: 0;
}

body[data-page="pages"] .pages-view-modal__heading {
  width: 100%;
  padding-right: clamp(52px, 7vw, 76px);
}

body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__header h3 {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-title) !important;
  font-size: clamp(2.5rem, 4.4vw, 3.25rem);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.supplies-preview-modal .supplies-preview-modal__head h3,
.supplies-preview-modal.is-set-preview .supplies-preview-modal__head h3,
.supplies-preview-modal.is-marker-preview .supplies-preview-modal__head h3,
body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__header h3 {
  display: none !important;
}

.supplies-preview-modal .supplies-preview-modal__head {
  position: absolute;
  top: clamp(18px, 2.4vw, 32px);
  right: clamp(18px, 2.4vw, 32px);
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.supplies-preview-modal .supplies-preview-modal__head .supplies-modal__close {
  pointer-events: auto;
}

body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__header {
  position: static;
  display: flex;
  justify-content: space-between;
  gap: clamp(18px, 3vw, 42px);
  align-items: flex-start;
  pointer-events: auto;
}

body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__header .supplies-modal__close {
  position: absolute;
  top: clamp(18px, 2.4vw, 32px);
  right: clamp(18px, 2.4vw, 32px);
  z-index: 3;
}

body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__kicker {
  margin: 0;
  color: rgba(28, 35, 42, 0.58);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__title {
  margin: 0;
  max-width: 46rem;
  color: rgba(23, 20, 16, 0.96);
  font-family: var(--font-title) !important;
  font-size: clamp(2.2rem, 3.7vw, 3rem);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}

body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__subtitle {
  margin: 0;
  max-width: 42rem;
  color: rgba(38, 43, 51, 0.64);
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.25vw, 1.08rem);
  font-weight: 650;
  line-height: 1.35;
}

body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__subtitle[hidden] {
  display: none !important;
}

body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  margin: 4px 0 0;
  padding: 0;
  max-width: none;
}

body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__chip,
body:is([data-page="palettes"], [data-page="pages"]) .palette-preview-modal__stat {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--paper-border) 66%, transparent);
  background: var(--main-card-surface);
  color: rgba(38, 43, 51, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  cursor: default;
  transition: none;
}

body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__chip[hidden],
body:is([data-page="palettes"], [data-page="pages"]) .palette-preview-modal__stat[hidden] {
  display: none !important;
}

body:is([data-page="palettes"], [data-page="pages"]) .palette-preview-modal__stat:hover {
  transform: none;
  background: var(--main-card-surface);
  border-color: color-mix(in srgb, var(--paper-border) 66%, transparent);
}

body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 22px;
  min-height: 0;
  overflow: hidden;
}

body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__divider {
  height: 1px;
  background: color-mix(in srgb, var(--paper-border-soft) 78%, transparent);
}

body[data-page="palettes"] .palette-preview-modal__grid {
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: clamp(20px, 2.3vw, 30px) clamp(18px, 2vw, 28px);
  min-height: 0;
  overflow: auto;
  padding: 0 2px 2px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body[data-page="palettes"] .palette-preview-modal__grid::-webkit-scrollbar {
  display: none;
}

body[data-page="palettes"] .palette-preview-tile {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page="palettes"] .palette-preview-tile__swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 0;
  box-shadow: none;
}

body[data-page="palettes"] .palette-preview-tile__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

body[data-page="palettes"] .palette-preview-tile__code {
  color: rgba(23, 20, 16, 0.96);
  font-size: 0.92rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
}

body[data-page="palettes"] .palette-preview-tile__copy h5,
body[data-page="palettes"] .palette-preview-tile__brand,
body[data-page="palettes"] .palette-preview-tile__medium {
  color: rgba(38, 43, 51, 0.64);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.15;
}

body[data-page="palettes"] .palette-preview-tile__copy > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="palettes"] .preview-modal__footer-section {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--paper-border-soft) 78%, transparent);
  background: color-mix(in srgb, var(--gallery-surface) 86%, white);
  box-shadow: none;
}

body[data-page="palettes"] .palette-preview-modal__section-head h4 {
  color: rgba(31, 36, 48, 0.88);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 850;
  letter-spacing: 0;
}

body[data-page="palettes"] .palette-preview-modal__section--page .palette-preview-page-list {
  max-height: 160px;
  padding: 0;
}

body[data-page="palettes"] .palette-preview-page {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
}

body[data-page="palettes"] .palette-preview-page__thumb {
  border-radius: 10px;
  background: color-mix(in srgb, var(--gallery-surface) 76%, white);
}

body[data-page="pages"] .pages-view-modal__dialog {
  width: min(calc(100% - 32px), 980px);
  max-height: min(90vh, 880px);
}

body[data-page="pages"] .pages-view-modal__body {
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding-right: 0;
}

body[data-page="pages"] .pages-view-modal__section--page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page="pages"] .pages-view-modal__image-shell {
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(100%, 675px, 70vh);
  height: auto;
  aspect-ratio: 5 / 4;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  padding: 0;
  border-radius: 14px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body[data-page="pages"] .pages-view-modal__image-shell.is-empty {
  min-height: 0;
  background:
    linear-gradient(135deg, rgba(255, 250, 247, 0.76), rgba(246, 238, 232, 0.68)),
    rgba(255, 252, 249, 0.7);
}

body[data-page="pages"] .pages-view-modal__image {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
  object-position: center center;
  border-radius: inherit;
}

body[data-page="pages"] .pages-view-modal__objects {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  margin: 4px 0 0;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page="pages"] .pages-view-modal__objects-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

body[data-page="pages"] .pages-view-modal__objects h4 {
  margin: 0;
  color: rgba(28, 35, 42, 0.58);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

body[data-page="pages"] .pages-view-modal__object-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
}

body[data-page="pages"] .pages-view-modal__object-chip,
body[data-page="pages"] .pages-view-modal__object-empty {
  display: inline-flex;
  align-items: center;
  max-width: 12rem;
  min-height: 34px;
  padding: 0 14px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--paper-border) 66%, transparent);
  background: var(--main-card-surface);
  color: rgba(38, 43, 51, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="pages"] .pages-view-modal__object-empty {
  max-width: none;
  color: rgba(38, 43, 51, 0.5);
}

body[data-page="pages"] .pages-view-modal__objects-count {
  display: flex;
  align-items: center;
  min-width: 0;
  padding-left: 0;
  border-left: 0;
}

body[data-page="pages"] .pages-view-modal__objects-count strong {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--paper-border) 66%, transparent);
  background: var(--main-card-surface);
  color: rgba(38, 43, 51, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

body[data-page="pages"] .pages-view-modal__objects-count span {
  display: none;
}

@media (max-width: 760px) {
  body:is([data-page="palettes"], [data-page="pages"]) .preview-modal.supplies-preview-modal {
    padding: 12px;
  }

  body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__dialog {
    max-height: min(90vh, 840px);
    padding: 20px;
    border-radius: 20px;
  }

  body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__body {
    gap: 18px;
  }

  body:is([data-page="palettes"], [data-page="pages"]) .preview-modal__title {
    font-size: clamp(1.75rem, 9vw, 2.3rem);
  }

  body[data-page="palettes"] .palette-preview-modal__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="palettes"] .palette-preview-page {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  body[data-page="pages"] .pages-view-modal__objects {
    align-items: flex-start;
  }

  body[data-page="pages"] .pages-view-modal__objects-count {
    padding-left: 0;
    border-top: 0;
    border-left: 0;
  }

  body[data-page="pages"] .pages-view-modal__dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: clamp(14px, 3.8vw, 18px);
    height: 100svh;
    padding: clamp(20px, 5.4vw, 26px) clamp(18px, 5vw, 24px) calc(clamp(20px, 5.4vw, 26px) + env(safe-area-inset-bottom));
    overflow: hidden !important;
  }

  body[data-page="pages"] .pages-view-modal__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px;
    align-items: start;
    gap: 14px;
    min-height: 0;
  }

  body[data-page="pages"] .pages-view-modal__heading {
    min-width: 0;
    gap: 8px;
  }

  body[data-page="pages"] .pages-view-modal__meta-line {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: rgba(47, 41, 53, 0.62);
    font-size: clamp(0.86rem, 3.5vw, 0.98rem);
    font-weight: 760;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-page="pages"] .pages-view-modal__objects {
    margin-top: 4px;
  }

  body[data-page="pages"] .pages-view-modal__objects-count strong {
    min-height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: rgba(47, 41, 53, 0.66);
    font-size: 0.86rem;
    font-weight: 860;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  body[data-page="pages"] .pages-view-modal__body {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    min-height: 0;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-view-modal__divider {
    display: none;
  }

  body[data-page="pages"] .pages-view-modal__section--page {
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
    gap: clamp(10px, 3vw, 14px);
    min-height: 0;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-view-modal__image-controls {
    gap: 0;
  }

  body[data-page="pages"] .pages-view-modal__image-controls .page-image-helper {
    display: none;
  }

  body[data-page="pages"] .pages-view-modal__image-shell {
    justify-self: center;
    align-self: start;
    width: min(100%, 72svh);
    height: auto;
    max-height: none;
    aspect-ratio: 5 / 4;
    border-radius: 16px;
    background: color-mix(in srgb, var(--main-card-surface) 78%, var(--color-peach-fuzz) 12%);
    border: 1px solid color-mix(in srgb, var(--paper-border) 58%, transparent);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.7),
      0 10px 22px rgba(130, 100, 123, 0.06);
  }

  body[data-page="pages"] .pages-view-modal__image {
    object-fit: cover;
  }

}

.supplies-modal input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
.supplies-modal textarea,
.supplies-modal select,
.supplies-preview-modal input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
.supplies-preview-modal textarea,
.supplies-preview-modal select,
.palette-tag-modal input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
.palette-tag-modal textarea,
.palette-tag-modal select,
.swatch-capture-modal input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
.swatch-capture-modal textarea,
.swatch-capture-modal select {
  min-height: 42px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--color-floral-white) 74%, white) !important;
  border: 1.5px solid var(--modal-field-border) !important;
  box-shadow: none !important;
}

.supplies-modal input:focus,
.supplies-modal textarea:focus,
.supplies-modal select:focus,
.supplies-preview-modal input:focus,
.supplies-preview-modal textarea:focus,
.supplies-preview-modal select:focus,
.palette-tag-modal input:focus,
.palette-tag-modal textarea:focus,
.palette-tag-modal select:focus,
.swatch-capture-modal input:focus,
.swatch-capture-modal textarea:focus,
.swatch-capture-modal select:focus {
  border-color: var(--modal-field-border-focus) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-peach-fuzz) 24%, transparent) !important;
}

.pages-upload-modal__dropzone,
.palette-tag-modal__empty,
.modal-section,
.palette-modal__results {
  background: color-mix(in srgb, var(--gallery-surface) 82%, white) !important;
  border-color: var(--modal-field-border) !important;
  box-shadow: none !important;
}

.pages-upload-modal__dropzone {
  border-radius: 18px !important;
  border: 2px dashed color-mix(in srgb, var(--paper-border-soft) 76%, white) !important;
  outline: none !important;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--gallery-surface) 88%, white),
      color-mix(in srgb, var(--gallery-surface) 78%, white)
    ) !important;
  background-clip: padding-box;
}

.pages-upload-modal__dropzone:focus-within {
  outline: none !important;
  border-color: var(--paper-border-soft) !important;
}

.pages-upload-modal__dropzone .supply-card__plus {
  width: 54px;
  height: 54px;
  border: 1.5px solid var(--paper-border) !important;
  background: transparent !important;
  color: var(--color-text);
  box-shadow: none !important;
}

.palette-tag-modal__tag-remove {
  border-color: var(--modal-field-border) !important;
}

/* Global field focus: soft orange active border/glow for all text inputs. */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):focus,
textarea:focus,
select:focus,
.marker-search__input:focus,
.palette-details-modal__input:focus,
.palette-details-modal__textarea:focus,
.pages-upload-modal__input:focus,
.supply-card__action--capture-input input:focus,
.swatch-capture-modal__capture-input input:focus {
  outline: 0 !important;
  border-color: var(--modal-field-border-focus) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-peach-fuzz) 24%, transparent) !important;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__frame {
  padding: 10px 20px 8px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__header {
  min-height: 66px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__logo {
  width: 56px;
  height: 56px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__logo span {
  font-size: 1.36rem;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__heading {
  left: 76px;
  top: 7px;
  width: calc(100% - 76px);
  max-width: calc(100% - 76px);
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__eyebrow {
  min-height: 20px;
  gap: 7px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__brand {
  font-size: 0.76rem;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__status {
  width: 17px;
  height: 17px;
  font-size: 0.58rem;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__title {
  margin-top: 7px;
  font-size: clamp(1rem, 1.06vw, 1.14rem);
  line-height: 1.06;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__divider {
  margin-left: 76px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__meta {
  flex: 0 0 44px;
  min-height: 44px;
  max-height: 44px;
  align-items: center;
  padding-left: 76px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__footer {
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 11px;
  padding-top: 7px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__count {
  padding-right: 11px;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__count strong {
  font-size: 1.1rem;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__count span {
  margin-top: 1px;
  font-size: 0.52rem;
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__swatches {
  gap: clamp(4px, 0.85cqw, 7px);
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__swatches .swatch-row__item,
body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__swatches .swatch-row__item--large {
  width: clamp(15px, 4.9cqw, 20px);
  height: clamp(15px, 4.9cqw, 20px);
  flex-basis: clamp(15px, 4.9cqw, 20px);
}

body[data-page="supplies"] .supplies-grid .supply-card--owned .supply-card__swatches .swatch-row__overflow {
  min-width: clamp(20px, 5.6cqw, 26px);
  height: clamp(20px, 5.6cqw, 26px);
  padding: 0 5px;
  font-size: 0.62rem;
}

body[data-page="palettes"] .palette-card__frame {
  padding: 10px 20px 8px;
}

body[data-page="palettes"] .palette-card__top {
  min-height: 66px;
}

body[data-page="palettes"] .palette-card__logo {
  width: 56px;
  height: 56px;
}

body[data-page="palettes"] .palette-card__logo span {
  font-size: 1.36rem;
}

body[data-page="palettes"] .palette-card__body {
  left: 76px;
  top: 7px;
  width: calc(100% - 76px);
  max-width: calc(100% - 76px);
}

body[data-page="palettes"] .palette-card__eyebrow {
  min-height: 20px;
  gap: 7px;
}

body[data-page="palettes"] .palette-card__brand {
  font-size: 0.76rem;
}

body[data-page="palettes"] .palette-card__status {
  width: 17px;
  height: 17px;
  font-size: 0.58rem;
}

body[data-page="palettes"] .palette-card__body h2 {
  margin-top: 7px;
  font-size: clamp(1rem, 1.06vw, 1.14rem);
  line-height: 1.06;
}

body[data-page="palettes"] .palette-card__divider {
  margin-left: 76px;
}

body[data-page="palettes"] .palette-card__meta {
  flex: 0 0 44px;
  min-height: 44px;
  max-height: 44px;
  align-items: center;
  padding-left: 76px;
}

body[data-page="palettes"] .palette-card__tag-list {
  gap: 7px;
}

body[data-page="palettes"] .palette-card__footer {
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 11px;
  padding-top: 7px;
}

body[data-page="palettes"] .palette-card__count {
  padding-right: 11px;
}

body[data-page="palettes"] .palette-card__count strong {
  font-size: 1.1rem;
}

body[data-page="palettes"] .palette-card__count span {
  margin-top: 1px;
  font-size: 0.52rem;
}

body[data-page="palettes"] .palette-card__swatches {
  min-height: 20px;
}

body[data-page="palettes"] .palette-card__swatch-segment {
  min-height: 20px;
}

/* Button skin: card-like rounded edge with a stronger right/bottom line. */
:where(
  .supplies-tab,
  .supply-card__action
) {
  border-radius: 14px !important;
  border-color: color-mix(in srgb, var(--paper-border) 72%, var(--color-tangerine-dream)) !important;
  box-shadow:
    2px 3px 0 color-mix(in srgb, var(--paper-border) 56%, transparent),
    0 2px 8px rgba(35, 32, 26, 0.035) !important;
}

:where(
  .supplies-tab,
  .supply-card__action
):hover,
:where(
  .supplies-tab,
  .supply-card__action
):focus-visible {
  border-color: color-mix(in srgb, var(--paper-border) 58%, var(--color-tangerine-dream)) !important;
  box-shadow:
    3px 4px 0 color-mix(in srgb, var(--paper-border) 62%, transparent),
    0 4px 12px rgba(35, 32, 26, 0.05) !important;
}

/* Shared gallery system: Supplies is the source component. */
.cc-gallery {
  --gallery-chrome-inset: 8px;
  --gallery-grid-gap: 14px;
  --gallery-card-reference-width: 434px;
  --gallery-card-reference-height: 176px;
  --gallery-card-min-width: 360px;
  --gallery-card-min-height: var(--collection-gallery-card-min-height, var(--gallery-card-reference-height));
  --gallery-card-max-height: var(--collection-gallery-card-max-height, var(--gallery-row-height));
  --gallery-row-height: var(--collection-gallery-row-height, var(--gallery-card-min-height));
  --gallery-grid-padding-block: 12px;
  --gallery-third-row-guard: 10px;
  --gallery-visible-height: calc(
    var(--gallery-row-height) + var(--gallery-row-height) + var(--gallery-grid-gap) + var(--gallery-grid-padding-block)
  );
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(14px, 1.8vw, 18px);
  align-self: stretch;
  width: 100%;
  height: var(--gallery-panel-height);
  min-height: var(--gallery-panel-min-height);
  max-height: none;
  min-width: 0;
  overflow: visible;
  padding: clamp(12px, 1.5vw, 18px) clamp(18px, 2.2vw, 24px) 14px;
  border-radius: 20px;
  background: var(--gallery-surface);
  border: 1px solid var(--paper-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 0 42px rgba(201, 184, 154, 0.12),
    0 16px 32px rgba(60, 45, 25, 0.04),
    0 4px 10px rgba(60, 45, 25, 0.025);
}

/* Shared split workspace: a resized gallery beside a same-material editor panel. */
.split-workspace.split-workspace {
  --workspace-panel-gap: 24px;
  --workspace-gallery-column: minmax(380px, 1fr);
  --workspace-editor-column: minmax(420px, 1fr);
  --workspace-split-duration: 680ms;
  position: relative;
  display: grid;
  grid-template-columns: var(--workspace-gallery-column) var(--workspace-editor-column);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  gap: var(--workspace-panel-gap);
  width: 100%;
  min-width: 0;
  height: var(--gallery-panel-height);
  min-height: var(--gallery-panel-min-height);
  max-height: none;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.split-workspace.is-gallery-mode {
  grid-template-columns: 1fr;
  gap: 0;
  height: var(--gallery-panel-height);
  min-height: var(--gallery-panel-min-height);
}

.split-workspace.is-gallery-mode > .workspace-panel--editor {
  display: none;
}

.workspace-panel.workspace-panel {
  --gallery-chrome-inset: 8px;
  position: relative;
  min-width: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  max-height: none;
  align-self: stretch;
  overflow: hidden;
  border-radius: 20px;
  background: var(--gallery-surface);
  border: 1px solid var(--paper-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 0 42px rgba(201, 184, 154, 0.12),
    0 16px 32px rgba(60, 45, 25, 0.04),
    0 4px 10px rgba(60, 45, 25, 0.025);
}

.workspace-panel--gallery.workspace-panel--gallery {
  overflow: visible;
}

.split-workspace > .workspace-panel--gallery.gallery-panel {
  height: 100%;
  min-height: 0;
  max-height: none;
}

.split-workspace.is-gallery-mode > .workspace-panel--gallery.gallery-panel {
  height: 100%;
  min-height: 0;
}

.split-workspace:not(.is-gallery-mode) > .workspace-panel--gallery .cc-gallery__viewport.is-populated {
  justify-content: stretch;
  padding-inline: 0;
}

.split-workspace:not(.is-gallery-mode) > .workspace-panel--gallery .cc-gallery-grid {
  grid-template-columns: 1fr;
  grid-auto-rows: var(--gallery-card-reference-height);
  max-width: none;
  padding-inline: 4px;
}

.split-workspace:not(.is-gallery-mode) > .workspace-panel--gallery .cc-gallery-grid > .cc-card {
  min-height: var(--gallery-card-reference-height);
}

.split-workspace.is-splitting-border:not(.is-gallery-mode) > .workspace-panel--gallery .gallery-grid > .gallery-card.gallery-card {
  justify-self: start;
  width: 100%;
  transform-origin: left center;
  animation: workspace-card-grow var(--workspace-split-duration) cubic-bezier(0.22, 1, 0.36, 1) both;
}

.split-workspace.is-splitting-border .gallery-card__actions {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(4px) !important;
}

.split-workspace.is-splitting-border > .workspace-panel--editor > * {
  animation: workspace-editor-content-in var(--workspace-split-duration) cubic-bezier(0.22, 1, 0.36, 1) both;
}

.split-workspace:not(.is-gallery-mode) > .workspace-panel--gallery .gallery-panel__helper-text {
  display: none;
}

.workspace-panel--editor.palette-editor {
  flex: none;
  max-width: none;
  padding: clamp(12px, 1.5vw, 18px) clamp(18px, 2.2vw, 24px) 14px;
}

body[data-page="pages"] .pages-workspace.split-workspace {
  --workspace-gallery-column: minmax(520px, 1.55fr);
  --workspace-editor-column: minmax(360px, 1fr);
  --workspace-panel-gap: 24px;
  height: var(--gallery-panel-height);
  min-height: var(--gallery-panel-min-height);
  max-height: none;
}

body[data-page="pages"] .pages-workspace.split-workspace > .workspace-panel {
  height: 100%;
  min-height: 0;
  max-height: none;
}

body[data-page="pages"] .pages-workspace.split-workspace > .pages-preview-panel {
  display: flex;
  padding: 14px;
  overflow: hidden;
}

body[data-page="pages"] .pages-workspace.split-workspace > .pages-object-tracker {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  max-width: none;
  padding: clamp(14px, 1.6vw, 20px) clamp(18px, 2vw, 24px) 14px;
}

body[data-page="pages"] .pages-preview-panel__view {
  height: 100%;
  min-height: 0;
}

body[data-page="pages"] .pages-preview-panel__artwork {
  height: 100%;
  min-height: 0;
  flex: 1 1 auto;
  padding: 0 4px;
  gap: 0;
}

body[data-page="pages"] .pages-preview-panel__frame {
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 16px;
  border-color: var(--paper-border-soft);
  box-shadow: inset 0 0 0 1px rgba(80, 65, 45, 0.08);
}

body[data-page="pages"] .pages-preview-panel__footer.gallery-panel__footer {
  --gallery-chrome-inset: 0px;
  grid-template-columns: minmax(0, 1fr) auto;
  flex-shrink: 0;
  min-height: 44px;
  margin-top: 6px;
  padding: 6px 10px 0;
  border-top-color: var(--page-divider-color, rgba(205, 192, 177, 0.48));
}

body[data-page="pages"] .pages-object-tracker__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  margin: 0;
}

body[data-page="pages"] .pages-object-tracker__title {
  width: 100%;
  gap: 8px;
}

body[data-page="pages"] .pages-object-tracker__title-view {
  max-width: 12ch;
  color: var(--color-text);
  font-size: clamp(1.85rem, 2.7vw, 2.35rem);
  line-height: 0.9;
}

body[data-page="pages"] .pages-object-tracker__meta {
  max-width: 100%;
  color: var(--color-text-muted);
  font-size: clamp(0.9rem, 1.05vw, 1rem);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-page="pages"] .pages-object-tracker__actions {
  align-self: start;
}

body[data-page="pages"] .pages-preview-panel__toggle.modal-button {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

body[data-page="pages"] .pages-object-tracker__shell {
  min-height: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body[data-page="pages"] .pages-object-list {
  height: 100%;
  padding: 0 2px 2px 0;
  gap: 10px;
}

body[data-page="pages"] .pages-object {
  border-radius: 14px;
  background: var(--gallery-card-surface);
  border-color: var(--paper-border);
  box-shadow: var(--shadow-sm);
}

body[data-page="pages"] .pages-object__row {
  min-height: 64px;
}

body[data-page="pages"] .pages-object__summary {
  padding: 14px 0 12px 22px;
}

body[data-page="pages"] .pages-object__details-inner {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@keyframes workspace-card-grow {
  0% {
    width: 58%;
  }

  100% {
    width: 100%;
  }
}

@keyframes pages-object-card-grow-down {
  0% {
    max-height: var(--gallery-card-reference-height, 176px);
  }

  100% {
    max-height: var(--pages-object-expanded-height, clamp(520px, 72vh, 760px));
  }
}

@keyframes workspace-editor-content-in {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.cc-gallery .cc-page-header {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  padding: 0 10px;
  margin: 0;
  background: transparent;
}

.cc-gallery .cc-controls {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.cc-gallery .cc-page-stats {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: clamp(18px, 2vw, 32px);
  flex: 0 0 auto;
  margin-left: auto;
  margin-right: 0;
  text-align: right;
}

.cc-gallery .cc-stat {
  display: grid;
  gap: 4px;
  min-width: 104px;
  text-align: right;
  justify-items: end;
}

.cc-gallery .cc-stat__value {
  color: rgba(47, 41, 53, 0.96);
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1.7rem, 2.35vw, 2.12rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.cc-gallery .cc-stat__label {
  color: rgba(47, 41, 53, 0.58);
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(0.72rem, 0.82vw, 0.84rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.cc-gallery__viewport {
  min-height: 0;
  align-self: stretch;
}

.gallery-grid-shell.is-populated:not(.is-editing) {
  display: flex;
  justify-content: center;
  align-self: start;
  height: min(100%, var(--gallery-visible-height));
  max-height: var(--gallery-visible-height);
  min-height: 0;
  overflow-y: hidden;
  overflow-x: hidden;
  padding: 8px 0;
  scrollbar-width: none;
}

.gallery-grid-shell.is-populated:not(.is-editing)::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.cc-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--gallery-card-min-width)), 1fr));
  grid-auto-rows: clamp(
    var(--gallery-card-min-height),
    calc((100% - var(--gallery-grid-gap) - var(--gallery-grid-padding-block) + var(--gallery-third-row-guard)) / 2),
    var(--gallery-card-max-height)
  );
  align-content: start;
  gap: var(--gallery-grid-gap);
  width: 100%;
  max-width: calc((3 * var(--gallery-card-reference-width)) + (2 * var(--gallery-grid-gap)) + 12px);
  height: 100%;
  max-height: 100%;
  min-height: 0;
  margin: 0;
  padding: calc(var(--gallery-grid-padding-block) / 2) 6px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.gallery-grid::-webkit-scrollbar {
  display: none;
}

.cc-gallery .cc-gallery-grid > .cc-card {
  --gallery-card-accent: var(--supply-accent, var(--palette-accent, var(--paper-border)));
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: var(--gallery-card-min-height);
  max-height: var(--gallery-card-max-height);
  padding: 5px;
  border-radius: 16px;
  background: #faf6f0;
  border: 1.5px solid color-mix(in srgb, var(--gallery-card-accent) 48%, var(--paper-border-soft));
  box-shadow:
    3px 5px 0 color-mix(in srgb, var(--gallery-card-accent) 18%, transparent),
    0 2px 10px color-mix(in srgb, var(--gallery-card-accent) 8%, rgba(60, 45, 20, 0.04));
  color: var(--color-text);
  text-align: left;
  transform: none;
  filter: none;
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 220ms ease,
    background-color 220ms ease;
}

.cc-gallery__viewport.is-animating .cc-gallery-grid > .cc-card {
  animation: supplies-card-in 560ms ease both;
  animation-delay: calc(var(--card-index, 0) * 70ms);
}

.cc-gallery .cc-gallery-grid > .cc-card::before,
.cc-gallery .cc-gallery-grid > .cc-card::after {
  display: none;
}

.cc-gallery .cc-gallery-grid > .cc-card:hover,
.cc-gallery .cc-gallery-grid > .cc-card:focus-visible,
.cc-gallery .cc-gallery-grid > .cc-card:focus-within {
  transform: translateY(-2px);
  background: #faf6f0;
  border-color: color-mix(in srgb, var(--gallery-card-accent) 70%, var(--paper-border-strong));
  box-shadow:
    3px 5px 0 color-mix(in srgb, var(--gallery-card-accent) 26%, transparent),
    0 4px 16px color-mix(in srgb, var(--gallery-card-accent) 12%, rgba(60, 45, 20, 0.06));
}

.cc-gallery .cc-gallery-grid > .cc-card:active {
  transform: translateY(-1px) scale(0.997);
}

.cc-gallery .cc-gallery-grid > .cc-card.is-selected {
  border-color: color-mix(in srgb, var(--gallery-card-accent) 68%, var(--paper-border-strong));
  box-shadow:
    3px 5px 0 color-mix(in srgb, var(--gallery-card-accent) 30%, transparent),
    0 4px 16px color-mix(in srgb, var(--gallery-card-accent) 14%, rgba(60, 45, 20, 0.06)),
    0 0 0 3px color-mix(in srgb, var(--gallery-card-accent) 18%, transparent);
}

.cc-gallery .cc-gallery-grid > .cc-card,
.cc-gallery .cc-gallery-grid > .cc-card * {
  font-family: "Inter", system-ui, sans-serif;
}

.supplies-results .search-results__grid > .search-result-card {
  animation: supplies-card-in 420ms ease both;
  animation-delay: calc(var(--card-index, 0) * 45ms);
}

@media (prefers-reduced-motion: reduce) {
  .cc-gallery__viewport.is-animating .cc-gallery-grid > .cc-card,
  .supplies-results .search-results__grid > .search-result-card {
    animation: none;
  }
}

.gallery-panel .gallery-grid > .pages-gallery-tile.gallery-card .pages-gallery-tile__button {
  border-radius: 12px;
  overflow: hidden;
}

.gallery-panel .gallery-grid > .pages-gallery-tile.gallery-card .pages-gallery-tile__title {
  color: rgba(255, 252, 249, 0.96);
}

.gallery-panel .gallery-grid > .gallery-card.gallery-card .gallery-card__actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  width: fit-content;
  max-width: none;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(4px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.gallery-panel .gallery-grid > .gallery-card.gallery-card:hover .gallery-card__actions,
.gallery-panel .gallery-grid > .gallery-card.gallery-card:focus-within .gallery-card__actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.gallery-panel .gallery-grid > .gallery-card.gallery-card .gallery-card__actions .gallery-card__action.gallery-card__action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: fit-content !important;
  min-width: 24px !important;
  max-width: none !important;
  height: 24px !important;
  min-height: 0 !important;
  padding: 0 8px !important;
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--paper-border) !important;
  background: var(--gallery-card-surface) !important;
  color: var(--color-text) !important;
  box-shadow: 0 4px 10px rgba(60, 45, 20, 0.04) !important;
  font-size: 0.64rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  user-select: none;
  cursor: pointer;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease !important;
}

.gallery-panel .gallery-grid > .gallery-card.gallery-card .gallery-card__actions .gallery-card__action.gallery-card__action:hover,
.gallery-panel .gallery-grid > .gallery-card.gallery-card .gallery-card__actions .gallery-card__action.gallery-card__action:focus-visible {
  transform: translateY(-1px);
  background: var(--gallery-card-surface) !important;
  border-color: var(--paper-border) !important;
  color: var(--color-text) !important;
  box-shadow: var(--paper-shadow-soft) !important;
}

.gallery-panel .gallery-grid > .gallery-card.gallery-card .gallery-card__actions .gallery-card__action--delete {
  min-width: 5.4em !important;
  opacity: 0.62;
}

.gallery-panel .gallery-grid > .gallery-card.gallery-card .gallery-card__actions .gallery-card__action--delete:hover,
.gallery-panel .gallery-grid > .gallery-card.gallery-card .gallery-card__actions .gallery-card__action--delete:focus-visible {
  opacity: 1;
}

.gallery-panel .gallery-grid > .gallery-card.gallery-card .gallery-card__actions .gallery-card__action.is-confirm {
  opacity: 1;
  background: var(--gallery-card-surface) !important;
  border-color: var(--paper-border) !important;
  color: var(--color-text) !important;
}

.gallery-panel__footer.gallery-panel__footer,
.cc-gallery .cc-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  align-self: end;
  column-gap: 14px;
  row-gap: 0;
  width: 100%;
  margin-top: 0;
  padding: 5px var(--gallery-chrome-inset) 0;
  border-top: 1px solid rgba(205, 178, 158, 0.24);
  box-sizing: border-box;
}

.gallery-panel__action.gallery-panel__action,
.cc-gallery .cc-footer__action {
  justify-self: start;
}

.palette-editor__footer.palette-editor__footer {
  flex-shrink: 0;
  margin-top: auto;
  border-top-color: var(--page-divider-color, rgba(205, 192, 177, 0.48));
}

.palette-editor__footer [data-clear-palette] {
  justify-self: end;
}

.gallery-panel__helper-text.gallery-panel__helper-text,
.cc-gallery .cc-footer__note {
  margin: 0;
  justify-self: end;
  max-width: none;
  white-space: nowrap;
  color: rgba(47, 41, 53, 0.68);
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1vw, 0.96rem);
  line-height: 1.2;
}

@media (max-width: 1199px) {
  .cc-gallery-grid {
    max-width: calc((2 * var(--gallery-card-reference-width)) + var(--gallery-grid-gap));
  }

  .split-workspace.split-workspace {
    --workspace-gallery-column: minmax(320px, 1fr);
    --workspace-editor-column: minmax(340px, 1fr);
    --workspace-panel-gap: 18px;
  }
}

@media (max-width: 767px) {
  .split-workspace.split-workspace,
  .split-workspace.is-gallery-mode {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    gap: 14px;
  }

  .split-workspace > .workspace-panel.workspace-panel,
  .split-workspace.is-gallery-mode > .workspace-panel--gallery.gallery-panel {
    height: auto;
    min-height: min(620px, calc(100dvh - 140px));
  }

  .cc-gallery {
    height: auto;
    min-height: min(620px, calc(100dvh - 140px));
  }

  .cc-gallery .cc-page-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .cc-gallery__viewport.is-populated:not(.is-editing),
  .cc-gallery-grid {
    height: auto;
  }

  .cc-gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(var(--gallery-card-reference-height), auto);
    max-width: calc((3 * var(--gallery-card-reference-width)) + (2 * var(--gallery-grid-gap)) + 12px);
    padding-inline: 0;
  }

  .cc-gallery .cc-gallery-grid > .cc-card {
    min-height: var(--gallery-card-reference-height);
  }

  .gallery-panel__footer.gallery-panel__footer {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  .gallery-panel__helper-text.gallery-panel__helper-text {
    justify-self: start;
    white-space: normal;
  }
}

/* Canonical filter controls. The current Supplies gallery filter is the source of truth. */
.site-filterbar,
.cc-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
}

.site-filter-button,
.cc-filter__button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: var(--cc-control-height);
  padding: 0 17px 0 18px;
  border-radius: 12px;
  background: var(--main-card-surface);
  border: 1.5px solid color-mix(in srgb, var(--paper-border) 58%, transparent);
  color: rgba(38, 43, 51, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 660;
  letter-spacing: 0;
  line-height: 1;
  text-align: left;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.site-filter-button span,
.cc-filter__button span {
  flex: 0 1 auto;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  letter-spacing: 0;
  line-height: 1;
  pointer-events: none;
  text-transform: capitalize;
  white-space: nowrap;
}

.cc-filter__button::before {
  content: none;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  background-color: currentColor;
  opacity: 0.76;
  filter: none;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  pointer-events: none;
}

.cc-filter__button:is(
  [data-filter-trigger="medium"],
  [data-owned-filter-trigger="medium"],
  [data-pages-colour-filter-trigger="medium"],
  [data-palette-filter-trigger="medium"]
)::before {
  content: "";
  -webkit-mask-image: url("./assets/icons/ui/colour-palette.svg");
  mask-image: url("./assets/icons/ui/colour-palette.svg");
}

.cc-filter__button:is(
  [data-pages-gallery-filter-trigger="genre"]
)::before {
  content: "";
  -webkit-mask-image: url("./assets/icons/ui/genre.svg");
  mask-image: url("./assets/icons/ui/genre.svg");
}

.cc-filter__button:is(
  [data-pages-gallery-filter-trigger="book"]
)::before {
  content: "";
  -webkit-mask-image: url("./assets/icons/ui/colouring-book.svg");
  mask-image: url("./assets/icons/ui/colouring-book.svg");
}

.cc-filter__button:is(
  [data-filter-trigger="brand"],
  [data-owned-filter-trigger="brand"],
  [data-gallery-tag-trigger],
  [data-pages-gallery-filter-trigger="brand"],
  [data-pages-colour-filter-trigger="brand"],
  [data-palette-filter-trigger="brand"]
)::before {
  content: "";
  -webkit-mask-image: url("./assets/icons/ui/brand-badge.svg");
  mask-image: url("./assets/icons/ui/brand-badge.svg");
}

.cc-filter__button[data-owned-filter-trigger="sort"]::before {
  content: "";
  -webkit-mask-image: url("./assets/icons/actions/sort.svg");
  mask-image: url("./assets/icons/actions/sort.svg");
}

.cc-filter__button:is(
  [data-pages-colour-owned-toggle],
  [data-palette-owned-toggle]
)::before {
  content: "";
  -webkit-mask-image: url("./assets/icons/actions/check-circle.svg");
  mask-image: url("./assets/icons/actions/check-circle.svg");
}

.cc-filter__button[data-gallery-used-pages-toggle]::before {
  content: "";
  -webkit-mask-image: url("./assets/icons/ui/anchor-link-svgrepo-com.svg");
  mask-image: url("./assets/icons/ui/anchor-link-svgrepo-com.svg");
}

.cc-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 1 300px;
  max-width: 300px;
  min-width: min(280px, 100%);
  min-height: var(--cc-control-height);
}

.cc-search__input {
  width: 100%;
  height: var(--cc-control-height);
  min-height: var(--cc-control-height);
  padding: 0 18px 0 46px;
  border-radius: 12px;
  background: var(--main-card-surface);
  border: 1.5px solid color-mix(in srgb, var(--paper-border) 58%, transparent);
  color: rgba(38, 43, 51, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 660;
  letter-spacing: 0;
  line-height: var(--cc-control-height);
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.cc-search__input::-webkit-search-decoration,
.cc-search__input::-webkit-search-cancel-button,
.cc-search__input::-webkit-search-results-button,
.cc-search__input::-webkit-search-results-decoration {
  display: none;
}

.cc-search__input::placeholder {
  color: rgba(38, 43, 51, 0.82);
  opacity: 1;
  text-transform: capitalize;
}

.cc-search__input:focus {
  background: var(--main-card-surface);
  border-color: color-mix(in srgb, var(--paper-border) 72%, transparent);
  color: rgba(38, 43, 51, 0.82);
  box-shadow: none;
}

.cc-search__icon {
  position: absolute;
  display: block;
  left: 18px;
  top: 50%;
  z-index: 1;
  width: 19px;
  height: 19px;
  background-color: rgba(47, 41, 53, 0.74);
  filter:
    drop-shadow(0.7px 0 0 rgba(47, 41, 53, 0.74))
    drop-shadow(-0.7px 0 0 rgba(47, 41, 53, 0.74))
    drop-shadow(0 0.7px 0 rgba(47, 41, 53, 0.74))
    drop-shadow(0 -0.7px 0 rgba(47, 41, 53, 0.74));
  -webkit-mask-image: url("./assets/icons/actions/search.svg");
  mask-image: url("./assets/icons/actions/search.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  pointer-events: none;
  transform: translateY(-50%);
}

.site-filter-button:hover,
.site-filter-button:focus-visible,
.cc-filter__button:hover,
.cc-filter__button:focus-visible {
  background: color-mix(in srgb, var(--color-peach-fuzz) 28%, white);
  border-color: color-mix(in srgb, var(--paper-border) 72%, transparent);
  color: var(--color-text);
  box-shadow: none;
  outline: 0;
}

.site-filter-button.is-active,
.site-filter-button.has-selection,
.site-filter-button[aria-pressed="true"],
.cc-filter__button.is-active,
.cc-filter__button.has-selection,
.cc-filter__button[aria-pressed="true"] {
  background: color-mix(in srgb, var(--color-peach-fuzz) 58%, white);
  border-color: color-mix(in srgb, var(--paper-border) 72%, transparent);
  color: var(--color-text);
  box-shadow: none;
}

.site-filter-menu,
.cc-filter__menu {
  display: grid;
  gap: 0;
  width: min(300px, calc(100vw - 56px)) !important;
  max-height: min(var(--cc-dropdown-available-height, calc(100dvh - 32px)), calc(var(--cc-dropdown-list-max-height) + var(--cc-dropdown-shell-padding)));
  padding: 8px !important;
  border-radius: 14px !important;
  background: var(--main-card-surface) !important;
  border: 1px solid var(--paper-border) !important;
  box-shadow: none !important;
  overflow: hidden;
}

.site-filter-menu__header {
  padding: 0 !important;
  min-height: 0 !important;
}

.site-filter-menu__header h4 {
  display: none !important;
}

.site-filter-menu__list {
  display: grid !important;
  gap: var(--cc-dropdown-row-gap) !important;
  padding: 0 !important;
  max-height: min(
    var(--cc-dropdown-list-max-height),
    calc(var(--cc-dropdown-available-height, calc(100dvh - 32px)) - var(--cc-dropdown-shell-padding))
  );
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: none;
}

.site-filter-menu__list--scroll {
  max-height: min(
    var(--cc-dropdown-list-max-height),
    calc(var(--cc-dropdown-available-height, calc(100dvh - 32px)) - var(--cc-dropdown-shell-padding))
  );
  overflow-y: auto;
}

.site-filter-menu__list::-webkit-scrollbar {
  display: none;
}

.site-filter-option {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  width: 100% !important;
  min-height: 44px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  border: 1.5px solid transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease !important;
}

.site-filter-option:hover,
.site-filter-option:focus-visible {
  background: color-mix(in srgb, var(--color-peach-fuzz) 28%, white) !important;
  border-color: color-mix(in srgb, var(--color-peach-fuzz) 28%, transparent) !important;
  color: var(--color-text) !important;
  box-shadow: none !important;
  transform: none !important;
}

.site-filter-option.is-active,
.site-filter-option[aria-pressed="true"] {
  background: color-mix(in srgb, var(--color-peach-fuzz) 58%, white) !important;
  border-color: color-mix(in srgb, var(--color-peach-fuzz) 58%, transparent) !important;
  color: var(--color-text) !important;
  box-shadow: none !important;
}

.site-filter-option.is-active:hover,
.site-filter-option.is-active:focus-visible,
.site-filter-option[aria-pressed="true"]:hover,
.site-filter-option[aria-pressed="true"]:focus-visible {
  background: color-mix(in srgb, var(--color-peach-fuzz) 66%, white) !important;
  border-color: color-mix(in srgb, var(--color-peach-fuzz) 66%, transparent) !important;
}

.site-filter-option span {
  color: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-align: left;
}

.site-filter-option strong {
  color: rgba(23, 20, 16, 0.42);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1;
}

/* Shared modal buttons: quiet paper buttons with the filter-button hover colour. */
.modal-button.modal-button,
.btn--modal.btn--modal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 26px;
  border-radius: 14px;
  border: 1.5px solid color-mix(in srgb, var(--paper-border) 58%, transparent);
  background: var(--main-card-surface);
  color: rgba(23, 20, 16, 0.86);
  box-shadow: none;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.modal-button.modal-button:hover,
.modal-button.modal-button:focus-visible,
.btn--modal.btn--modal:hover,
.btn--modal.btn--modal:focus-visible {
  background: color-mix(in srgb, var(--color-peach-fuzz) 28%, white);
  border-color: color-mix(in srgb, var(--color-peach-fuzz) 28%, transparent);
  color: var(--color-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 2px 7px rgba(35, 32, 26, 0.035);
  outline: 0;
  transform: none;
}

.modal-button.modal-button:disabled,
.modal-button.modal-button[aria-disabled="true"],
.btn--modal.btn--modal:disabled,
.btn--modal.btn--modal[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.48;
}

.modal-button.modal-button.is-owner-action-gated,
.modal-button.modal-button[aria-disabled="true"].is-owner-action-gated,
.btn--modal.btn--modal.is-owner-action-gated,
.btn--modal.btn--modal[aria-disabled="true"].is-owner-action-gated {
  cursor: pointer;
  opacity: 0.62;
}

.modal-button.modal-button:disabled:hover,
.modal-button.modal-button[aria-disabled="true"]:hover,
.btn--modal.btn--modal:disabled:hover,
.btn--modal.btn--modal[aria-disabled="true"]:hover {
  background: var(--main-card-surface);
  border-color: color-mix(in srgb, var(--paper-border) 58%, transparent);
  color: rgba(23, 20, 16, 0.86);
  box-shadow: none;
}

.modal-button--icon.modal-button--icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  flex-shrink: 0;
}

.modal-button--icon span {
  font-size: 1.2rem;
  line-height: 1;
}

.modal-actions .modal-button,
.palette-tag-modal__actions .modal-button,
.pages-upload-modal__actions .modal-button {
  min-width: 132px;
}

.palette-tag-modal__add-btn.modal-button,
.search-result__button.modal-button,
.custom-set-color-picker__done.modal-button,
.swatch-capture-action.modal-button,
.swatch-capture-change.modal-button {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.9rem;
}

.swatch-capture-modal .swatch-capture-action.modal-button,
.swatch-capture-modal .swatch-capture-change.modal-button,
.swatch-capture-modal .swatch-capture-modal__upload.modal-button,
.swatch-capture-modal .swatch-capture-modal__clear-image.modal-button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 0.86rem;
}

.swatch-capture-modal .swatch-capture-modal__field input {
  min-height: 38px;
}

.swatch-capture-modal__close.modal-button--icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
}

/* Cleaner search modals: one main dialog, flatter toolbar/results, quieter rows. */
.supplies-modal .supplies-panel {
  gap: 10px;
}

.supplies-modal .supplies-workspace,
.palette-modal .supplies-workspace {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.supplies-modal .supplies-search,
.palette-modal .supplies-search {
  gap: 10px;
}

.supplies-modal .supplies-search__toolbar,
.palette-modal .supplies-search__toolbar {
  position: relative;
  padding: 10px 0 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.supplies-modal .marker-search__input,
.palette-modal .marker-search__input {
  background: color-mix(in srgb, var(--gallery-surface) 88%, white);
  border-color: color-mix(in srgb, var(--paper-border-soft) 72%, white);
}

.supplies-modal .supplies-results,
.palette-modal .palette-modal__results {
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--paper-border-soft) 62%, transparent);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-gutter: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.supplies-modal .supplies-results::-webkit-scrollbar,
.palette-modal .palette-modal__results::-webkit-scrollbar,
.supplies-modal .search-results__grid::-webkit-scrollbar,
.palette-modal .search-results__grid::-webkit-scrollbar {
  display: none;
}

.supplies-modal .search-results__grid,
.palette-modal .search-results__grid {
  gap: 8px;
  padding-right: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.supplies-modal .search-result__actions,
.palette-modal .search-result__actions {
  gap: 8px;
}

.supplies-modal .search-result__button.modal-button,
.palette-modal .search-result__button.modal-button {
  background: color-mix(in srgb, var(--gallery-surface) 88%, white);
}

.supplies-modal .search-result__button.modal-button[data-add-set],
.supplies-modal .search-result__button.modal-button[data-add-marker] {
  background: #ffdece !important;
  border-color: #efb69c !important;
  color: #171410 !important;
}

.supplies-modal .search-result__button.modal-button:hover,
.supplies-modal .search-result__button.modal-button:focus-visible,
.palette-modal .search-result__button.modal-button:hover,
.palette-modal .search-result__button.modal-button:focus-visible {
  background: color-mix(in srgb, var(--color-peach-fuzz) 28%, white);
}

.supplies-modal .search-result__button.modal-button[data-add-set]:hover,
.supplies-modal .search-result__button.modal-button[data-add-set]:focus-visible,
.supplies-modal .search-result__button.modal-button[data-add-marker]:hover,
.supplies-modal .search-result__button.modal-button[data-add-marker]:focus-visible {
  background: #ffc7ae !important;
  border-color: #e99b78 !important;
  color: #171410 !important;
}

.supplies-modal .search-result__button.modal-button.is-added,
.supplies-modal .search-result__button.modal-button.is-added[data-add-set],
.supplies-modal .search-result__button.modal-button.is-added[data-add-marker],
.supplies-modal .search-result__button.modal-button.is-added[data-add-set]:hover,
.supplies-modal .search-result__button.modal-button.is-added[data-add-set]:focus-visible,
.supplies-modal .search-result__button.modal-button.is-added[data-add-marker]:hover,
.supplies-modal .search-result__button.modal-button.is-added[data-add-marker]:focus-visible,
.supplies-modal .search-result__button.modal-button.is-added:hover,
.supplies-modal .search-result__button.modal-button.is-added:focus-visible {
  background: #dcefd6 !important;
  border-color: #a8caa0 !important;
  color: #315a35 !important;
  box-shadow: none !important;
}

/* Shared site frame: landing and gallery pages use one shell/header/button foundation. */
body.cc-page {
  --cc-shell-y: clamp(8px, 1vh, 12px);
  --cc-footer-tray-height: clamp(66px, 7vh, 80px);
  --cc-footer-surface-gap: clamp(4px, 0.6vh, 8px);
  min-height: 100dvh;
  overflow: auto;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 204, 216, 0.72), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(219, 207, 248, 0.78), transparent 34%),
    radial-gradient(circle at 50% 100%, rgba(255, 227, 214, 0.66), transparent 40%),
    linear-gradient(125deg, #f8cfdc 0%, #eee0ff 52%, #f6dce8 100%);
}

body.cc-page .site-shell,
body.cc-page .cc-shell {
  min-height: 100dvh;
  padding-block: var(--cc-shell-y);
  padding-inline: clamp(16px, 3.5vw, 56px);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.cc-page .canvas-card,
body.cc-page .cc-shell__surface {
  width: min(94vw, 1540px);
  max-width: none;
  min-height: calc(100dvh - (2 * var(--cc-shell-y)));
  height: auto;
  margin-inline: auto;
  padding: 0;
  border-radius: clamp(18px, 1.6vw, 24px);
  background: var(--cc-container-shell-surface);
  border: 1px solid rgba(235, 118, 158, 0.2);
  box-shadow:
    0 28px 70px rgba(88, 60, 72, 0.16),
    0 6px 18px rgba(80, 52, 42, 0.06);
  overflow: hidden;
}

body.cc-page .site-header,
body.cc-page .cc-header {
  position: relative;
  top: auto;
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
  min-height: clamp(72px, 5.2vw, 80px);
  grid-template-columns: minmax(280px, 1fr) auto minmax(280px, 1fr);
  gap: clamp(16px, 1.9vw, 30px);
  padding: 0 clamp(20px, 2.7vw, 46px);
  background: rgba(255, 251, 247, 0.7);
  border-bottom: 1px solid rgba(205, 178, 158, 0.36);
}

body.cc-page .brand-mark,
body.cc-page .cc-brand {
  justify-self: start;
  gap: 8px;
}

body.cc-page .brand-mark__script,
body.cc-page .brand-mark__word,
body.cc-page .cc-brand__text {
  font-family: var(--font-ui);
  font-size: clamp(1.7rem, 2.05vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--cc-brand-ink);
  transform: translateY(3px);
}

.brand-mark__dot,
.cc-brand__dot {
  color: #ef7897;
}

body.cc-page .site-nav,
body.cc-page .cc-nav {
  grid-column: 2;
  justify-self: center;
  margin-inline: auto;
  gap: clamp(16px, 1.8vw, 30px);
}

body.cc-page .site-nav a,
body.cc-page .cc-nav__link {
  font-family: var(--font-ui);
  font-size: clamp(0.86rem, 0.92vw, 0.95rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(31, 33, 36, 0.76);
}

body.cc-page .site-nav a::after {
  bottom: -9px;
  height: 2px;
  border-radius: 999px;
  background: #ef7897;
}

body.cc-page .site-nav a.is-active::after {
  transform: scaleX(1);
}

body.cc-page .site-nav a:hover,
body.cc-page .site-nav a.is-active {
  color: rgba(23, 20, 16, 0.96);
}

body.cc-page .header-actions,
body.cc-page .cc-auth {
  justify-self: end;
  gap: 12px;
}

body.cc-page .header-link,
body.cc-page .cc-auth__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  line-height: 1;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

body.cc-page .header-link::after {
  content: none;
}

body.cc-page .header-link:hover,
body.cc-page .header-link:focus-visible {
  transform: translateY(-1px);
}

body.cc-page .cc-auth__profile-link {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

body.cc-page .cc-auth__profile-link::after {
  content: none;
}

body.cc-page .cc-auth__profile-link:hover,
body.cc-page .cc-auth__profile-link:focus-visible,
body.cc-page .cc-auth__profile-link.is-active {
  transform: translateY(-1px);
}

body.cc-page .cc-auth-avatar--header {
  width: 38px;
  height: 38px;
  border-width: 1.5px;
  font-size: 1.08rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 6px 14px rgba(72, 53, 38, 0.14);
}

.cc-auth-avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--cc-avatar-border);
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.82), transparent 44%),
    color-mix(in srgb, var(--color-peach-fuzz) 42%, var(--main-card-surface));
  color: rgba(23, 20, 16, 0.9);
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 3px 8px rgba(72, 53, 38, 0.1);
}

.cc-auth-avatar__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cc-auth-avatar__initial {
  display: block;
  transform: translateY(0.02em);
}

body.cc-page .cc-shell__surface > .cc-site-footer {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 14px;
  row-gap: 0;
  width: 100%;
  min-height: calc(var(--cc-footer-tray-height) + var(--cc-footer-surface-gap));
  margin: 0;
  padding:
    clamp(14px, 1.7vh, 20px)
    clamp(22px, 3vw, 52px)
    clamp(12px, 1.6vh, 18px);
  border-top: 0;
  background: transparent;
  box-sizing: border-box;
  overflow: visible;
}

body.cc-page .cc-shell__surface > .cc-site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(205, 178, 158, 0.36);
  pointer-events: none;
}

.cc-main--placeholder {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(42px, 7vh, 88px) clamp(48px, 6vw, 84px);
}

.cc-main--placeholder .cc-page-header {
  width: 100%;
  max-width: 760px;
  margin: 0;
  padding: 0;
}

.cc-main--placeholder .cc-page-header__copy {
  min-width: 0;
}

.cc-main--auth {
  display: grid;
  place-items: start center;
  min-height: clamp(520px, calc(100dvh - 92px), 760px);
  padding: clamp(82px, 11vh, 126px) clamp(24px, 6vw, 84px) clamp(48px, 8vh, 92px);
}

.cc-auth-page {
  display: grid;
  place-items: center;
  width: 100%;
}

.cc-auth-page__panel {
  width: min(100%, 680px);
  padding: clamp(30px, 5vw, 54px);
  border: 1px solid rgba(205, 178, 158, 0.5);
  border-radius: clamp(20px, 2vw, 28px);
  background:
    radial-gradient(circle at 92% 8%, rgba(244, 212, 232, 0.36), transparent 34%),
    radial-gradient(circle at 8% 100%, rgba(255, 222, 206, 0.42), transparent 38%),
    rgba(255, 252, 248, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 18px 42px rgba(72, 53, 38, 0.06);
  text-align: center;
}

.cc-auth-page__copy {
  max-width: 560px;
  margin-inline: auto;
}

.cc-auth-page__title {
  max-width: 620px;
  margin-inline: auto;
}

.cc-auth-page__message {
  max-width: 520px;
  margin: clamp(18px, 2.4vh, 24px) auto 0;
}

.cc-auth-page__button {
  gap: 12px;
  width: min(100%, 330px);
  min-height: 54px;
  margin-top: clamp(28px, 4vh, 38px);
  padding-inline: 22px;
}

.cc-auth-page__google {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 252, 248, 0.78);
  border: 1px solid rgba(190, 151, 124, 0.38);
  color: rgba(23, 20, 16, 0.92);
  font-family: var(--font-ui);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.cc-auth-page__switch {
  margin: clamp(18px, 2.4vh, 24px) 0 0;
  color: rgba(47, 41, 53, 0.62);
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(0.95rem, 1vw, 1.02rem);
  font-weight: 500;
  line-height: 1.5;
}

.cc-auth-page__switch a {
  color: rgba(23, 20, 16, 0.94);
  font-weight: 700;
  text-decoration: none;
}

.cc-auth-page__switch a:hover,
.cc-auth-page__switch a:focus-visible {
  color: #c95f7b;
}

.cc-auth-page__status,
.cc-profile-card__status {
  min-height: 1.4em;
  margin: 14px 0 0;
  color: rgba(47, 41, 53, 0.64);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
}

.cc-auth-page__status[hidden],
.cc-profile-card__status[hidden],
.cc-profile-card [data-auth-sign-out][hidden] {
  display: none;
}

.cc-auth-page__status.is-error,
.cc-profile-card__status.is-error {
  color: #b64d68;
}

.cc-save-toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 14px;
  border: 1px solid rgba(47, 43, 38, 0.14);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.96);
  box-shadow: 0 18px 50px rgba(47, 43, 38, 0.16);
  color: var(--color-ink);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.cc-save-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.cc-save-toast__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.cc-save-toast__actions a {
  color: #b64d68;
  text-decoration: none;
}

.cc-save-toast__actions a:hover,
.cc-save-toast__actions a:focus-visible {
  text-decoration: underline;
}

.cc-profile-card {
  display: grid;
  justify-items: center;
  gap: clamp(18px, 3vh, 26px);
}

.cc-profile-card__avatar-block {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.cc-profile-card__avatar-block[hidden] {
  display: none;
}

.cc-auth-avatar--profile {
  width: 108px;
  height: 108px;
  border-width: 1.5px;
  font-size: 2.25rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 12px 28px rgba(72, 53, 38, 0.12);
}

.cc-profile-card__avatar-action {
  border: 0;
  padding: 0;
  background: transparent;
  color: #d87966;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cc-profile-card__avatar-action:hover,
.cc-profile-card__avatar-action:focus-visible {
  color: #bd5f74;
}

.cc-auth-avatar--mobile {
  width: 34px;
  height: 34px;
  font-size: 0.92rem;
}

.cc-profile-card__identity {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
}

.cc-profile-card__name {
  margin: 0;
  color: rgba(23, 20, 16, 0.96);
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  font-weight: 820;
  letter-spacing: -0.038em;
  line-height: 1;
  text-align: center;
}

.cc-profile-card__email {
  max-width: min(100%, 32rem);
  margin: 0;
  color: rgba(47, 41, 53, 0.62);
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(0.98rem, 1.1vw, 1.05rem);
  font-weight: 560;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
}

.cc-profile-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.cc-profile-card__actions[hidden] {
  display: none;
}

.cc-profile-card__local-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.cc-profile-card__local-actions[hidden] {
  display: none;
}

body[data-page="profile"] {
  --cc-container-shell-surface: var(--main-card-surface);
  --profile-main-x: clamp(48px, 6vw, 84px);
  --profile-main-top: clamp(24px, 3.4vh, 38px);
  --profile-main-bottom: var(--cc-footer-surface-gap);
  --profile-divider: rgba(205, 178, 158, 0.36);
  --profile-split-x: calc(25.5% + clamp(17px, 2vw, 32px));
}

body[data-page="profile"] .canvas-card,
body[data-page="profile"] .cc-shell__surface {
  min-height: calc(100dvh - (2 * var(--cc-shell-y)));
}

.cc-main--profile {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  padding: var(--profile-main-top) var(--profile-main-x) var(--profile-main-bottom);
  overflow: hidden;
}

.cc-profile-page {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  justify-items: stretch;
  gap: 0;
  width: 100%;
  min-height: 0;
}

.cc-profile-page.is-profile-logged-out {
  place-items: center;
}

.cc-profile-page.is-profile-loading {
  place-items: center;
}

.cc-profile-loading {
  margin: 0;
  color: rgba(47, 41, 53, 0.68);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
  text-align: center;
}

.cc-profile-loading[hidden] {
  display: none;
}

.cc-profile-logged-out {
  margin: 0;
  color: rgba(28, 26, 28, 0.98);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 5rem);
  font-weight: 780;
  line-height: 0.95;
  text-align: center;
  font-variation-settings: "SOFT" 80, "WONK" 0, "opsz" 72;
}

.cc-profile-logged-out[hidden] {
  display: none;
}

.cc-profile-page__header {
  grid-column: 1;
  grid-row: 1;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
}

body[data-page="profile"] .cc-page-title {
  margin: 0;
  color: rgba(28, 26, 28, 0.98);
  font-family: var(--font-display);
  font-size: clamp(2.05rem, 3vw, 3.05rem);
  font-weight: 780;
  letter-spacing: -0.028em;
  line-height: 0.88;
  font-variation-settings: "SOFT" 80, "WONK" 0, "opsz" 72;
  white-space: nowrap;
  text-wrap: balance;
}

body[data-page="profile"] .cc-page-description {
  max-width: 520px;
  margin: clamp(12px, 1.5vh, 18px) 0 0;
  color: rgba(47, 41, 53, 0.68);
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(0.95rem, 1vw, 1.05rem);
  font-weight: 500;
  line-height: 1.45;
}

.cc-profile-identity {
  --profile-avatar-size: clamp(54px, 3.9vw, 64px);
  --profile-identity-gap: clamp(14px, 1.2vw, 20px);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: var(--profile-identity-gap);
  width: 100%;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.cc-profile-identity[hidden] {
  display: none;
}

.cc-profile-identity__avatar {
  display: inline-grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}

.cc-profile-avatar-trigger {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: var(--profile-avatar-size);
  height: var(--profile-avatar-size);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  overflow: hidden;
}

.cc-profile-avatar-trigger:disabled {
  cursor: default;
}

.cc-profile-avatar-trigger:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-peach-fuzz) 46%, transparent);
  outline-offset: 5px;
}

.cc-profile-avatar-trigger__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(23, 20, 16, 0.36);
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    background-color 180ms ease;
}

.cc-profile-avatar-trigger:hover .cc-profile-avatar-trigger__overlay,
.cc-profile-avatar-trigger:focus-visible .cc-profile-avatar-trigger__overlay {
  opacity: 1;
}

.cc-profile-avatar-trigger:disabled .cc-profile-avatar-trigger__overlay {
  display: none;
}

.cc-profile-avatar-trigger__overlay img {
  display: block;
  width: 42% !important;
  height: 42% !important;
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.cc-profile-identity .cc-auth-avatar--profile {
  width: 100%;
  height: 100%;
  border-width: 1.5px;
  font-size: clamp(1.85rem, 2.45vw, 2.5rem);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 6px 14px rgba(72, 53, 38, 0.1);
}

.cc-profile-identity__copy {
  display: grid;
  justify-items: start;
  gap: 5px;
  min-width: 0;
}

.cc-profile-identity__name {
  --profile-name-base-size: clamp(2.05rem, 3vw, 3.05rem);
  flex: 0 1 auto;
  min-width: 0;
  max-width: calc(100% - var(--profile-avatar-size) - var(--profile-identity-gap));
  margin: 0;
  color: rgba(28, 26, 28, 0.98);
  font-family: var(--font-display);
  font-size: var(--profile-name-fit-size, var(--profile-name-base-size));
  font-weight: 780;
  letter-spacing: -0.028em;
  line-height: 0.88;
  font-variation-settings: "SOFT" 80, "WONK" 0, "opsz" 72;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.cc-profile-identity__email {
  max-width: min(42vw, 28rem);
  margin: 0;
  color: rgba(47, 41, 53, 0.62);
  font-family: var(--font-copy);
  font-size: clamp(0.85rem, 0.92vw, 0.96rem);
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cc-profile-identity__email[hidden] {
  display: none;
}

.cc-profile-identity__avatar-action {
  border: 0;
  padding: 0;
  background: transparent;
  color: #d87966;
  font-family: var(--font-copy);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cc-profile-identity__avatar-action:hover,
.cc-profile-identity__avatar-action:focus-visible {
  color: #bd5f74;
}

.cc-profile-card.cc-profile-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, var(--profile-split-x)) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.cc-profile-card.cc-profile-card[hidden],
.cc-auth-page__panel.cc-profile-card[hidden] {
  display: none !important;
}

.cc-profile-card::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--profile-split-x);
  width: 1px;
  background: var(--profile-divider);
  transform: translateX(-50%);
  pointer-events: none;
}

.cc-profile-tabs {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  align-content: start;
  justify-self: stretch;
  gap: clamp(14px, 1.6vh, 20px);
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
  padding:
    clamp(22px, 2.7vh, 32px)
    clamp(20px, 1.8vw, 28px)
    0
    0;
}

.cc-profile-tab-group {
  display: grid;
  gap: clamp(7px, 0.8vh, 10px);
  min-width: 0;
}

.cc-profile-tab-group:not(:first-child) {
  padding-top: clamp(13px, 1.6vh, 18px);
  border-top: 1px solid var(--profile-divider);
}

.cc-profile-tab-group--primary {
  gap: clamp(8px, 1vh, 11px);
}

.cc-profile-tab-group__label {
  margin: 0;
  color: rgba(47, 41, 53, 0.54);
  font-family: var(--font-ui);
  font-size: clamp(0.74rem, 0.76vw, 0.82rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.cc-profile-tab-list {
  display: grid;
  min-width: 0;
}

.cc-profile-tab-list--divided {
  border: 1px solid rgba(205, 178, 158, 0.4);
  border-radius: 8px;
  background: rgba(255, 252, 248, 0.12);
  overflow: hidden;
}

.cc-profile-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-self: stretch;
  gap: clamp(14px, 1.35vw, 20px);
  width: 100%;
  min-height: clamp(50px, 5.4vh, 60px);
  padding: 0 clamp(18px, 1.7vw, 24px);
  border: 1px solid rgba(205, 178, 158, 0.46);
  border-radius: 8px;
  background: rgba(255, 252, 248, 0.26);
  color: rgba(28, 26, 28, 0.78);
  font-family: var(--font-ui);
  font-size: clamp(0.96rem, 1.02vw, 1.08rem);
  font-weight: 740;
  line-height: 1.1;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.cc-profile-tab-list--divided .cc-profile-tab {
  min-height: clamp(38px, 4.3vh, 46px);
  padding-inline: clamp(17px, 1.45vw, 22px);
  border: 0;
  border-radius: 0;
  background: rgba(255, 252, 248, 0.06);
  color: rgba(47, 41, 53, 0.72);
  font-size: clamp(0.9rem, 0.94vw, 1rem);
  font-weight: 720;
}

.cc-profile-tab-list--divided .cc-profile-tab + .cc-profile-tab {
  border-top: 1px solid rgba(205, 178, 158, 0.34);
}

.cc-profile-tab::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: 6px;
  border-radius: 8px 0 0 8px;
  background: transparent;
  opacity: 0;
  transition:
    background-color 180ms ease,
    opacity 180ms ease;
}

.cc-profile-tab__icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: clamp(19px, 1.5vw, 23px);
  height: clamp(19px, 1.5vw, 23px);
}

.cc-profile-tab__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: invert(37%) sepia(9%) saturate(496%) hue-rotate(182deg) brightness(89%) contrast(86%);
}

.cc-profile-tab:hover,
.cc-profile-tab:focus-visible {
  color: rgba(23, 20, 16, 0.96);
  border-color: rgba(205, 178, 158, 0.62);
  background: rgba(255, 246, 241, 0.56);
}

.cc-profile-tab-list--divided .cc-profile-tab:hover,
.cc-profile-tab-list--divided .cc-profile-tab:focus-visible {
  color: rgba(23, 20, 16, 0.86);
  background: rgba(255, 248, 244, 0.32);
}

.cc-profile-tab-list--divided .cc-profile-tab__icon {
  width: clamp(17px, 1.22vw, 20px);
  height: clamp(17px, 1.22vw, 20px);
}

.cc-profile-tab-list--divided .cc-profile-tab__icon img {
  opacity: 0.78;
}

.cc-profile-tab.is-active {
  border-color: rgba(239, 120, 151, 0.24);
  background: rgba(255, 244, 249, 0.72);
  color: rgba(23, 20, 16, 0.96);
  font-weight: 820;
}

.cc-profile-tab.is-active::before {
  background: #ef7897;
  opacity: 1;
}

.cc-profile-tab.is-active .cc-profile-tab__icon img {
  filter: invert(53%) sepia(59%) saturate(908%) hue-rotate(299deg) brightness(98%) contrast(91%);
}

.cc-profile-details {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  row-gap: clamp(10px, 1.2vh, 14px);
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding-left: clamp(34px, 3.4vw, 54px);
  border-left: 0;
  background: transparent;
  overflow: hidden;
  scrollbar-width: none;
}

.cc-profile-details::-webkit-scrollbar {
  display: none;
}

.cc-profile-details__content {
  display: grid;
  align-content: start;
  gap: clamp(10px, 1.25vh, 15px);
  flex: 1 1 auto;
  justify-self: start;
  width: min(100%, 940px);
  min-height: 0;
  padding-bottom: clamp(2px, 0.5vh, 6px);
  background: transparent;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.cc-profile-details__content::-webkit-scrollbar {
  display: none;
}

.cc-profile-section-heading {
  display: grid;
  gap: 4px;
}

.cc-profile-section-heading h2 {
  margin: 0;
  color: rgba(23, 20, 16, 0.94);
  font-family: var(--font-ui);
  font-size: clamp(1.05rem, 1.25vw, 1.28rem);
  font-weight: 800;
  letter-spacing: -0.018em;
  line-height: 1.15;
}

.cc-profile-section-heading p {
  max-width: 48rem;
  margin: 0;
  color: rgba(47, 41, 53, 0.58);
  font-family: var(--font-copy);
  font-size: clamp(0.9rem, 0.98vw, 1rem);
  font-weight: 500;
  line-height: 1.36;
}

.cc-profile-section-heading--compact {
  gap: 0;
}

.cc-profile-field-list,
.cc-profile-linked__list {
  display: grid;
  border-top: 1px solid var(--profile-divider);
}

.cc-profile-field {
  display: grid;
  grid-template-columns: minmax(130px, 0.28fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  min-height: clamp(42px, 4.9vh, 52px);
  padding: clamp(5px, 0.65vh, 8px) 0;
  border-bottom: 1px solid var(--profile-divider);
}

.cc-profile-field--bio {
  align-items: start;
  min-height: clamp(68px, 7.8vh, 82px);
}

.cc-profile-field__label {
  color: rgba(47, 41, 53, 0.56);
  font-family: var(--font-ui);
  font-size: clamp(0.74rem, 0.78vw, 0.82rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cc-profile-field__value,
.cc-profile-field__control {
  min-width: 0;
  color: rgba(23, 20, 16, 0.88);
  font-family: var(--font-copy);
  font-size: clamp(0.96rem, 1.02vw, 1.08rem);
  font-weight: 620;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.cc-profile-field__control {
  width: 100%;
  min-height: clamp(34px, 3.8vh, 40px);
  padding: 7px 13px;
  border: 1px solid rgba(201, 184, 154, 0.62);
  border-radius: 8px;
  background: rgba(255, 252, 248, 0.56);
  box-shadow: none;
  outline: none;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.cc-profile-field:not(.cc-profile-field--readonly) .cc-profile-field__control {
  cursor: text;
}

.cc-profile-field:not(.cc-profile-field--readonly):hover .cc-profile-field__control,
.cc-profile-field:not(.cc-profile-field--readonly):focus-within .cc-profile-field__control {
  border-color: color-mix(in srgb, var(--color-tangerine-dream) 48%, var(--paper-border));
  background: rgba(255, 250, 246, 0.86);
}

.cc-profile-field__control:focus-visible {
  border-color: color-mix(in srgb, var(--color-tangerine-dream) 62%, var(--paper-border-strong));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-peach-fuzz) 22%, transparent);
}

.cc-profile-field__control[readonly] {
  color: rgba(47, 41, 53, 0.66);
  cursor: default;
}

.cc-profile-field__control:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.cc-profile-field__control--bio {
  min-height: clamp(56px, 6.4vh, 66px);
  resize: vertical;
  line-height: 1.42;
}

.cc-profile-field.is-dirty .cc-profile-field__control {
  border-color: color-mix(in srgb, var(--color-peach-fuzz) 70%, var(--paper-border));
  background: rgba(255, 246, 240, 0.82);
}

.cc-profile-linked {
  display: grid;
  gap: clamp(9px, 1.05vh, 12px);
}

.cc-profile-linked__list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(11px, 1.1vw, 15px);
  border-top: 0;
}

.cc-profile-linked-card {
  --linked-action-size: clamp(28px, 1.95vw, 34px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) var(--linked-action-size);
  align-items: center;
  column-gap: clamp(10px, 1vw, 15px);
  min-width: 0;
  min-height: clamp(66px, 7.4vh, 78px);
  padding: clamp(12px, 1.35vh, 16px) clamp(13px, 1.25vw, 18px);
  border: 1px solid color-mix(in srgb, var(--paper-border) 60%, transparent);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.86), rgba(255, 250, 246, 0.64)),
    rgba(255, 252, 248, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 16px 34px rgba(76, 58, 42, 0.055);
}

.cc-profile-linked-card--connected {
  border-color: color-mix(in srgb, #8fbd92 42%, var(--paper-border));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 16px 34px rgba(83, 137, 89, 0.1);
}

.cc-profile-linked-card__icon {
  display: inline-grid;
  place-items: center;
  width: clamp(38px, 2.65vw, 50px);
  height: clamp(38px, 2.65vw, 50px);
  border: 1px solid color-mix(in srgb, var(--paper-border) 58%, transparent);
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255, 254, 251, 0.92), rgba(255, 250, 246, 0.72)),
    rgba(255, 252, 248, 0.78);
  color: rgba(47, 41, 53, 0.72);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
}

.cc-profile-linked-card__icon img {
  display: block;
  width: clamp(20px, 1.6vw, 29px);
  height: clamp(20px, 1.6vw, 29px);
  object-fit: contain;
}

.cc-profile-linked-card__copy {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding-right: 6px;
}

.cc-profile-linked-card__label {
  color: rgba(23, 20, 16, 0.86);
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1rem, 1.08vw, 1.2rem);
  font-weight: 680;
  letter-spacing: 0;
  line-height: 1.08;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-profile-linked-card__status {
  color: rgba(203, 102, 84, 0.78);
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(0.76rem, 0.78vw, 0.88rem);
  font-weight: 540;
  letter-spacing: 0;
  line-height: 1.08;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-profile-linked-card__status--connected {
  color: rgba(64, 154, 88, 0.78);
}

.cc-profile-linked-card__action {
  position: relative;
  display: inline-grid;
  place-items: center;
  justify-self: end;
  width: var(--linked-action-size);
  height: var(--linked-action-size);
  border: 1px solid #d96b58;
  border-radius: 50%;
  background: rgba(255, 253, 250, 0.74);
  color: #cf604d;
  font-family: var(--font-ui);
  font-size: clamp(1.45rem, 1.75vw, 1.85rem);
  font-weight: 820;
  line-height: 1;
}

.cc-profile-linked-card__action:not(.cc-profile-linked-card__action--connected) {
  font-size: 0;
}

.cc-profile-linked-card__action:not(.cc-profile-linked-card__action--connected)::before,
.cc-profile-linked-card__action:not(.cc-profile-linked-card__action--connected)::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.cc-profile-linked-card__action:not(.cc-profile-linked-card__action--connected)::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.cc-profile-linked-card__action--connected {
  border-color: color-mix(in srgb, #58ad65 18%, transparent);
  background:
    linear-gradient(180deg, rgba(229, 245, 229, 0.82), rgba(220, 241, 221, 0.62)),
    color-mix(in srgb, #58ad65 12%, rgba(255, 252, 248, 0.82));
  color: #55a761;
  font-size: clamp(1rem, 1.2vw, 1.3rem);
  font-weight: 900;
  line-height: 0;
  padding-bottom: 1px;
}

.cc-profile-details__footer {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  flex-shrink: 0;
  align-self: start;
  width: 100%;
  max-width: 940px;
  min-height: var(--cc-footer-tray-height);
  margin: auto 0 0;
  padding:
    clamp(14px, 1.7vh, 20px)
    0
    clamp(12px, 1.6vh, 18px);
  border-top: 0;
  background: transparent;
}

.cc-profile-details__footer > .cc-button {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
}

.cc-profile-details__footer[hidden],
.cc-profile-sign-out[hidden] {
  display: none;
}

.cc-profile-details__footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  border-top: 1px solid var(--profile-divider);
  pointer-events: none;
}

.cc-profile-sign-out {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(47, 41, 53, 0.6);
  font-family: var(--font-copy);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

body[data-page="profile"] .cc-shell__surface > .cc-site-footer {
  display: none;
}

.cc-profile-sign-out:hover,
.cc-profile-sign-out:focus-visible {
  color: #bd5f74;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cc-profile-card__status {
  justify-self: start;
  margin-top: 12px;
}

@media (min-width: 901px) and (max-height: 900px) {
  body[data-page="profile"] {
    --profile-main-top: clamp(22px, 3vh, 34px);
    --profile-main-bottom: clamp(14px, 2vh, 24px);
  }

  .cc-profile-details {
    min-height: 0;
  }

  .cc-profile-details__content {
    gap: clamp(10px, 1.25vh, 14px);
  }

  .cc-profile-identity {
    --profile-avatar-size: clamp(52px, 3.6vw, 60px);
  }

  .cc-profile-field {
    min-height: clamp(40px, 4.7vh, 48px);
    padding: clamp(4px, 0.6vh, 7px) 0;
  }

  .cc-profile-field--bio {
    min-height: clamp(70px, 8.2vh, 82px);
  }

  .cc-profile-field__control {
    min-height: clamp(32px, 3.7vh, 38px);
    padding-block: 6px;
  }

  .cc-profile-field__control--bio {
    min-height: clamp(58px, 6.9vh, 68px);
  }

  .cc-profile-linked {
    gap: clamp(8px, 1vh, 10px);
  }

  .cc-profile-linked__list {
    gap: clamp(10px, 1vw, 13px);
  }

  .cc-profile-linked-card {
    min-height: clamp(62px, 7vh, 70px);
    padding-block: clamp(11px, 1.15vh, 13px);
  }

  .cc-profile-details__footer {
    min-height: clamp(58px, 7vh, 68px);
    padding-block: clamp(8px, 1.2vh, 12px);
  }
}

@media (min-width: 901px) and (max-height: 820px) {
  body[data-page="profile"] {
    --profile-main-top: clamp(22px, 3vh, 34px);
    --profile-main-bottom: clamp(14px, 2vh, 24px);
  }

  .cc-profile-tabs {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .cc-profile-tabs::-webkit-scrollbar {
    display: none;
  }

  .cc-profile-details__footer {
    margin-top: clamp(10px, 1.5vh, 14px);
  }
}

@media (max-width: 900px) {
  .cc-profile-page {
    gap: 34px;
  }

  .cc-profile-page__header,
  .cc-profile-card.cc-profile-card {
    grid-template-columns: 1fr;
  }

  .cc-profile-card.cc-profile-card {
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .cc-profile-page__header {
    grid-row: 1;
  }

  .cc-profile-identity {
    justify-content: start;
  }

  .cc-profile-identity__email {
    max-width: 100%;
  }

  .cc-profile-identity__name {
    max-width: calc(100% - var(--profile-avatar-size) - var(--profile-identity-gap));
  }

  .cc-profile-card::after {
    content: none;
  }

  .cc-profile-tabs {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 67px;
    overflow-x: auto;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--profile-divider);
  }

  .cc-profile-tab-group,
  .cc-profile-tab-group--primary,
  .cc-profile-tab-list {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .cc-profile-tab-group {
    flex: 0 0 auto;
  }

  .cc-profile-tab-group:not(:first-child) {
    padding-top: 0;
    padding-left: 12px;
    border-top: 0;
    border-left: 1px solid var(--profile-divider);
  }

  .cc-profile-tab-group__label {
    display: none;
  }

  .cc-profile-tab-list--divided {
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  .cc-profile-tab-list--divided .cc-profile-tab {
    border: 1px solid rgba(205, 178, 158, 0.46);
    border-radius: 8px;
    background: rgba(255, 252, 248, 0.26);
  }

  .cc-profile-tab-list--divided .cc-profile-tab + .cc-profile-tab {
    border-top: 1px solid rgba(205, 178, 158, 0.46);
  }

  .cc-profile-tab {
    width: max-content;
    min-height: 54px;
    padding-inline: 20px;
    white-space: nowrap;
  }

  .cc-profile-details {
    grid-column: 1;
    grid-row: 3;
    padding-left: 0;
    border-left: 0;
  }

  .cc-profile-linked__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .cc-main--profile {
    padding-inline: clamp(20px, 6vw, 28px);
  }

  body[data-page="profile"] .cc-page-title {
    font-size: clamp(2.8rem, 14vw, 4rem);
  }

  .cc-profile-field {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cc-profile-linked__list {
    grid-template-columns: 1fr;
  }

  .cc-profile-details__footer {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

body[data-page="onboarding"] .cc-shell__surface {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - (2 * var(--cc-shell-y)));
}

body[data-page="onboarding"].cc-page .cc-shell__surface > .cc-site-footer {
  display: none;
}

body[data-page="onboarding"].cc-page .cc-shell__surface > .cc-site-footer::before {
  content: none;
}

@media (min-width: 761px) {
  body[data-page="onboarding"] {
    min-height: 100dvh;
    overflow: hidden;
  }

  body[data-page="onboarding"] .site-shell {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  body[data-page="onboarding"] .canvas-card {
    height: calc(100dvh - (2 * var(--cc-shell-y)));
    min-height: 0;
    max-height: calc(100dvh - (2 * var(--cc-shell-y)));
  }
}

.cc-main--onboarding {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  place-items: center;
  padding: clamp(24px, 3.4vh, 38px) clamp(24px, 6vw, 84px);
}

.cc-onboarding-page {
  align-items: center;
  min-height: 0;
}

.cc-onboarding-card {
  display: grid;
  justify-items: center;
  width: min(100%, 760px);
  padding: clamp(24px, 3.2vh, 34px) clamp(30px, 5vw, 68px);
}

.cc-onboarding-card__intro {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.cc-onboarding-card__sparkles {
  width: 36px;
  height: 18px;
  color: #f0a27d;
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 860;
  line-height: 1;
  text-shadow:
    -14px 8px 0 rgba(182, 177, 206, 0.72),
    14px 8px 0 rgba(255, 183, 148, 0.8),
    3px -5px 0 rgba(255, 166, 137, 0.52);
}

.cc-onboarding-card__title {
  max-width: none;
  margin: 0;
  font-size: clamp(1.92rem, 2.34vw, 2.28rem);
  line-height: 1.04;
}

.cc-onboarding-card__avatar {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: clamp(18px, 2.6vh, 24px);
}

.cc-onboarding-avatar-stack {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.cc-auth-avatar--onboarding {
  width: clamp(96px, 8.6vw, 112px);
  height: clamp(96px, 8.6vw, 112px);
  border: 1.5px solid var(--cc-avatar-border);
  font-size: clamp(2.35rem, 4vw, 3rem);
  box-shadow:
    0 0 0 3px var(--cc-avatar-border-soft),
    0 10px 30px rgba(72, 53, 38, 0.14),
    0 0 0 6px rgba(26, 25, 27, 0.08);
}

.cc-onboarding-card__avatar-action {
  border: 0;
  padding: 0;
  background: transparent;
  color: #d87966;
  font-family: var(--font-copy);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cc-onboarding-card__avatar-action:hover,
.cc-onboarding-card__avatar-action:focus-visible {
  color: #bd5f74;
}

.cc-onboarding-card__section {
  width: min(100%, 580px);
  margin-top: clamp(18px, 2.5vh, 24px);
  padding-top: clamp(17px, 2.2vh, 22px);
  border-top: 1px dashed rgba(214, 169, 143, 0.5);
  text-align: left;
}

.cc-onboarding-field {
  display: grid;
  gap: 6px;
}

.cc-onboarding-field__label {
  color: rgba(23, 20, 16, 0.94);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.cc-onboarding-input-wrap {
  position: relative;
  margin-top: 14px;
}

.cc-onboarding-input {
  width: 100%;
  min-height: 52px;
  padding: 0 76px 0 20px;
  border: 1px solid rgba(196, 163, 136, 0.58);
  border-radius: 11px;
  background: rgba(255, 253, 250, 0.7);
  color: rgba(23, 20, 16, 0.96);
  font-family: var(--font-ui);
  font-size: 1.06rem;
  font-weight: 650;
  line-height: 1.2;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.cc-onboarding-input:focus {
  border-color: rgba(226, 112, 82, 0.74);
  background: rgba(255, 255, 255, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 0 0 4px rgba(255, 185, 160, 0.24);
}

.cc-onboarding-counter {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  color: rgba(47, 41, 53, 0.62);
  font-family: var(--font-copy);
  font-size: 0.95rem;
  font-weight: 650;
  pointer-events: none;
}

.cc-onboarding-card__section--actions {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.cc-onboarding-card__continue {
  width: min(100%, 360px);
  min-height: 52px;
  gap: 14px;
  font-size: 1.06rem;
}

.cc-onboarding-card__status {
  margin: 0;
  text-align: center;
}

.cc-avatar-crop-modal[hidden] {
  display: none;
}

.cc-avatar-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 42px);
}

.cc-avatar-crop-modal__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 14%, rgba(255, 204, 216, 0.36), transparent 30%),
    rgba(28, 25, 24, 0.42);
  backdrop-filter: blur(10px);
}

.cc-avatar-crop-card {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: clamp(18px, 2.5vh, 24px);
  width: min(100%, 520px);
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid rgba(205, 178, 158, 0.52);
  border-radius: clamp(20px, 2vw, 28px);
  background:
    radial-gradient(circle at 92% 8%, rgba(244, 212, 232, 0.4), transparent 34%),
    radial-gradient(circle at 8% 100%, rgba(255, 222, 206, 0.44), transparent 38%),
    rgba(255, 252, 248, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 28px 70px rgba(48, 36, 28, 0.2);
}

.cc-avatar-crop-card__header {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.cc-avatar-crop-card__title {
  margin: 0;
  color: rgba(23, 20, 16, 0.96);
  font-family: var(--font-title);
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  font-weight: 820;
  line-height: 1;
}

.cc-avatar-crop-stage {
  display: grid;
  place-items: center;
  width: 100%;
}

.cc-avatar-crop-frame {
  position: relative;
  width: min(68vw, 268px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, 0.9);
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.82), transparent 44%),
    color-mix(in srgb, var(--color-peach-fuzz) 32%, var(--main-card-surface));
  box-shadow:
    0 0 0 1px rgba(205, 178, 158, 0.34),
    0 18px 36px rgba(72, 53, 38, 0.14);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.cc-avatar-crop-frame:active {
  cursor: grabbing;
}

.cc-avatar-crop-image {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  max-width: none;
  max-height: none;
  object-fit: contain;
  transform-origin: top left;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
}

.cc-avatar-crop-zoom {
  display: grid;
  gap: 10px;
  width: min(100%, 360px);
  color: rgba(23, 20, 16, 0.88);
  font-family: var(--font-ui);
  font-size: 0.94rem;
  font-weight: 800;
}

.cc-avatar-crop-zoom input {
  width: 100%;
  accent-color: #df8d70;
}

.cc-avatar-crop-card__status {
  min-height: 1.35em;
  margin: 0;
  color: rgba(47, 41, 53, 0.64);
  font-family: var(--font-copy);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
}

.cc-avatar-crop-card__status[hidden] {
  display: none;
}

.cc-avatar-crop-card__status.is-error {
  color: #b64d68;
}

.cc-avatar-crop-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.cc-avatar-crop-card__actions .cc-button {
  min-width: 148px;
}

.cc-image-position-modal[hidden] {
  display: none;
}

.cc-image-position-modal {
  position: fixed;
  inset: 0;
  z-index: 245;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3.5vw, 38px);
}

.cc-image-position-modal__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 14%, rgba(255, 204, 216, 0.32), transparent 30%),
    rgba(28, 25, 24, 0.44);
  backdrop-filter: blur(10px);
}

.cc-image-position-card {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: clamp(14px, 2.2vh, 22px);
  width: min(100%, 620px);
  max-height: min(92svh, 760px);
  padding: clamp(20px, 3.6vw, 32px);
  border: 1px solid rgba(205, 178, 158, 0.52);
  border-radius: clamp(18px, 2vw, 26px);
  background:
    radial-gradient(circle at 92% 8%, rgba(244, 212, 232, 0.34), transparent 34%),
    radial-gradient(circle at 8% 100%, rgba(255, 222, 206, 0.38), transparent 38%),
    rgba(255, 252, 248, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 28px 70px rgba(48, 36, 28, 0.2);
  overflow: auto;
}

.cc-image-position-card__header {
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
}

.cc-image-position-card__eyebrow {
  margin: 0;
  color: rgba(47, 41, 53, 0.58);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.cc-image-position-card__title {
  margin: 0;
  color: rgba(23, 20, 16, 0.96);
  font-family: var(--font-title);
  font-size: clamp(1.5rem, 2.1vw, 1.95rem);
  font-weight: 820;
  line-height: 1;
}

.cc-image-position-stage {
  display: grid;
  place-items: center;
  width: 100%;
}

.cc-image-position-frame {
  position: relative;
  width: min(100%, 500px);
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 249, 244, 0.94), rgba(255, 239, 230, 0.86)),
    color-mix(in srgb, var(--color-peach-fuzz) 24%, var(--main-card-surface));
  box-shadow:
    0 0 0 1px rgba(205, 178, 158, 0.34),
    0 18px 36px rgba(72, 53, 38, 0.14);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.cc-image-position-frame:active {
  cursor: grabbing;
}

.cc-image-position-image {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  max-width: none;
  max-height: none;
  object-fit: contain;
  transform-origin: top left;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
}

.cc-image-position-zoom {
  display: grid;
  gap: 10px;
  width: min(100%, 390px);
  color: rgba(23, 20, 16, 0.88);
  font-family: var(--font-ui);
  font-size: 0.94rem;
  font-weight: 800;
}

.cc-image-position-zoom input {
  width: 100%;
  accent-color: #df8d70;
}

.cc-image-position-card__status {
  min-height: 1.35em;
  margin: 0;
  color: rgba(47, 41, 53, 0.64);
  font-family: var(--font-copy);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
}

.cc-image-position-card__status[hidden] {
  display: none;
}

.cc-image-position-card__status.is-error {
  color: #b64d68;
}

.cc-image-position-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.cc-image-position-card__actions .cc-button {
  min-width: 148px;
}

@media (max-width: 760px) {
  .cc-image-position-modal {
    align-items: stretch;
    padding: 0;
  }

  .cc-image-position-card {
    width: 100%;
    max-height: 100svh;
    min-height: 100svh;
    align-content: start;
    border: 0;
    border-radius: 0;
    padding:
      clamp(20px, 5svh, 34px)
      clamp(16px, 5vw, 24px)
      calc(clamp(18px, 4svh, 28px) + env(safe-area-inset-bottom));
    background: var(--cc-container-shell-surface);
    box-shadow: none;
  }

  .cc-image-position-frame {
    width: min(100%, 430px, 60svh);
    max-height: 48svh;
    border-radius: 14px;
  }

  .cc-image-position-card__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cc-image-position-card__actions .cc-button {
    width: 100%;
    min-width: 0;
    min-height: 52px;
  }
}

body[data-page="home"] .home-main {
  justify-content: center;
  gap: var(--home-main-gap, clamp(28px, 3vh, 40px));
  padding:
    var(--home-main-top, clamp(42px, 4.4vw, 60px))
    var(--home-main-x, clamp(56px, 7vw, 112px))
    var(--home-main-bottom, clamp(28px, 3vw, 44px));
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body[data-page="home"] .home-main::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body[data-page="home"] .hero {
  flex: 0 0 auto;
  align-items: center;
  grid-template-columns: minmax(0, 0.9fr) minmax(30rem, 1.1fr);
  gap: var(--home-hero-gap, clamp(5rem, 8vw, 8.5rem));
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0;
}

body[data-page="home"] .hero-copy {
  grid-column: 1;
  max-width: 47rem;
  padding: 0;
  transform: none;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  min-height: 40px;
  margin: 0 0 clamp(20px, 2vw, 28px);
  padding: 0 17px;
  border-radius: 999px;
  border: 1px solid rgba(224, 180, 178, 0.62);
  background: rgba(255, 246, 244, 0.68);
  color: #e97895;
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hero-kicker__icon {
  font-size: 0.98em;
  line-height: 1;
}

body[data-page="home"] .hero h1 {
  max-width: 12.3ch;
  font-family: var(--font-display);
  font-size: var(--home-title-size, clamp(4.5rem, 5.5vw, 6.05rem));
  font-weight: 780;
  line-height: 0.92;
  letter-spacing: -0.028em;
  font-variation-settings: "SOFT" 80, "WONK" 0, "opsz" 72;
  color: rgba(28, 26, 28, 0.98);
  text-wrap: balance;
}

.hero-accent-dot {
  color: #ee7897;
}

body[data-page="home"] .hero-nowrap--creative {
  white-space: nowrap;
}

body[data-page="home"] .hero-text {
  max-width: 44rem;
  margin-top: var(--home-copy-margin, clamp(24px, 2vw, 30px));
  margin-left: clamp(14px, 1.1vw, 18px);
  padding-left: 0;
  font-family: var(--font-copy);
  font-size: clamp(1rem, 1.05vw, 1.1rem);
  font-weight: 500;
  line-height: 1.6;
  color: rgba(43, 43, 47, 0.68);
}

body[data-page="home"] .hero-text__line {
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: var(--home-actions-margin, clamp(28px, 2.8vw, 36px));
  margin-left: clamp(14px, 1.1vw, 18px);
}

body[data-page="home"] .hero-actions .button {
  min-height: 52px;
  min-width: 168px;
  padding: 0.9rem 1.65rem;
  border-radius: 14px;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.button--with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.button__icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  background-color: #171410;
  opacity: 0.94;
  filter: none;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  pointer-events: none;
}

.button__icon--get-started {
  -webkit-mask-image: url("./assets/icons/actions/get-started.svg");
  mask-image: url("./assets/icons/actions/get-started.svg");
}

.button__icon--compass {
  -webkit-mask-image: url("./assets/icons/actions/explore.svg");
  mask-image: url("./assets/icons/actions/explore.svg");
}

.button:hover .button__icon,
.button:focus-visible .button__icon {
  opacity: 1;
}

body[data-page="home"] .hero-visual {
  grid-column: 2;
  align-self: center;
  justify-self: end;
  justify-items: end;
  padding: clamp(8px, 1.3vw, 18px) 0 0;
  transform: translateX(clamp(18px, 2.2vw, 34px));
}

body[data-page="home"] .palette-artwork {
  width: clamp(31rem, 38vw, 40rem);
  margin: 0;
  padding: 0;
  filter:
    saturate(1.08)
    drop-shadow(0 22px 34px rgba(128, 82, 102, 0.1));
}

body[data-page="home"] .palette-panel {
  gap: clamp(26px, 3vw, 42px);
  justify-items: center;
}

body[data-page="home"] .palette-selector {
  gap: clamp(22px, 2.1vw, 32px);
}

body[data-page="home"] .palette-selector__dot {
  width: clamp(2.15rem, 2.7vw, 2.7rem);
  box-shadow: none;
}

body[data-page="home"] .palette-selector__dot::after {
  content: none;
}

body[data-page="home"] .palette-selector__dot:hover {
  animation: landing-dot-bobble 760ms ease-in-out;
  box-shadow: none;
}

body[data-page="home"] .hero-swatch-art {
  width: min(100%, 39rem);
  min-height: var(--home-art-height, clamp(330px, 25vw, 386px));
}

body[data-page="home"] .hero-swatch-row--one {
  width: 92%;
  transform: translateX(12px) rotate(-0.8deg);
}

body[data-page="home"] .hero-swatch-row--two {
  top: 66px;
  width: 90%;
  transform: translateX(34px) rotate(1deg);
}

body[data-page="home"] .hero-swatch-row--three {
  top: 132px;
  width: 96%;
  transform: translateX(4px) rotate(-0.6deg);
}

body[data-page="home"] .hero-swatch-row--four {
  top: 198px;
  width: 82%;
  transform: translateX(-18px) rotate(0.8deg);
}

body[data-page="home"] .hero-swatch-row--five {
  top: 264px;
  width: 88%;
  transform: translateX(28px) rotate(-1deg);
}

@keyframes landing-dot-bobble {
  0%,
  100% {
    transform: translateY(0);
  }

  45% {
    transform: translateY(-3px);
  }

  72% {
    transform: translateY(1px);
  }
}

body[data-page="home"] .hero-swatch-strip {
  height: clamp(42px, 3.5vw, 50px);
  border-radius: 999px;
  box-shadow:
    0 18px 32px rgba(128, 82, 102, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

body[data-page="home"] .hero-metrics {
  flex: 0 0 auto;
  width: 100%;
  max-width: 1210px;
  margin: var(--home-metrics-margin, clamp(20px, 2.5vh, 34px)) auto 0;
}

body[data-page="home"] .hero-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: var(--home-stats-height, clamp(104px, 10.8vh, 118px));
  padding: clamp(1.25rem, 1.85vw, 1.85rem) clamp(1.35rem, 2.2vw, 2.2rem);
  border-radius: 18px;
  background: rgba(255, 251, 247, 0.7);
  border: 1px solid rgba(205, 178, 158, 0.5);
  box-shadow:
    0 18px 38px rgba(88, 60, 48, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

body[data-page="home"] .hero-stats .hero-stat {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.7vw, 22px);
  min-width: 0;
  padding: 0 clamp(18px, 3vw, 46px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

body[data-page="home"] .hero-stats .hero-stat:hover {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

body[data-page="home"] .hero-stats .hero-stat:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 0;
  bottom: 8px;
  width: 1px;
  background: rgba(205, 178, 158, 0.48);
}

.hero-stat__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--hero-stat-accent, currentColor) 28%, var(--paper-border-soft));
  background: color-mix(in srgb, var(--hero-stat-accent, currentColor) 10%, white);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 8px 18px color-mix(in srgb, var(--hero-stat-accent, currentColor) 10%, transparent);
}

.hero-stat__icon::before {
  content: "";
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  background-color: currentColor;
  opacity: 0.96;
  filter:
    drop-shadow(0.42px 0 0 currentColor)
    drop-shadow(-0.42px 0 0 currentColor)
    drop-shadow(0 0.42px 0 currentColor)
    drop-shadow(0 -0.42px 0 currentColor);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  pointer-events: none;
}

.hero-stat__icon::after {
  content: none;
}

.hero-stat--brands .hero-stat__icon {
  --hero-stat-accent: color-mix(in srgb, var(--color-pink) 72%, #e96f8f);
  color: color-mix(in srgb, var(--color-pink) 72%, #e96f8f);
}

.hero-stat--brands .hero-stat__icon::before {
  -webkit-mask-image: url("./assets/icons/ui/brand-badge.svg");
  mask-image: url("./assets/icons/ui/brand-badge.svg");
}

.hero-stat--colours .hero-stat__icon {
  --hero-stat-accent: var(--medium-alcohol-accent);
  color: color-mix(in srgb, var(--medium-alcohol-accent) 74%, var(--color-text));
}

.hero-stat--colours .hero-stat__icon::before {
  -webkit-mask-image: url("./assets/icons/ui/colour-palette.svg");
  mask-image: url("./assets/icons/ui/colour-palette.svg");
}

.hero-stat--pages .hero-stat__icon {
  --hero-stat-accent: var(--medium-pencil-accent);
  color: color-mix(in srgb, var(--medium-pencil-accent) 64%, var(--color-text));
}

.hero-stat--pages .hero-stat__icon::before {
  -webkit-mask-image: url("./assets/icons/ui/database-stats.svg");
  mask-image: url("./assets/icons/ui/database-stats.svg");
}

.hero-stat__copy {
  min-width: 0;
  text-align: center;
}

body[data-page="home"] .hero-stats .hero-stat__copy,
body[data-page="home"] .hero-stats .hero-stat__copy:hover {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

body[data-page="home"] .hero-stats dt {
  margin: 0;
  color: rgba(52, 48, 56, 0.62);
  font-family: var(--font-ui);
  font-size: clamp(0.62rem, 0.66vw, 0.7rem);
  font-weight: 800;
  letter-spacing: 0.105em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

body[data-page="home"] .hero-stats dd {
  margin: 6px 0 0;
  color: rgba(26, 25, 27, 0.98);
  font-family: var(--font-ui);
  font-size: clamp(1.42rem, 1.7vw, 1.78rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  text-align: center;
}

/* Desktop source-of-truth: home keeps its current fixed-height app frame. */
@media (min-width: 761px) {
  body[data-page="home"] {
    overflow: hidden;
  }

  body[data-page="home"] .site-shell {
    height: 100dvh;
    min-height: 100svh;
    overflow: hidden;
  }

  body[data-page="home"] .canvas-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: calc(100dvh - (2 * var(--cc-shell-y)));
    min-height: 0;
    max-height: calc(100dvh - (2 * var(--cc-shell-y)));
  }

  body[data-page="home"] .home-main {
    min-height: 0;
  }
}

/* Desktop height compression: reduce gallery density before changing structure. */
@media (min-width: 761px) and (max-height: 1080px) {
  body[data-page="home"] {
    --home-main-top: clamp(24px, 2.8vh, 34px);
    --home-main-bottom: clamp(24px, 2.9vh, 36px);
    --home-main-gap: clamp(20px, 2.6vh, 30px);
    --home-hero-gap: clamp(48px, 6vw, 88px);
    --home-title-size: clamp(3.9rem, 4.85vw, 5.35rem);
    --home-copy-margin: clamp(16px, 1.8vh, 22px);
    --home-actions-margin: clamp(18px, 2.2vh, 26px);
    --home-art-height: clamp(280px, 22vw, 330px);
    --home-metrics-margin: clamp(14px, 1.8vh, 22px);
    --home-stats-height: clamp(92px, 9.6vh, 108px);
  }

  body[data-page="home"] .hero-swatch-strip {
    height: clamp(36px, 3.1vw, 44px);
  }

  body[data-page="home"] .hero-swatch-row--two {
    top: 56px;
  }

  body[data-page="home"] .hero-swatch-row--three {
    top: 112px;
  }

  body[data-page="home"] .hero-swatch-row--four {
    top: 168px;
  }

  body[data-page="home"] .hero-swatch-row--five {
    top: 224px;
  }

  body[data-page="home"] .hero-stats {
    padding-block: clamp(0.9rem, 1.45vw, 1.35rem);
  }
}

@media (min-width: 761px) and (max-height: 920px) {
  body[data-page="home"] {
    --home-main-top: clamp(24px, 3.1vh, 34px);
    --home-main-bottom: clamp(34px, 4.4vh, 48px);
    --home-main-gap: clamp(32px, 4vh, 46px);
    --home-hero-gap: clamp(44px, 6vw, 84px);
    --home-title-size: clamp(3.95rem, 5vw, 5.3rem);
    --home-copy-margin: clamp(18px, 2.2vh, 24px);
    --home-actions-margin: clamp(22px, 2.8vh, 30px);
    --home-art-height: clamp(292px, 23vw, 340px);
    --home-metrics-margin: clamp(22px, 3.2vh, 34px);
    --home-stats-height: clamp(100px, 11vh, 116px);
  }

  body[data-page="home"] .home-main {
    justify-content: flex-start;
  }

  body[data-page="home"] .hero-swatch-strip {
    height: clamp(36px, 3.2vw, 44px);
  }

  body[data-page="home"] .hero-swatch-row--two {
    top: 54px;
  }

  body[data-page="home"] .hero-swatch-row--three {
    top: 108px;
  }

  body[data-page="home"] .hero-swatch-row--four {
    top: 162px;
  }

  body[data-page="home"] .hero-swatch-row--five {
    top: 216px;
  }

}

@media (min-width: 761px) and (max-height: 820px) {
  body[data-page="home"] .home-main {
    scroll-padding-block: var(--home-main-top, 28px) var(--home-main-bottom, 42px);
  }
}

@media (max-width: 1199px) {
  body[data-page="home"] .home-main {
    padding-inline: clamp(28px, 5vw, 68px);
  }

  body[data-page="home"] .hero {
    grid-template-columns: minmax(0, 0.95fr) minmax(20rem, 1.05fr);
    gap: clamp(34px, 5vw, 58px);
  }

  body[data-page="home"] .hero h1 {
    font-size: var(--home-title-size, clamp(4.2rem, 7.8vw, 6.15rem));
  }

  body[data-page="home"] .hero-visual {
    transform: none;
  }

  body[data-page="home"] .palette-artwork {
    width: clamp(24rem, 39vw, 32rem);
  }

  body[data-page="home"] .hero-swatch-art {
    min-height: clamp(276px, 28vw, 330px);
  }

  body[data-page="home"] .hero-swatch-strip {
    height: clamp(38px, 4vw, 46px);
  }

  body[data-page="home"] .hero-swatch-row--two {
    top: 58px;
  }

  body[data-page="home"] .hero-swatch-row--three {
    top: 116px;
  }

  body[data-page="home"] .hero-swatch-row--four {
    top: 174px;
  }

  body[data-page="home"] .hero-swatch-row--five {
    top: 232px;
  }

  body[data-page="home"] .hero-stats {
    padding: 18px;
  }

  body[data-page="home"] .hero-stats .hero-stat {
    padding: 0 18px;
  }
}

@media (max-width: 900px) {
  body[data-page="home"] .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 16px clamp(18px, 4vw, 28px);
  }

  body[data-page="home"] .site-nav,
  body[data-page="home"] .header-link {
    display: none;
  }

  body[data-page="home"] .menu-toggle {
    display: inline-flex;
  }

  body[data-page="home"] .mobile-panel {
    position: absolute;
    top: 72px;
    left: clamp(18px, 4vw, 28px);
    right: clamp(18px, 4vw, 28px);
  }

  body[data-page="home"] .home-main {
    justify-content: flex-start;
    padding:
      var(--home-main-top, clamp(30px, 7vw, 52px))
      var(--home-main-x, clamp(22px, 6vw, 42px))
      var(--home-main-bottom, clamp(28px, 6vw, 42px));
  }

  body[data-page="home"] .hero {
    grid-template-columns: 1fr;
    gap: clamp(18px, 4vw, 28px);
  }

  body[data-page="home"] .hero-copy,
  body[data-page="home"] .hero-visual {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  body[data-page="home"] .hero-copy {
    max-width: 42rem;
  }

  body[data-page="home"] .hero h1 {
    max-width: 10.6ch;
    font-size: var(--home-title-size, clamp(4rem, 12vw, 5.8rem));
  }

  body[data-page="home"] .hero-visual {
    display: none;
    justify-self: center;
    justify-items: center;
    padding-top: 0;
    transform: none;
  }

  body[data-page="home"] .palette-artwork {
    width: min(100%, 34rem);
  }

  body[data-page="home"] .hero-stats {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
  }

  body[data-page="home"] .hero-stats .hero-stat {
    padding: 0;
  }

  body[data-page="home"] .hero-stats .hero-stat:not(:last-child)::after {
    top: auto;
    right: 0;
    bottom: -8px;
    left: 0;
    width: auto;
    height: 1px;
  }
}

@media (max-width: 560px) {
  .brand-mark {
    margin-left: clamp(-10px, -2.8vw, -6px);
  }

  body[data-page="home"] .brand-mark__script,
  body[data-page="home"] .brand-mark__word {
    font-size: clamp(1.32rem, 5.6vw, 1.58rem);
  }

  body[data-page="home"] .hero-kicker {
    min-height: 38px;
    padding: 0 15px;
    font-size: 0.84rem;
  }

  body[data-page="home"] .hero h1 {
    max-width: 9.8ch;
    font-size: var(--home-title-size, clamp(2.8rem, 13.4vw, 3.3rem));
    line-height: 0.92;
    letter-spacing: -0.03em;
  }

  body[data-page="home"] .hero-text {
    font-size: 0.94rem;
  }

  body[data-page="home"] .hero-text__line {
    white-space: normal;
  }

  body[data-page="home"] .hero-actions {
    width: 100%;
  }

  body[data-page="home"] .hero-actions .button {
    width: 100%;
    min-width: 0;
  }

  body[data-page="home"] .palette-selector {
    gap: 11px;
  }

  body[data-page="home"] .palette-selector__dot {
    width: clamp(1.45rem, 7vw, 2rem);
  }

  body[data-page="home"] .hero-swatch-art {
    width: min(100%, 22rem);
    min-height: 235px;
  }

  body[data-page="home"] .hero-swatch-row--two {
    top: 45px;
  }

  body[data-page="home"] .hero-swatch-row--three {
    top: 90px;
  }

  body[data-page="home"] .hero-swatch-row--four {
    top: 135px;
  }

  body[data-page="home"] .hero-swatch-row--five {
    top: 180px;
  }

  body[data-page="home"] .hero-swatch-strip {
    height: 34px;
  }

  .hero-stat__icon {
    flex-basis: 50px;
    width: 50px;
    height: 50px;
  }
}

/* Pages opened workspace: image-led split that preserves the existing pin crop model. */
/* Desktop source-of-truth: current Pages split workspace pass. */
@media (min-width: 761px) {
  body[data-page="pages"] .pages-workspace.split-workspace {
    --workspace-panel-gap: clamp(30px, 3.5vw, 52px);
    --workspace-preview-column: minmax(0, 1.36fr);
    --workspace-tracker-column: minmax(380px, 1fr);
    grid-template-columns: var(--workspace-preview-column) var(--workspace-tracker-column);
    gap: var(--workspace-panel-gap);
    position: relative;
  }

  body[data-page="pages"] .pages-workspace.split-workspace::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 58%;
    width: 1px;
    background: rgba(205, 178, 158, 0.36);
    pointer-events: none;
  }

  body[data-page="pages"] .pages-workspace.split-workspace > .workspace-panel {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-page="pages"] .pages-workspace.split-workspace > .pages-preview-panel {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto auto;
    gap: 0;
    padding:
      clamp(12px, 1.8vh, 22px)
      clamp(20px, 2.4vw, 34px)
      0
      var(--collection-action-inset);
  }

  body[data-page="pages"] .pages-workspace.split-workspace > .pages-object-tracker {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: clamp(12px, 1.5vh, 18px);
    max-width: none;
    padding:
      clamp(12px, 1.45vh, 18px)
      var(--collection-action-inset)
      0
      0;
  }

  body[data-page="pages"] .pages-preview-panel__view,
  body[data-page="pages"] .pages-preview-panel__artwork {
    height: 100%;
    min-height: 0;
  }

  body[data-page="pages"] .pages-preview-panel__artwork {
    display: grid;
    place-items: stretch;
    padding: 0;
  }

  body[data-page="pages"] .pages-preview-panel__frame {
    flex: none;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    align-self: stretch;
    border-radius: 16px;
    border-color: rgba(205, 178, 158, 0.46);
    box-shadow:
      inset 0 0 0 1px rgba(80, 65, 45, 0.07),
      0 12px 26px rgba(60, 45, 25, 0.045);
  }

  body[data-page="pages"] .pages-preview-panel__footer.gallery-panel__footer {
    --gallery-chrome-inset: 0px;
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    min-height: clamp(78px, 8.2vh, 94px);
    margin: 0;
    padding:
      clamp(14px, 1.7vh, 20px)
      0
      clamp(12px, 1.6vh, 18px);
    border-top: 0;
    background: transparent;
    overflow: visible;
  }

  body[data-page="pages"] .pages-preview-panel__footer.gallery-panel__footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(205, 178, 158, 0.36);
    pointer-events: none;
  }

  body[data-page="pages"] .pages-object-tracker__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: clamp(12px, 1.45vw, 18px);
    margin: 0;
  }

  body[data-page="pages"] .pages-object-tracker__title {
    display: block;
    width: 100%;
    min-width: 0;
  }

  body[data-page="pages"] .pages-object-tracker__title-view {
    max-width: min(100%, 14ch);
    margin: 0;
    color: rgba(28, 26, 28, 0.98);
    font-family: var(--font-display);
    font-size: clamp(2.05rem, 3vw, 3.05rem);
    font-weight: 780;
    letter-spacing: -0.028em;
    line-height: 0.88;
    font-variation-settings: "SOFT" 80, "WONK" 0, "opsz" 72;
    text-wrap: balance;
  }

  body[data-page="pages"] .pages-object-tracker__meta {
    max-width: 100%;
    margin: clamp(6px, 0.85vh, 10px) 0 0;
    color: rgba(47, 41, 53, 0.68);
    font-family: var(--font-copy);
    font-size: clamp(0.78rem, 0.84vw, 0.92rem);
    font-weight: 600;
    line-height: 1.38;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body[data-page="pages"] .pages-object-tracker__actions {
    align-self: start;
    gap: 8px;
    padding-top: 2px;
  }

  body[data-page="pages"] .pages-object-tracker__shell {
    min-height: 0;
    overflow: hidden auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-page="pages"] .pages-object-list {
    height: 100%;
    gap: 10px;
    padding: 0;
  }

  body[data-page="pages"] .pages-workspace.split-workspace .palette-editor__footer {
    position: relative;
    width: 100%;
    min-height: clamp(78px, 8.2vh, 94px);
    margin: 0;
    padding:
      clamp(14px, 1.7vh, 20px)
      0
      clamp(12px, 1.6vh, 18px);
    border-top: 0;
    background: transparent;
    overflow: visible;
  }

  body[data-page="pages"] .pages-workspace.split-workspace .palette-editor__footer .cc-footer__action,
  body[data-page="pages"] .pages-workspace.split-workspace .palette-editor__footer .cc-footer__note {
    min-width: 0;
    min-height: 0;
    visibility: hidden;
    pointer-events: none;
  }

  body[data-page="pages"] .pages-workspace.split-workspace .palette-editor__footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(205, 178, 158, 0.36);
    pointer-events: none;
  }
}

/* Pages workspace tracker polish: object cards, flat colour rows, shared card actions. */
body[data-page="pages"] .pages-object-tracker__actions .palette-editor__close.modal-button--icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  color: rgba(23, 20, 16, 0.72);
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

body[data-page="pages"] .pages-object-tracker__actions .palette-editor__close.modal-button--icon span {
  font-size: 1.42rem;
  line-height: 1;
  transform: translateY(1px);
}

body[data-page="pages"] .pages-object {
  --pages-object-divider-inset: 22px;
  overflow: hidden;
  border-radius: 16px;
  background: #faf6f0;
  border: 1.5px solid color-mix(in srgb, var(--paper-border) 58%, var(--paper-border-soft));
  box-shadow:
    3px 5px 0 color-mix(in srgb, var(--paper-border) 18%, transparent),
    0 3px 10px color-mix(in srgb, var(--paper-border) 12%, rgba(35, 32, 26, 0.035));
}

body[data-page="pages"] .pages-object:hover,
body[data-page="pages"] .pages-object:focus-within,
body[data-page="pages"] .pages-object.is-active {
  background: #faf6f0;
  border-color: color-mix(in srgb, var(--paper-border) 64%, var(--paper-border-soft));
  box-shadow:
    3px 5px 0 color-mix(in srgb, var(--paper-border) 22%, transparent),
    0 4px 16px rgba(60, 45, 20, 0.045);
}

body[data-page="pages"] .pages-object__row {
  min-height: 64px;
  padding: 0 14px 0 22px;
  gap: 12px;
}

body[data-page="pages"] .pages-object__summary {
  min-height: 64px;
  padding: 14px 0 12px;
  gap: 8px;
}

body[data-page="pages"] .pages-object__summary--collapsed {
  min-height: 64px;
  padding-bottom: 12px;
}

body[data-page="pages"] .pages-object__name {
  font-size: clamp(1.02rem, 1.18vw, 1.16rem);
  line-height: 1.08;
}

body[data-page="pages"] .pages-object__actions {
  align-self: start;
  padding-top: 14px;
  gap: 6px;
  transform: translateX(4px);
}

body[data-page="pages"] .pages-object:hover .pages-object__actions,
body[data-page="pages"] .pages-object__actions:hover,
body[data-page="pages"] .pages-object__actions:focus-within,
body[data-page="pages"] .pages-object:focus-within .pages-object__actions {
  transform: translateX(0);
}

body[data-page="pages"] .pages-object__actions .gallery-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 24px;
  max-width: none;
  height: 24px;
  min-height: 0;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--paper-border);
  background: var(--gallery-card-surface);
  color: var(--color-text);
  box-shadow: 0 4px 10px rgba(60, 45, 20, 0.04);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

body[data-page="pages"] .pages-object__actions .gallery-card__action:hover,
body[data-page="pages"] .pages-object__actions .gallery-card__action:focus-visible {
  transform: translateY(-1px);
  background: var(--gallery-card-surface);
  border-color: var(--paper-border);
  color: var(--color-text);
  box-shadow: var(--paper-shadow-soft);
}

body[data-page="pages"] .pages-object__actions .gallery-card__action--delete {
  min-width: 5.4em;
  opacity: 0.62;
}

body[data-page="pages"] .pages-object__actions .gallery-card__action--delete:hover,
body[data-page="pages"] .pages-object__actions .gallery-card__action--delete:focus-visible,
body[data-page="pages"] .pages-object__actions .gallery-card__action--delete.is-confirm {
  opacity: 1;
}

body[data-page="pages"] .pages-object__details-inner {
  padding: 0 16px 12px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body[data-page="pages"] .pages-colour-list {
  padding-top: 8px;
}

body[data-page="pages"] .pages-colour-row {
  grid-template-columns: 36px minmax(0, 1fr) minmax(112px, auto);
  gap: 12px;
  min-height: 48px;
  padding: 7px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

body[data-page="pages"] .pages-colour-row:hover,
body[data-page="pages"] .pages-colour-row:focus-within,
body[data-page="pages"] .pages-colour-row.is-highlighted {
  background: color-mix(in srgb, var(--color-peach-fuzz) 12%, transparent);
  box-shadow: none;
  transform: none;
}

body[data-page="pages"] .pages-colour-row--empty {
  margin-top: 4px;
  min-height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--gallery-card-surface) 76%, transparent);
}

body[data-page="pages"] .pages-colour-row__swatch {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  box-shadow:
    0 3px 8px rgba(60, 45, 20, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

body[data-page="pages"] .pages-colour-row__brand {
  font-size: 0.58rem;
  line-height: 1.05;
}

body[data-page="pages"] .pages-colour-row__code,
body[data-page="pages"] .pages-colour-row__name {
  font-size: 0.98rem;
  line-height: 1.08;
}

body[data-page="pages"] .pages-colour-row__side {
  min-height: 28px;
}

body[data-page="pages"] .pages-colour-row__roles {
  gap: 5px;
}

@media (max-width: 500px) {
  body[data-page="pages"] .pages-colour-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  body[data-page="pages"] .pages-colour-row__side {
    grid-column: 2;
    justify-items: start;
  }

  body[data-page="pages"] .pages-object__actions {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

@media (min-width: 761px) {
  body[data-page="pages"] .pages-object-list {
    gap: clamp(12px, 1.4vh, 16px);
  }

  body[data-page="pages"] .pages-object.palette-card {
    --gallery-card-accent: var(--palette-accent, var(--color-coral));
    --palette-accent: var(--color-coral);
    --palette-accent-soft: color-mix(in srgb, var(--color-coral) 30%, var(--color-floral-white));
    position: relative;
    display: block;
    width: 100%;
    min-height: var(--gallery-card-reference-height, 176px);
    height: auto;
    padding: 5px;
    border-radius: 16px;
    border: 1.5px solid color-mix(in srgb, var(--gallery-card-accent) 48%, var(--paper-border-soft));
    background: #faf6f0;
    box-shadow:
      3px 5px 0 color-mix(in srgb, var(--gallery-card-accent) 18%, transparent),
      0 2px 10px color-mix(in srgb, var(--gallery-card-accent) 8%, rgba(60, 45, 20, 0.04));
    color: var(--color-text);
    overflow: hidden;
    text-align: left;
    transform: none;
    filter: none;
  }

  body[data-page="pages"] .pages-object.palette-card:hover,
  body[data-page="pages"] .pages-object.palette-card:focus-within,
  body[data-page="pages"] .pages-object.palette-card.is-active {
    border-color: color-mix(in srgb, var(--gallery-card-accent) 70%, var(--paper-border-strong));
    background: #faf6f0;
    box-shadow:
      3px 5px 0 color-mix(in srgb, var(--gallery-card-accent) 26%, transparent),
      0 4px 16px color-mix(in srgb, var(--gallery-card-accent) 12%, rgba(60, 45, 20, 0.06));
  }

  body[data-page="pages"] .pages-object.palette-card::before,
  body[data-page="pages"] .pages-object.palette-card::after {
    display: none;
  }

  body[data-page="pages"] .pages-object__frame.palette-card__frame {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-height: calc(var(--gallery-card-reference-height, 176px) - 10px);
    height: 100%;
    padding: clamp(7px, 1vh, 10px) clamp(16px, 1.65vw, 20px) clamp(6px, 0.9vh, 8px);
    border-radius: 12px;
    background: #faf6f0;
  }

  body[data-page="pages"] .pages-object__top.palette-card__top {
    position: relative;
    display: block;
    min-height: clamp(48px, 6.6vh, 62px);
  }

  body[data-page="pages"] .pages-object__summary {
    position: static;
    display: block;
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    cursor: pointer;
    text-align: left;
  }

  body[data-page="pages"] .pages-object__summary::before,
  body[data-page="pages"] .pages-object__summary::after {
    display: none;
  }

  body[data-page="pages"] .pages-object__logo.palette-card__logo {
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: clamp(46px, 5.6vh, 54px);
    height: clamp(46px, 5.6vh, 54px);
    border-radius: 999px;
    border: 1.5px solid color-mix(in srgb, var(--palette-accent, var(--paper-border)) 36%, var(--paper-border));
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(250, 247, 241, 0.99));
    box-shadow:
      0 6px 0 rgba(56, 48, 38, 0.09),
      0 11px 18px rgba(56, 48, 38, 0.09),
      inset 0 1px 0 rgba(255, 255, 255, 0.95);
    color: color-mix(in srgb, var(--palette-accent, var(--color-text)) 72%, var(--color-text));
    font-family: var(--font-copy);
  }

  body[data-page="pages"] .pages-object__logo.palette-card__logo span {
    display: block;
    font-size: clamp(1.2rem, 1.45vw, 1.42rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
  }

  body[data-page="pages"] .pages-object__content.palette-card__body {
    position: absolute;
    left: clamp(64px, 6.8vw, 74px);
    top: clamp(5px, 0.7vh, 8px);
    display: block;
    width: calc(100% - clamp(64px, 6.8vw, 74px));
    max-width: calc(100% - clamp(64px, 6.8vw, 74px));
    min-width: 0;
    margin: 0;
    padding: 0;
    text-align: left;
  }

  body[data-page="pages"] .pages-object__eyebrow.palette-card__eyebrow {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    min-height: 24px;
    margin: 0;
  }

  body[data-page="pages"] .pages-object__eyebrow .palette-card__brand {
    display: inline-flex;
    min-height: 0;
    margin: 0;
    color: rgba(28, 35, 42, 0.58);
    font-size: clamp(0.68rem, 0.72vw, 0.78rem);
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.1;
    text-transform: uppercase;
  }

  body[data-page="pages"] .pages-object__check.palette-card__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 999px;
    background: var(--palette-accent, var(--paper-border));
    border: 1px solid color-mix(in srgb, var(--palette-accent, var(--paper-border-strong)) 58%, white);
    color: white;
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1;
    transform: translateY(-1px);
    box-shadow:
      0 2px 6px color-mix(in srgb, var(--palette-accent, var(--paper-border)) 25%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, 0.48);
  }

  body[data-page="pages"] .pages-object__content.palette-card__body h2.pages-object__name {
    display: block;
    width: 100%;
    max-width: min(24ch, calc(100% - 150px));
    margin: clamp(5px, 0.75vh, 7px) 0 0;
    color: rgba(23, 20, 16, 0.96);
    font-family: var(--font-copy);
    font-size: clamp(1.06rem, 1.12vw, 1.22rem);
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.08;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-page="pages"] .pages-object__description {
    display: none;
  }

  body[data-page="pages"] .pages-object__divider.palette-card__divider {
    display: block;
    margin: 0 0 0 clamp(64px, 6.8vw, 74px);
    border-top: 1px dashed color-mix(in srgb, var(--paper-border) 74%, var(--paper-border-soft));
    opacity: 1;
  }

  body[data-page="pages"] .pages-object__meta.palette-card__meta {
    position: static;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-start;
    min-height: clamp(32px, 4.8vh, 42px);
    max-height: clamp(32px, 4.8vh, 42px);
    margin: 0;
    padding: 0 0 0 clamp(64px, 6.8vw, 74px);
    opacity: 1;
    transform: none;
  }

  body[data-page="pages"] .pages-object__tag-list.palette-card__tag-list {
    position: static;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(5px, 0.65vw, 7px);
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  body[data-page="pages"] .pages-object__solid-divider.palette-card__solid-divider {
    display: none;
  }

  body[data-page="pages"] .pages-object__footer.palette-card__footer {
    container-type: inline-size;
    display: grid;
    grid-template-columns: clamp(52px, 5.8vw, 62px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(8px, 1vw, 11px);
    width: 100%;
    min-height: clamp(32px, 4.8vh, 42px);
    margin-top: 0;
    padding-top: clamp(5px, 0.8vh, 7px);
    border-top: 1.5px solid rgba(190, 176, 156, 0.7);
  }

  body[data-page="pages"] .pages-object__count.palette-card__count {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    padding-right: clamp(8px, 1vw, 11px);
    border-right: 1.5px solid var(--paper-border);
  }

  body[data-page="pages"] .pages-object__count.palette-card__count strong {
    display: block;
    color: var(--color-text);
    font-size: clamp(0.98rem, 1.12vw, 1.12rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
  }

  body[data-page="pages"] .pages-object__count.palette-card__count span {
    display: block;
    margin-top: 2px;
    color: var(--color-text-muted);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
  }

  body[data-page="pages"] .pages-object__swatch-field.palette-card__swatch-field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-page="pages"] .pages-object__preview-swatches.supply-card__swatches {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(7px, 0.9vw, 12px);
    min-width: 0;
    width: 100%;
    min-height: clamp(17px, 2.5vh, 20px);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-object__preview-swatch.swatch-row__item {
    display: block;
    width: clamp(14px, 1.35vw, 18px);
    height: clamp(14px, 1.35vw, 18px);
    flex: 0 0 clamp(14px, 1.35vw, 18px);
    border-radius: 999px;
    border: 1px solid rgba(109, 96, 84, 0.16);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.18),
      0 2px 5px rgba(60, 45, 20, 0.08);
  }

  body[data-page="pages"] .pages-object__preview-more.swatch-row__overflow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-left: 0;
    padding-inline: 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--gallery-card-surface) 70%, #e7dfd6);
    color: rgba(47, 41, 53, 0.68);
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0;
  }

  body[data-page="pages"] .pages-object__actions.gallery-card__actions {
    position: absolute;
    top: clamp(13px, 1.4vh, 17px);
    right: clamp(16px, 1.65vw, 20px);
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    max-width: min(48%, 250px);
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-2px);
    transition:
      opacity 160ms ease,
      transform 160ms ease;
  }

  body[data-page="pages"] .pages-object.is-expanded .pages-object__actions,
  body[data-page="pages"] .pages-object:hover .pages-object__actions,
  body[data-page="pages"] .pages-object:focus-within .pages-object__actions,
  body[data-page="pages"] .pages-object__actions:hover,
  body[data-page="pages"] .pages-object__actions:focus-within {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  body[data-page="pages"] .pages-object__details {
    display: none;
    max-height: none;
    border: 0;
    overflow: visible;
  }

  body[data-page="pages"] .pages-object.is-expanded .pages-object__details {
    display: block;
  }

  body[data-page="pages"] .pages-object__details-inner {
    padding: clamp(10px, 1.2vh, 14px) 0 clamp(7px, 1vh, 10px);
  }

  body[data-page="pages"] .pages-object__summary--editing {
    display: block;
    width: 100%;
    padding-left: clamp(64px, 6.8vw, 74px);
  }
}

/* Pages object tracker cards: supply-card family, object-specific content. */
body[data-page="pages"] .pages-object {
  display: grid;
  grid-template-rows: auto auto;
  min-height: 0;
}

body[data-page="pages"] .pages-object__row {
  min-height: 0;
  padding: 0 18px 0 24px;
}

body[data-page="pages"] .pages-object__summary {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: start;
  column-gap: 12px;
  row-gap: 0;
  min-height: 0;
  padding: 13px 0 11px;
  border-bottom: 0;
}

body[data-page="pages"] .pages-object__summary::before,
body[data-page="pages"] .pages-object__summary::after {
  display: none;
}

body[data-page="pages"] .pages-object__name {
  max-width: min(100%, 18rem);
  font-family: var(--font-copy);
  font-size: clamp(0.9rem, 0.98vw, 1.05rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
}

body[data-page="pages"] .pages-object__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-row: 1 / span 3;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--paper-border) 76%, var(--paper-border-soft));
  background: rgba(255, 252, 249, 0.9);
  box-shadow:
    0 8px 14px rgba(60, 45, 20, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.64);
  color: color-mix(in srgb, var(--color-text) 76%, var(--color-coral));
  font-family: var(--font-copy);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1;
}

body[data-page="pages"] .pages-object__content {
  display: grid;
  min-width: 0;
  gap: 5px;
}

body[data-page="pages"] .pages-object__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: rgba(92, 88, 98, 0.62);
  font-family: var(--font-copy);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

body[data-page="pages"] .pages-object__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-rose) 70%, white);
  color: #fff;
  font-size: 0.56rem;
  font-weight: 900;
  line-height: 1;
}

body[data-page="pages"] .pages-object__description {
  display: block;
  max-width: min(100%, 28rem);
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="pages"] .pages-object__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 1px;
}

body[data-page="pages"] .pages-object__details {
  border: 0;
}

body[data-page="pages"] .pages-object__details-inner {
  padding: 0 18px 10px 24px;
}

body[data-page="pages"] .pages-colour-list {
  padding-top: 0;
}

body[data-page="pages"] .pages-colour-row {
  grid-template-columns: 38px minmax(0, 1fr) minmax(104px, auto);
  min-height: 46px;
  padding: 6px 0;
}

body[data-page="pages"] .pages-colour-row__swatch {
  width: 34px;
  height: 34px;
}

body[data-page="pages"] .pages-object__solid-divider {
  display: none;
}

body[data-page="pages"] .pages-object__footer {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 31px;
  margin-top: 7px;
  padding: 7px 0 0;
  border-top: 1px solid var(--page-divider-color, color-mix(in srgb, var(--paper-border) 68%, transparent));
}

body[data-page="pages"] .pages-object__count {
  display: grid;
  align-content: center;
  gap: 0;
  min-width: 0;
  color: var(--color-text);
}

body[data-page="pages"] .pages-object__count strong {
  font-size: clamp(0.95rem, 1.12vw, 1.08rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0;
}

body[data-page="pages"] .pages-object__count span {
  color: var(--color-text-muted);
  font-size: 0.52rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
}

body[data-page="pages"] .pages-object__preview-swatches {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 24px;
  padding-left: 10px;
  border-left: 1px solid var(--page-divider-color, color-mix(in srgb, var(--paper-border) 68%, transparent));
  overflow: hidden;
}

body[data-page="pages"] .pages-object__preview-swatch {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--paper-border) 52%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

body[data-page="pages"] .pages-object__preview-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 21px;
  padding-inline: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gallery-card-surface) 70%, #e7dfd6);
  color: rgba(47, 41, 53, 0.68);
  font-family: var(--font-copy);
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
}

body[data-page="pages"] .pages-object__preview-swatch--empty {
  background: color-mix(in srgb, var(--gallery-card-surface) 80%, white);
}

body[data-page="pages"] .pages-object__footer .pages-object__preview-swatches,
body[data-page="pages"] .pages-object__footer .pages-object__preview-swatch {
  cursor: default;
}

body[data-page="pages"] .pages-object.is-expanded .pages-object__footer .pages-object__preview-swatches,
body[data-page="pages"] .pages-object:not(.is-expanded) .pages-object__footer .pages-object__preview-swatches {
  display: flex;
}

body[data-page="pages"] .pages-object__actions {
  padding-top: 11px;
}

body[data-page="pages"] .pages-object .pages-colour-list {
  padding-top: 4px;
}

body[data-page="pages"] .pages-object .pages-colour-row {
  grid-template-columns: 36px minmax(0, 1fr) minmax(88px, auto);
  gap: 10px;
  min-height: 52px;
  padding: 6px 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

body[data-page="pages"] .pages-object .pages-colour-row:hover,
body[data-page="pages"] .pages-object .pages-colour-row:focus-within,
body[data-page="pages"] .pages-object .pages-colour-row.is-highlighted {
  background: transparent;
  box-shadow: none;
  transform: none;
}

body[data-page="pages"] .pages-object .pages-colour-row:not(:last-child)::after,
body[data-page="pages"] .pages-object .pages-colour-row__copy::after {
  display: none;
}

body[data-page="pages"] .pages-object .pages-colour-row__swatch {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

body[data-page="pages"] .pages-object .pages-colour-row__brand {
  font-size: 0.58rem;
  line-height: 1.05;
  letter-spacing: 0.075em;
}

body[data-page="pages"] .pages-object .pages-colour-row__code,
body[data-page="pages"] .pages-object .pages-colour-row__name {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  font-size: clamp(0.86rem, 0.94vw, 0.98rem);
  line-height: 1.08;
}

body[data-page="pages"] .pages-object .pages-colour-row__copy {
  gap: 3px;
}

body[data-page="pages"] .pages-object .pages-colour-row__headline {
  flex-wrap: wrap;
  gap: 3px 4px;
  overflow: visible;
}

  body[data-page="pages"] .pages-object .pages-colour-row__side {
  align-self: center;
  min-height: 28px;
}

body[data-page="pages"] .pages-object .pages-colour-row__roles {
  gap: 6px;
}

body[data-page="pages"] .pages-object .pages-colour-row__swatch--empty {
  background: var(--gallery-surface);
  border-style: solid;
  border-color: var(--paper-border);
  box-shadow: none;
}

body[data-page="pages"] .pages-object .pages-colour-row__swatch--empty::before,
body[data-page="pages"] .pages-object .pages-colour-row__swatch--empty::after {
  background: var(--color-text);
}

@media (min-width: 761px) {
  body[data-page="pages"] .pages-object-list__empty {
    margin: 0;
    padding: 18px 20px;
    border-radius: 11px;
    background: color-mix(in srgb, var(--gallery-card-surface) 70%, transparent);
    color: rgba(92, 88, 98, 0.64);
    font-family: var(--font-copy);
    font-size: clamp(0.78rem, 0.84vw, 0.9rem);
    font-weight: 500;
    line-height: 1.35;
  }

  body[data-page="pages"] .pages-object {
    --pages-object-divider-inset: 16px;
    border-radius: 13px;
    background: rgba(250, 246, 240, 0.9);
    border-width: 1px;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.44) inset,
      0 5px 14px rgba(60, 45, 20, 0.035);
  }

  body[data-page="pages"] .pages-object:hover,
  body[data-page="pages"] .pages-object:focus-within,
  body[data-page="pages"] .pages-object.is-active {
    background: rgba(255, 250, 245, 0.96);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.5) inset,
      0 7px 18px rgba(60, 45, 20, 0.05);
  }

  body[data-page="pages"] .pages-object__row {
    display: block;
    min-height: 0;
    padding: 0;
    cursor: default;
  }

  body[data-page="pages"] .pages-object__summary {
    min-height: 0;
    padding: 13px 14px 9px 16px;
    gap: 7px;
  }

  body[data-page="pages"] .pages-object__summary--collapsed {
    min-height: 0;
    padding-bottom: 9px;
  }

  body[data-page="pages"] .pages-object__name {
    max-width: 100%;
    font-size: clamp(1rem, 1vw, 1.12rem);
    line-height: 1.04;
  }

  body[data-page="pages"] .pages-object__description {
    max-width: 100%;
    color: rgba(92, 88, 98, 0.66);
    font-size: 0.72rem;
    line-height: 1.28;
  }

  body[data-page="pages"] .pages-object__footer {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
    min-height: 28px;
    margin-top: 2px;
    padding-top: 7px;
  }

  body[data-page="pages"] .pages-object__count strong {
    font-size: 0.98rem;
  }

  body[data-page="pages"] .pages-object__count span {
    font-size: 0.48rem;
  }

  body[data-page="pages"] .pages-object__preview-swatches {
    gap: 5px;
    min-height: 20px;
    padding-left: 8px;
  }

  body[data-page="pages"] .pages-object__preview-swatch {
    width: 12px;
    height: 12px;
    border-radius: 5px;
  }

  body[data-page="pages"] .pages-object__actions {
    opacity: 1;
    pointer-events: auto;
    transform: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 5px;
    padding: 0 14px 12px 16px;
  }

  body[data-page="pages"] .pages-object:hover .pages-object__actions,
  body[data-page="pages"] .pages-object__actions:hover,
  body[data-page="pages"] .pages-object__actions:focus-within,
  body[data-page="pages"] .pages-object:focus-within .pages-object__actions {
    transform: none;
  }

  body[data-page="pages"] .pages-object__actions .gallery-card__action {
    height: 23px;
    min-width: 0;
    padding: 0 7px;
    border-radius: 8px;
    font-size: 0.62rem;
  }

  body[data-page="pages"] .pages-object__actions .pages-object__action--add-palette {
    max-width: 9.8em;
  }

  body[data-page="pages"] .pages-object__details-inner {
    padding: 0 14px 11px 16px;
  }

  body[data-page="pages"] .pages-object .pages-colour-list {
    padding-top: 2px;
  }

  body[data-page="pages"] .pages-object .pages-colour-row {
    grid-template-columns: 31px minmax(0, 1fr);
    gap: 8px 9px;
    min-height: 44px;
    padding: 6px 0;
  }

  body[data-page="pages"] .pages-object .pages-colour-row__swatch {
    grid-row: 1 / span 2;
    width: 29px;
    height: 29px;
    border-radius: 9px;
  }

  body[data-page="pages"] .pages-object .pages-colour-row__brand {
    font-size: 0.53rem;
  }

  body[data-page="pages"] .pages-object .pages-colour-row__code,
  body[data-page="pages"] .pages-object .pages-colour-row__name {
    font-size: clamp(0.82rem, 0.86vw, 0.92rem);
  }

  body[data-page="pages"] .pages-object .pages-colour-row__side {
    grid-column: 2;
    justify-items: start;
    min-height: 22px;
  }

  body[data-page="pages"] .pages-object .pages-colour-row__roles {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 4px;
    padding-right: 0;
  }

  body[data-page="pages"] .pages-colour-row__actions {
    justify-content: flex-start;
  }

  body[data-page="pages"] .pages-colour-row:hover .pages-colour-row__roles,
  body[data-page="pages"] .pages-colour-row__copy:hover ~ .pages-colour-row__side .pages-colour-row__roles,
  body[data-page="pages"] .pages-colour-row__copy:focus-within ~ .pages-colour-row__side .pages-colour-row__roles,
  body[data-page="pages"] .pages-colour-row__side:hover .pages-colour-row__roles,
  body[data-page="pages"] .pages-colour-row:focus-within .pages-colour-row__roles {
    opacity: 0;
  }
}

@media (max-width: 500px) {
  body[data-page="pages"] .pages-object__footer {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  body[data-page="pages"] .pages-object .pages-colour-row {
    grid-template-columns: 44px minmax(0, 1fr);
  }

body[data-page="pages"] .pages-object .pages-colour-row__side {
    grid-column: 2;
    justify-items: start;
  }
}

/* Pages object tracker cards: simplified page-workspace treatment. */
body[data-page="pages"] .pages-object {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  overflow: hidden;
  border: 1.5px solid color-mix(in srgb, var(--paper-border) 88%, var(--color-rose) 12%);
  border-radius: 16px;
  background: rgba(250, 246, 240, 0.94);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.58) inset,
    3px 5px 0 rgba(111, 89, 58, 0.08);
}

body[data-page="pages"] .pages-object:hover,
body[data-page="pages"] .pages-object:focus-within,
body[data-page="pages"] .pages-object.is-active {
  border-color: color-mix(in srgb, var(--paper-border) 78%, var(--color-coral) 22%);
  background: rgba(255, 250, 245, 0.98);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.62) inset,
    3px 5px 0 rgba(111, 89, 58, 0.11),
    0 10px 24px rgba(60, 45, 20, 0.055);
}

body[data-page="pages"] .pages-object__row {
  display: block;
  min-height: 0;
  padding: 0;
}

body[data-page="pages"] .pages-object__summary {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 18px 24px 17px;
  text-align: left;
  cursor: pointer;
}

body[data-page="pages"] .pages-object__summary--editing {
  padding: 16px 24px;
}

body[data-page="pages"] .pages-object__summary--collapsed {
  min-height: 132px;
}

body[data-page="pages"] .pages-object__logo,
body[data-page="pages"] .pages-object__eyebrow,
body[data-page="pages"] .pages-object__check,
body[data-page="pages"] .pages-object__description {
  display: none;
}

body[data-page="pages"] .pages-object__content {
  display: block;
  min-width: 0;
}

body[data-page="pages"] .pages-object__name {
  display: block;
  max-width: calc(100% - 185px);
  color: var(--color-text);
  font-family: var(--font-copy);
  font-size: clamp(1.45rem, 2.1vw, 1.82rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.02;
}

body[data-page="pages"] .pages-object__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-width: calc(100% - 160px);
  padding-top: 9px;
}

body[data-page="pages"] .pages-object__footer {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: min(100%, 360px);
  min-height: 38px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid color-mix(in srgb, var(--paper-border) 72%, transparent);
}

body[data-page="pages"] .pages-object__count {
  display: grid;
  align-content: center;
  gap: 1px;
  min-width: 0;
  color: var(--color-text);
}

body[data-page="pages"] .pages-object__count strong {
  font-size: clamp(1.08rem, 1.35vw, 1.24rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.9;
}

body[data-page="pages"] .pages-object__count span {
  color: rgba(47, 41, 53, 0.72);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

body[data-page="pages"] .pages-object__preview-swatches {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 28px;
  padding-left: 14px;
  border-left: 1px solid color-mix(in srgb, var(--paper-border) 70%, transparent);
  overflow: hidden;
}

body[data-page="pages"] .pages-object__preview-swatch {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--paper-border) 56%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

body[data-page="pages"] .pages-object__preview-swatch--empty {
  background: rgba(255, 252, 249, 0.82);
}

body[data-page="pages"] .pages-object__preview-more {
  min-width: 24px;
  height: 24px;
  padding-inline: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gallery-card-surface) 66%, #e2dbd1);
  color: rgba(47, 41, 53, 0.72);
  font-size: 0.62rem;
  font-weight: 900;
}

body[data-page="pages"] .pages-object__actions {
  position: absolute;
  top: 17px;
  right: 24px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: min(52%, 250px);
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

body[data-page="pages"] .pages-object.is-expanded .pages-object__actions,
body[data-page="pages"] .pages-object:hover .pages-object__actions,
body[data-page="pages"] .pages-object__actions:hover,
body[data-page="pages"] .pages-object__actions:focus-within,
body[data-page="pages"] .pages-object:focus-within .pages-object__actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

body[data-page="pages"] .pages-object__actions .gallery-card__action {
  height: 31px;
  min-width: 0;
  padding: 0 13px;
  border-radius: 999px;
  border-color: color-mix(in srgb, var(--paper-border) 84%, transparent);
  background: rgba(255, 252, 249, 0.9);
  color: var(--color-text);
  box-shadow: 0 3px 8px rgba(60, 45, 20, 0.035);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

body[data-page="pages"] .pages-object__actions .pages-object__action--add-palette {
  max-width: none;
}

body[data-page="pages"] .pages-object__actions .gallery-card__action:hover,
body[data-page="pages"] .pages-object__actions .gallery-card__action:focus-visible {
  border-color: color-mix(in srgb, var(--paper-border) 64%, var(--color-coral));
  background: #fff;
  color: var(--color-text);
  transform: translateY(-1px);
}

body[data-page="pages"] .pages-object__actions .gallery-card__action--delete {
  color: color-mix(in srgb, var(--color-text) 74%, var(--color-coral));
}

body[data-page="pages"] .pages-object__details {
  border: 0;
}

body[data-page="pages"] .pages-object__details-inner {
  padding: 0 24px 20px;
}

body[data-page="pages"] .pages-object .pages-colour-list {
  display: grid;
  gap: 0;
  padding-top: 0;
  border-top: 1px solid color-mix(in srgb, var(--paper-border) 72%, transparent);
}

body[data-page="pages"] .pages-object .pages-colour-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(88px, auto);
  gap: 10px 12px;
  align-items: center;
  min-height: 64px;
  padding: 9px 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

body[data-page="pages"] .pages-object .pages-colour-row:hover,
body[data-page="pages"] .pages-object .pages-colour-row:focus-within,
body[data-page="pages"] .pages-object .pages-colour-row.is-highlighted {
  background: transparent;
  box-shadow: none;
  transform: none;
}

body[data-page="pages"] .pages-object .pages-colour-row:not(:last-child)::after,
body[data-page="pages"] .pages-object .pages-colour-row__copy::after {
  display: none;
}

body[data-page="pages"] .pages-object .pages-colour-row__swatch {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

body[data-page="pages"] .pages-object .pages-colour-row__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

body[data-page="pages"] .pages-object .pages-colour-row__brand {
  overflow: hidden;
  color: rgba(90, 84, 98, 0.55);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

body[data-page="pages"] .pages-object .pages-colour-row__headline {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 5px;
  align-items: baseline;
  min-width: 0;
  overflow: visible;
}

body[data-page="pages"] .pages-object .pages-colour-row__code,
body[data-page="pages"] .pages-object .pages-colour-row__name {
  overflow: visible;
  color: #302842;
  font-family: var(--font-copy);
  font-size: clamp(1rem, 1.05vw, 1.16rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.12;
  text-overflow: clip;
  white-space: normal;
}

body[data-page="pages"] .pages-object .pages-colour-row__dash {
  color: rgba(48, 40, 66, 0.55);
  font-weight: 800;
}

body[data-page="pages"] .pages-object .pages-colour-row__side {
  display: grid;
  justify-items: end;
  align-items: center;
  min-height: 31px;
}

body[data-page="pages"] .pages-object .pages-colour-row__roles {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  min-height: 0;
  padding-right: 0;
  opacity: 1;
  pointer-events: auto;
}

body[data-page="pages"] .pages-colour-row__actions {
  justify-content: flex-end;
}

body[data-page="pages"] .pages-colour-row:hover .pages-colour-row__roles,
body[data-page="pages"] .pages-colour-row__copy:hover ~ .pages-colour-row__side .pages-colour-row__roles,
body[data-page="pages"] .pages-colour-row__copy:focus-within ~ .pages-colour-row__side .pages-colour-row__roles,
body[data-page="pages"] .pages-colour-row__side:hover .pages-colour-row__roles,
body[data-page="pages"] .pages-colour-row:focus-within .pages-colour-row__roles {
  opacity: 1;
}

body[data-page="pages"] .pages-object .pages-colour-row--empty {
  grid-template-columns: 48px minmax(0, 1fr);
  cursor: pointer;
}

body[data-page="pages"] .pages-object .pages-colour-row__swatch--empty {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 252, 249, 0.72);
  border-color: color-mix(in srgb, var(--paper-border) 84%, transparent);
  box-shadow: none;
}

body[data-page="pages"] .pages-colour-row__copy--empty .pages-colour-row__copy--empty-title {
  color: #302842;
  font-family: var(--font-copy);
  font-size: clamp(1rem, 1.05vw, 1.16rem);
  font-weight: 900;
  letter-spacing: 0;
}

@media (max-width: 1120px) {
  body[data-page="pages"] .pages-object__summary {
    padding: 16px 18px 15px;
  }

  body[data-page="pages"] .pages-object__summary--collapsed {
    min-height: 118px;
  }

  body[data-page="pages"] .pages-object__name,
  body[data-page="pages"] .pages-object__tags {
    max-width: 100%;
  }

  body[data-page="pages"] .pages-object__actions {
    position: static;
    justify-content: flex-start;
    max-width: none;
    padding: 0 18px 14px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  body[data-page="pages"] .pages-object__details-inner {
    padding: 0 18px 17px;
  }

  body[data-page="pages"] .pages-object .pages-colour-row {
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 58px;
  }

  body[data-page="pages"] .pages-object .pages-colour-row__swatch {
    width: 38px;
    height: 38px;
  }

  body[data-page="pages"] .pages-object .pages-colour-row__side {
    grid-column: 2;
    justify-items: start;
  }

  body[data-page="pages"] .pages-object .pages-colour-row__roles {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  body[data-page="pages"] .pages-object__summary--collapsed {
    min-height: 108px;
  }

  body[data-page="pages"] .pages-object__name {
    font-size: clamp(1.3rem, 6.2vw, 1.68rem);
  }

  body[data-page="pages"] .pages-object__footer {
    width: 100%;
  }
}

/* Pages workspace target layout: large preview plus compact object rows. */
@media (min-width: 761px) {
  body[data-page="pages"] .pages-workspace.split-workspace {
    --workspace-panel-gap: clamp(28px, 3.2vw, 46px);
    --workspace-preview-column: minmax(0, 1.28fr);
    --workspace-tracker-column: minmax(430px, 1fr);
    grid-template-columns: var(--workspace-preview-column) var(--workspace-tracker-column);
  }

  body[data-page="pages"] .pages-workspace.split-workspace::after {
    left: calc((100% - var(--workspace-panel-gap)) * 0.561 + (var(--workspace-panel-gap) / 2));
  }

  body[data-page="pages"] .pages-workspace.split-workspace > .pages-preview-panel {
    padding:
      clamp(20px, 3vh, 34px)
      clamp(18px, 2.2vw, 32px)
      0
      var(--collection-action-inset);
  }

  body[data-page="pages"] .pages-workspace.split-workspace > .pages-object-tracker {
    gap: clamp(10px, 1.25vh, 14px);
    padding:
      clamp(20px, 3vh, 34px)
      var(--collection-action-inset)
      0
      0;
  }

  body[data-page="pages"] .pages-preview-panel__frame {
    width: 100%;
    height: 100%;
    border-radius: 13px;
    border-color: rgba(205, 178, 158, 0.4);
    background:
      linear-gradient(180deg, rgba(255, 249, 244, 0.96), rgba(252, 244, 238, 0.9)),
      rgba(255, 249, 244, 0.92);
    box-shadow:
      inset 0 0 0 1px rgba(80, 65, 45, 0.045),
      0 10px 22px rgba(60, 45, 25, 0.035);
  }

  body[data-page="pages"] .pages-preview-panel__footer.gallery-panel__footer {
    min-height: clamp(62px, 6.2vh, 78px);
    padding-top: clamp(13px, 1.45vh, 17px);
  }

  body[data-page="pages"] .pages-object-tracker__top {
    padding-right: clamp(4px, 0.5vw, 8px);
  }

  body[data-page="pages"] .pages-object-tracker__shell {
    overflow: hidden auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-page="pages"] .pages-object-list {
    gap: 10px;
    height: 100%;
    padding: 0 clamp(4px, 0.45vw, 8px) 0 0;
  }

  body[data-page="pages"] .pages-object-list__empty {
    margin: 0 0 2px;
    border-radius: 10px;
    background: rgba(244, 234, 226, 0.54);
  }

  body[data-page="pages"] .pages-object {
    width: 100%;
    border: 1.5px solid color-mix(in srgb, var(--paper-border) 70%, var(--color-coral) 30%);
    border-radius: 11px;
    background: rgba(255, 251, 247, 0.8);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.55) inset,
      2px 4px 0 rgba(111, 89, 58, 0.055);
  }

  body[data-page="pages"] .pages-object:hover,
  body[data-page="pages"] .pages-object:focus-within,
  body[data-page="pages"] .pages-object.is-active {
    border-color: color-mix(in srgb, var(--paper-border) 58%, var(--color-coral) 42%);
    background: rgba(255, 251, 247, 0.92);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.58) inset,
      2px 4px 0 rgba(111, 89, 58, 0.075);
  }

  body[data-page="pages"] .pages-object__summary {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 0;
    min-height: 0;
    padding: 14px 18px 13px;
  }

  body[data-page="pages"] .pages-object__summary--collapsed {
    min-height: 96px;
  }

  body[data-page="pages"] .pages-object__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    grid-row: 1 / span 3;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1.5px solid rgba(205, 178, 158, 0.76);
    background: rgba(255, 252, 249, 0.9);
    box-shadow:
      0 6px 10px rgba(60, 45, 20, 0.07),
      inset 0 1px 0 rgba(255, 255, 255, 0.7);
    color: color-mix(in srgb, var(--color-text) 66%, var(--color-coral));
    font-family: var(--font-copy);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
  }

  body[data-page="pages"] .pages-object__content {
    display: grid;
    min-width: 0;
    gap: 5px;
  }

  body[data-page="pages"] .pages-object__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(92, 88, 98, 0.62);
    font-family: var(--font-copy);
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
  }

  body[data-page="pages"] .pages-object__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-rose) 72%, white);
    color: #fff;
    font-size: 0.56rem;
    font-weight: 900;
    line-height: 1;
  }

  body[data-page="pages"] .pages-object__name {
    max-width: 100%;
    font-size: clamp(0.92rem, 0.98vw, 1.06rem);
    font-weight: 900;
    line-height: 1.05;
  }

  body[data-page="pages"] .pages-object__description {
    display: none;
  }

  body[data-page="pages"] .pages-object__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 100%;
    padding-top: 1px;
  }

  body[data-page="pages"] .pages-object__footer {
    grid-template-columns: 50px minmax(0, 1fr);
    grid-column: 1 / -1;
    gap: 12px;
    width: 100%;
    min-height: 31px;
    margin-top: 8px;
    padding-top: 8px;
  }

  body[data-page="pages"] .pages-object__count strong {
    font-size: 1rem;
  }

  body[data-page="pages"] .pages-object__count span {
    font-size: 0.49rem;
  }

  body[data-page="pages"] .pages-object__preview-swatches {
    gap: clamp(8px, 1vw, 14px);
    min-height: 24px;
    padding-left: 13px;
  }

  body[data-page="pages"] .pages-object__preview-swatch {
    width: clamp(14px, 1.15vw, 18px);
    height: clamp(14px, 1.15vw, 18px);
    border-radius: 999px;
  }

  body[data-page="pages"] .pages-object__preview-more {
    min-width: 22px;
    height: 22px;
    font-size: 0.58rem;
  }

  body[data-page="pages"] .pages-object__actions {
    top: 12px;
    right: 16px;
    max-width: min(54%, 250px);
  }

  body[data-page="pages"] .pages-object:not(.is-expanded):not(:hover):not(:focus-within) .pages-object__actions {
    opacity: 0;
    pointer-events: none;
  }

  body[data-page="pages"] .pages-object__actions .gallery-card__action {
    height: 25px;
    padding: 0 9px;
    font-size: 0.62rem;
  }

  body[data-page="pages"] .pages-object__details-inner {
    padding: 0 18px 15px;
  }

  body[data-page="pages"] .pages-object .pages-colour-list {
    padding-top: 9px;
  }

  body[data-page="pages"] .pages-object .pages-colour-row {
    grid-template-columns: 38px minmax(0, 1fr) minmax(82px, auto);
    gap: 8px 10px;
    min-height: 48px;
    padding: 6px 0;
  }

  body[data-page="pages"] .pages-object .pages-colour-row__swatch {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  body[data-page="pages"] .pages-object .pages-colour-row__brand {
    font-size: 0.56rem;
  }

  body[data-page="pages"] .pages-object .pages-colour-row__code,
  body[data-page="pages"] .pages-object .pages-colour-row__name {
    font-size: clamp(0.84rem, 0.9vw, 0.98rem);
  }
}

/* Collection gallery system: My Supplies is the canonical layout source. */
body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) {
  --collection-shell-y: var(--cc-shell-y);
  --collection-main-x: clamp(40px, 5.2vw, 72px);
  --collection-main-top: clamp(24px, 3.2vh, 38px);
  --collection-main-bottom: var(--cc-footer-surface-gap);
  --collection-action-inset: clamp(10px, 0.9vw, 14px);
  --collection-gallery-card-min-height: 190px;
  --collection-gallery-card-max-height: 190px;
  --collection-gallery-row-height: 190px;
  --collection-gallery-hover-safe: 6px;
  --collection-gallery-width: calc(100% - (2 * var(--collection-action-inset)));
}

body[data-page="supplies"] {
  --collection-gallery-card-min-height: 190px;
  --collection-gallery-card-max-height: 190px;
  --collection-gallery-row-height: 190px;
}

body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-page-header__copy {
  display: block;
}

body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-page-title,
.cc-main--placeholder .cc-page-title {
  margin: 0;
  color: rgba(28, 26, 28, 0.98);
  font-family: var(--font-display);
  font-size: clamp(3rem, 4vw, 4.4rem);
  font-weight: 780;
  letter-spacing: -0.028em;
  line-height: 0.92;
  font-variation-settings: "SOFT" 80, "WONK" 0, "opsz" 72;
  text-wrap: balance;
}

body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-page-description,
.cc-main--placeholder .cc-page-description {
  max-width: 520px;
  margin: clamp(12px, 1.5vh, 18px) 0 0;
  color: rgba(47, 41, 53, 0.68);
  font-family: var(--font-copy);
  font-size: clamp(0.9rem, 0.95vw, 1rem);
  font-weight: 500;
  line-height: 1.45;
}

body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-filter {
  align-items: center;
  gap: clamp(10px, 1.1vw, 18px);
  width: 100%;
}

body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-filter .cc-search {
  flex: 0 1 280px;
  max-width: 280px;
  min-width: min(260px, 100%);
  min-height: var(--cc-control-height);
}

body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-filter .cc-search__input {
  height: var(--cc-control-height);
  min-height: var(--cc-control-height);
  padding-left: 40px;
  border-radius: 12px;
  background: #fffefb;
  border-color: color-mix(in srgb, var(--paper-border) 58%, transparent);
  color: rgba(38, 43, 51, 0.82);
  font-size: 0.92rem;
  font-weight: 660;
  line-height: var(--cc-control-height);
}

body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-filter .cc-search__input:focus {
  background: #fffefb;
  border-color: color-mix(in srgb, var(--paper-border) 72%, transparent);
  color: rgba(38, 43, 51, 0.82);
  box-shadow: none !important;
  outline: 0 !important;
}

body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-filter .cc-search__icon {
  left: 17px;
  width: 18px;
  height: 18px;
}

:is(
  .supplies-modal,
  .supplies-preview-modal,
  .palette-modal,
  .palette-preview-modal,
  .pages-upload-modal,
  .pages-view-modal,
  .palette-tag-modal,
  .pages-tag-modal,
  .palette-details-modal,
  .swatch-capture-modal
) :is(
  input:not([type="button"]):not([type="checkbox"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="image"]):not([type="radio"]):not([type="range"]):not([type="reset"]):not([type="submit"]),
  textarea
) {
  background: #fffefb !important;
  background-color: #fffefb !important;
}

/* Desktop source-of-truth: Supplies, Palettes, and Pages gallery frames. */
@media (min-width: 761px) {
  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) {
    min-height: 100dvh;
    overflow: hidden;
  }

  body[data-page="profile"] {
    --profile-main-x: calc(clamp(40px, 5.2vw, 72px) + clamp(10px, 0.9vw, 14px));
    --profile-main-top: calc(clamp(24px, 3.2vh, 38px) + clamp(16px, 2vh, 24px));
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .site-shell {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .canvas-card {
    height: calc(100dvh - (2 * var(--collection-shell-y)));
    min-height: 0;
    max-height: calc(100dvh - (2 * var(--collection-shell-y)));
  }

  body[data-page="profile"] {
    min-height: 100dvh;
    overflow: hidden;
  }

  body[data-page="profile"] .site-shell,
  body[data-page="profile"] .cc-shell {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  body[data-page="profile"] .canvas-card,
  body[data-page="profile"] .cc-shell__surface {
    height: calc(100dvh - (2 * var(--cc-shell-y)));
    min-height: 0;
    max-height: calc(100dvh - (2 * var(--cc-shell-y)));
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .supplies-main {
    display: flex;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    padding: var(--collection-main-top) var(--collection-main-x) var(--collection-main-bottom);
    overflow: hidden;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .supplies-shell,
  body[data-page="palettes"] .palettes-shell,
  body[data-page="pages"] .pages-shell {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: visible;
  }

  body[data-page="palettes"] .palettes-workspace.is-gallery-mode {
    display: grid;
    grid-template-columns: 1fr;
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    gap: 0;
  }

  body[data-page="palettes"] .palettes-workspace.is-gallery-mode > .workspace-panel--editor {
    display: none;
  }

  body[data-page="supplies"] .gallery-page,
  body[data-page="pages"] .gallery-page,
  body[data-page="palettes"] .palettes-workspace.is-gallery-mode > .gallery-page {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: clamp(14px, 1.8vh, 22px);
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    max-height: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-page-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: clamp(24px, 4vw, 64px);
    row-gap: clamp(16px, 2vh, 26px);
    padding:
      clamp(14px, 1.9vh, 24px)
      var(--collection-action-inset)
      clamp(4px, 0.8vh, 8px);
    border-bottom: 0;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-page-header__copy {
    min-width: 0;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-page-stats {
    align-items: center;
    gap: clamp(14px, 1.5vw, 24px);
    margin-left: auto;
    padding-top: clamp(6px, 0.9vh, 12px);
    justify-content: flex-end;
    text-align: right;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-stat {
    min-width: 104px;
    text-align: right;
    justify-items: end;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-controls {
    grid-column: 1 / -1;
    width: 100%;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-controls .cc-filter__button {
    justify-content: flex-start;
    min-width: 150px;
    gap: 8px;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-controls .cc-filter__button::after {
    content: "";
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-right: 2.2px solid currentColor;
    border-bottom: 2.2px solid currentColor;
    opacity: 0.58;
    transform: translateY(-2px) rotate(45deg);
  }

  body[data-page="palettes"] .cc-controls .cc-filter__button[data-gallery-used-pages-toggle]::after {
    content: none;
    display: none;
    width: 0;
    height: 0;
    border: 0;
  }

  .gallery-page .cc-gallery__viewport.is-populated {
    align-self: start;
    display: flex;
    justify-content: center;
    height: min(100%, var(--gallery-visible-height));
    max-height: var(--gallery-visible-height);
    min-height: 0;
    overflow: hidden;
    padding: 0;
  }

  .gallery-page .cc-gallery-grid {
    box-sizing: border-box;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--gallery-card-min-width)), 1fr));
    grid-auto-rows: clamp(
      var(--gallery-card-min-height),
      calc((100% - var(--gallery-grid-gap) - var(--gallery-grid-padding-block) + var(--gallery-third-row-guard)) / 2),
      var(--gallery-card-max-height)
    );
    gap: var(--gallery-grid-gap, 14px);
    width: var(--collection-gallery-width);
    max-width: calc((3 * var(--gallery-card-reference-width)) + (2 * var(--gallery-grid-gap)) + 12px);
    height: 100%;
    max-height: 100%;
    margin-inline: auto;
    align-content: start;
    overflow-y: auto;
    overflow-x: hidden;
    padding: calc(var(--gallery-grid-padding-block) / 2) 6px;
    scroll-padding-top: calc(var(--gallery-grid-padding-block) / 2);
  }

  .gallery-page .cc-gallery-grid > .cc-card {
    height: 100%;
    min-height: var(--gallery-card-min-height);
    max-height: var(--gallery-card-max-height);
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__frame,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__frame {
    justify-content: space-between;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__frame {
    padding: 16px 24px 14px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__header {
    min-height: 90px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__heading {
    top: 12px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__title {
    margin-top: 14px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__meta {
    flex: 0 0 clamp(52px, 5.8vh, 62px);
    min-height: 54px;
    max-height: 62px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__supporting {
    margin-top: 0;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__footer {
    padding-top: 13px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__count {
    transform: translateY(1px);
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__swatches .swatch-row__item,
  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__swatches .swatch-row__item--large {
    width: clamp(18px, 5.4cqw, 22px);
    height: clamp(18px, 5.4cqw, 22px);
    flex-basis: clamp(18px, 5.4cqw, 22px);
  }

  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__top {
    min-height: 90px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__body {
    top: 12px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__body h2 {
    margin-top: 14px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__meta {
    flex: 0 0 clamp(52px, 5.8vh, 62px);
    min-height: 54px;
    max-height: 62px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__footer {
    padding-top: 13px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__count {
    min-height: 31px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__swatches,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__swatch-segment {
    min-height: 22px;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .gallery-page__footer.gallery-panel__footer {
    position: relative;
    width: calc(100% + (2 * var(--collection-main-x)));
    min-height: var(--cc-footer-tray-height);
    margin-inline: calc(var(--collection-main-x) * -1);
    padding:
      clamp(14px, 1.7vh, 20px)
      calc(var(--collection-main-x) + var(--collection-action-inset))
      clamp(12px, 1.6vh, 18px);
    border-top: 0;
    overflow: visible;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .gallery-page__footer.gallery-panel__footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(205, 178, 158, 0.36);
    pointer-events: none;
  }
}

@media (min-width: 761px) and (max-height: 1080px) {
  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) {
    --collection-main-top: clamp(24px, 3.2vh, 34px);
    --collection-gallery-card-min-height: 184px;
    --collection-gallery-card-max-height: 212px;
    --collection-gallery-row-height: clamp(
      var(--collection-gallery-card-min-height),
      20vh,
      var(--collection-gallery-card-max-height)
    );
  }

  body[data-page="profile"] {
    --profile-main-top: calc(clamp(24px, 3.2vh, 34px) + clamp(16px, 2vh, 24px));
  }

  .cc-gallery {
    --gallery-grid-gap: 12px;
    --gallery-grid-padding-block: 10px;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-page-header {
    row-gap: clamp(16px, 2vh, 24px);
    padding-top: clamp(16px, 2vh, 24px);
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-page-description {
    margin-top: clamp(12px, 1.6vh, 18px);
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__frame,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__frame {
    padding: 11px 22px 8px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__header,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__top {
    min-height: 72px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__heading,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__body {
    top: 9px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__title,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__body h2 {
    margin-top: 10px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__meta,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__meta {
    flex-basis: clamp(42px, 4.9vh, 52px);
    min-height: 42px;
    max-height: 52px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__footer,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__footer {
    padding-top: 7px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__swatches,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__swatch-segment {
    min-height: 20px;
  }
}

@media (min-width: 761px) and (max-height: 920px) {
  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) {
    --collection-main-top: clamp(20px, 3vh, 30px);
    --collection-gallery-card-min-height: 176px;
    --collection-gallery-card-max-height: 202px;
    --collection-gallery-row-height: clamp(
      var(--collection-gallery-card-min-height),
      20vh,
      var(--collection-gallery-card-max-height)
    );
  }

  body[data-page="profile"] {
    --profile-main-top: calc(clamp(20px, 3vh, 30px) + clamp(14px, 2vh, 22px));
  }

  .cc-gallery {
    --gallery-grid-gap: 10px;
    --gallery-grid-padding-block: 8px;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-page-header {
    row-gap: clamp(14px, 2vh, 22px);
    padding-top: clamp(14px, 2vh, 22px);
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__frame,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__frame {
    padding: 10px 20px 8px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__header,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__top {
    min-height: 66px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__heading,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__body {
    top: 7px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__title,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__body h2 {
    margin-top: 7px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__meta,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__meta {
    flex: 0 0 clamp(40px, 4.8vh, 50px);
    min-height: 44px;
    max-height: 50px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__footer,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__footer {
    padding-top: 7px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__swatches .swatch-row__item,
  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__swatches .swatch-row__item--large {
    width: clamp(16px, 4.9cqw, 20px);
    height: clamp(16px, 4.9cqw, 20px);
    flex-basis: clamp(16px, 4.9cqw, 20px);
  }

  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__swatches,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__swatch-segment {
    min-height: 20px;
  }
}

@media (min-width: 761px) and (max-height: 840px) {
  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) {
    --collection-main-top: clamp(16px, 2.4vh, 22px);
    --collection-gallery-card-min-height: 168px;
    --collection-gallery-card-max-height: 190px;
    --collection-gallery-row-height: clamp(
      var(--collection-gallery-card-min-height),
      20vh,
      var(--collection-gallery-card-max-height)
    );
  }

  body[data-page="profile"] {
    --profile-main-top: calc(clamp(16px, 2.4vh, 22px) + 12px);
  }

  .cc-gallery {
    --gallery-grid-gap: 7px;
    --gallery-grid-padding-block: 6px;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-page-header {
    row-gap: 12px;
    padding-top: 12px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__frame,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__frame {
    padding: 7px 18px 5px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__header,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__top {
    min-height: 54px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__logo,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__logo {
    width: 52px;
    height: 52px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__heading,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__body {
    left: 70px;
    top: 5px;
    width: calc(100% - 70px);
    max-width: calc(100% - 70px);
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__title,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__body h2 {
    margin-top: 5px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__divider,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__divider {
    margin-left: 70px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__meta,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__meta {
    flex: 0 0 clamp(34px, 4.4vh, 42px);
    min-height: 36px;
    max-height: 42px;
    padding-left: 70px;
  }

  .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__footer,
  .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__footer {
    padding-top: 4px;
  }
}

@media (min-width: 761px) and (min-height: 841px) {
  body[data-page="supplies"] {
    --collection-gallery-card-min-height: 190px;
    --collection-gallery-card-max-height: 190px;
    --collection-gallery-row-height: 190px;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) {
    --collection-gallery-card-min-height: 190px;
    --collection-gallery-card-max-height: 190px;
    --collection-gallery-row-height: 190px;
  }

  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__frame,
  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__frame {
    padding: 11px 22px 8px;
  }

  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__header,
  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__top {
    min-height: 72px;
  }

  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__heading,
  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__body {
    top: 9px;
  }

  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__title,
  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__body h2 {
    margin-top: 10px;
  }

  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__meta,
  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__meta {
    flex-basis: clamp(42px, 4.9vh, 52px);
    min-height: 42px;
    max-height: 52px;
  }

  body[data-page="supplies"] .gallery-page .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__footer,
  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__footer {
    padding-top: 7px;
  }

  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__swatches,
  body[data-page="palettes"] .gallery-page .cc-gallery-grid > .cc-card--palette .palette-card__swatch-segment {
    min-height: 20px;
  }
}

body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .gallery-page[data-gallery-density="relaxed"] {
  --gallery-grid-gap: 14px;
  --gallery-grid-padding-block: 12px;
}

body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .gallery-page[data-gallery-density="compact"] {
  --gallery-grid-gap: 10px;
  --gallery-grid-padding-block: 8px;
}

body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .gallery-page[data-gallery-density="safe"] {
  --gallery-grid-gap: 7px;
  --gallery-grid-padding-block: 6px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="relaxed"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__frame, .palette-card__frame) {
  padding: 11px 22px 8px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="relaxed"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__header, .palette-card__top) {
  min-height: 72px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="relaxed"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__heading, .palette-card__body) {
  top: 9px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="relaxed"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__title, .palette-card__body h2) {
  margin-top: 10px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="relaxed"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__meta, .palette-card__meta) {
  flex-basis: clamp(42px, 4.9vh, 52px);
  min-height: 42px;
  max-height: 52px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="relaxed"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__footer, .palette-card__footer) {
  padding-top: 7px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="compact"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__frame, .palette-card__frame) {
  padding: 10px 20px 8px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="compact"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__header, .palette-card__top) {
  min-height: 66px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="compact"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__heading, .palette-card__body) {
  top: 7px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="compact"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__title, .palette-card__body h2) {
  margin-top: 7px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="compact"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__meta, .palette-card__meta) {
  flex: 0 0 clamp(40px, 4.8vh, 50px);
  min-height: 44px;
  max-height: 50px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="compact"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__footer, .palette-card__footer) {
  padding-top: 7px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="safe"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__frame, .palette-card__frame) {
  padding: 7px 18px 5px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="safe"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__header, .palette-card__top) {
  min-height: 54px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="safe"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__logo, .palette-card__logo) {
  width: 52px;
  height: 52px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="safe"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__heading, .palette-card__body) {
  left: 70px;
  top: 5px;
  width: calc(100% - 70px);
  max-width: calc(100% - 70px);
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="safe"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__title, .palette-card__body h2) {
  margin-top: 5px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="safe"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__divider, .palette-card__divider) {
  margin-left: 70px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="safe"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__meta, .palette-card__meta) {
  flex: 0 0 clamp(34px, 4.4vh, 42px);
  min-height: 36px;
  max-height: 42px;
  padding-left: 70px;
}

body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density="safe"] .cc-gallery-grid > :is(.cc-card--supply.supply-card--owned, .cc-card--palette) :is(.supply-card__footer, .palette-card__footer) {
  padding-top: 4px;
}

body[data-page="supplies"] .gallery-page[data-gallery-text-scale="compact"] .cc-gallery-grid > .cc-card--supply.supply-card--owned .supply-card__title {
  font-size: clamp(1.02rem, 1.12vw, 1.24rem);
  letter-spacing: -0.03em;
}

body[data-page="palettes"] .gallery-page[data-gallery-text-scale="compact"] .cc-gallery-grid > .cc-card--palette .palette-card__body h2 {
  font-size: clamp(0.96rem, 1.05vw, 1.04rem);
  letter-spacing: -0.035em;
}

@media (min-width: 761px) {
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) {
    --workspace-panel-gap: clamp(34px, 4vw, 64px);
    --workspace-center-breathing: clamp(16px, 1.6vw, 24px);
    --workspace-gallery-column: minmax(0, 1fr);
    --workspace-editor-column: minmax(0, 1fr);
    position: relative;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--workspace-panel-gap);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode)::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: rgba(205, 178, 158, 0.28);
    transform: translateX(-50%);
    pointer-events: none;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) > .workspace-panel {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) > .palettes-gallery-panel,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) > .palette-editor {
    height: 100%;
    min-height: 0;
    padding:
      clamp(12px, 1.8vh, 22px)
      0
      0;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) > .palettes-gallery-panel {
    --gallery-grid-gap: 14px;
    gap: clamp(10px, 1.35vh, 16px);
    padding-left: var(--collection-action-inset);
    padding-right: var(--workspace-center-breathing);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) > .palette-editor {
    gap: clamp(10px, 1.3vh, 16px);
    padding-left: var(--workspace-center-breathing);
    padding-right: var(--collection-action-inset);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-page-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: clamp(14px, 1.8vw, 24px);
    row-gap: clamp(10px, 1.35vh, 14px);
    width: 100%;
    min-width: 0;
    padding: 0;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-page-header__copy {
    display: block;
    min-width: 0;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-page-title,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__title-view {
    margin: 0;
    color: rgba(28, 26, 28, 0.98);
    font-family: var(--font-display);
    font-size: clamp(2.05rem, 3vw, 3.05rem);
    font-weight: 780;
    letter-spacing: -0.028em;
    line-height: 0.88;
    font-variation-settings: "SOFT" 80, "WONK" 0, "opsz" 72;
    text-wrap: balance;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-page-description,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__description-view {
    max-width: 44ch;
    margin: clamp(6px, 0.85vh, 10px) 0 0;
    color: rgba(47, 41, 53, 0.68);
    font-family: var(--font-copy);
    font-size: clamp(0.78rem, 0.84vw, 0.92rem);
    font-weight: 500;
    line-height: 1.38;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-page-description {
    display: none;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-page-stats {
    align-items: flex-start;
    gap: clamp(14px, 1.65vw, 22px);
    margin-left: 0;
    padding-top: clamp(2px, 0.35vh, 5px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-stat {
    min-width: 58px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-stat__value {
    font-size: clamp(1.35rem, 1.8vw, 1.72rem);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-stat__label {
    font-size: clamp(0.54rem, 0.64vw, 0.66rem);
    letter-spacing: 0.12em;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-controls {
    grid-column: 1 / -1;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-filter {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: clamp(8px, 1vw, 14px);
    width: 100%;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-filter .cc-search {
    flex: 1 1 220px;
    min-width: 0;
    max-width: none;
    min-height: 40px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-filter .cc-search__input {
    height: 40px;
    min-height: 40px;
    padding-left: 40px;
    font-size: clamp(0.78rem, 0.82vw, 0.88rem);
    line-height: 40px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-filter .cc-search__icon {
    left: 16px;
    width: 18px;
    height: 18px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-controls .cc-filter__button {
    flex: 0 1 clamp(108px, 11vw, 150px);
    min-width: 0;
    min-height: 40px;
    padding-inline: clamp(12px, 1.25vw, 16px);
    gap: 8px;
    font-size: clamp(0.78rem, 0.82vw, 0.88rem);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-controls [data-gallery-used-pages-toggle] {
    flex-basis: clamp(132px, 13vw, 176px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery__viewport.is-populated {
    align-self: stretch;
    justify-content: stretch;
    height: 100%;
    max-height: none;
    padding: 0;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: 100%;
    gap: var(--gallery-grid-gap);
    padding: 3px 0 0;
    overflow: hidden;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery-grid > .cc-card--palette {
    min-height: 0;
    height: 100%;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery-grid > .cc-card--palette .palette-card__frame {
    padding: clamp(7px, 1vh, 10px) clamp(16px, 1.65vw, 20px) clamp(6px, 0.9vh, 8px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery-grid > .cc-card--palette .palette-card__top {
    min-height: clamp(48px, 6.6vh, 62px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery-grid > .cc-card--palette .palette-card__logo {
    width: clamp(46px, 5.6vh, 54px);
    height: clamp(46px, 5.6vh, 54px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery-grid > .cc-card--palette .palette-card__body {
    left: clamp(64px, 6.8vw, 74px);
    top: clamp(5px, 0.7vh, 8px);
    width: calc(100% - clamp(64px, 6.8vw, 74px));
    max-width: calc(100% - clamp(64px, 6.8vw, 74px));
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery-grid > .cc-card--palette .palette-card__body h2 {
    margin-top: clamp(5px, 0.75vh, 7px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery-grid > .cc-card--palette .palette-card__divider {
    margin-left: clamp(64px, 6.8vw, 74px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery-grid > .cc-card--palette .palette-card__meta {
    flex: 0 0 clamp(32px, 4.8vh, 42px);
    min-height: clamp(32px, 4.8vh, 42px);
    max-height: clamp(32px, 4.8vh, 42px);
    padding-left: clamp(64px, 6.8vw, 74px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery-grid > .cc-card--palette .palette-card__tag-list {
    gap: clamp(5px, 0.65vw, 7px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery-grid > .cc-card--palette .palette-card__footer {
    grid-template-columns: clamp(52px, 5.8vw, 62px) minmax(0, 1fr);
    gap: clamp(8px, 1vw, 11px);
    padding-top: clamp(5px, 0.8vh, 7px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery-grid > .cc-card--palette .palette-card__count {
    padding-right: clamp(8px, 1vw, 11px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery-grid > .cc-card--palette .palette-card__swatches,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery-grid > .cc-card--palette .palette-card__swatch-segment {
    min-height: clamp(17px, 2.5vh, 20px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .gallery-page__footer.gallery-panel__footer,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer {
    position: relative;
    width: 100%;
    min-height: var(--cc-footer-tray-height);
    margin: 0;
    padding:
      clamp(14px, 1.7vh, 20px)
      0
      clamp(12px, 1.6vh, 18px);
    border-top: 0;
    background: transparent;
    overflow: visible;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .gallery-page__footer.gallery-panel__footer::before,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(205, 178, 158, 0.36);
    pointer-events: none;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .gallery-panel__helper-text {
    display: none;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: clamp(14px, 1.8vw, 24px);
    margin: 0;
    width: min(100%, 620px);
    justify-self: end;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__title-block {
    display: block;
    min-width: 0;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__title-view {
    max-width: min(100%, 15.5ch);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__header-actions {
    gap: 8px;
    padding-top: 2px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__description-block {
    display: block;
    width: min(100%, 620px);
    justify-self: end;
    margin: calc(clamp(4px, 0.5vh, 6px) * -1) 0 clamp(4px, 0.8vh, 8px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__description-view {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    text-align: left;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__stack-shell {
    width: min(100%, 620px);
    justify-self: end;
    margin-top: 0;
    border-radius: 13px;
    border: 1px solid rgba(205, 178, 158, 0.54);
    background: rgba(255, 252, 249, 0.52);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.36),
      0 10px 24px rgba(60, 45, 25, 0.035);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack {
    border-radius: 12px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
    width: min(100%, 620px);
    justify-self: end;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer [data-clear-palette] {
    justify-self: end;
  }
}

/* Desktop width compression: keep the desktop layout, but tighten chrome and spacing. */
@media (min-width: 1081px) and (max-width: 1320px) {
  body[data-page] .site-header {
    grid-template-columns: max-content minmax(0, auto) max-content;
    justify-content: space-between;
    gap: clamp(10px, 1.25vw, 18px);
    padding-inline: clamp(18px, 2.4vw, 34px);
    overflow: hidden;
  }

  body[data-page] .brand-mark {
    min-width: 0;
    margin-left: 0;
  }

  body[data-page] .brand-mark__script,
  body[data-page] .brand-mark__word {
    font-size: clamp(1.62rem, 2.2vw, 2.05rem);
  }

  body[data-page] .site-nav {
    min-width: 0;
    gap: clamp(10px, 1.25vw, 17px);
  }

  body[data-page] .site-nav a,
  body[data-page] .header-link {
    font-size: clamp(0.84rem, 0.94vw, 0.94rem);
  }

  body[data-page] .header-actions {
    min-width: 0;
    gap: clamp(8px, 1vw, 12px);
  }

  body[data-page] .header-link {
    min-height: 40px;
    padding-inline: clamp(12px, 1.25vw, 16px);
  }
}

@media (min-width: 1081px) and (max-width: 1180px) {
  body[data-page] .site-header {
    gap: 10px;
    padding-inline: clamp(16px, 2vw, 26px);
  }

  body[data-page] .brand-mark__script,
  body[data-page] .brand-mark__word {
    font-size: clamp(1.48rem, 2vw, 1.75rem);
  }

  body[data-page] .site-nav {
    gap: 9px;
  }

  body[data-page] .site-nav a,
  body[data-page] .header-link {
    font-size: clamp(0.8rem, 0.9vw, 0.88rem);
  }

  body[data-page] .header-link {
    min-height: 38px;
    padding-inline: 11px;
  }
}

@media (max-width: 1080px) {
  body[data-page] .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: clamp(66px, 6.4vw, 78px);
    padding: 0 clamp(18px, 4vw, 32px);
  }

  body[data-page] .brand-mark {
    min-width: 0;
    margin-left: 0;
  }

  body[data-page] .brand-mark__script,
  body[data-page] .brand-mark__word {
    font-size: clamp(1.58rem, 3.5vw, 2rem);
  }

  body[data-page] .site-nav,
  body[data-page] .header-link {
    display: none;
  }

  body[data-page] .header-actions {
    grid-column: 2;
    gap: 0;
  }

  body[data-page] .menu-toggle {
    display: inline-flex;
  }
}

@media (min-width: 768px) and (max-width: 1080px) {
  body[data-page] .mobile-panel {
    position: absolute;
    top: clamp(72px, 7vw, 86px);
    right: clamp(18px, 4vw, 32px);
    z-index: 90;
    width: min(320px, calc(100% - 36px));
    margin: 0;
  }
}

/* Mobile base layer: preserve today's scrollable galleries until the future app-view pass. */
@media (max-width: 760px) {
  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) {
    overflow: auto;
  }

  body.cc-page .site-shell,
  body.cc-page .cc-shell {
    align-items: flex-start;
    min-height: 100dvh;
    padding: 12px;
    overflow: visible;
  }

  body.cc-page .canvas-card,
  body.cc-page .cc-shell__surface {
    width: 100%;
    height: auto;
    min-height: 100dvh;
    max-height: none;
    overflow: visible;
  }

  body[data-page="home"] {
    overflow: hidden;
  }

  body[data-page="home"] .site-shell {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  body[data-page="home"] .canvas-card,
  body[data-page="home"] .cc-shell__surface {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: calc(100dvh - 24px);
    min-height: 0;
    max-height: calc(100dvh - 24px);
    overflow: hidden;
  }

  body[data-page="home"] .home-main {
    min-height: 0;
    overflow: auto;
  }

  .cc-main--placeholder {
    align-items: flex-start;
    padding: 28px 18px 44px;
  }

  .cc-main--auth {
    min-height: auto;
    padding: 36px 18px 48px;
    place-items: start stretch;
  }

  .cc-auth-page__panel {
    padding: 28px 20px 30px;
    border-radius: 20px;
  }

  .cc-auth-page__title {
    max-width: 100%;
  }

  .cc-auth-page__button {
    width: 100%;
  }

  .cc-main--onboarding {
    padding: 28px 18px 44px;
  }

  .cc-onboarding-card {
    padding: 30px 20px 32px;
  }

  .cc-onboarding-card__title {
    font-size: clamp(1.9rem, 10vw, 2.25rem);
  }

  .cc-onboarding-card__section {
    width: 100%;
  }

  .cc-onboarding-card__continue {
    width: 100%;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .supplies-main {
    padding: 24px 18px 12px;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-page-header {
    grid-template-columns: 1fr;
    row-gap: 18px;
    padding-top: 0;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-page-title,
  .cc-main--placeholder .cc-page-title {
    font-size: clamp(2.25rem, 13vw, 3.1rem);
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-page-stats {
    width: 100%;
    justify-content: flex-start;
    padding-top: 0;
    text-align: left;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-stat {
    justify-items: start;
    text-align: left;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-filter .cc-search {
    flex-basis: 100%;
    max-width: none;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-controls .cc-filter__button {
    flex: 1 1 132px;
    min-width: 0;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .cc-gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(var(--gallery-card-reference-height, 176px), auto);
  }
}

@media (max-width: 560px) {
  body.cc-page .canvas-card,
  body.cc-page .cc-shell__surface {
    border-radius: 24px;
  }

  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .brand-mark__script,
  body:is([data-page="pages"], [data-page="palettes"], [data-page="supplies"]) .brand-mark__word {
    font-size: clamp(1.32rem, 5.6vw, 1.58rem);
  }
}

/* My Pages opened workspace: palette workspace anatomy, page-specific content. */
@media (min-width: 761px) {
  body[data-page="pages"] .pages-workspace.split-workspace {
    --workspace-panel-gap: clamp(34px, 4vw, 64px);
    --workspace-center-breathing: clamp(16px, 1.6vw, 24px);
    --pages-workspace-split: 55%;
    grid-template-columns:
      minmax(0, calc(var(--pages-workspace-split) - (var(--workspace-panel-gap) / 2)))
      minmax(0, calc((100% - var(--pages-workspace-split)) - (var(--workspace-panel-gap) / 2)));
    gap: var(--workspace-panel-gap);
    position: relative;
    height: var(--gallery-panel-height);
    min-height: var(--gallery-panel-min-height);
    padding: 0;
    overflow: visible;
  }

  body[data-page="pages"] .pages-workspace.split-workspace::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pages-workspace-split);
    width: 1px;
    background: rgba(205, 178, 158, 0.28);
    transform: translateX(-50%);
    pointer-events: none;
  }

  body[data-page="pages"] .pages-workspace.split-workspace > .workspace-panel {
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-page="pages"] .pages-workspace.split-workspace > .pages-preview-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: clamp(10px, 1.35vh, 16px);
    padding:
      clamp(12px, 1.8vh, 22px)
      var(--workspace-center-breathing)
      0
      var(--collection-action-inset);
    overflow: visible;
  }

  body[data-page="pages"] .pages-workspace.split-workspace > .pages-object-tracker {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: clamp(10px, 1.35vh, 16px);
    padding:
      clamp(12px, 1.8vh, 22px)
      var(--collection-action-inset)
      0
      var(--workspace-center-breathing);
    overflow: visible;
  }

  body[data-page="pages"] .pages-preview-panel__workspace-header,
  body[data-page="pages"] .pages-object-tracker__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: clamp(14px, 1.8vw, 24px);
    row-gap: clamp(10px, 1.35vh, 14px);
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
  }

  body[data-page="pages"] .pages-preview-panel__workspace-header {
    grid-template-areas:
      "title stats"
      "content content";
  }

  body[data-page="pages"] .pages-preview-panel__workspace-header .cc-page-header__copy {
    grid-area: title;
    min-width: 0;
  }

  body[data-page="pages"] .pages-preview-panel__workspace-header .cc-page-stats {
    grid-area: stats;
    align-items: flex-start;
    justify-content: flex-end;
    gap: clamp(14px, 1.65vw, 22px);
    margin-left: 0;
    padding-top: clamp(2px, 0.35vh, 5px);
  }

  body[data-page="pages"] .pages-preview-panel__workspace-header .cc-stat {
    min-width: 58px;
  }

  body[data-page="pages"] .pages-preview-panel__workspace-header .cc-stat__value {
    font-size: clamp(1.35rem, 1.8vw, 1.72rem);
  }

  body[data-page="pages"] .pages-preview-panel__workspace-header .cc-stat__label {
    font-size: clamp(0.54rem, 0.64vw, 0.66rem);
    letter-spacing: 0;
  }

  body[data-page="pages"] .pages-preview-panel__metadata {
    grid-area: content;
    display: block;
    width: 100%;
    min-width: 0;
    min-height: clamp(34px, 4.6vh, 42px);
    margin: 0;
    padding: 0;
    color: rgba(86, 80, 93, 0.78);
    font-family: var(--font-copy);
    font-size: clamp(0.78rem, 0.86vw, 0.94rem);
    font-weight: 760;
    line-height: 1.35;
    letter-spacing: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-page="pages"] .pages-preview-panel__workspace-header .cc-page-title,
  body[data-page="pages"] .pages-object-tracker__title-view {
    margin: 0;
    color: rgba(28, 26, 28, 0.98);
    font-family: var(--font-display);
    font-size: clamp(2.05rem, 3vw, 3.05rem);
    font-weight: 780;
    letter-spacing: 0;
    line-height: 0.88;
    font-variation-settings: "SOFT" 80, "WONK" 0, "opsz" 72;
    text-wrap: balance;
  }

  body[data-page="pages"] .pages-object-tracker__title {
    display: block;
    min-width: 0;
  }

  body[data-page="pages"] .pages-object-tracker__title-view {
    max-width: min(100%, 15.5ch);
  }

  body[data-page="pages"] .pages-object-tracker__meta {
    display: none;
  }

  body[data-page="pages"] .pages-object-tracker__actions {
    gap: 8px;
    padding-top: 2px;
  }

  body[data-page="pages"] .pages-object-tracker__actions .palette-editor__close.modal-button--icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  body[data-page="pages"] .pages-preview-panel__view {
    display: block;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-preview-panel__artwork {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-preview-panel__card {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 13px;
    border: 1px solid rgba(205, 178, 158, 0.54);
    background: rgba(255, 252, 249, 0.52);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.36),
      0 10px 24px rgba(60, 45, 25, 0.035);
    overflow: hidden;
  }

  body[data-page="pages"] .pages-preview-panel__frame {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: inherit;
    background:
      linear-gradient(180deg, rgba(255, 249, 244, 0.96), rgba(255, 239, 230, 0.82)),
      rgba(255, 249, 244, 0.92);
    box-shadow: none;
    overflow: hidden;
    cursor: crosshair;
  }

  body[data-page="pages"] .pages-preview-card__image {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    object-position: center center;
  }

  body[data-page="pages"] .pages-object-tracker__shell {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-object-list {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(0, auto);
    align-content: start;
    width: 100%;
    height: 100%;
    gap: var(--gallery-grid-gap, 14px);
    padding: 3px 0 0;
    overflow: hidden auto;
    scrollbar-width: none;
  }

  body[data-page="pages"] .pages-object-list::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  body[data-page="pages"] .pages-object-list__empty {
    margin: 0;
    padding: 18px 20px;
    border-radius: 13px;
    border: 1px solid rgba(205, 178, 158, 0.44);
    background: rgba(255, 252, 249, 0.52);
    color: rgba(92, 88, 98, 0.64);
    font-family: var(--font-copy);
    font-size: clamp(0.78rem, 0.84vw, 0.9rem);
    font-weight: 500;
    line-height: 1.35;
  }

  body[data-page="pages"] .pages-object.palette-card {
    --palette-accent: var(--color-coral);
    --palette-accent-soft: color-mix(in srgb, var(--color-coral) 28%, var(--paper-border));
    --palette-pill-bg: color-mix(in srgb, var(--gallery-card-surface) 86%, white);
    --palette-pill-border: var(--paper-border);
    --palette-pill-text: var(--color-text-muted);
    --palette-pill-text-strong: var(--color-text);
    display: grid;
    grid-template-rows: auto auto;
    min-height: clamp(132px, 17vh, 170px);
    border-radius: 13px;
    border: 1.5px solid color-mix(in srgb, var(--paper-border) 70%, var(--palette-accent-soft));
    background: color-mix(in srgb, var(--gallery-card-surface) 92%, white);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.44) inset,
      0 5px 14px rgba(60, 45, 20, 0.035);
    overflow: hidden;
  }

  body[data-page="pages"] .pages-object.palette-card:hover,
  body[data-page="pages"] .pages-object.palette-card:focus-within,
  body[data-page="pages"] .pages-object.palette-card.is-active {
    border-color: color-mix(in srgb, var(--paper-border) 52%, var(--palette-accent));
    background: color-mix(in srgb, var(--gallery-card-surface) 96%, white);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.5) inset,
      0 7px 18px rgba(60, 45, 20, 0.05);
  }

  body[data-page="pages"] .pages-object__row {
    position: relative;
    display: block;
    min-height: 0;
    padding: 0;
  }

  body[data-page="pages"] .pages-object__summary {
    display: grid;
    grid-template-columns: clamp(46px, 5.6vh, 54px) minmax(0, 1fr);
    align-items: start;
    column-gap: clamp(12px, 1.35vw, 16px);
    width: 100%;
    min-height: 0;
    padding: clamp(10px, 1.25vh, 14px) clamp(16px, 1.65vw, 20px) clamp(8px, 1.1vh, 12px);
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
  }

  body[data-page="pages"] .pages-object__summary--collapsed {
    min-height: 0;
  }

  body[data-page="pages"] .pages-object__summary::before,
  body[data-page="pages"] .pages-object__summary::after {
    display: none;
  }

  body[data-page="pages"] .pages-object__logo.palette-card__logo {
    grid-row: 1 / span 3;
    width: clamp(46px, 5.6vh, 54px);
    height: clamp(46px, 5.6vh, 54px);
    border-radius: 999px;
    border: 1.5px solid color-mix(in srgb, var(--paper-border) 76%, var(--palette-accent-soft));
    background: rgba(255, 252, 249, 0.92);
    color: color-mix(in srgb, var(--color-text) 72%, var(--palette-accent));
    box-shadow:
      0 8px 14px rgba(60, 45, 20, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.64);
    font-family: var(--font-copy);
    font-size: clamp(1.02rem, 1.35vw, 1.18rem);
    font-weight: 900;
  }

  body[data-page="pages"] .pages-object__content.palette-card__body {
    position: static;
    display: grid;
    width: 100%;
    max-width: none;
    min-width: 0;
    gap: clamp(5px, 0.65vh, 8px);
  }

  body[data-page="pages"] .pages-object__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(92, 88, 98, 0.62);
    font-family: var(--font-copy);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
  }

  body[data-page="pages"] .pages-object__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-rose) 70%, white);
    color: #fff;
    font-size: 0.56rem;
    font-weight: 900;
  }

  body[data-page="pages"] .pages-object__name {
    max-width: calc(100% - 155px);
    overflow: hidden;
    color: var(--color-text);
    font-family: var(--font-copy);
    font-size: clamp(1rem, 1vw, 1.12rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.06;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-page="pages"] .pages-object__description {
    display: none;
  }

  body[data-page="pages"] .pages-object__tags {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(5px, 0.65vw, 7px);
    padding-top: 0;
  }

  body[data-page="pages"] .pages-object__footer.palette-card__footer {
    display: grid;
    grid-template-columns: clamp(52px, 5.8vw, 62px) minmax(0, 1fr);
    grid-column: 1 / -1;
    align-items: center;
    gap: clamp(8px, 1vw, 11px);
    width: 100%;
    min-height: clamp(32px, 4.8vh, 42px);
    margin-top: clamp(6px, 0.8vh, 8px);
    padding-top: clamp(5px, 0.8vh, 7px);
    border-top: 1px solid color-mix(in srgb, var(--paper-border) 70%, transparent);
  }

  body[data-page="pages"] .pages-object__count.palette-card__count {
    display: grid;
    align-content: center;
    gap: 1px;
    min-width: 0;
    padding-right: clamp(8px, 1vw, 11px);
    border-right: 1px solid color-mix(in srgb, var(--paper-border) 78%, transparent);
    color: var(--color-text);
  }

  body[data-page="pages"] .pages-object__count strong {
    font-size: clamp(0.98rem, 1.12vw, 1.12rem);
    font-weight: 900;
    line-height: 0.92;
  }

  body[data-page="pages"] .pages-object__count span {
    color: var(--color-text-muted);
    font-size: clamp(0.48rem, 0.56vw, 0.58rem);
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
  }

  body[data-page="pages"] .pages-object__preview-swatches.supply-card__swatches {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(7px, 0.9vw, 12px);
    min-width: 0;
    min-height: clamp(17px, 2.5vh, 20px);
    padding: 0;
    border: 0;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-object__preview-swatch.swatch-row__item {
    width: clamp(14px, 1.35vw, 18px);
    height: clamp(14px, 1.35vw, 18px);
    flex: 0 0 clamp(14px, 1.35vw, 18px);
    border-radius: 999px;
  }

  body[data-page="pages"] .pages-object__preview-more.swatch-row__overflow {
    min-width: 22px;
    height: 22px;
    margin-left: 0;
    padding-inline: 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--gallery-card-surface) 70%, #e7dfd6);
    color: rgba(47, 41, 53, 0.68);
    font-size: 0.58rem;
    font-weight: 900;
  }

  body[data-page="pages"] .pages-object__actions {
    position: absolute;
    top: clamp(11px, 1.25vh, 14px);
    right: clamp(16px, 1.65vw, 20px);
    z-index: 4;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    max-width: min(48%, 250px);
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-2px);
    transition:
      opacity 160ms ease,
      transform 160ms ease;
  }

  body[data-page="pages"] .pages-object.is-expanded .pages-object__actions,
  body[data-page="pages"] .pages-object:hover .pages-object__actions,
  body[data-page="pages"] .pages-object:focus-within .pages-object__actions,
  body[data-page="pages"] .pages-object__actions:hover,
  body[data-page="pages"] .pages-object__actions:focus-within {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  body[data-page="pages"] .pages-object__actions .gallery-card__action {
    height: 25px;
    min-width: 0;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid var(--paper-border);
    background: var(--gallery-card-surface);
    color: var(--color-text);
    box-shadow: 0 4px 10px rgba(60, 45, 20, 0.04);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0;
  }

  body[data-page="pages"] .pages-object__actions .gallery-card__action--delete {
    color: color-mix(in srgb, var(--color-text) 74%, var(--color-coral));
  }

  body[data-page="pages"] .pages-object__details {
    border: 0;
  }

  body[data-page="pages"] .pages-object__details-inner {
    padding: 0 clamp(16px, 1.65vw, 20px) clamp(11px, 1.35vh, 16px);
  }

  body[data-page="pages"] .pages-object .pages-colour-list {
    display: grid;
    gap: 0;
    padding-top: clamp(5px, 0.8vh, 8px);
    border-top: 1px solid color-mix(in srgb, var(--paper-border) 70%, transparent);
  }

  body[data-page="pages"] .pages-object .pages-colour-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) minmax(88px, auto);
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 6px 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
  }

  body[data-page="pages"] .pages-object .pages-colour-row__swatch {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  body[data-page="pages"] .pages-object .pages-colour-row__brand {
    color: rgba(90, 84, 98, 0.55);
    font-size: 0.56rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  body[data-page="pages"] .pages-object .pages-colour-row__code,
  body[data-page="pages"] .pages-object .pages-colour-row__name {
    color: #302842;
    font-size: clamp(0.84rem, 0.9vw, 0.98rem);
    font-weight: 900;
  }

  body[data-page="pages"] .pages-workspace.split-workspace .gallery-page__footer.gallery-panel__footer,
  body[data-page="pages"] .pages-workspace.split-workspace .palette-editor__footer {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
    width: 100%;
    min-height: var(--cc-footer-tray-height);
    margin: 0;
    padding:
      clamp(14px, 1.7vh, 20px)
      0
      clamp(12px, 1.6vh, 18px);
    border-top: 0;
    background: transparent;
    overflow: visible;
  }

  body[data-page="pages"] .pages-workspace.split-workspace .gallery-page__footer.gallery-panel__footer::before,
  body[data-page="pages"] .pages-workspace.split-workspace .palette-editor__footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(205, 178, 158, 0.36);
    pointer-events: none;
  }

  body[data-page="pages"] .pages-workspace.split-workspace .cc-button--footer {
    min-height: clamp(40px, 4.6vh, 46px);
  }

  body[data-page="pages"] [data-pages-add-object].is-active {
    border-color: color-mix(in srgb, var(--color-coral) 70%, var(--paper-border));
    background: color-mix(in srgb, var(--color-peach-fuzz) 78%, white);
  }
}

@media (max-width: 760px) {
  body[data-page="pages"] .pages-workspace.split-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 18px;
    height: auto;
    min-height: 0;
    max-height: none;
  }

  body[data-page="pages"] .pages-workspace.split-workspace::after {
    display: none;
  }

  body[data-page="pages"] .pages-workspace.split-workspace > .pages-preview-panel,
  body[data-page="pages"] .pages-workspace.split-workspace > .pages-object-tracker {
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    padding: 0;
  }

  body[data-page="pages"] .pages-preview-panel__workspace-header,
  body[data-page="pages"] .pages-object-tracker__top {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body[data-page="pages"] .pages-preview-panel__card {
    min-height: 420px;
  }

  body[data-page="pages"] .pages-object-list {
    max-height: none;
    overflow: visible;
  }

  body[data-page="pages"] .pages-object__actions {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

@media (min-width: 761px) {
  body[data-page="pages"] .pages-object.palette-card {
    --gallery-card-accent: var(--palette-accent, var(--color-coral));
    --palette-accent: var(--color-coral);
    --palette-accent-soft: color-mix(in srgb, var(--color-coral) 30%, var(--color-floral-white));
    display: block;
    min-height: var(--gallery-card-reference-height, 176px);
    height: auto;
    padding: 5px;
    border-radius: 16px;
    border: 1.5px solid color-mix(in srgb, var(--gallery-card-accent) 48%, var(--paper-border-soft));
    background: #faf6f0;
    box-shadow:
      3px 5px 0 color-mix(in srgb, var(--gallery-card-accent) 18%, transparent),
      0 2px 10px color-mix(in srgb, var(--gallery-card-accent) 8%, rgba(60, 45, 20, 0.04));
    overflow: hidden;
  }

  body[data-page="pages"] .pages-object.palette-card:hover,
  body[data-page="pages"] .pages-object.palette-card:focus-within,
  body[data-page="pages"] .pages-object.palette-card.is-active {
    border-color: color-mix(in srgb, var(--gallery-card-accent) 70%, var(--paper-border-strong));
    background: #faf6f0;
    box-shadow:
      3px 5px 0 color-mix(in srgb, var(--gallery-card-accent) 26%, transparent),
      0 4px 16px color-mix(in srgb, var(--gallery-card-accent) 12%, rgba(60, 45, 20, 0.06));
  }

  body[data-page="pages"] .pages-object__frame.palette-card__frame {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-height: calc(var(--gallery-card-reference-height, 176px) - 10px);
    height: 100%;
    padding: clamp(7px, 1vh, 10px) clamp(16px, 1.65vw, 20px) clamp(6px, 0.9vh, 8px);
    border-radius: 12px;
    background: #faf6f0;
  }

  body[data-page="pages"] .pages-object__top.palette-card__top {
    position: relative;
    display: block;
    min-height: clamp(48px, 6.6vh, 62px);
  }

  body[data-page="pages"] .pages-object__summary {
    position: static;
    display: block;
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    cursor: pointer;
    text-align: left;
  }

  body[data-page="pages"] .pages-object__logo.palette-card__logo {
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: clamp(46px, 5.6vh, 54px);
    height: clamp(46px, 5.6vh, 54px);
    border-radius: 999px;
    border: 1.5px solid color-mix(in srgb, var(--palette-accent, var(--paper-border)) 36%, var(--paper-border));
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(250, 247, 241, 0.99));
    box-shadow:
      0 6px 0 rgba(56, 48, 38, 0.09),
      0 11px 18px rgba(56, 48, 38, 0.09),
      inset 0 1px 0 rgba(255, 255, 255, 0.95);
    color: color-mix(in srgb, var(--palette-accent, var(--color-text)) 72%, var(--color-text));
  }

  body[data-page="pages"] .pages-object__logo.palette-card__logo span {
    display: block;
    font-size: clamp(1.2rem, 1.45vw, 1.42rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
  }

  body[data-page="pages"] .pages-object__content.palette-card__body {
    position: absolute;
    left: clamp(64px, 6.8vw, 74px);
    top: clamp(5px, 0.7vh, 8px);
    display: block;
    width: calc(100% - clamp(64px, 6.8vw, 74px));
    max-width: calc(100% - clamp(64px, 6.8vw, 74px));
    min-width: 0;
    margin: 0;
    padding: 0;
    text-align: left;
  }

  body[data-page="pages"] .pages-object__eyebrow.palette-card__eyebrow {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    min-height: 24px;
    margin: 0;
  }

  body[data-page="pages"] .pages-object__eyebrow .palette-card__brand {
    color: rgba(28, 35, 42, 0.58);
    font-size: clamp(0.68rem, 0.72vw, 0.78rem);
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.1;
    text-transform: uppercase;
  }

  body[data-page="pages"] .pages-object__check.palette-card__status {
    width: 17px;
    height: 17px;
    background: var(--palette-accent, var(--paper-border));
    border: 1px solid color-mix(in srgb, var(--palette-accent, var(--paper-border-strong)) 58%, white);
    font-size: 0.58rem;
  }

  body[data-page="pages"] .pages-object__content.palette-card__body h2.pages-object__name {
    display: block;
    max-width: min(24ch, calc(100% - 150px));
    margin: clamp(5px, 0.75vh, 7px) 0 0;
    color: rgba(23, 20, 16, 0.96);
    font-size: clamp(1.06rem, 1.12vw, 1.22rem);
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.08;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body[data-page="pages"] .pages-object__divider.palette-card__divider {
    display: block;
    margin: 0 0 0 clamp(64px, 6.8vw, 74px);
    border-top: 1px dashed color-mix(in srgb, var(--paper-border) 74%, var(--paper-border-soft));
  }

  body[data-page="pages"] .pages-object__meta.palette-card__meta {
    position: static;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    min-height: clamp(32px, 4.8vh, 42px);
    max-height: clamp(32px, 4.8vh, 42px);
    margin: 0;
    padding: 0 0 0 clamp(64px, 6.8vw, 74px);
    opacity: 1;
    transform: none;
  }

  body[data-page="pages"] .pages-object__tag-list.palette-card__tag-list {
    position: static;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(5px, 0.65vw, 7px);
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  body[data-page="pages"] .pages-object__footer.palette-card__footer {
    container-type: inline-size;
    display: grid;
    grid-template-columns: clamp(52px, 5.8vw, 62px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(8px, 1vw, 11px);
    width: 100%;
    min-height: clamp(32px, 4.8vh, 42px);
    margin-top: 0;
    padding-top: clamp(5px, 0.8vh, 7px);
    border-top: 1.5px solid rgba(190, 176, 156, 0.7);
  }

  body[data-page="pages"] .pages-object__count.palette-card__count {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    padding-right: clamp(8px, 1vw, 11px);
    border-right: 1.5px solid var(--paper-border);
  }

  body[data-page="pages"] .pages-object__count.palette-card__count strong {
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
  }

  body[data-page="pages"] .pages-object__count.palette-card__count span {
    margin-top: 2px;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0;
  }

  body[data-page="pages"] .pages-object__swatch-field.palette-card__swatch-field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-page="pages"] .pages-object__preview-swatches.supply-card__swatches {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(7px, 0.9vw, 12px);
    width: 100%;
    min-height: clamp(17px, 2.5vh, 20px);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  body[data-page="pages"] .pages-object__preview-swatch.swatch-row__item {
    width: clamp(14px, 1.35vw, 18px);
    height: clamp(14px, 1.35vw, 18px);
    flex: 0 0 clamp(14px, 1.35vw, 18px);
    border-radius: 999px;
    border: 1px solid rgba(109, 96, 84, 0.16);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.18),
      0 2px 5px rgba(60, 45, 20, 0.08);
  }

  body[data-page="pages"] .pages-object__details {
    display: none;
    max-height: none;
    border: 0;
    overflow: visible;
  }

  body[data-page="pages"] .pages-object.is-expanded .pages-object__details {
    display: block;
  }
}

@media (min-width: 761px) {
  body[data-page="pages"] .pages-object__preview-swatches.palette-card__swatches {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    gap: 0;
    width: 100%;
    min-width: 0;
    min-height: clamp(17px, 2.5vh, 20px);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-object__swatch-segment.palette-card__swatch-segment {
    display: block;
    flex: 1 1 0;
    min-width: 0;
    min-height: clamp(17px, 2.5vh, 20px);
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body[data-page="pages"] .pages-object__swatch-segment.palette-card__swatch-segment--empty {
    background:
      repeating-linear-gradient(
        45deg,
        rgba(190, 176, 156, 0.26) 0 8px,
        rgba(255, 255, 255, 0.34) 8px 16px
      ),
      color-mix(in srgb, var(--gallery-card-surface) 74%, white);
  }
}

body[data-page="pages"] .pages-object__actions {
  pointer-events: none;
}

body[data-page="pages"] .pages-object.is-expanded .pages-object__actions,
body[data-page="pages"] .pages-object:hover .pages-object__actions,
body[data-page="pages"] .pages-object:focus-within .pages-object__actions,
body[data-page="pages"] .pages-object__actions:hover,
body[data-page="pages"] .pages-object__actions:focus-within {
  pointer-events: none;
}

body[data-page="pages"] .pages-object__actions .gallery-card__action {
  pointer-events: none;
}

body[data-page="pages"] .pages-object.is-expanded .pages-object__actions .gallery-card__action,
body[data-page="pages"] .pages-object:hover .pages-object__actions .gallery-card__action,
body[data-page="pages"] .pages-object:focus-within .pages-object__actions .gallery-card__action,
body[data-page="pages"] .pages-object__actions:hover .gallery-card__action,
body[data-page="pages"] .pages-object__actions:focus-within .gallery-card__action {
  pointer-events: auto;
}

body[data-page="pages"] .pages-object-tracker > .palette-editor__footer {
  justify-items: start;
}

body[data-page="pages"] .pages-workspace.split-workspace .pages-object-tracker > .palette-editor__footer .cc-footer__action[data-pages-add-object] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-column: 1;
  justify-self: start;
  min-width: max-content;
  min-height: clamp(40px, 4.6vh, 46px);
  visibility: visible;
  pointer-events: auto;
}

@media (min-width: 761px) {
  body[data-page="pages"] .pages-workspace.split-workspace {
    --pages-workspace-split: 58%;
    --workspace-panel-gap: clamp(30px, 3.6vw, 56px);
    --workspace-center-breathing: clamp(10px, 1.15vw, 18px);
  }

  body[data-page="pages"] .pages-workspace.split-workspace > .pages-preview-panel {
    padding-right: var(--workspace-center-breathing);
    justify-content: center;
    transform: translateX(calc(var(--workspace-panel-gap) / 4));
  }

  body[data-page="pages"] .pages-preview-panel__workspace-header .cc-page-stats {
    justify-self: end;
    justify-content: flex-end;
    align-items: flex-start;
    width: max-content;
    text-align: right;
  }

  body[data-page="pages"] .pages-preview-panel__workspace-header .cc-stat {
    justify-items: end;
    text-align: right;
  }

  body[data-page="pages"] .pages-preview-panel__workspace-header .cc-stat__value,
  body[data-page="pages"] .pages-preview-panel__workspace-header .cc-stat__label {
    text-align: right;
  }

  body[data-page="pages"] .pages-preview-panel__view,
  body[data-page="pages"] .pages-preview-panel__artwork,
  body[data-page="pages"] .pages-preview-panel__card {
    width: 100%;
    max-width: none;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery__viewport.is-populated {
    --mini-gallery-visible-rows: 3;
    --mini-gallery-row-gap: var(--gallery-grid-gap, 14px);
    --mini-gallery-min-row-height: var(--gallery-card-reference-height, 176px);
    --mini-gallery-visible-height: calc(
      (var(--mini-gallery-min-row-height) * 3) + (var(--mini-gallery-row-gap) * 2) + 3px
    );
    align-self: start;
    height: min(100%, var(--mini-gallery-visible-height));
    max-height: var(--mini-gallery-visible-height);
    min-height: 0;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-object-tracker__shell {
    --mini-gallery-visible-rows: 3;
    --mini-gallery-row-gap: var(--gallery-grid-gap, 14px);
    --mini-gallery-min-row-height: var(--gallery-card-reference-height, 176px);
    min-height: 0;
    overflow: hidden;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery-grid,
  body[data-page="pages"] .pages-object-list {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: max(
      var(--mini-gallery-min-row-height),
      calc((100% - (var(--mini-gallery-row-gap) * 2) - 3px) / 3)
    );
    align-content: start;
    gap: var(--mini-gallery-row-gap);
    width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    padding: 3px 0 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-gallery-grid > .cc-card--palette,
  body[data-page="pages"] .pages-object-list > .pages-object.palette-card {
    min-height: 0;
    height: 100%;
  }

  body[data-page="pages"] .pages-object-list {
    display: flex;
    flex-direction: column;
    grid-auto-rows: unset;
    align-content: stretch;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card {
    flex: 0 0 auto;
    min-height: var(--mini-gallery-min-row-height);
    height: auto;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__frame.palette-card__frame {
    min-height: calc(var(--mini-gallery-min-row-height) - 10px);
    height: auto;
  }
}

/* Pages object colour rows: compact readable redesign. */
body[data-page="pages"] .pages-object .pages-colour-list {
  gap: 0;
  padding-top: clamp(7px, 1vh, 10px);
  border-top: 1px solid color-mix(in srgb, var(--paper-border) 68%, transparent);
}

body[data-page="pages"] .pages-object .pages-colour-row {
  --row-line: color-mix(in srgb, var(--paper-border) 56%, transparent);
  grid-template-columns: 38px minmax(0, 1fr) minmax(92px, auto);
  gap: 9px 11px;
  min-height: 54px;
  padding: 7px 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

body[data-page="pages"] .pages-object .pages-colour-row:hover,
body[data-page="pages"] .pages-object .pages-colour-row:focus-within,
body[data-page="pages"] .pages-object .pages-colour-row.is-highlighted {
  background: transparent;
  box-shadow: none;
  transform: none;
}

body[data-page="pages"] .pages-object .pages-colour-row:not(:last-child)::after {
  display: block;
  left: 49px;
  right: 0;
  background: var(--row-line);
}

body[data-page="pages"] .pages-object .pages-colour-row__swatch {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, #6e6470 18%, transparent);
  box-shadow:
    0 3px 8px rgba(80, 58, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    0 0 0 3px rgba(255, 252, 248, 0.62);
}

body[data-page="pages"] .pages-object .pages-colour-row__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body[data-page="pages"] .pages-object .pages-colour-row__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: rgba(83, 77, 91, 0.55);
  font-family: var(--font-copy);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

body[data-page="pages"] .pages-object .pages-colour-row__brand {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-overflow: ellipsis;
  text-transform: inherit;
  white-space: nowrap;
}

body[data-page="pages"] .pages-object .pages-colour-row__medium {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 17px;
  padding: 0 6px;
  border: 1px solid color-mix(in srgb, var(--paper-border) 64%, transparent);
  border-radius: 7px;
  background: rgba(255, 252, 249, 0.68);
  color: rgba(83, 77, 91, 0.62);
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

body[data-page="pages"] .pages-object .pages-colour-row__headline {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

body[data-page="pages"] .pages-object .pages-colour-row__code,
body[data-page="pages"] .pages-object .pages-colour-row__name {
  color: #302842;
  font-family: var(--font-copy);
  font-size: clamp(0.88rem, 0.92vw, 1rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.08;
}

body[data-page="pages"] .pages-object .pages-colour-row__code {
  flex: 0 0 auto;
  font-weight: 900;
}

body[data-page="pages"] .pages-object .pages-colour-row__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="pages"] .pages-object .pages-colour-row__dash {
  flex: 0 0 auto;
  color: rgba(48, 40, 66, 0.42);
  font-weight: 800;
}

body[data-page="pages"] .pages-object .pages-colour-row__side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  min-height: 28px;
}

body[data-page="pages"] .pages-object .pages-colour-row__roles {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
  padding-right: 0;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

body[data-page="pages"] .pages-colour-row:hover .pages-colour-row__roles,
body[data-page="pages"] .pages-colour-row__copy:hover ~ .pages-colour-row__side .pages-colour-row__roles,
body[data-page="pages"] .pages-colour-row__copy:focus-within ~ .pages-colour-row__side .pages-colour-row__roles,
body[data-page="pages"] .pages-colour-row__side:hover .pages-colour-row__roles,
body[data-page="pages"] .pages-colour-row:focus-within .pages-colour-row__roles {
  opacity: 1;
  transform: none;
}

body[data-page="pages"] .pages-object .pages-colour-row__actions {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(4px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

body[data-page="pages"] .pages-object .pages-colour-row:hover .pages-colour-row__actions,
body[data-page="pages"] .pages-object .pages-colour-row:focus-within .pages-colour-row__actions,
body[data-page="pages"] .pages-object .pages-colour-row__side:hover .pages-colour-row__actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

body[data-page="pages"] .pages-object .pages-colour-row__action {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--paper-border) 76%, transparent);
  background: rgba(255, 252, 249, 0.92);
  color: rgba(48, 40, 66, 0.78);
  box-shadow: none;
  font-size: 0;
}

body[data-page="pages"] .pages-object .pages-colour-row__button-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

body[data-page="pages"] .pages-object .pages-colour-row__button-icon,
body[data-page="pages"] .pages-object__button-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  background-color: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

body[data-page="pages"] .pages-object__button-icon {
  width: 11px;
  height: 11px;
}

body[data-page="pages"] .pages-object .pages-colour-row__button-icon--edit,
body[data-page="pages"] .pages-object__button-icon--edit {
  -webkit-mask-image: url("./assets/icons/mediums/pen-nib.svg");
  mask-image: url("./assets/icons/mediums/pen-nib.svg");
}

body[data-page="pages"] .pages-object .pages-colour-row__button-icon--delete,
body[data-page="pages"] .pages-object__button-icon--delete {
  -webkit-mask-image: url("./assets/icons/actions/delete.svg");
  mask-image: url("./assets/icons/actions/delete.svg");
}

body[data-page="pages"] .pages-object__button-icon--palette {
  -webkit-mask-image: url("./assets/icons/actions/add-square.svg");
  mask-image: url("./assets/icons/actions/add-square.svg");
}

body[data-page="pages"] .pages-object__actions .gallery-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

body[data-page="pages"] .pages-object .pages-colour-row--empty {
  grid-template-columns: 38px minmax(0, 1fr);
  cursor: pointer;
  min-height: 50px;
}

body[data-page="pages"] .pages-object .pages-colour-row__swatch--empty {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, var(--paper-border) 82%, transparent);
  background: rgba(255, 252, 249, 0.78);
  box-shadow: none;
}

body[data-page="pages"] .pages-object .pages-colour-row__swatch--empty::before,
body[data-page="pages"] .pages-object .pages-colour-row__swatch--empty::after {
  background: rgba(48, 40, 66, 0.74);
}

body[data-page="pages"] .pages-colour-row__copy--empty .pages-colour-row__copy--empty-title {
  color: #302842;
  font-family: var(--font-copy);
  font-size: clamp(0.88rem, 0.92vw, 1rem);
  font-weight: 850;
  letter-spacing: 0;
}

@media (max-width: 1120px) {
  body[data-page="pages"] .pages-object .pages-colour-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  body[data-page="pages"] .pages-object .pages-colour-row__side {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  body[data-page="pages"] .pages-object .pages-colour-row__headline {
    flex-wrap: wrap;
  }

  body[data-page="pages"] .pages-object .pages-colour-row__name {
    white-space: normal;
  }
}

body[data-page="pages"] .pages-object__actions {
  flex-wrap: nowrap;
  max-width: calc(100% - 112px);
}

body[data-page="pages"] .pages-object__actions .gallery-card__action {
  gap: 3px;
  height: 24px;
  padding: 0 6px;
  font-size: 0.54rem;
  flex: 0 0 auto;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}

body[data-page="pages"] .pages-object__actions .pages-object__action--add-palette {
  max-width: none;
}

body[data-page="pages"] .pages-object .pages-colour-row {
  grid-template-columns: 38px minmax(0, 1fr);
}

body[data-page="pages"] .pages-object .pages-colour-row__headline {
  flex-wrap: nowrap;
}

body[data-page="pages"] .pages-object .pages-colour-row__side {
  grid-column: 2;
  justify-content: flex-start;
}

body[data-page="pages"] .pages-object .pages-colour-row__roles {
  justify-content: flex-start;
}

body[data-page="pages"] .pages-object .pages-colour-row--empty {
  grid-template-columns: 38px minmax(0, 1fr);
}

/* Object tracker cards mirror the compact palette-card list anatomy. */
@media (min-width: 761px) {
  body[data-page="pages"] .pages-object-list > .pages-object.palette-card:not(.is-expanded) {
    min-height: 0 !important;
    height: var(--gallery-card-reference-height, 176px) !important;
  }

  body[data-page="pages"] .pages-object.palette-card:not(.is-expanded) .pages-object__frame.palette-card__frame {
    min-height: calc(var(--gallery-card-reference-height, 176px) - 10px);
    height: 100%;
    padding: clamp(7px, 1vh, 10px) clamp(16px, 1.65vw, 20px) clamp(6px, 0.9vh, 8px);
  }

  body[data-page="pages"] .pages-object.palette-card:not(.is-expanded) .pages-object__top.palette-card__top {
    min-height: clamp(48px, 6.6vh, 62px);
  }

  body[data-page="pages"] .pages-object.palette-card .pages-object__logo.palette-card__logo {
    width: clamp(46px, 5.6vh, 54px);
    height: clamp(46px, 5.6vh, 54px);
  }

  body[data-page="pages"] .pages-object.palette-card .pages-object__content.palette-card__body {
    left: clamp(64px, 6.8vw, 74px);
    top: clamp(5px, 0.7vh, 8px);
    width: calc(100% - clamp(64px, 6.8vw, 74px));
    max-width: calc(100% - clamp(64px, 6.8vw, 74px));
  }

  body[data-page="pages"] .pages-object.palette-card .pages-object__content.palette-card__body h2.pages-object__name {
    margin-top: clamp(5px, 0.75vh, 7px);
    color: rgba(47, 41, 53, 0.96);
    font-size: clamp(1rem, 1.2vw, 1.12rem);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1.16;
    max-width: min(24ch, calc(100% - 150px));
  }

  body[data-page="pages"] .pages-object.palette-card .pages-object__divider.palette-card__divider,
  body[data-page="pages"] .pages-object.palette-card.is-expanded .pages-object__divider.palette-card__divider {
    display: block !important;
    margin: 0 0 0 clamp(64px, 6.8vw, 74px);
    border-top: 1px dashed color-mix(in srgb, var(--paper-border) 74%, var(--paper-border-soft));
    opacity: 1;
  }

  body[data-page="pages"] .pages-object.palette-card .pages-object__meta.palette-card__meta,
  body[data-page="pages"] .pages-object.palette-card.is-expanded .pages-object__meta.palette-card__meta {
    position: static;
    display: flex !important;
    flex: 0 0 clamp(32px, 4.8vh, 42px);
    align-items: center;
    justify-content: flex-start;
    min-height: clamp(32px, 4.8vh, 42px);
    max-height: clamp(32px, 4.8vh, 42px);
    margin: 0;
    padding: 0 0 0 clamp(64px, 6.8vw, 74px);
    opacity: 1;
    transform: none;
  }

  body[data-page="pages"] .pages-object.palette-card .pages-object__tag-list.palette-card__tag-list,
  body[data-page="pages"] .pages-object.palette-card.is-expanded .pages-object__tag-list.palette-card__tag-list {
    position: static;
    display: inline-flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(5px, 0.65vw, 7px);
    width: 100%;
    min-width: 0;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  body[data-page="pages"] .pages-object.palette-card .pages-object__solid-divider.palette-card__solid-divider,
  body[data-page="pages"] .pages-object.palette-card.is-expanded .pages-object__solid-divider.palette-card__solid-divider {
    display: none !important;
  }

  body[data-page="pages"] .pages-object.palette-card:not(.is-expanded) .pages-object__footer.palette-card__footer {
    grid-template-columns: clamp(52px, 5.8vw, 62px) minmax(0, 1fr);
    gap: clamp(8px, 1vw, 11px);
    min-height: clamp(32px, 4.8vh, 42px);
    margin-top: 0;
    padding-top: clamp(5px, 0.8vh, 7px);
    border-top: 1.5px solid rgba(190, 176, 156, 0.7);
  }

  body[data-page="pages"] .pages-object.palette-card:not(.is-expanded) .pages-object__count.palette-card__count {
    padding-right: clamp(8px, 1vw, 11px);
  }

  body[data-page="pages"] .pages-object.palette-card:not(.is-expanded) .pages-object__preview-swatches.palette-card__swatches,
  body[data-page="pages"] .pages-object.palette-card:not(.is-expanded) .pages-object__swatch-segment.palette-card__swatch-segment {
    min-height: clamp(17px, 2.5vh, 20px);
  }
}

/* Final page workspace alignment and preview surface polish. */
@media (min-width: 761px) {
  body[data-page="pages"] .pages-workspace.split-workspace > .pages-preview-panel {
    padding-right: var(--workspace-center-breathing);
  }

  body[data-page="pages"] .pages-workspace.split-workspace .pages-preview-panel__workspace-header {
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: start;
    width: 100%;
  }

  body[data-page="pages"] .pages-workspace.split-workspace .pages-preview-panel__workspace-header .cc-page-stats {
    justify-self: end;
    align-items: flex-start;
    justify-content: flex-end;
    width: max-content;
    margin-left: 0;
    padding-top: clamp(2px, 0.35vh, 5px);
    padding-right: 0;
    text-align: right;
    transform: none !important;
  }

  body[data-page="pages"] .pages-workspace.split-workspace .pages-preview-panel__workspace-header .cc-stat {
    min-width: 58px;
    justify-items: end;
    text-align: right;
  }

  body[data-page="pages"] .pages-workspace.split-workspace .pages-preview-panel__workspace-header .cc-stat__label {
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  body[data-page="pages"] .pages-workspace.split-workspace .pages-preview-panel__view {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 5px;
    width: 100%;
    justify-self: center;
    min-height: 0;
    overflow: visible;
  }

  body[data-page="pages"] .pages-workspace.split-workspace .pages-preview-panel__artwork {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: visible;
  }

  body[data-page="pages"] .pages-workspace.split-workspace .pages-preview-panel__card {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    margin-inline: auto;
    justify-self: center;
    align-self: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  body[data-page="pages"] .pages-workspace.split-workspace .pages-preview-panel__frame {
    flex: none;
    width: auto;
    max-width: 100%;
    height: min(100%, 72vh);
    aspect-ratio: 5 / 4;
    max-height: none;
    border-radius: 16px;
    border: 1px solid rgba(205, 178, 158, 0.46);
    background: rgba(255, 252, 249, 0.52);
    box-shadow: none;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-workspace.split-workspace .pages-preview-card__image {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    object-position: center center;
  }
}

/* Final object tag visibility guard: same slot and behavior as palette cards. */
body[data-page="pages"] .pages-object.palette-card .pages-object__divider.palette-card__divider {
  display: block !important;
  margin: 0 0 0 clamp(64px, 6.8vw, 74px);
  border-top: 1px dashed color-mix(in srgb, var(--paper-border) 74%, var(--paper-border-soft));
  opacity: 1;
}

body[data-page="pages"] .pages-object.palette-card .pages-object__meta.palette-card__meta {
  position: static !important;
  display: flex !important;
  flex: 0 0 clamp(32px, 4.8vh, 42px);
  align-items: center;
  justify-content: flex-start;
  min-height: clamp(32px, 4.8vh, 42px);
  max-height: clamp(32px, 4.8vh, 42px);
  margin: 0;
  padding: 0 0 0 clamp(64px, 6.8vw, 74px);
  overflow: visible;
  visibility: visible;
  opacity: 1 !important;
  transform: none !important;
}

body[data-page="pages"] .pages-object.palette-card .pages-object__tag-list.palette-card__tag-list {
  position: static !important;
  display: inline-flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(5px, 0.65vw, 7px);
  width: 100%;
  min-width: 0;
  overflow: hidden;
  visibility: visible;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto;
}

/* Page preview stats should sit like palette workspace stats, tight to the divider. */
@media (min-width: 761px) {
  body[data-page="pages"] .pages-workspace.split-workspace .pages-preview-panel__workspace-header {
    grid-template-columns: minmax(0, 1fr) max-content;
    column-gap: clamp(14px, 1.8vw, 24px);
  }

  body[data-page="pages"] .pages-workspace.split-workspace .pages-preview-panel__workspace-header .cc-page-stats {
    align-items: flex-start;
    justify-content: flex-end;
    justify-self: end;
    gap: clamp(14px, 1.65vw, 22px);
    width: max-content;
    margin-left: 0;
    padding-top: clamp(2px, 0.35vh, 5px);
    text-align: right;
    transform: none !important;
  }

  body[data-page="pages"] .pages-workspace.split-workspace .pages-preview-panel__workspace-header .cc-stat {
    display: grid;
    gap: 4px;
    min-width: 58px;
    justify-items: end;
    text-align: right;
  }

  body[data-page="pages"] .pages-workspace.split-workspace .pages-preview-panel__workspace-header .cc-stat__value {
    color: rgba(47, 41, 53, 0.96);
    font-size: clamp(1.35rem, 1.8vw, 1.72rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    text-align: right;
  }

  body[data-page="pages"] .pages-workspace.split-workspace .pages-preview-panel__workspace-header .cc-stat__label {
    color: rgba(47, 41, 53, 0.58);
    font-size: clamp(0.54rem, 0.64vw, 0.66rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1;
    text-align: right;
    text-transform: uppercase;
  }
}

/* Match palette list default viewport: three object cards visible, extra cards scroll. */
@media (min-width: 761px) {
  body[data-page="pages"] .pages-object-tracker__shell {
    --pages-object-row-gap: var(--gallery-grid-gap, 14px);
    --pages-object-row-height: var(--gallery-card-reference-height, 176px);
    align-self: stretch;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body[data-page="pages"] .pages-object-list {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) {
    display: grid !important;
    grid-template-columns: 1fr;
    grid-auto-rows: var(--pages-object-row-height);
    align-content: start;
    gap: var(--pages-object-row-gap);
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card {
    height: 100% !important;
    min-height: 0 !important;
  }
}

/* Revert object and colour-row hover actions to shared card text pills. */
body[data-page="pages"] .pages-object__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
  width: fit-content;
  max-width: none;
}

body[data-page="pages"] .pages-object__actions .gallery-card__action,
body[data-page="pages"] .pages-object .pages-colour-row__action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: fit-content !important;
  min-width: 24px !important;
  max-width: none !important;
  height: 24px !important;
  min-height: 0 !important;
  padding: 0 8px !important;
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--paper-border) !important;
  background: var(--gallery-card-surface) !important;
  color: var(--color-text) !important;
  box-shadow: 0 4px 10px rgba(60, 45, 20, 0.04) !important;
  font-size: 0.64rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  opacity: 1;
  cursor: pointer;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease !important;
}

body[data-page="pages"] .pages-object__actions .gallery-card__action:hover,
body[data-page="pages"] .pages-object__actions .gallery-card__action:focus-visible,
body[data-page="pages"] .pages-object .pages-colour-row__action:hover,
body[data-page="pages"] .pages-object .pages-colour-row__action:focus-visible {
  transform: translateY(-1px);
  background: var(--gallery-card-surface) !important;
  border-color: var(--paper-border) !important;
  color: var(--color-text) !important;
  box-shadow: var(--paper-shadow-soft) !important;
}

body[data-page="pages"] .pages-object__actions .gallery-card__action--delete,
body[data-page="pages"] .pages-object .pages-colour-row__action--delete {
  min-width: 5.4em !important;
  opacity: 0.62;
}

body[data-page="pages"] .pages-object__actions .gallery-card__action--delete:hover,
body[data-page="pages"] .pages-object__actions .gallery-card__action--delete:focus-visible,
body[data-page="pages"] .pages-object .pages-colour-row__action--delete:hover,
body[data-page="pages"] .pages-object .pages-colour-row__action--delete:focus-visible,
body[data-page="pages"] .pages-object__actions .gallery-card__action--delete.is-confirm,
body[data-page="pages"] .pages-object .pages-colour-row__action--delete.is-confirm {
  opacity: 1;
}

body[data-page="pages"] .pages-object .pages-colour-row__actions {
  gap: 6px;
}

@media (max-width: 1120px) {
  body[data-page="pages"] .pages-object__actions {
    max-width: none;
  }
}

/* Expanded object cards use one clean divider, then compact colour rows. */
body[data-page="pages"] .pages-object.is-expanded .pages-object__divider {
  display: none;
}

body[data-page="pages"] .pages-object.is-expanded .pages-object__details-inner {
  padding-top: 0;
}

body[data-page="pages"] .pages-object.is-expanded .pages-colour-list {
  margin-top: clamp(6px, 0.8vh, 9px);
  padding-top: clamp(4px, 0.55vh, 6px);
  border-top: 1.5px solid color-mix(in srgb, var(--paper-border) 76%, transparent);
}

body[data-page="pages"] .pages-object .pages-colour-row {
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 5px 9px;
  min-height: 42px;
  padding: 5px 0;
}

body[data-page="pages"] .pages-object .pages-colour-row:not(:last-child)::after {
  left: 41px;
}

body[data-page="pages"] .pages-object .pages-colour-row__swatch {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  box-shadow:
    0 2px 6px rgba(80, 58, 42, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 0 0 2px rgba(255, 252, 248, 0.58);
}

body[data-page="pages"] .pages-object .pages-colour-row__copy {
  gap: 2px;
}

body[data-page="pages"] .pages-object .pages-colour-row__meta {
  gap: 5px;
  font-size: 0.51rem;
  line-height: 1;
}

body[data-page="pages"] .pages-object .pages-colour-row__medium {
  min-height: 15px;
  padding: 0 5px;
  border-radius: 6px;
  font-size: 0.5rem;
}

body[data-page="pages"] .pages-object .pages-colour-row__code,
body[data-page="pages"] .pages-object .pages-colour-row__name {
  font-size: clamp(0.8rem, 0.84vw, 0.92rem);
  line-height: 1.05;
}

body[data-page="pages"] .pages-object .pages-colour-row__side {
  grid-column: 2;
  justify-content: flex-start;
  min-height: 0;
}

body[data-page="pages"] .pages-object .pages-colour-row--plain .pages-colour-row__side {
  height: 0;
  overflow: visible;
}

body[data-page="pages"] .pages-object .pages-colour-row__roles:empty {
  display: none;
}

body[data-page="pages"] .pages-object .pages-colour-row__actions {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(4px, -50%);
}

body[data-page="pages"] .pages-object .pages-colour-row:hover .pages-colour-row__actions,
body[data-page="pages"] .pages-object .pages-colour-row:focus-within .pages-colour-row__actions,
body[data-page="pages"] .pages-object .pages-colour-row__side:hover .pages-colour-row__actions {
  transform: translate(0, -50%);
}

body[data-page="pages"] .pages-object .pages-colour-row__action {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
}

body[data-page="pages"] .pages-object .pages-colour-row__button-icon {
  width: 12px;
  height: 12px;
}

body[data-page="pages"] .pages-object .pages-colour-row--empty {
  grid-template-columns: 32px minmax(0, 1fr);
  min-height: 40px;
}

body[data-page="pages"] .pages-object .pages-colour-row__swatch--empty {
  width: 28px;
  height: 28px;
  border-radius: 9px;
}

/* Screenshot-aligned expanded object rows. */
body[data-page="pages"] .pages-object.is-expanded .pages-object__divider,
body[data-page="pages"] .pages-object.is-expanded .pages-object__solid-divider {
  display: none !important;
}

body[data-page="pages"] .pages-object.is-expanded .pages-object__meta.palette-card__meta {
  display: flex !important;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
  min-height: clamp(24px, 3.2vh, 32px);
  max-height: none;
  margin: 0;
  padding: clamp(3px, 0.45vh, 5px) 0 clamp(2px, 0.35vh, 4px) clamp(64px, 6.8vw, 74px);
  opacity: 1;
  transform: none;
}

body[data-page="pages"] .pages-object.is-expanded .pages-object__tag-list.palette-card__tag-list {
  display: inline-flex !important;
  position: static;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(5px, 0.65vw, 7px);
  width: 100%;
  min-width: 0;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

body[data-page="pages"] .pages-object.is-expanded .pages-object__details-inner {
  padding-top: 0 !important;
  overflow: visible;
}

body[data-page="pages"] .pages-object.is-expanded .pages-colour-list {
  margin-top: clamp(4px, 0.6vh, 7px);
  padding-top: clamp(8px, 1vh, 12px);
  border-top: 1.5px solid color-mix(in srgb, var(--paper-border) 78%, transparent);
}

body[data-page="pages"] .pages-object.is-expanded .pages-colour-list::before,
body[data-page="pages"] .pages-object .pages-colour-row:not(:last-child)::after,
body[data-page="pages"] .pages-object .pages-colour-row__copy::after {
  display: none !important;
}

body[data-page="pages"] .pages-object .pages-colour-row {
  grid-template-columns: 40px minmax(0, 1fr) max-content;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  min-height: 54px;
  padding: 6px 0;
}

body[data-page="pages"] .pages-object .pages-colour-row__swatch {
  grid-row: 1 / span 2;
  align-self: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow:
    0 4px 8px rgba(80, 58, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

body[data-page="pages"] .pages-object .pages-colour-row__copy {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  gap: 2px;
}

body[data-page="pages"] .pages-object .pages-colour-row__meta {
  gap: 5px;
  color: rgba(83, 77, 91, 0.48);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0;
}

body[data-page="pages"] .pages-object .pages-colour-row__brand::after {
  content: "•";
  display: inline-block;
  margin-left: 5px;
  color: rgba(83, 77, 91, 0.38);
}

body[data-page="pages"] .pages-object .pages-colour-row__medium {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

body[data-page="pages"] .pages-object .pages-colour-row__headline {
  gap: 4px;
}

body[data-page="pages"] .pages-object .pages-colour-row__code,
body[data-page="pages"] .pages-object .pages-colour-row__name {
  color: #4a465a;
  font-size: clamp(1rem, 1.05vw, 1.14rem);
  font-weight: 850;
  line-height: 1.08;
}

body[data-page="pages"] .pages-object .pages-colour-row__side {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  justify-content: flex-end;
  min-height: 0;
}

body[data-page="pages"] .pages-object .pages-colour-row__roles {
  justify-content: flex-end;
  gap: 0;
}

body[data-page="pages"] .pages-object .pages-colour-row__actions {
  right: 0;
}

body[data-page="pages"] .pages-object .pages-colour-row--empty {
  grid-template-columns: 40px minmax(0, 1fr);
  min-height: 50px;
  padding-top: 8px;
}

body[data-page="pages"] .pages-object .pages-colour-row--empty .pages-colour-row__meta {
  display: none;
}

body[data-page="pages"] .pages-object .pages-colour-row__swatch--empty {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

body[data-page="pages"] .pages-colour-row__copy--empty .pages-colour-row__copy--empty-title {
  color: #4a465a;
  font-size: clamp(1rem, 1.05vw, 1.14rem);
  font-weight: 850;
}

/* Final object-row alignment polish. */
body[data-page="pages"] .pages-object.is-expanded .pages-colour-list {
  --pages-colour-list-extra-width: clamp(44px, 4vw, 52px);
  --pages-colour-list-left-pull: clamp(12px, 1.25vw, 18px);
  --pages-colour-list-right-inset: calc(
    var(--pages-colour-list-extra-width) -
    var(--pages-colour-list-left-pull) -
    var(--pages-colour-list-left-pull)
  );
  width: calc(100% + var(--pages-colour-list-extra-width));
  margin-left: calc(-1 * var(--pages-colour-list-left-pull));
}

body[data-page="pages"] .pages-object.is-expanded .pages-colour-list {
  overflow: visible;
}

body[data-page="pages"] .pages-object.is-expanded .pages-colour-list {
  border-top-color: transparent;
}

body[data-page="pages"] .pages-object.is-expanded .pages-colour-list::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: var(--pages-colour-list-right-inset);
  height: 1.5px;
  background: color-mix(in srgb, var(--paper-border) 78%, transparent);
}

body[data-page="pages"] .pages-object .pages-colour-row {
  grid-template-columns: 38px minmax(0, 1fr) minmax(min(44vw, 236px), max-content);
  column-gap: 11px;
  width: 100%;
  padding-right: 12px;
}

body[data-page="pages"] .pages-object .pages-colour-row__swatch,
body[data-page="pages"] .pages-object .pages-colour-row__swatch--empty {
  width: 34px;
  height: 34px;
}

body[data-page="pages"] .pages-object .pages-colour-row__dash {
  color: rgba(83, 77, 91, 0.46);
  font-size: 0.78em;
  font-weight: 850;
  transform: translateY(-0.04em);
}

body[data-page="pages"] .pages-object .pages-colour-row--empty {
  grid-template-columns: 38px minmax(0, 1fr);
}

/* Final object tracker card anatomy: keep object cards matched to palette cards. */
@media (min-width: 761px) {
  body[data-page="pages"] .pages-object-list > .pages-object.palette-card:not(.is-expanded) {
    min-height: 0 !important;
    height: var(--gallery-card-reference-height, 176px) !important;
    padding: 5px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) {
    gap: var(--gallery-grid-gap, 14px);
  }

  body[data-page="pages"] .pages-object.palette-card:not(.is-expanded) .pages-object__frame.palette-card__frame {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: calc(var(--gallery-card-reference-height, 176px) - 10px);
    height: 100%;
    padding: clamp(7px, 1vh, 10px) clamp(16px, 1.65vw, 20px) clamp(6px, 0.9vh, 8px);
  }

  body[data-page="pages"] .pages-object.palette-card:not(.is-expanded) .pages-object__top.palette-card__top {
    flex: 0 0 clamp(48px, 6.6vh, 62px);
    min-height: clamp(48px, 6.6vh, 62px);
  }

  body[data-page="pages"] .pages-object.palette-card .pages-object__logo.palette-card__logo {
    width: clamp(46px, 5.6vh, 54px);
    height: clamp(46px, 5.6vh, 54px);
  }

  body[data-page="pages"] .pages-object.palette-card .pages-object__content.palette-card__body {
    left: clamp(64px, 6.8vw, 74px);
    top: clamp(5px, 0.7vh, 8px);
    width: calc(100% - clamp(64px, 6.8vw, 74px));
    max-width: calc(100% - clamp(64px, 6.8vw, 74px));
  }

  body[data-page="pages"] .pages-object.palette-card .pages-object__content.palette-card__body h2.pages-object__name {
    margin-top: clamp(5px, 0.75vh, 7px);
  }

  body[data-page="pages"] .pages-object.palette-card .pages-object__divider.palette-card__divider {
    display: block !important;
    flex: 0 0 auto;
    margin: 0 0 0 clamp(64px, 6.8vw, 74px);
    border-top: 1px dashed color-mix(in srgb, var(--paper-border) 74%, var(--paper-border-soft));
    opacity: 1;
  }

  body[data-page="pages"] .pages-object.palette-card .pages-object__meta.palette-card__meta {
    position: static;
    display: flex !important;
    flex: 0 0 clamp(32px, 4.8vh, 42px);
    align-items: center;
    justify-content: flex-start;
    min-height: clamp(32px, 4.8vh, 42px);
    max-height: clamp(32px, 4.8vh, 42px);
    margin: 0;
    padding: 0 0 0 clamp(64px, 6.8vw, 74px);
    opacity: 1;
    transform: none;
  }

  body[data-page="pages"] .pages-object.palette-card .pages-object__tag-list.palette-card__tag-list {
    position: static;
    display: inline-flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(5px, 0.65vw, 7px);
    width: 100%;
    min-width: 0;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  body[data-page="pages"] .pages-object.palette-card .pages-object__solid-divider.palette-card__solid-divider {
    display: none !important;
  }

  body[data-page="pages"] .pages-object.palette-card:not(.is-expanded) .pages-object__footer.palette-card__footer {
    display: grid;
    grid-template-columns: clamp(52px, 5.8vw, 62px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(8px, 1vw, 11px);
    flex: 0 0 clamp(37px, 5.6vh, 49px);
    min-height: clamp(32px, 4.8vh, 42px);
    margin-top: 0;
    padding-top: clamp(5px, 0.8vh, 7px);
    border-top: 1.5px solid rgba(190, 176, 156, 0.7);
  }

  body[data-page="pages"] .pages-object.palette-card:not(.is-expanded) .pages-object__count.palette-card__count {
    padding-right: clamp(8px, 1vw, 11px);
  }

  body[data-page="pages"] .pages-object.palette-card:not(.is-expanded) .pages-object__preview-swatches.palette-card__swatches,
  body[data-page="pages"] .pages-object.palette-card:not(.is-expanded) .pages-object__swatch-segment.palette-card__swatch-segment {
    min-height: clamp(17px, 2.5vh, 20px);
  }
}

/* End-of-file expanded tracker viewport: fill the space above the footer divider. */
@media (min-width: 761px) {
  body[data-page="pages"] .pages-object.palette-card.is-expanded.is-expanding-down {
    max-height: var(--pages-object-expanded-height, clamp(520px, 72vh, 760px));
    overflow: hidden !important;
    transform-origin: top center;
    animation: pages-object-card-grow-down var(--workspace-split-duration, 680ms) cubic-bezier(0.22, 1, 0.36, 1) both;
    will-change: max-height;
  }

  body[data-page="pages"] .pages-object.palette-card.is-expanded.is-expanding-down .pages-object__details {
    animation: workspace-editor-content-in var(--workspace-split-duration, 680ms) cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  body[data-page="pages"] .pages-object-tracker:has(.pages-object.is-expanded) .pages-object-tracker__shell {
    align-self: stretch;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body[data-page="pages"] .pages-object-tracker:has(.pages-object.is-expanded) .pages-object-list {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    padding-bottom: clamp(8px, 1vh, 12px);
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
}

/* End-of-file object title typography: mirror palette card titles exactly. */
@media (min-width: 761px) {
  body[data-page="pages"] .pages-object.palette-card .pages-object__content.palette-card__body h2.pages-object__name {
    display: block;
    width: 100%;
    max-width: min(24ch, calc(100% - 150px));
    margin: clamp(5px, 0.75vh, 7px) 0 0 !important;
    color: rgba(23, 20, 16, 0.96);
    font-family: "Inter", system-ui, sans-serif;
    font-size: clamp(1rem, 1.06vw, 1.14rem);
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.06;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: none;
  }
}

body[data-page="pages"] .pages-object .pages-colour-row__roles {
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 140ms ease;
}

body[data-page="pages"] .pages-object .pages-colour-row:hover .pages-colour-row__roles,
body[data-page="pages"] .pages-object .pages-colour-row:focus-within .pages-colour-row__roles,
body[data-page="pages"] .pages-object .pages-colour-row__copy:hover ~ .pages-colour-row__side .pages-colour-row__roles,
body[data-page="pages"] .pages-object .pages-colour-row__copy:focus-within ~ .pages-colour-row__side .pages-colour-row__roles,
body[data-page="pages"] .pages-object .pages-colour-row__side:hover .pages-colour-row__roles,
body[data-page="pages"] .pages-object .pages-colour-row__side:focus-within .pages-colour-row__roles {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateX(4px) !important;
}

body[data-page="pages"] .pages-object .pages-colour-row:hover .pages-colour-row__actions,
body[data-page="pages"] .pages-object .pages-colour-row:focus-within .pages-colour-row__actions,
body[data-page="pages"] .pages-object .pages-colour-row__copy:hover ~ .pages-colour-row__side .pages-colour-row__actions,
body[data-page="pages"] .pages-object .pages-colour-row__copy:focus-within ~ .pages-colour-row__side .pages-colour-row__actions,
body[data-page="pages"] .pages-object .pages-colour-row__side:hover .pages-colour-row__actions,
body[data-page="pages"] .pages-object .pages-colour-row__side:focus-within .pages-colour-row__actions {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Palette workspace colour rows: large editorial labels with the existing contrast ink. */
body[data-page="palettes"] .palette-editor__stack-shell {
  overflow: hidden;
  border-radius: 12px;
}

body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__stack-shell {
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}

body[data-page="palettes"] .palette-stack {
  gap: 0;
  padding: 0;
  border-radius: 12px;
  background: transparent;
}

body[data-page="palettes"] .palette-stack__empty--filtered {
  position: relative;
  min-height: 100%;
}

body[data-page="palettes"] .palette-stack__filter-empty {
  display: none;
}

body[data-page="palettes"] .palette-stack__item + .palette-stack__item {
  margin-top: -1px;
}

body[data-page="palettes"] .palette-stack__item {
  border-radius: 0;
  box-shadow: none;
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-page="palettes"] .palette-stack__item:first-child {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

body[data-page="palettes"] .palette-stack__item:last-child {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

body[data-page="palettes"] .palette-stack__item:hover,
body[data-page="palettes"] .palette-stack__item:focus-within {
  transform: scale(1.003);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--palette-colour) 18%, transparent);
  filter: none;
  z-index: calc(220 - var(--stack-index, 0));
}

body[data-page="palettes"] .palette-stack__overlay {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  align-items: center;
  gap: clamp(18px, 3cqw, 38px);
  padding: clamp(8px, 11cqh, 38px) clamp(22px, 4.2cqw, 44px);
  background: transparent;
}

body[data-page="palettes"] .palette-stack.palette-stack--show-all .palette-stack__overlay {
  opacity: 1;
  pointer-events: auto;
}

body[data-page="palettes"] .palette-stack__info,
body[data-page="palettes"] .palette-stack__hex-cell,
body[data-page="palettes"] .palette-stack__actions {
  position: static;
  inset: auto;
}

body[data-page="palettes"] .palette-stack__info {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: none;
  color: var(--palette-hover-ink, #ffffff);
  text-shadow: var(--palette-hover-text-shadow, none);
}

body[data-page="palettes"] .palette-stack__copy {
  display: grid;
  align-content: center;
  gap: clamp(3px, 3cqh, 16px);
  min-width: 0;
}

body[data-page="palettes"] .palette-stack__identity {
  display: grid;
  gap: clamp(0px, 0.6cqh, 4px);
  min-width: 0;
}

body[data-page="palettes"] .palette-stack__marker-code,
body[data-page="palettes"] .palette-stack__marker-name {
  display: block;
  min-width: 0;
  max-width: min(100%, 18ch);
  margin: 0;
  overflow: hidden;
  color: var(--palette-hover-ink, #ffffff) !important;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: none;
  transform: none;
}

body[data-page="palettes"] .palette-stack__marker-code {
  font-family: var(--font-title) !important;
  font-size: clamp(24px, min(46cqh, 6.4cqw), 68px) !important;
  font-weight: 760 !important;
  line-height: 1.02;
}

body[data-page="palettes"] .palette-stack__marker-name {
  font-family: var(--font-title) !important;
  font-size: clamp(11px, min(18cqh, 3.1cqw), 32px) !important;
  font-weight: 760 !important;
  line-height: 1.08;
  opacity: 0.9;
}

body[data-page="palettes"] .palette-stack__meta {
  display: inline-flex;
  align-items: center;
  gap: 0;
  max-width: min(100%, 30ch);
  min-height: 0;
  color: var(--palette-hover-ink-muted, var(--palette-hover-ink, #ffffff)) !important;
  font-size: clamp(8px, min(10.5cqh, 1.45cqw), 15px);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
  opacity: 0.86;
  text-transform: uppercase;
  transition: none;
  transform: none;
}

body[data-page="palettes"] .palette-stack__meta-label {
  display: inline-flex;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="palettes"] .palette-stack__actions {
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  justify-content: end;
  column-gap: clamp(10px, 1.5cqw, 18px);
  min-width: max-content;
  color: var(--palette-hover-ink, #ffffff);
}

body[data-page="palettes"] .palette-stack__hex-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  color: var(--palette-hover-ink, #ffffff);
}

body[data-page="palettes"] .palette-stack__hex {
  color: var(--palette-hover-ink, #ffffff) !important;
  font-family: var(--font-title) !important;
  font-size: clamp(19px, min(32cqh, 3.6cqw), 44px) !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  line-height: 1;
  opacity: 0.94;
  transform: none;
  transition: none;
}

body[data-page="palettes"] .palette-stack__copy-button,
body[data-page="palettes"] .palette-stack__icon-button,
body[data-page="palettes"] .palette-stack__reorder-handle {
  width: clamp(28px, min(40cqh, 4.8cqw), 50px);
  min-width: clamp(28px, min(40cqh, 4.8cqw), 50px);
  height: clamp(28px, min(40cqh, 4.8cqw), 50px);
  min-height: clamp(28px, min(40cqh, 4.8cqw), 50px);
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--palette-hover-ink, #ffffff);
  box-shadow: none;
  opacity: 0.94;
}

body[data-page="palettes"] .palette-stack__copy-button,
body[data-page="palettes"] .palette-stack__icon-button {
  font-family: var(--font-body);
  font-weight: 650;
  letter-spacing: 0;
}

body[data-page="palettes"] .palette-stack__copy-button:hover,
body[data-page="palettes"] .palette-stack__copy-button:focus-visible,
body[data-page="palettes"] .palette-stack__icon-button:hover,
body[data-page="palettes"] .palette-stack__icon-button:focus-visible,
body[data-page="palettes"] .palette-stack__reorder-handle:hover,
body[data-page="palettes"] .palette-stack__reorder-handle:focus-visible {
  background: transparent;
  color: var(--palette-hover-ink, #ffffff);
  box-shadow: none;
  opacity: 0.94;
  outline: 0;
  transform: none;
}

body[data-page="palettes"] .palette-stack__copy-button-icons,
body[data-page="palettes"] .palette-stack__copy-icon,
body[data-page="palettes"] .palette-stack__copy-tick {
  width: clamp(21px, min(29cqh, 3.3cqw), 34px);
  height: clamp(21px, min(29cqh, 3.3cqw), 34px);
}

body[data-page="palettes"] .palette-stack__delete-icon {
  width: clamp(21px, min(28cqh, 3.2cqw), 33px);
  height: clamp(21px, min(28cqh, 3.2cqw), 33px);
}

body[data-page="palettes"] .palette-stack__reorder-icon {
  width: 7px;
  height: clamp(22px, min(32cqh, 3.4cqw), 36px);
  background-size: 7px 10px;
}

body[data-page="palettes"] .palette-stack__item:hover .palette-stack__copy strong,
body[data-page="palettes"] .palette-stack__item:hover .palette-stack__meta,
body[data-page="palettes"] .palette-stack__item:focus-within .palette-stack__copy strong,
body[data-page="palettes"] .palette-stack__item:focus-within .palette-stack__meta,
body[data-page="palettes"] .palette-stack__item:hover .palette-stack__hex,
body[data-page="palettes"] .palette-stack__item:focus-within .palette-stack__hex {
  letter-spacing: 0;
  transform: none;
}

@container (max-height: 92px) {
  body[data-page="palettes"] .palette-stack__overlay {
    padding-block: clamp(7px, 8cqh, 16px);
  }

  body[data-page="palettes"] .palette-stack__copy {
    gap: clamp(2px, 2.2cqh, 5px);
  }

  body[data-page="palettes"] .palette-stack__identity {
    gap: 0;
  }

  body[data-page="palettes"] .palette-stack__marker-code {
    font-size: clamp(22px, min(42cqh, 5.6cqw), 44px) !important;
    line-height: 0.96;
  }

  body[data-page="palettes"] .palette-stack__marker-name {
    display: none;
  }

  body[data-page="palettes"] .palette-stack__meta {
    font-size: clamp(7px, min(9cqh, 1.1cqw), 10px);
  }

  body[data-page="palettes"] .palette-stack__hex {
    font-size: clamp(20px, min(36cqh, 3.8cqw), 40px) !important;
  }
}

@container (max-height: 68px) {
  body[data-page="palettes"] .palette-stack__overlay {
    padding-block: 6px;
  }

  body[data-page="palettes"] .palette-stack__copy {
    gap: 1px;
  }

  body[data-page="palettes"] .palette-stack__marker-code {
    font-size: clamp(18px, min(38cqh, 4.8cqw), 30px) !important;
    line-height: 0.95;
  }

  body[data-page="palettes"] .palette-stack__marker-name {
    font-size: clamp(9px, min(14cqh, 2.2cqw), 13px) !important;
    display: none;
  }

  body[data-page="palettes"] .palette-stack__meta {
    font-size: clamp(6px, min(8cqh, 0.95cqw), 8px);
  }

  body[data-page="palettes"] .palette-stack__hex {
    font-size: clamp(17px, min(34cqh, 3.4cqw), 30px) !important;
  }
}

@media (max-width: 760px) {
  body[data-page="palettes"] .palette-stack__overlay {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 10px;
  }

  body[data-page="palettes"] .palette-stack__hex-cell {
    justify-content: start;
  }

  body[data-page="palettes"] .palette-stack__actions {
    justify-content: start;
  }
}

/* Tracker empty state: mirror the gallery empty panel and center it in the tracker. */
body[data-page="pages"] .pages-object-list:has(> .pages-object-list__empty) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: auto !important;
  align-content: center !important;
  justify-items: center;
  gap: 0 !important;
  height: 100% !important;
  min-height: 100%;
  padding: 0 !important;
  overflow: hidden !important;
}

body[data-page="pages"] .pages-object-list > .pages-object-list__empty {
  width: min(100%, 28rem) !important;
  margin: 0 !important;
  padding: 22px 24px !important;
  border: 1px dashed var(--paper-border-soft) !important;
  border-radius: var(--radius-md) !important;
  background: var(--main-card-surface) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
  color: var(--color-text-muted) !important;
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(0.92rem, 1vw, 1rem) !important;
  font-weight: 500;
  line-height: 1.18 !important;
  text-align: center;
}

/* Workspace mini-galleries: reuse main gallery rhythm with compact one-column rows. */
@media (min-width: 761px) {
  .cc-mini-gallery {
    --mini-gallery-row-gap: var(--gallery-grid-gap, 14px);
    --mini-gallery-row-padding: var(--gallery-grid-padding-block, 8px);
    --mini-gallery-min-row-height: var(--collection-gallery-row-height, var(--gallery-card-reference-height, 176px));
    --mini-gallery-max-row-height: var(--collection-gallery-row-height, var(--gallery-card-reference-height, 176px));
    --mini-gallery-visible-rows: var(--gallery-visible-rows, 3);
    --mini-gallery-visible-height: var(--gallery-visible-height, calc(
      (var(--mini-gallery-max-row-height) * 3) + (var(--mini-gallery-row-gap) * 2) + var(--mini-gallery-row-padding)
    ));
    container-type: inline-size;
    align-self: stretch;
    height: min(100%, var(--mini-gallery-visible-height));
    max-height: var(--mini-gallery-visible-height);
  }

  .cc-mini-gallery > .cc-mini-gallery__grid {
    align-content: start;
    gap: var(--mini-gallery-row-gap);
    height: 100%;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding: calc(var(--mini-gallery-row-padding) / 2) 0;
    scrollbar-width: none;
  }

  .cc-mini-gallery > .cc-mini-gallery__grid::-webkit-scrollbar {
    display: none;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-mini-gallery {
    --mini-gallery-min-row-height: var(--collection-gallery-row-height, 168px);
    --mini-gallery-max-row-height: var(--collection-gallery-row-height, 190px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-mini-gallery > .cc-mini-gallery__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-rows: var(--collection-gallery-row-height, var(--mini-gallery-min-row-height));
    width: 100%;
    max-width: none;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .cc-mini-gallery > .cc-mini-gallery__grid > .cc-mini-gallery-card {
    height: 100%;
    min-height: var(--collection-gallery-row-height, var(--mini-gallery-min-row-height));
    max-height: var(--collection-gallery-row-height, var(--mini-gallery-max-row-height));
  }

  body[data-page="pages"] .pages-object-tracker__shell.cc-mini-gallery {
    --pages-object-row-height: var(--collection-gallery-row-height, var(--mini-gallery-max-row-height));
  }

  body[data-page="pages"] .pages-object-list.cc-mini-gallery__grid:not(:has(.pages-object.is-expanded)) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-rows: var(--collection-gallery-row-height, var(--mini-gallery-min-row-height));
    gap: var(--mini-gallery-row-gap) !important;
    height: 100% !important;
    max-height: 100% !important;
  }

  body[data-page="pages"] .pages-object-list.cc-mini-gallery__grid:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) {
    height: 100% !important;
    min-height: var(--collection-gallery-row-height, var(--mini-gallery-min-row-height)) !important;
    max-height: var(--collection-gallery-row-height, var(--mini-gallery-max-row-height));
  }

  body[data-page="pages"] .pages-object-tracker__shell.cc-mini-gallery {
    align-self: stretch;
    height: min(100%, var(--mini-gallery-visible-height)) !important;
    max-height: var(--mini-gallery-visible-height) !important;
    min-height: 0 !important;
  }

  body[data-page="pages"] .pages-object-list.cc-mini-gallery__grid:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__frame.palette-card__frame {
    justify-content: space-between;
    height: 100%;
    min-height: 0 !important;
    padding: 15px 22px 10px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__top.palette-card__top {
    flex: 0 0 84px;
    min-height: 84px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__content.palette-card__body {
    left: 82px;
    top: 10px;
    width: calc(100% - 82px);
    max-width: calc(100% - 82px);
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__content.palette-card__body h2.pages-object__name {
    margin-top: 13px !important;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__divider.palette-card__divider {
    margin-left: 82px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__meta.palette-card__meta {
    flex: 1 1 auto;
    min-height: 48px;
    max-height: none;
    padding-left: 82px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__footer.palette-card__footer {
    flex: 0 0 auto;
    padding-top: 12px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__count.palette-card__count {
    min-height: 31px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__preview-swatches.palette-card__swatches,
  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__swatch-segment.palette-card__swatch-segment {
    min-height: 22px;
  }
}

@media (min-width: 761px) and (max-height: 1080px) {
  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__frame.palette-card__frame {
    padding: 11px 22px 8px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__top.palette-card__top {
    flex-basis: 72px;
    min-height: 72px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__content.palette-card__body {
    top: 9px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__content.palette-card__body h2.pages-object__name {
    margin-top: 10px !important;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__meta.palette-card__meta {
    flex-basis: clamp(42px, 4.9vh, 52px);
    min-height: 42px;
    max-height: 52px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__footer.palette-card__footer {
    padding-top: 7px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__preview-swatches.palette-card__swatches,
  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__swatch-segment.palette-card__swatch-segment {
    min-height: 20px;
  }
}

@media (min-width: 761px) and (max-height: 920px) {
  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__frame.palette-card__frame {
    padding: 10px 20px 8px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__top.palette-card__top {
    flex: 0 0 66px;
    min-height: 66px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__content.palette-card__body {
    top: 7px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__content.palette-card__body h2.pages-object__name {
    margin-top: 7px !important;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__meta.palette-card__meta {
    flex: 0 0 clamp(40px, 4.8vh, 50px);
    min-height: 44px;
    max-height: 50px;
  }
}

@media (min-width: 761px) and (max-height: 840px) {
  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__frame.palette-card__frame {
    padding: 7px 18px 5px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__top.palette-card__top {
    flex: 0 0 54px;
    min-height: 54px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__logo.palette-card__logo {
    width: 52px;
    height: 52px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__content.palette-card__body {
    left: 70px;
    top: 5px;
    width: calc(100% - 70px);
    max-width: calc(100% - 70px);
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__content.palette-card__body h2.pages-object__name {
    margin-top: 5px !important;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__divider.palette-card__divider {
    margin-left: 70px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__meta.palette-card__meta {
    flex: 0 0 clamp(34px, 4.4vh, 42px);
    min-height: 36px;
    max-height: 42px;
    padding-left: 70px;
  }

  body[data-page="pages"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__footer.palette-card__footer {
    padding-top: 4px;
  }
}

@media (min-width: 761px) {
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="relaxed"] .cc-gallery-grid > .cc-card--palette .palette-card__frame,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="relaxed"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__frame.palette-card__frame {
    padding: 11px 22px 8px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="relaxed"] .cc-gallery-grid > .cc-card--palette .palette-card__top,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="relaxed"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__top.palette-card__top {
    flex: 0 0 72px;
    min-height: 72px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="relaxed"] .cc-gallery-grid > .cc-card--palette .palette-card__body,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="relaxed"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__content.palette-card__body {
    top: 9px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="relaxed"] .cc-gallery-grid > .cc-card--palette .palette-card__body h2,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="relaxed"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__content.palette-card__body h2.pages-object__name {
    margin-top: 10px !important;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="relaxed"] .cc-gallery-grid > .cc-card--palette .palette-card__meta,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="relaxed"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__meta.palette-card__meta {
    flex-basis: clamp(42px, 4.9vh, 52px);
    min-height: 42px;
    max-height: 52px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="relaxed"] .cc-gallery-grid > .cc-card--palette .palette-card__footer,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="relaxed"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__footer.palette-card__footer {
    padding-top: 7px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="compact"] .cc-gallery-grid > .cc-card--palette .palette-card__frame,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="compact"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__frame.palette-card__frame {
    padding: 10px 20px 8px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="compact"] .cc-gallery-grid > .cc-card--palette .palette-card__top,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="compact"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__top.palette-card__top {
    flex: 0 0 66px;
    min-height: 66px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="compact"] .cc-gallery-grid > .cc-card--palette .palette-card__body,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="compact"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__content.palette-card__body {
    top: 7px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="compact"] .cc-gallery-grid > .cc-card--palette .palette-card__body h2,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="compact"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__content.palette-card__body h2.pages-object__name {
    margin-top: 7px !important;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="compact"] .cc-gallery-grid > .cc-card--palette .palette-card__meta,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="compact"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__meta.palette-card__meta {
    flex: 0 0 clamp(40px, 4.8vh, 50px);
    min-height: 44px;
    max-height: 50px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="compact"] .cc-gallery-grid > .cc-card--palette .palette-card__footer,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="compact"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__footer.palette-card__footer {
    padding-top: 7px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="safe"] .cc-gallery-grid > .cc-card--palette .palette-card__frame,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="safe"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__frame.palette-card__frame {
    padding: 7px 18px 5px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="safe"] .cc-gallery-grid > .cc-card--palette .palette-card__top,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="safe"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__top.palette-card__top {
    flex: 0 0 54px;
    min-height: 54px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="safe"] .cc-gallery-grid > .cc-card--palette .palette-card__logo,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="safe"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__logo.palette-card__logo {
    width: 52px;
    height: 52px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="safe"] .cc-gallery-grid > .cc-card--palette .palette-card__body,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="safe"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__content.palette-card__body {
    left: 70px;
    top: 5px;
    width: calc(100% - 70px);
    max-width: calc(100% - 70px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="safe"] .cc-gallery-grid > .cc-card--palette .palette-card__body h2,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="safe"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__content.palette-card__body h2.pages-object__name {
    margin-top: 5px !important;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="safe"] .cc-gallery-grid > .cc-card--palette .palette-card__divider,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="safe"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__divider.palette-card__divider {
    margin-left: 70px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="safe"] .cc-gallery-grid > .cc-card--palette .palette-card__meta,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="safe"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__meta.palette-card__meta {
    flex: 0 0 clamp(34px, 4.4vh, 42px);
    min-height: 36px;
    max-height: 42px;
    padding-left: 70px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-density="safe"] .cc-gallery-grid > .cc-card--palette .palette-card__footer,
  body[data-page="pages"] .pages-object-tracker[data-gallery-density="safe"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__footer.palette-card__footer {
    padding-top: 4px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palettes-gallery-panel[data-gallery-text-scale="compact"] .cc-gallery-grid > .cc-card--palette .palette-card__body h2,
  body[data-page="pages"] .pages-object-tracker[data-gallery-text-scale="compact"] .pages-object-list:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__content.palette-card__body h2.pages-object__name {
    font-size: clamp(0.96rem, 1.05vw, 1.04rem);
    letter-spacing: -0.035em;
  }

  body[data-page="pages"] .pages-object-tracker__shell.cc-mini-gallery {
    --pages-object-card-min-height: 168px;
  }

  body[data-page="pages"] .pages-object-list.cc-mini-gallery__grid:not(:has(.pages-object.is-expanded)) {
    grid-auto-rows: max(
      var(--pages-object-card-min-height),
      var(--collection-gallery-row-height, var(--pages-object-card-min-height))
    ) !important;
  }

  body[data-page="pages"] .pages-object-list.cc-mini-gallery__grid:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) {
    min-height: max(
      var(--pages-object-card-min-height),
      var(--collection-gallery-row-height, var(--pages-object-card-min-height))
    ) !important;
    max-height: none;
  }

  body[data-page="pages"] .pages-object-list.cc-mini-gallery__grid:not(:has(.pages-object.is-expanded)) > .pages-object.palette-card:not(.is-expanded) .pages-object__frame.palette-card__frame {
    min-height: calc(var(--pages-object-card-min-height) - 10px) !important;
  }
}

/* Final modal search controls: match filter buttons instead of generic form fields. */
.supplies-modal input.marker-search__input,
.palette-modal input.marker-search__input,
.pages-upload-modal input.marker-search__input {
  height: var(--cc-control-height) !important;
  min-height: var(--cc-control-height) !important;
  border-radius: 12px !important;
  background: var(--main-card-surface) !important;
  border: 1.5px solid color-mix(in srgb, var(--paper-border) 58%, transparent) !important;
  box-shadow: none !important;
}

.supplies-modal input.marker-search__input:focus,
.palette-modal input.marker-search__input:focus,
.pages-upload-modal input.marker-search__input:focus {
  border-color: color-mix(in srgb, var(--paper-border) 72%, transparent) !important;
  box-shadow: none !important;
}

/* Custom set editor: full-width data-entry gallery for colour rows. */
body[data-page="supplies"] .supplies-collection.is-editing {
  grid-template-rows: minmax(0, 1fr);
}

body[data-page="supplies"] .supplies-grid-wrapper.is-populated.is-editing {
  height: min(100%, var(--gallery-visible-height));
  overflow: hidden;
}

body[data-page="supplies"] .supplies-grid-wrapper.is-editing .supplies-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

body[data-page="supplies"] .supplies-grid-wrapper.is-editing .supply-card--editor {
  height: 100% !important;
  min-height: min(620px, calc(100dvh - 260px)) !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body[data-page="supplies"] .supplies-grid-wrapper.is-editing .supply-card--editor .supply-card__frame {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  height: 100%;
  min-height: 0;
  padding: clamp(18px, 2.2vw, 28px) !important;
}

body[data-page="supplies"] .supplies-grid-wrapper.is-editing .supply-card--editor .supply-card__header {
  min-height: 0 !important;
  align-items: center;
}

body[data-page="supplies"] .supplies-grid-wrapper.is-editing .custom-set-editor-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 0;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--paper-border-soft);
  border-radius: var(--radius-md);
  background: var(--main-card-surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

body[data-page="supplies"] .custom-set-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

body[data-page="supplies"] .custom-set-editor-count {
  flex: 0 0 auto;
  color: rgba(23, 20, 16, 0.56);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body[data-page="supplies"] .custom-set-editor-head,
body[data-page="supplies"] .custom-set-editor-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1.55fr) minmax(140px, 0.6fr) 48px;
  gap: 10px;
  align-items: center;
}

body[data-page="supplies"] .custom-set-editor-head {
  padding: 0 12px;
  color: rgba(23, 20, 16, 0.46);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

body[data-page="supplies"] .custom-set-editor-scroll {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 8px;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0 8px 0 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(186, 138, 121, 0.34) transparent;
}

body[data-page="supplies"] .custom-set-editor-row {
  min-height: 52px;
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, var(--paper-border-soft) 80%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--main-card-surface) 78%, var(--main-surface));
  box-shadow: none;
}

body[data-page="supplies"] .custom-set-editor-row__index {
  width: 34px;
  min-width: 34px;
  height: 32px;
  justify-self: center;
  border-radius: 10px;
  font-size: 0.78rem;
}

body[data-page="supplies"] .custom-set-editor-field {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.92rem;
}

body[data-page="supplies"] .custom-set-editor-swatch {
  width: 38px;
  height: 38px;
  justify-self: end;
  border-radius: 11px;
}

/* Custom set workspace: dedicated editing surface inspired by the swatch-sheet mockup. */
body[data-page="supplies"] .supplies-custom-workspace.split-workspace:not(.is-gallery-mode) {
  --workspace-panel-gap: clamp(18px, 2.4vw, 30px);
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

body[data-page="supplies"] .supplies-custom-workspace.split-workspace:not(.is-gallery-mode) > .workspace-panel {
  height: 100%;
  min-height: 0;
}

body[data-page="supplies"] .supplies-custom-workspace.split-workspace:not(.is-gallery-mode) > .workspace-panel--gallery {
  display: none;
}

body[data-page="supplies"] .supplies-custom-workspace:not(.is-gallery-mode) > .supplies-collection {
  padding: clamp(12px, 1.5vw, 16px);
  border-radius: 20px;
  background: rgba(255, 252, 248, 0.62);
  border: 1px solid color-mix(in srgb, var(--paper-border) 80%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

body[data-page="supplies"] .supplies-custom-workspace:not(.is-gallery-mode) .supplies-grid-wrapper.is-populated {
  padding: 0;
}

body[data-page="supplies"] .supplies-custom-workspace:not(.is-gallery-mode) .supplies-grid {
  grid-template-columns: 1fr;
  grid-auto-rows: minmax(154px, auto);
  gap: 12px;
  padding: 0;
}

body[data-page="supplies"] .supply-card.is-active-custom-set .supply-card__frame {
  border-color: color-mix(in srgb, var(--color-coral) 42%, var(--paper-border));
  background:
    linear-gradient(180deg, rgba(255, 252, 249, 0.98), rgba(255, 245, 239, 0.9)),
    var(--card-surface);
  box-shadow:
    0 10px 22px rgba(186, 119, 94, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body[data-page="supplies"] .custom-set-workspace-editor.workspace-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding:
    clamp(12px, 1.8vh, 22px)
    clamp(20px, 3vw, 38px)
    0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: hidden;
  scrollbar-width: none;
}

body[data-page="supplies"] .supplies-custom-workspace.is-gallery-mode > .custom-set-workspace-editor.workspace-panel {
  display: none;
}

body[data-page="supplies"] .custom-set-workspace-editor.workspace-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body[data-page="supplies"] .custom-set-workspace-editor__content {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body[data-page="supplies"] .custom-set-workspace {
  height: 100%;
  min-height: 0;
}

body[data-page="supplies"] .custom-set-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(380px, 0.86fr);
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(22px, 3vw, 40px);
  color: #22202a;
}

body[data-page="supplies"] .custom-set-workspace-editor__footer {
  --gallery-chrome-inset: 0;
  grid-row: 2;
  flex-shrink: 0;
  min-height: 74px;
  padding-top: 11px;
  padding-bottom: clamp(10px, 1.2vw, 14px);
}

body[data-page="supplies"] .custom-set-workspace__editor {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: clamp(10px, 1.35vh, 16px);
  min-width: 0;
  min-height: 0;
  padding-right: clamp(6px, 1vw, 12px);
}

body[data-page="supplies"] .custom-set-workspace__hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(14px, 1.8vw, 24px);
  align-items: end;
  min-width: 0;
}

body[data-page="supplies"] .custom-set-workspace__copy {
  min-width: 0;
}

body[data-page="supplies"] .custom-set-workspace__copy h1 {
  max-width: min(100%, 15.5ch);
  margin: 0;
  color: rgba(22, 20, 24, 0.98);
  font-family: var(--font-display);
  font-size: clamp(2.05rem, 3vw, 3.05rem);
  font-weight: 780;
  letter-spacing: 0;
  line-height: 0.88;
  font-variation-settings: "SOFT" 80, "WONK" 0, "opsz" 72;
  text-wrap: balance;
}

body[data-page="supplies"] .custom-set-workspace__copy p {
  display: flex;
  align-items: center;
  max-width: 54ch;
  min-height: clamp(40px, 5.2vh, 52px);
  margin: clamp(8px, 1.1vh, 14px) 0 0;
  color: rgba(55, 51, 62, 0.72);
  font-size: clamp(0.78rem, 0.86vw, 0.94rem);
  font-weight: 650;
  line-height: 1.38;
}

body[data-page="supplies"] .custom-set-workspace__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  align-self: end;
  padding-bottom: clamp(5px, 0.55vh, 7px);
}

body[data-page="supplies"] .custom-set-workspace__upload,
body[data-page="supplies"] .custom-set-workspace__capture,
body[data-page="supplies"] .custom-set-workspace__clear-image {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1.5px solid #efb69c;
  background: #ffdece;
  color: #171410;
  box-shadow:
    2px 3px 0 color-mix(in srgb, var(--paper-border) 56%, transparent),
    0 2px 8px rgba(35, 32, 26, 0.04);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

body[data-page="supplies"] .custom-set-workspace__upload img {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  object-fit: contain;
  opacity: 0.78;
}

body[data-page="supplies"] .custom-set-workspace__upload input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

body[data-page="supplies"] .custom-set-workspace__upload:hover,
body[data-page="supplies"] .custom-set-workspace__upload:focus-within,
body[data-page="supplies"] .custom-set-workspace__capture:hover,
body[data-page="supplies"] .custom-set-workspace__capture:focus-visible,
body[data-page="supplies"] .custom-set-workspace__clear-image:hover,
body[data-page="supplies"] .custom-set-workspace__clear-image:focus-visible {
  transform: translateY(-1px);
  background: #ffc7ae;
  border-color: #e99b78;
  box-shadow:
    3px 4px 0 color-mix(in srgb, var(--paper-border) 62%, transparent),
    0 4px 12px rgba(35, 32, 26, 0.06);
  outline: none;
}

body[data-page="supplies"] .custom-set-workspace__upload:active,
body[data-page="supplies"] .custom-set-workspace__capture:active,
body[data-page="supplies"] .custom-set-workspace__clear-image:active {
  transform: translateY(0) scale(0.99);
}

body[data-page="supplies"] .custom-set-workspace__controls {
  display: grid;
  grid-template-columns: minmax(220px, 1.18fr) minmax(160px, 0.72fr) minmax(118px, 0.42fr);
  gap: 10px;
  align-items: stretch;
  padding: 0;
  border: 0;
}

body[data-page="supplies"] .custom-set-workspace__control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--paper-border) 76%, transparent);
  background: rgba(255, 252, 248, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

body[data-page="supplies"] .custom-set-workspace__control span {
  color: rgba(47, 41, 53, 0.62);
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
}

body[data-page="supplies"] .custom-set-workspace__control input {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #26232e;
  font-family: var(--font-copy);
  font-size: 0.9rem;
  font-weight: 850;
}

body[data-page="supplies"] .custom-set-workspace__control input:focus {
  outline: none;
}

body[data-page="supplies"] .custom-set-workspace__control:focus-within {
  border-color: color-mix(in srgb, var(--color-coral) 34%, var(--paper-border));
  background: rgba(255, 253, 250, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  outline: none;
}

body[data-page="supplies"] .custom-set-workspace__control--count strong {
  color: #26232e;
  font-size: 0.96rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

body[data-page="supplies"] .custom-set-workspace__table-card,
body[data-page="supplies"] .custom-set-picker {
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-page="supplies"] .custom-set-workspace__table-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
}

body[data-page="supplies"] .custom-set-workspace__cell,
body[data-page="supplies"] .custom-set-picker__hex input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--paper-border) 78%, transparent);
  background: rgba(255, 253, 249, 0.86);
  color: #26232e;
  font-family: var(--font-copy);
  font-size: 0.9rem;
  font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

body[data-page="supplies"] .custom-set-workspace__cell:focus,
body[data-page="supplies"] .custom-set-picker__hex input:focus {
  border-color: color-mix(in srgb, var(--color-coral) 48%, var(--paper-border));
  background: #fffefa;
  box-shadow:
    0 0 0 3px rgba(250, 150, 118, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
  outline: none;
}

body[data-page="supplies"] .custom-set-workspace__error {
  grid-column: 1 / -1;
  margin: 0;
  color: #a74835;
  font-size: 0.8rem;
  font-weight: 750;
}

body[data-page="supplies"] .custom-set-workspace__table-shell {
  min-height: 0;
  overflow: hidden;
}

body[data-page="supplies"] .custom-set-workspace__table-head,
body[data-page="supplies"] .custom-set-workspace__row {
  display: grid;
  grid-template-columns: 36px minmax(92px, 0.78fr) minmax(150px, 1.32fr) minmax(124px, 0.96fr) 56px;
  gap: 10px;
  align-items: center;
}

body[data-page="supplies"] .custom-set-workspace__table-head {
  grid-template-columns: 36px minmax(92px, 0.78fr) minmax(150px, 1.32fr) minmax(124px, 0.96fr) 56px;
}

body[data-page="supplies"] .custom-set-workspace__table-head {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--paper-border) 68%, transparent);
  border-radius: 0;
  background: transparent;
  color: rgba(46, 42, 52, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
}

body[data-page="supplies"] .custom-set-workspace__table-head span {
  justify-self: stretch;
  text-align: center;
}

body[data-page="supplies"] .custom-set-workspace__rows {
  display: grid;
  align-content: start;
  gap: 4px;
  height: 100%;
  max-height: 100%;
  padding: 6px 0 28px;
  scroll-padding-bottom: 28px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

body[data-page="supplies"] .custom-set-workspace__rows::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body[data-page="supplies"] .custom-set-workspace__row {
  min-height: 44px;
  padding: 3px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

body[data-page="supplies"] .custom-set-workspace__row:hover,
body[data-page="supplies"] .custom-set-workspace__row:focus-within,
body[data-page="supplies"] .custom-set-workspace__row.is-active {
  transform: none;
  background: transparent;
  box-shadow: none;
  outline: none;
}

body[data-page="supplies"] .custom-set-workspace__index,
body[data-page="supplies"] .custom-set-picker__hex button,
body[data-page="supplies"] .custom-set-picker__swatches button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--paper-border) 76%, transparent);
  background: rgba(255, 252, 248, 0.82);
  color: #282430;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

body[data-page="supplies"] .custom-set-workspace__index {
  width: 100%;
  height: 28px;
  justify-self: center;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 0.86rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

body[data-page="supplies"] .custom-set-workspace__cell {
  min-height: 36px;
  padding-inline: 12px;
  text-align: center;
}

body[data-page="supplies"] .custom-set-workspace__row .custom-set-workspace__cell {
  border-color: rgba(205, 178, 158, 0.42);
  background: rgba(255, 253, 249, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

body[data-page="supplies"] .custom-set-workspace__row:hover .custom-set-workspace__cell,
body[data-page="supplies"] .custom-set-workspace__row:focus-within .custom-set-workspace__cell,
body[data-page="supplies"] .custom-set-workspace__row.is-active .custom-set-workspace__cell {
  border-color: rgba(205, 178, 158, 0.5);
  background: rgba(255, 253, 249, 0.66);
}

body[data-page="supplies"] .custom-set-workspace__hex-token {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(205, 178, 158, 0.42);
  background: rgba(255, 253, 249, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

body[data-page="supplies"] .custom-set-workspace__hex-code {
  min-width: 0;
  color: #26232e;
  font-size: 0.84rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  white-space: nowrap;
}

body[data-page="supplies"] .custom-set-workspace__swatch {
  width: 26px;
  height: 26px;
  justify-self: center;
  border-radius: 7px;
  border: 1px solid color-mix(in srgb, var(--swatch-color, #eadfdf) 56%, rgba(47, 41, 53, 0.16));
  background: var(--swatch-color, #eadfdf);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

body[data-page="supplies"] .custom-set-workspace__swatch:hover,
body[data-page="supplies"] .custom-set-workspace__swatch:focus-visible {
  transform: scale(1.08);
  outline: none;
}

body[data-page="supplies"] .custom-set-picker__hex button:hover,
body[data-page="supplies"] .custom-set-picker__hex button:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--color-coral) 42%, var(--paper-border));
  background: #fffefa;
  box-shadow: 0 5px 12px rgba(154, 96, 73, 0.1);
  outline: none;
}

body[data-page="supplies"] .custom-set-picker__swatches button:hover {
  transform: none;
  border-color: color-mix(in srgb, var(--paper-border) 76%, transparent);
  background: var(--swatch-color, rgba(255, 252, 248, 0.9));
  box-shadow: none;
  outline: none;
}

body[data-page="supplies"] .custom-set-picker__swatches button:focus-visible {
  transform: none;
  border-color: color-mix(in srgb, var(--color-coral) 42%, var(--paper-border));
  box-shadow: 0 0 0 3px rgba(250, 150, 118, 0.14);
  outline: none;
}

body[data-page="supplies"] .custom-set-workspace__index:hover,
body[data-page="supplies"] .custom-set-workspace__index:focus-visible {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: rgba(22, 20, 24, 0.9);
  outline: none;
}

body[data-page="supplies"] .custom-set-picker {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: clamp(14px, 1.75vh, 20px);
  justify-items: center;
  padding-inline: clamp(12px, 1vw, 16px);
  border-left: 1px solid rgba(205, 178, 158, 0.36);
  align-content: start;
  align-self: start;
  --picker-color: #eadfdf;
  --picker-hue: 350;
  --picker-saturation: 24%;
  --picker-lightness: 90%;
  --picker-foreground: #23202b;
  --custom-picker-content-width: 100%;
}

body[data-page="supplies"] .custom-set-picker__top,
body[data-page="supplies"] .custom-set-picker__editor-panel,
body[data-page="supplies"] .custom-set-picker__gallery {
  width: var(--custom-picker-content-width);
}

body[data-page="supplies"] .custom-set-picker__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: clamp(14px, 1.8vw, 24px);
  min-width: 0;
}

body[data-page="supplies"] .custom-set-picker__head {
  display: grid;
}

body[data-page="supplies"] .custom-set-picker__head h2 {
  margin: 0;
  color: #23202b;
  font-family: var(--font-display);
  font-size: clamp(2.05rem, 3vw, 3.05rem);
  font-weight: 780;
  letter-spacing: 0;
  line-height: 0.88;
  font-variation-settings: "SOFT" 80, "WONK" 0, "opsz" 72;
}

body[data-page="supplies"] .custom-set-picker__close.modal-button--icon {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  color: rgba(23, 20, 16, 0.72);
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

body[data-page="supplies"] .custom-set-picker__close.modal-button--icon span {
  font-size: 1.42rem;
  line-height: 1;
  transform: translateY(1px);
}

body[data-page="supplies"] .custom-set-picker__editor-panel {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 13px;
  border: 1px solid color-mix(in srgb, var(--picker-color) 34%, rgba(205, 178, 158, 0.72));
  background: rgba(255, 253, 249, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.66),
    0 15px 34px color-mix(in srgb, var(--picker-color) 14%, transparent);
}

body[data-page="supplies"] .custom-set-picker__preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(72px, 9vh, 96px);
  width: 100%;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  border: 0;
  background: var(--picker-color);
  cursor: pointer;
}

body[data-page="supplies"] .custom-set-picker__preview-count {
  position: relative;
  z-index: 1;
  color: var(--picker-foreground);
  font-size: clamp(0.8rem, 0.85vw, 0.94rem);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow:
    0 1px 2px rgba(255, 255, 255, 0.42),
    0 0 10px color-mix(in srgb, var(--picker-color) 60%, transparent);
  pointer-events: none;
}

body[data-page="supplies"] .custom-set-picker__native-input {
  position: absolute;
  inset: -12px;
  width: calc(100% + 24px);
  height: calc(100% + 24px);
  padding: 0;
  border: 0;
  opacity: 0.01;
  cursor: pointer;
}

body[data-page="supplies"] .custom-set-picker__controls {
  display: block;
  padding: clamp(14px, 1.6vw, 18px) clamp(16px, 1.9vw, 22px) 8px;
}

body[data-page="supplies"] .custom-set-picker__hex {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  min-width: 0;
}

body[data-page="supplies"] .custom-set-picker__hex span {
  color: rgba(55, 51, 62, 0.76);
  font-size: clamp(0.75rem, 0.78vw, 0.84rem);
  font-weight: 900;
}

body[data-page="supplies"] .custom-set-picker__hex input {
  height: 28px;
  min-height: 28px;
  padding: 0 8px;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  color: #24212b;
  font-size: 0.9rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  text-align: center;
  box-shadow: none;
}

body[data-page="supplies"] .custom-set-picker__hex input:focus {
  border-color: color-mix(in srgb, var(--color-coral) 34%, transparent);
  background: rgba(255, 253, 249, 0.36);
  box-shadow: 0 0 0 3px rgba(250, 150, 118, 0.1);
  outline: none;
}

body[data-page="supplies"] .custom-set-picker__sliders {
  display: grid;
  gap: 12px;
  padding: 2px clamp(16px, 1.9vw, 22px) clamp(16px, 1.8vw, 22px);
}

body[data-page="supplies"] .custom-set-picker__slider-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: center;
}

body[data-page="supplies"] .custom-set-picker__slider-name,
body[data-page="supplies"] .custom-set-picker__slider-value {
  color: rgba(55, 51, 62, 0.72);
  font-size: 0.76rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

body[data-page="supplies"] .custom-set-picker__slider-value {
  text-align: right;
}

body[data-page="supplies"] .custom-set-picker__slider {
  width: 100%;
  height: 16px;
  margin: 0;
  border-radius: 999px;
  appearance: none;
  background: linear-gradient(90deg, var(--picker-color), var(--picker-color));
  cursor: pointer;
}

body[data-page="supplies"] .custom-set-picker__slider:disabled {
  cursor: default;
  opacity: 0.55;
}

body[data-page="supplies"] .custom-set-picker__slider--h {
  background: linear-gradient(90deg, #f42118 0%, #ffc400 16%, #42f112 32%, #13e2c5 49%, #184cff 66%, #b00cff 82%, #f42150 100%);
}

body[data-page="supplies"] .custom-set-picker__slider--s {
  background: linear-gradient(90deg, hsl(var(--picker-hue) 0% var(--picker-lightness)), hsl(var(--picker-hue) 100% var(--picker-lightness)));
}

body[data-page="supplies"] .custom-set-picker__slider--l {
  background: linear-gradient(90deg, #050505, hsl(var(--picker-hue) var(--picker-saturation) 50%), #ffffff);
}

body[data-page="supplies"] .custom-set-picker__slider::-webkit-slider-runnable-track {
  height: 16px;
  border-radius: 999px;
}

body[data-page="supplies"] .custom-set-picker__slider::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -1px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  appearance: none;
  background: var(--picker-color);
  box-shadow:
    0 0 0 1px rgba(47, 41, 53, 0.18),
    0 5px 12px rgba(47, 41, 53, 0.16);
}

body[data-page="supplies"] .custom-set-picker__slider::-moz-range-track {
  height: 16px;
  border-radius: 999px;
}

body[data-page="supplies"] .custom-set-picker__slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: var(--picker-color);
  box-shadow:
    0 0 0 1px rgba(47, 41, 53, 0.18),
    0 5px 12px rgba(47, 41, 53, 0.16);
}

body[data-page="supplies"] .custom-set-picker__slider:focus-visible {
  outline: 3px solid rgba(250, 150, 118, 0.18);
  outline-offset: 3px;
}

body[data-page="supplies"] .custom-set-picker__gallery {
  display: grid;
  grid-template-rows: auto minmax(0, auto) auto;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
  --custom-picker-row-gap: 6px;
  --custom-picker-row-height: 26px;
}

body[data-page="supplies"] .custom-set-picker__gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

body[data-page="supplies"] .custom-set-picker__recent {
  display: grid;
  gap: 7px;
  align-content: start;
  min-height: 0;
}

body[data-page="supplies"] .custom-set-picker__gallery-head h3,
body[data-page="supplies"] .custom-set-picker__recent h3 {
  margin: 0;
  color: #24212b;
  font-family: var(--font-copy);
  font-size: 0.88rem;
  font-weight: 900;
}

body[data-page="supplies"] .custom-set-picker__family {
  position: relative;
  flex: 0 0 126px;
  min-width: 112px;
}

body[data-page="supplies"] .custom-set-picker__family select {
  width: 100%;
  height: 28px;
  min-height: 28px;
  padding: 0 28px 0 10px;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--paper-border) 78%, transparent);
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, rgba(35, 32, 43, 0.88) 50%) calc(100% - 15px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(35, 32, 43, 0.88) 50%, transparent 50%) calc(100% - 11px) 50% / 6px 6px no-repeat,
    rgba(255, 253, 249, 0.78);
  color: #23202b;
  font-family: var(--font-copy);
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

body[data-page="supplies"] .custom-set-picker__family select:focus-visible {
  border-color: color-mix(in srgb, var(--color-coral) 48%, var(--paper-border));
  box-shadow: 0 0 0 3px rgba(250, 150, 118, 0.14);
  outline: none;
}

body[data-page="supplies"] .custom-set-picker__swatch-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: var(--custom-picker-row-gap);
  min-height: 0;
  max-height: calc((var(--custom-picker-row-height) * 8) + (var(--custom-picker-row-gap) * 7));
  padding-right: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(130, 113, 92, 0.34) transparent;
}

body[data-page="supplies"] .custom-set-picker__swatch-grid::-webkit-scrollbar {
  width: 5px;
}

body[data-page="supplies"] .custom-set-picker__swatch-grid::-webkit-scrollbar-track {
  background: transparent;
}

body[data-page="supplies"] .custom-set-picker__swatch-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(130, 113, 92, 0.28);
}

body[data-page="supplies"] .custom-set-picker__swatch-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(130, 113, 92, 0.42);
}

body[data-page="supplies"] .custom-set-picker__swatch-row {
  display: grid;
  grid-template-columns: repeat(10, minmax(18px, 1fr));
  gap: 3px;
  min-width: 0;
}

body[data-page="supplies"] .custom-set-picker__swatch-grid button {
  width: 100%;
  height: var(--custom-picker-row-height);
  min-height: 0;
  border-radius: 4px;
  border: 1px solid rgba(35, 32, 43, 0.06);
  background: var(--swatch-color, #eadfdf);
  box-shadow: none;
  cursor: pointer;
  transition: none;
}

body[data-page="supplies"] .custom-set-picker__swatch-grid button:hover {
  border-color: rgba(35, 32, 43, 0.06);
  box-shadow: none;
  transform: none;
}

body[data-page="supplies"] .custom-set-picker__swatch-grid button:focus-visible {
  outline: 2px solid rgba(35, 32, 43, 0.34);
  outline-offset: 2px;
}

body[data-page="supplies"] .custom-set-picker__gallery-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  border-radius: 10px;
  background: rgba(255, 253, 249, 0.62);
  color: rgba(55, 51, 62, 0.62);
  font-size: 0.82rem;
  font-weight: 750;
}

body[data-page="supplies"] .custom-set-picker__recent {
  padding-top: 1px;
}

body[data-page="supplies"] .custom-set-picker__swatches {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

body[data-page="supplies"] .custom-set-picker__swatches::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body[data-page="supplies"] .custom-set-picker__swatches button {
  flex: 0 0 26px;
  width: 28px;
  height: 26px;
  border-radius: 7px;
  background: var(--swatch-color, rgba(255, 252, 248, 0.9));
  transition: none;
}

body[data-page="supplies"] .custom-set-picker__swatches .custom-set-picker__swatch-add {
  background: rgba(255, 253, 249, 0.72);
  font-size: 1rem;
  font-weight: 800;
}

/* Supplies custom-set workspace: tablet/mobile prep rules, not the future fullscreen app layer. */
@media (max-width: 1180px) {
  body[data-page="supplies"] .custom-set-workspace__controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-page="supplies"] .custom-set-workspace {
    grid-template-columns: minmax(0, 1.16fr) minmax(340px, 0.84fr);
    gap: clamp(18px, 2.5vw, 30px);
  }
}

@media (max-width: 960px) {
  body[data-page="supplies"] .supplies-custom-workspace.split-workspace:not(.is-gallery-mode) {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    overflow-y: auto;
  }

  body[data-page="supplies"] .supplies-custom-workspace:not(.is-gallery-mode) > .supplies-collection {
    max-height: 210px;
  }

  body[data-page="supplies"] .custom-set-workspace-editor.workspace-panel {
    min-height: 760px;
  }

  body[data-page="supplies"] .custom-set-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  body[data-page="supplies"] .custom-set-workspace__editor {
    padding-right: 0;
  }

  body[data-page="supplies"] .custom-set-picker {
    grid-template-columns: minmax(180px, 0.75fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    padding: clamp(16px, 2.5vw, 22px) 0 0;
    border-left: 0;
    border-top: 1px solid rgba(205, 178, 158, 0.36);
  }

  body[data-page="supplies"] .custom-set-picker__top {
    grid-column: 1 / -1;
  }

  body[data-page="supplies"] .custom-set-picker__gallery {
    min-height: 300px;
  }
}

@media (max-width: 720px) {
  body[data-page="supplies"] .custom-set-workspace-editor.workspace-panel {
    padding: 12px;
    min-height: 840px;
  }

  body[data-page="supplies"] .custom-set-workspace__hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  body[data-page="supplies"] .custom-set-workspace__actions {
    justify-content: flex-start;
  }

  body[data-page="supplies"] .custom-set-workspace__copy h1 {
    font-size: clamp(2.25rem, 12vw, 3.4rem);
  }

  body[data-page="supplies"] .custom-set-workspace__controls {
    grid-template-columns: 1fr;
  }

  body[data-page="supplies"] .custom-set-workspace__table-head {
    display: none;
  }

  body[data-page="supplies"] .custom-set-workspace__row {
    grid-template-columns: 36px minmax(0, 1fr) 42px;
    grid-template-areas:
      "index code swatch"
      "index name swatch"
      "index hex hex";
    min-height: 112px;
  }

  body[data-page="supplies"] .custom-set-workspace__index {
    grid-area: index;
  }

  body[data-page="supplies"] .custom-set-workspace__cell--code {
    grid-area: code;
  }

  body[data-page="supplies"] .custom-set-workspace__cell--name {
    grid-area: name;
  }

  body[data-page="supplies"] .custom-set-workspace__hex-token {
    grid-area: hex;
  }

  body[data-page="supplies"] .custom-set-workspace__swatch {
    grid-area: swatch;
  }

  body[data-page="supplies"] .custom-set-picker {
    grid-template-columns: 1fr;
  }

  body[data-page="supplies"] .custom-set-picker__head,
  body[data-page="supplies"] .custom-set-picker__native-wrap {
    grid-row: auto;
  }

  .swatch-capture-modal__source,
  .swatch-capture-modal__source-actions {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }
}

@media (max-width: 860px) {
  body[data-page="supplies"] .custom-set-editor-head {
    display: none;
  }

  body[data-page="supplies"] .custom-set-editor-row {
    grid-template-columns: 40px minmax(0, 1fr) 42px;
    grid-template-areas:
      "index name pick"
      "index code pick";
  }

  body[data-page="supplies"] .custom-set-editor-row__index {
    grid-area: index;
  }

  body[data-page="supplies"] .custom-set-editor-field--name {
    grid-area: name;
  }

  body[data-page="supplies"] .custom-set-editor-field--code {
    grid-area: code;
  }

  body[data-page="supplies"] .custom-set-editor-swatch {
    grid-area: pick;
  }
}

/* Palette workspace top controls: match the compact left-side filter buttons. */
body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__header-actions .cc-filter__button {
  height: 40px !important;
  min-height: 40px !important;
  padding-inline: clamp(12px, 1.25vw, 16px) !important;
  gap: 8px !important;
  border-radius: 12px !important;
  font-size: clamp(0.78rem, 0.82vw, 0.88rem) !important;
  font-weight: 660 !important;
}

body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__header-actions .cc-filter__button::before {
  width: 18px !important;
  height: 18px !important;
}

body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__medium-toggle {
  min-width: 98px !important;
}

body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__visibility-toggle {
  min-width: 128px !important;
}

body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__visibility-toggle {
  justify-content: center !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
}

body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__visibility-toggle::before {
  content: "" !important;
  width: 23px !important;
  height: 23px !important;
  margin: 0 !important;
  -webkit-mask-image: url("./assets/icons/actions/view.svg") !important;
  mask-image: url("./assets/icons/actions/view.svg") !important;
}

body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__visibility-toggle > span {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

/* Single colour previews stay intentionally simple: one swatch, one text stack. */
.supplies-preview-modal.is-marker-preview .supplies-preview-modal__dialog {
  width: min(100%, 680px) !important;
  max-height: min(84vh, 360px) !important;
  grid-template-rows: minmax(0, auto) !important;
  gap: 0 !important;
  padding: clamp(22px, 3vw, 34px) !important;
}

.supplies-preview-modal.is-marker-preview .supplies-preview-modal__body {
  display: block !important;
}

.supplies-preview-modal.is-marker-preview .supplies-preview-modal__summary {
  display: grid !important;
  grid-template-columns: 76px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 22px !important;
}

.supplies-preview-modal.is-marker-preview .supplies-preview-modal__swatch {
  display: block !important;
  width: 76px !important;
  height: 76px !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  border-radius: 10px !important;
}

.supplies-preview-modal.is-marker-preview .supplies-preview-modal__copy {
  display: grid !important;
  gap: 7px !important;
  align-content: center !important;
  min-height: 0 !important;
}

.supplies-preview-modal.is-marker-preview .supplies-preview-modal__meta {
  color: rgba(28, 35, 42, 0.58) !important;
  font-size: 0.76rem !important;
  font-weight: 850 !important;
  letter-spacing: 0.16em !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
}

.supplies-preview-modal.is-marker-preview .supplies-preview-modal__copy h4 {
  max-width: 34rem !important;
  font-size: clamp(1.45rem, 3vw, 2rem) !important;
  font-weight: 850 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.02 !important;
}

.supplies-preview-modal.is-marker-preview .supplies-preview-modal__detail,
.supplies-preview-modal.is-marker-preview .supplies-preview-modal__copy > p:last-child {
  display: block !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(38, 43, 51, 0.62) !important;
  font-size: 0.92rem !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  line-height: 1.25 !important;
  text-transform: none !important;
}

.supplies-preview-modal.is-marker-preview .supplies-preview-grid,
.supplies-preview-modal.is-marker-preview .modal-actions {
  display: none !important;
}

/* Shared close and eye glyphs use the same mask weight as the canonical filter icons. */
.modal-button--icon[aria-label^="Close"] {
  position: relative;
}

.modal-button--icon[aria-label^="Close"] > span {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.modal-button--icon[aria-label^="Close"]::before {
  content: "";
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  background-color: currentColor;
  opacity: 0.76;
  filter:
    drop-shadow(0.42px 0 0 currentColor)
    drop-shadow(-0.42px 0 0 currentColor)
    drop-shadow(0 0.42px 0 currentColor)
    drop-shadow(0 -0.42px 0 currentColor);
  -webkit-mask-image: url("./assets/icons/actions/close.svg");
  mask-image: url("./assets/icons/actions/close.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  pointer-events: none;
}

.modal-button--icon[aria-label^="Close"]:hover::before,
.modal-button--icon[aria-label^="Close"]:focus-visible::before {
  opacity: 0.82;
}

.palette-editor__visibility-icon-image {
  display: none;
}

.palette-editor__visibility-icon::before {
  content: "";
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  background-color: currentColor;
  opacity: 0.76;
  filter:
    drop-shadow(0.42px 0 0 currentColor)
    drop-shadow(-0.42px 0 0 currentColor)
    drop-shadow(0 0.42px 0 currentColor)
    drop-shadow(0 -0.42px 0 currentColor);
  -webkit-mask-image: url("./assets/icons/actions/view.svg");
  mask-image: url("./assets/icons/actions/view.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  pointer-events: none;
}

.palette-editor__visibility-toggle:hover .palette-editor__visibility-icon::before,
.palette-editor__visibility-toggle:focus-visible .palette-editor__visibility-icon::before {
  opacity: 0.82;
}

.palette-editor__visibility-toggle[aria-pressed="true"] .palette-editor__visibility-icon::before {
  opacity: 0.84;
}

.pages-object-tracker .palette-editor__visibility-icon::before {
  width: 16px;
  height: 16px;
  opacity: 0.72;
}

.pages-colour-row__action-icon--view {
  filter:
    drop-shadow(0.42px 0 0 currentColor)
    drop-shadow(-0.42px 0 0 currentColor)
    drop-shadow(0 0.42px 0 currentColor)
    drop-shadow(0 -0.42px 0 currentColor);
}

/* Shared card pills: one compact tag class for supply mediums, palette tags, page object tags, roles, and source pins. */
.cc-card-pill {
  --cc-card-pill-accent: var(--gallery-card-accent, var(--supply-accent, var(--palette-accent, var(--paper-border))));
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 26px !important;
  height: 26px !important;
  max-width: min(100%, 14ch) !important;
  padding: 0 9px !important;
  border-radius: 8px !important;
  border: 1px solid color-mix(in srgb, var(--cc-card-pill-accent) 45%, var(--paper-border-soft)) !important;
  background: color-mix(in srgb, var(--cc-card-pill-accent) 26%, white) !important;
  color: rgba(47, 41, 53, 0.82) !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  font-family: "Inter", system-ui, sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 500 !important;
  gap: 4px !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  text-transform: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin-left: 0 !important;
}

.cc-card-pill-list {
  gap: 5px !important;
}

.cc-card-pill--icon {
  width: 26px !important;
  min-width: 26px !important;
  max-width: 26px !important;
  padding: 0 !important;
}

.cc-card-pill--icon::before,
.cc-card-pill .supply-card__medium-icon {
  content: "";
  display: block !important;
  width: 13px !important;
  height: 13px !important;
  flex: 0 0 13px !important;
  background: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  font-size: 0 !important;
  line-height: 1 !important;
}

.cc-card-pill .supply-card__medium-label {
  font: inherit !important;
  color: inherit !important;
}

.cc-card-pill .supply-card__medium-icon {
  border: 0 !important;
  border-radius: 0 !important;
  color: inherit !important;
}

.cc-card-pill--icon::before {
  -webkit-mask-image: url("./assets/icons/ui/anchor-link-svgrepo-com.svg");
  mask-image: url("./assets/icons/ui/anchor-link-svgrepo-com.svg");
}

.supply-card--medium-alcohol .cc-card-pill .supply-card__medium-icon {
  -webkit-mask-image: url("./assets/icons/mediums/alcohol-marker.svg");
  mask-image: url("./assets/icons/mediums/alcohol-marker.svg");
}

.supply-card--medium-acrylic .cc-card-pill .supply-card__medium-icon {
  -webkit-mask-image: url("./assets/icons/mediums/acrylic-marker.svg");
  mask-image: url("./assets/icons/mediums/acrylic-marker.svg");
}

.supply-card--medium-pencil .cc-card-pill .supply-card__medium-icon {
  -webkit-mask-image: url("./assets/icons/mediums/colored-pencil.svg");
  mask-image: url("./assets/icons/mediums/colored-pencil.svg");
}

.supply-card--medium-gel .cc-card-pill .supply-card__medium-icon,
.supply-card--medium-fine-line .cc-card-pill .supply-card__medium-icon {
  -webkit-mask-image: url("./assets/icons/mediums/pen-nib.svg");
  mask-image: url("./assets/icons/mediums/pen-nib.svg");
}

.supply-card__medium--custom.cc-card-pill .supply-card__medium-icon {
  -webkit-mask-image: url("./assets/icons/ui/bookmark.svg");
  mask-image: url("./assets/icons/ui/bookmark.svg");
}

.supply-card--medium-generic .cc-card-pill:not(.supply-card__medium--custom) .supply-card__medium-icon {
  display: none !important;
}

.supply-card__mobile-actions {
  display: none;
}

body[data-page="pages"] .pages-preview-panel__frame.is-empty {
  border: 1px dashed var(--paper-border-soft) !important;
  background: var(--main-card-surface) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
  cursor: default;
}

body[data-page="pages"] .pages-preview-panel__frame.is-empty .page-image-empty-state {
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* Future mobile app layer placeholder:
   Add fullscreen workspace rules here in the next design pass, grouped as:
   1. mobile base, 2. page-specific mobile, 3. workspace-specific mobile,
   4. tiny phones, 5. touch/hover/reduced-motion safety.
   This prep pass intentionally leaves mobile behavior unchanged.
*/

.mobile-panel__nav,
.mobile-panel__primary,
.mobile-panel__utility {
  display: grid;
  gap: 18px;
}

.mobile-panel__icon {
  display: none;
}

/* Supplies owned-filter modal: shared shell, mobile layout is refined in the app layer below. */
.owned-filter-modal[hidden] {
  display: none;
}

.owned-filter-modal {
  position: fixed;
  inset: 0;
  z-index: 170;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 32px);
}

.owned-filter-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 24, 0.44);
  backdrop-filter: blur(2px);
}

.owned-filter-modal__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(440px, calc(100vw - 40px));
  max-height: min(620px, calc(100dvh - 48px));
  min-height: 360px;
  padding: 20px;
  border: 1px solid var(--paper-border-soft);
  border-radius: 18px;
  background: var(--main-card-surface);
  box-shadow:
    0 24px 60px rgba(47, 41, 53, 0.2),
    0 5px 16px rgba(47, 41, 53, 0.1);
  overflow: hidden;
  animation: owned-filter-modal-in 180ms ease both;
}

.owned-filter-modal.is-closing .owned-filter-modal__dialog {
  animation: owned-filter-modal-out 160ms ease both;
}

.owned-filter-modal__handle {
  justify-self: center;
  width: 46px;
  height: 5px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-text-muted) 34%, transparent);
}

.owned-filter-modal__content {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  animation: owned-filter-content-in 160ms ease both;
}

.owned-filter-modal__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-bottom: 16px;
}

.owned-filter-modal__header:has(.owned-filter-modal__back) {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}

.owned-filter-modal__header-spacer {
  display: none;
}

.owned-filter-modal__header h2 {
  grid-column: 1;
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-title);
  font-size: 1.45rem;
  font-weight: 790;
  letter-spacing: -0.035em;
  line-height: 1;
}

.owned-filter-modal__header:has(.owned-filter-modal__back) h2 {
  grid-column: 2;
  justify-self: start;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.owned-filter-modal__icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.owned-filter-modal__back {
  grid-column: 1;
}

.owned-filter-modal__close {
  grid-column: 2;
  justify-self: end;
}

.owned-filter-modal__header:has(.owned-filter-modal__back) .owned-filter-modal__close {
  grid-column: 3;
}

.owned-filter-modal__icon-button span {
  display: block;
  font-size: 1.45rem;
  font-weight: 420;
  line-height: 1;
}

.owned-filter-modal__root-list,
.owned-filter-modal__option-list {
  display: grid;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.owned-filter-modal__root-list {
  gap: 8px;
}

.owned-filter-modal__choice,
.owned-filter-modal__option {
  display: grid;
  align-items: center;
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.owned-filter-modal__choice {
  grid-template-columns: minmax(0, 1fr) 32px;
  min-height: 78px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--paper-border-soft);
}

.owned-filter-modal__choice:first-child {
  padding-inline: 16px;
  border: 1px solid color-mix(in srgb, var(--color-peach-fuzz) 68%, var(--paper-border-soft));
  border-radius: 10px;
  background: color-mix(in srgb, var(--color-peach-fuzz) 18%, transparent);
}

.owned-filter-modal__choice span:first-child {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.owned-filter-modal__choice strong,
.owned-filter-modal__option span {
  color: var(--color-text);
  font-weight: 780;
  letter-spacing: -0.02em;
}

.owned-filter-modal__choice small {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 560;
  letter-spacing: 0;
  line-height: 1.2;
}

.owned-filter-modal__arrow {
  justify-self: end;
  color: color-mix(in srgb, var(--color-text) 64%, transparent);
  font-size: 1.4rem;
  line-height: 1;
}

.owned-filter-modal__choice--toggle {
  grid-template-columns: minmax(0, 1fr) auto;
}

.owned-filter-modal__choice--toggle.is-selected {
  border-color: color-mix(in srgb, var(--color-peach-fuzz) 78%, var(--paper-border-soft));
  background: color-mix(in srgb, var(--color-peach-fuzz) 20%, transparent);
}

.owned-filter-modal__switch {
  position: relative;
  justify-self: end;
  width: 46px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--paper-border) 82%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-text-muted) 10%, transparent);
  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}

.owned-filter-modal__switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--main-card-surface);
  box-shadow: 0 2px 6px rgba(35, 32, 26, 0.16);
  transition: transform 160ms ease;
}

.owned-filter-modal__choice--toggle.is-selected .owned-filter-modal__switch {
  border-color: color-mix(in srgb, var(--color-peach-fuzz) 70%, var(--paper-border));
  background: color-mix(in srgb, var(--color-peach-fuzz) 70%, white);
}

.owned-filter-modal__choice--toggle.is-selected .owned-filter-modal__switch::after {
  transform: translateX(18px);
}

.owned-filter-modal__option {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 54px;
  padding: 0 4px;
  border-bottom: 1px solid var(--paper-border-soft);
}

.owned-filter-modal__option.is-selected {
  padding-inline: 12px 10px;
  border: 1px solid color-mix(in srgb, var(--color-peach-fuzz) 72%, var(--paper-border-soft));
  border-radius: 10px;
  background: color-mix(in srgb, var(--color-peach-fuzz) 28%, var(--main-card-surface));
}

.owned-filter-modal__option strong {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 690;
}

.owned-filter-modal__empty {
  margin: 20px 0 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.supplies-active-filter-chip {
  display: none;
}

@keyframes owned-filter-modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes owned-filter-modal-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
}

@keyframes owned-filter-content-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile app layer: global header/nav shell and Supplies-only gallery redesign. */
@media (max-width: 760px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body.is-mobile-nav-open {
    overflow: hidden;
  }

  body.cc-page {
    min-width: 0;
    overflow-x: clip;
    background: var(--cc-container-shell-surface);
  }

  body.cc-page .site-shell,
  body.cc-page .cc-shell {
    width: 100%;
    min-height: 100svh;
    padding: 0;
    background: var(--cc-container-shell-surface);
  }

  body.cc-page .canvas-card,
  body.cc-page .cc-shell__surface {
    width: 100%;
    min-height: 100svh;
    height: auto;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--cc-container-shell-surface);
    box-shadow: none;
    overflow: visible;
  }

  body[data-page] {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  body[data-page] .site-shell,
  body[data-page] .cc-shell,
  body[data-page] .canvas-card,
  body[data-page] .cc-shell__surface {
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;
    overflow: hidden;
  }

  body[data-page] .canvas-card,
  body[data-page] .cc-shell__surface {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  body[data-page] .cc-main {
    min-height: 0;
    height: 100%;
    overflow-x: clip;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body[data-page] .cc-main::-webkit-scrollbar {
    display: none;
  }

  body[data-page] .cc-shell__surface > .cc-site-footer {
    z-index: 60;
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 10px clamp(16px, 4.8vw, 22px) calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--paper-border-soft);
    background: var(--cc-container-shell-surface);
  }

  body[data-page] .cc-shell__surface > .cc-site-footer::before {
    content: none;
  }

  body[data-page] .site-header {
    position: static;
    top: auto;
    z-index: 50;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    width: 100%;
    min-height: 58px;
    margin: 0;
    padding: 0 clamp(16px, 4.8vw, 22px) 0 clamp(10px, 3.4vw, 16px);
    border-bottom: 1px solid var(--paper-border-soft);
    background: var(--cc-container-shell-surface);
    box-shadow: none;
  }

  body[data-page] .brand-mark {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
    margin: 0;
    gap: 5px;
    min-width: 0;
    z-index: 0;
  }

  body[data-page] .brand-mark__script,
  body[data-page] .brand-mark__word {
    font-family: var(--font-title);
    font-size: clamp(1.08rem, 5.1vw, 1.42rem);
    font-weight: 780;
    letter-spacing: -0.035em;
    line-height: 1;
  }

  body[data-page] .site-nav,
  body[data-page] .header-link {
    display: none;
  }

  body[data-page] .header-actions {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: center;
    z-index: 2;
  }

  body[data-page] .menu-toggle {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 12px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-page] .menu-toggle span {
    width: 22px;
    height: 2px;
  }

  body[data-page] .mobile-panel {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: block;
    width: 100%;
    height: auto;
    min-height: 100svh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(28, 25, 24, 0);
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transition: background-color 220ms ease, opacity 220ms ease;
  }

  body[data-page] .mobile-panel.is-open {
    display: block;
    background: rgba(28, 25, 24, 0.52);
    opacity: 1;
    pointer-events: auto;
  }

  body[data-page] .mobile-panel__drawer {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    width: min(80vw, 332px);
    height: 100svh;
    min-height: 100svh;
    background: var(--cc-container-shell-surface);
    border-right: 1px solid var(--paper-border-soft);
    box-shadow: 20px 0 44px rgba(47, 41, 53, 0.2);
    overflow: hidden;
    transform: translateX(-102%);
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  body[data-page] .mobile-panel.is-open .mobile-panel__drawer {
    transform: translateX(0);
  }

  body[data-page] .mobile-panel__nav {
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 4.2vh, 28px);
    min-height: 0;
    padding: clamp(32px, 6.2vh, 52px) clamp(22px, 6vw, 30px) max(22px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  body[data-page] .mobile-panel__primary,
  body[data-page] .mobile-panel__utility {
    display: grid;
    flex: 0 0 auto;
    gap: clamp(15px, 3.3vh, 24px);
  }

  body[data-page] .mobile-panel__utility {
    margin-top: auto;
    gap: 14px;
    padding-top: 20px;
    border-top: 1px solid var(--paper-border-soft);
  }

  body[data-page] .mobile-panel a::after {
    content: none;
  }

  body[data-page] .mobile-panel__link,
  body[data-page] .mobile-panel__utility-link {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 15px;
    min-width: 0;
    min-height: 48px;
    color: var(--mobile-nav-accent, var(--color-text));
    font-family: "Inter", system-ui, sans-serif;
    font-size: clamp(1.36rem, 6.2vw, 2rem);
    font-weight: 780;
    letter-spacing: -0.045em;
    line-height: 1;
    text-decoration: none;
    white-space: normal;
  }

  body[data-page] .mobile-panel__utility-link {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 15px;
    min-height: 48px;
    color: var(--color-text);
    font-size: clamp(1.36rem, 6.2vw, 2rem);
    font-weight: 780;
    letter-spacing: -0.045em;
  }

  body[data-page] .mobile-panel__link.is-active {
    position: relative;
  }

  body[data-page] .mobile-panel__link.is-active::before {
    content: "";
    position: absolute;
    left: calc(clamp(22px, 6vw, 30px) * -1);
    top: 8px;
    bottom: 8px;
    width: 5px;
    border-radius: 999px;
    background: currentColor;
  }

  body[data-page] .mobile-panel__icon {
    display: block;
    width: 30px;
    height: 30px;
    background: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
  }

  body[data-page] .mobile-panel__icon--home {
    -webkit-mask-image: url("./assets/icons/ui/home-svgrepo-com.svg");
    mask-image: url("./assets/icons/ui/home-svgrepo-com.svg");
  }

  body[data-page] .mobile-panel__icon--pages {
    -webkit-mask-image: url("./assets/icons/ui/colouring-book.svg");
    mask-image: url("./assets/icons/ui/colouring-book.svg");
  }

  body[data-page] .mobile-panel__icon--palettes {
    -webkit-mask-image: url("./assets/icons/ui/colour-palette.svg");
    mask-image: url("./assets/icons/ui/colour-palette.svg");
  }

  body[data-page] .mobile-panel__icon--supplies {
    -webkit-mask-image: url("./assets/icons/ui/brand-badge.svg");
    mask-image: url("./assets/icons/ui/brand-badge.svg");
  }

  body[data-page] .mobile-panel__icon--explore {
    -webkit-mask-image: url("./assets/icons/actions/explore.svg");
    mask-image: url("./assets/icons/actions/explore.svg");
  }

  body[data-page] .mobile-panel__icon--signup {
    -webkit-mask-image: url("./assets/icons/actions/get-started.svg");
    mask-image: url("./assets/icons/actions/get-started.svg");
  }

  body[data-page] .mobile-panel__icon--login {
    -webkit-mask-image: url("./assets/icons/ui/avatar.svg");
    mask-image: url("./assets/icons/ui/avatar.svg");
  }

  body[data-page] .mobile-panel__icon--help::after {
    content: none;
  }

  body[data-page] .mobile-panel__icon--help {
    -webkit-mask-image: url("./assets/icons/ui/help-svgrepo-com.svg");
    mask-image: url("./assets/icons/ui/help-svgrepo-com.svg");
  }

  body[data-page] .mobile-panel__icon--settings::after {
    content: none;
  }

  body[data-page] .mobile-panel__icon--settings {
    -webkit-mask-image: url("./assets/icons/ui/settings-svgrepo-com.svg");
    mask-image: url("./assets/icons/ui/settings-svgrepo-com.svg");
  }

  body[data-page] .mobile-panel__link[data-nav-key="home"] {
    --mobile-nav-accent: color-mix(in srgb, var(--medium-alcohol-accent) 88%, white);
  }

  body[data-page] .mobile-panel__link[data-nav-key="pages"] {
    --mobile-nav-accent: color-mix(in srgb, var(--medium-acrylic-accent) 82%, white);
  }

  body[data-page] .mobile-panel__link[data-nav-key="palettes"] {
    --mobile-nav-accent: color-mix(in srgb, var(--medium-pencil-accent) 84%, #5d7358);
  }

  body[data-page] .mobile-panel__link[data-nav-key="supplies"] {
    --mobile-nav-accent: color-mix(in srgb, var(--medium-gel-accent) 90%, white);
  }

  body[data-page] .mobile-panel__link[data-nav-key="explore"] {
    --mobile-nav-accent: #ffc7ae;
  }

  body[data-page] .mobile-panel__utility-link[data-nav-key="signup"],
  body[data-page] .mobile-panel__utility-link[data-nav-key="login"],
  body[data-page] .mobile-panel__utility-link[data-nav-key="help"],
  body[data-page] .mobile-panel__utility-link[data-nav-key="settings"] {
    color: var(--color-text);
  }

  body[data-page="home"] .hero h1 {
    width: min(100%, calc(100vw - 10px));
    max-width: calc(100% - 10px);
    margin-inline: auto;
    padding-right: clamp(4px, 1.5vw, 8px);
    box-sizing: border-box;
    font-size: clamp(2.95rem, 14.1vw, 3.78rem);
    line-height: 0.9;
    letter-spacing: -0.035em;
  }

  body[data-page="home"] .hero-text {
    display: grid;
    gap: clamp(8px, 2.8vw, 12px);
    justify-items: center;
    width: min(100%, 31rem);
    max-width: 31rem;
    margin: clamp(22px, 5.8vw, 30px) auto 0;
    padding: 0;
    color: rgba(43, 43, 47, 0.66);
    font-size: clamp(0.9rem, 3.75vw, 1rem);
    line-height: 1.38;
    text-align: center;
  }

  body[data-page="home"] .hero-text br {
    display: none;
  }

  body[data-page="home"] .hero-text__line {
    display: block;
    max-width: 27rem;
    white-space: normal;
    text-wrap: pretty;
  }

  body[data-page="home"] .hero-actions {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: clamp(10px, 3.2vw, 14px);
    width: min(100%, 33rem);
    margin: clamp(22px, 6vw, 30px) auto 0;
  }

  body[data-page="home"] .hero-actions .button {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 46px;
    padding: 0 clamp(10px, 3.6vw, 16px);
    border-radius: 12px;
    gap: 8px;
    font-size: clamp(0.82rem, 3.6vw, 0.96rem);
    white-space: nowrap;
  }

  body[data-page="home"] .button__icon {
    width: clamp(18px, 5vw, 22px);
    height: clamp(18px, 5vw, 22px);
  }

  body[data-page="home"] {
    --home-mobile-footer-height: 64px;
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  body[data-page="home"] .site-shell,
  body[data-page="home"] .cc-shell,
  body[data-page="home"] .canvas-card,
  body[data-page="home"] .cc-shell__surface {
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;
    overflow: hidden;
  }

  body[data-page="home"] .canvas-card,
  body[data-page="home"] .cc-shell__surface {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  body[data-page="home"] .site-header {
    margin-bottom: 0;
  }

  body[data-page="home"] .home-main {
    min-height: 0;
    height: 100%;
    padding-bottom: calc(var(--home-mobile-footer-height) + env(safe-area-inset-bottom) + 18px);
    overflow-x: clip;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body[data-page="home"] .home-main::-webkit-scrollbar {
    display: none;
  }

  body[data-page="home"] .hero {
    justify-items: center;
    gap: clamp(18px, 5.2vw, 26px);
    padding-bottom: 0;
  }

  body[data-page="home"] .hero-copy {
    justify-self: center;
    padding-inline: 0;
  }

  body[data-page="home"] .hero-visual {
    display: grid;
    justify-self: center;
    justify-items: center;
    width: 100%;
    max-width: min(100%, 24rem);
    margin: clamp(4px, 2vw, 12px) auto 0;
    padding: 0 0 clamp(8px, 2.5vw, 16px);
    transform: none;
  }

  body[data-page="home"] .palette-artwork {
    width: min(100%, 22rem);
  }

  body[data-page="home"] .palette-panel {
    gap: clamp(6px, 2vw, 10px);
  }

  body[data-page="home"] .palette-artwork__stack {
    margin-top: 0;
  }

  body[data-page="home"] .hero-swatch-art {
    width: min(100%, 22rem);
    min-height: clamp(205px, 60vw, 255px);
  }

  body[data-page="home"] .hero-swatch-strip {
    height: clamp(30px, 8vw, 38px);
  }

  body[data-page="home"] .hero-swatch-row--two {
    top: clamp(39px, 11vw, 49px);
  }

  body[data-page="home"] .hero-swatch-row--three {
    top: clamp(78px, 22vw, 98px);
  }

  body[data-page="home"] .hero-swatch-row--four {
    top: clamp(117px, 33vw, 147px);
  }

  body[data-page="home"] .hero-swatch-row--five {
    top: clamp(156px, 44vw, 196px);
  }

  body[data-page="home"] .hero-metrics {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    width: 100%;
    max-width: none;
    min-height: calc(var(--home-mobile-footer-height) + env(safe-area-inset-bottom));
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--paper-border-soft);
    background: var(--cc-container-shell-surface);
    box-shadow: none;
  }

  body[data-page="home"] .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 0;
    width: 100%;
    min-height: calc(var(--home-mobile-footer-height) + env(safe-area-inset-bottom));
    margin: 0;
    padding: 10px var(--supplies-mobile-x, clamp(16px, 4.8vw, 22px)) calc(12px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body[data-page="home"] .hero-stats .hero-stat {
    display: grid;
    justify-items: center;
    gap: 0;
    min-width: 0;
    padding: 0 6px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
  }

  body[data-page="home"] .hero-stats .hero-stat:not(:last-child)::after {
    top: 4px;
    right: 0;
    bottom: 4px;
    left: auto;
    width: 1px;
    height: auto;
    background: var(--paper-border-soft);
  }

  body[data-page="home"] .hero-stat__icon {
    display: none;
  }

  body[data-page="home"] .hero-stats .hero-stat__copy {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 0;
  }

  body[data-page="home"] .hero-stats dd {
    margin: 0;
    font-size: clamp(1.32rem, 5.6vw, 1.72rem);
    font-weight: 820;
    letter-spacing: -0.045em;
    line-height: 1;
  }

  body[data-page="home"] .hero-stats dt {
    max-width: 100%;
    margin-top: 5px;
    color: var(--color-text-muted);
    font-size: clamp(0.5rem, 2.05vw, 0.62rem);
    font-weight: 780;
    letter-spacing: 0.065em;
    line-height: 1.08;
    white-space: normal;
  }

  body[data-page="supplies"] {
    --supplies-mobile-x: clamp(16px, 4.8vw, 22px);
    --supplies-mobile-gap: clamp(10px, 3vw, 14px);
    --supplies-mobile-footer-height: 64px;
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  body[data-page="supplies"] .site-shell,
  body[data-page="supplies"] .cc-shell,
  body[data-page="supplies"] .canvas-card,
  body[data-page="supplies"] .cc-shell__surface {
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;
    overflow: hidden;
  }

  body[data-page="supplies"] .canvas-card,
  body[data-page="supplies"] .cc-shell__surface {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  body[data-page="supplies"] .site-header {
    margin-bottom: 0;
  }

  body[data-page="supplies"] .supplies-main {
    display: block;
    min-height: 0;
    height: 100%;
    padding:
      clamp(14px, 4vw, 18px)
      var(--supplies-mobile-x)
      var(--supplies-mobile-gap);
    background: var(--cc-container-shell-surface);
    overflow-x: clip;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  body[data-page="supplies"] .supplies-main::-webkit-scrollbar {
    display: none;
  }

  body[data-page="supplies"] .supplies-shell,
  body[data-page="supplies"] .supplies-custom-workspace.split-workspace {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    max-height: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--cc-container-shell-surface);
    box-shadow: none;
    overflow: visible;
  }

  body[data-page="supplies"] .supplies-collection {
    display: flex;
    flex-direction: column;
    gap: clamp(4px, 1.4vw, 6px);
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    max-height: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--cc-container-shell-surface);
    box-shadow: none;
    overflow: visible;
  }

  body[data-page="supplies"] .supplies-custom-workspace.is-gallery-mode > .custom-set-workspace-editor {
    display: none;
  }

  body[data-page="supplies"] .supplies-overview {
    display: contents;
  }

  body[data-page="supplies"] .supplies-overview__intro {
    display: block;
    order: 1;
    margin: 0 0 clamp(6px, 2vw, 8px);
  }

  body[data-page="supplies"] .cc-page-title {
    max-width: 100%;
    margin: 0;
    color: rgba(28, 26, 28, 0.98);
    font-family: var(--font-display);
    font-size: clamp(2.55rem, 12.5vw, 3.15rem);
    font-weight: 780;
    letter-spacing: -0.028em;
    line-height: 0.92;
    font-variation-settings: "SOFT" 80, "WONK" 0, "opsz" 72;
    text-wrap: balance;
  }

  body[data-page="supplies"] .cc-page-description {
    max-width: 28rem;
    margin: clamp(7px, 1.9vw, 10px) 0 0;
    color: rgba(47, 41, 53, 0.68);
    font-family: var(--font-copy);
    font-size: clamp(0.92rem, 3.65vw, 1.02rem);
    font-weight: 500;
    line-height: 1.35;
  }

  body[data-page="supplies"] .supplies-overview__filters {
    position: relative;
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 12px;
    order: 2;
    width: 100%;
    margin: 0 0 clamp(5px, 1.8vw, 7px);
  }

  body[data-page="supplies"] .supplies-active-filter-chip {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    min-height: 36px;
    max-width: min(34vw, 112px);
    padding: 0 10px;
    border: 1px solid color-mix(in srgb, var(--color-peach-fuzz) 66%, var(--paper-border-soft));
    border-radius: 9px;
    background: color-mix(in srgb, var(--color-peach-fuzz) 24%, var(--main-card-surface));
    color: var(--color-text);
    box-shadow: none;
    font-family: var(--font-ui);
    font-size: clamp(0.68rem, 2.75vw, 0.78rem);
    font-weight: 730;
    letter-spacing: -0.015em;
    line-height: 1;
    white-space: nowrap;
    touch-action: manipulation;
  }

  body[data-page="supplies"] .supplies-active-filter-chip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body[data-page="supplies"] .supplies-active-filter-chip strong {
    flex: 0 0 auto;
    color: color-mix(in srgb, var(--color-text) 70%, transparent);
    font-size: 0.8rem;
    line-height: 1;
  }

  body[data-page="supplies"] .supplies-overview__add-action {
    justify-self: end;
    min-height: 44px;
    padding: 0 clamp(14px, 4vw, 20px);
    border-radius: 10px;
    background: color-mix(in srgb, var(--color-peach-fuzz) 42%, var(--main-card-surface));
    border-color: color-mix(in srgb, var(--color-peach-fuzz) 62%, var(--paper-border));
    box-shadow: var(--shadow-sm);
    color: var(--color-text);
    font-size: clamp(0.86rem, 3.7vw, 0.98rem);
    font-weight: 760;
    white-space: nowrap;
  }

  body[data-page="supplies"] .supplies-filterdropdown--owned {
    top: calc(100% + 8px) !important;
    left: 0 !important;
    width: min(280px, calc(100vw - (2 * var(--supplies-mobile-x))));
    max-width: 100%;
    background: var(--cc-container-shell-surface);
  }

  body[data-page="supplies"] .supplies-grid-wrapper,
  body[data-page="supplies"] .supplies-grid-wrapper.is-populated {
    order: 3;
    width: 100%;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
    padding: 0;
  }

  body[data-page="supplies"] .supplies-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    gap: var(--supplies-mobile-gap);
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    padding: 0;
    margin: 0;
    overflow: visible;
  }

  body[data-page="supplies"] .cc-gallery-grid.supplies-grid,
  body[data-page="supplies"] .gallery-page[data-gallery-density] .cc-gallery-grid.supplies-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    align-content: start;
    align-items: stretch;
    justify-content: stretch;
  }

  body[data-page="supplies"] .supplies-grid .supply-card__mobile-actions {
    position: absolute;
    top: clamp(8px, 2.5vw, 11px);
    right: clamp(8px, 2.5vw, 11px);
    z-index: 12;
    display: block;
    pointer-events: auto;
  }

  body[data-page="supplies"] .supplies-grid .supply-card__quick-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: color-mix(in srgb, var(--color-text) 78%, var(--color-text-muted));
    box-shadow: none;
    touch-action: manipulation;
    transition:
      background-color 160ms ease,
      transform 160ms ease;
  }

  body[data-page="supplies"] .supplies-grid .supply-card__quick-action span {
    display: block;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
  }

  body[data-page="supplies"] .supplies-grid .supply-card__quick-action span + span {
    margin-top: 0;
  }

  body[data-page="supplies"] .supplies-grid .supply-card__quick-action:active {
    transform: scale(0.96);
  }

  body[data-page="supplies"] .supplies-grid .supply-card__mobile-actions.is-open .supply-card__quick-action {
    background: color-mix(in srgb, var(--supply-accent, var(--paper-border)) 10%, transparent);
  }

  body[data-page="supplies"] .supplies-grid .supply-card__action-menu {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    display: grid;
    width: 132px;
    padding: 6px;
    border: 1px solid color-mix(in srgb, var(--paper-border-soft) 72%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--main-card-surface) 93%, transparent);
    box-shadow:
      0 14px 28px rgba(56, 44, 35, 0.13),
      0 2px 8px rgba(56, 44, 35, 0.07);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px) scale(0.98);
    transform-origin: top right;
    transition:
      opacity 160ms ease,
      transform 160ms ease;
  }

  body[data-page="supplies"] .supplies-grid .supply-card__mobile-actions.is-open .supply-card__action-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  body[data-page="supplies"] .supplies-grid .supply-card__action-menu-item {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    min-height: 38px;
    width: 100%;
    padding: 0 9px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: left;
  }

  body[data-page="supplies"] .supplies-grid .supply-card__action-menu-item:active {
    background: color-mix(in srgb, var(--supply-accent, var(--paper-border)) 14%, transparent);
  }

  body[data-page="supplies"] .supplies-grid .supply-card__action-menu-item--delete {
    color: color-mix(in srgb, #d93f3f 86%, var(--color-text));
  }

  body[data-page="supplies"] .supplies-grid .supply-card__action-menu-item--delete.is-confirm {
    background: color-mix(in srgb, #d93f3f 10%, transparent);
  }

  body[data-page="supplies"] .supplies-grid .supply-card__action-menu-icon {
    display: block;
    width: 17px;
    height: 17px;
    background: currentColor;
    -webkit-mask: url("./assets/icons/actions/delete.svg") center / contain no-repeat;
    mask: url("./assets/icons/actions/delete.svg") center / contain no-repeat;
  }

  body[data-page="supplies"] .supplies-overview__stats {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    order: 4;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    align-self: stretch;
    flex: 0 0 auto;
    gap: 0;
    width: 100%;
    min-height: calc(var(--supplies-mobile-footer-height) + env(safe-area-inset-bottom));
    margin: 0;
    padding: 10px var(--supplies-mobile-x) calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--paper-border-soft);
    background: var(--cc-container-shell-surface);
    box-shadow: none;
    transform: none;
  }

  body[data-page="supplies"] .supplies-overview__stat {
    justify-items: center;
    min-width: 0;
    text-align: center;
  }

  body[data-page="supplies"] .supplies-overview__stat + .supplies-overview__stat {
    border-left: 1px solid var(--paper-border-soft);
  }

  body[data-page="supplies"] .cc-stat__value {
    font-size: clamp(1.45rem, 6vw, 1.82rem);
    font-weight: 820;
    letter-spacing: -0.045em;
    line-height: 1;
  }

  body[data-page="supplies"] .cc-stat__label {
    margin-top: 5px;
    color: var(--color-text-muted);
    font-size: clamp(0.56rem, 2.4vw, 0.68rem);
    font-weight: 780;
    letter-spacing: 0.075em;
    line-height: 1;
  }

  body[data-page="supplies"] .supplies-empty {
    min-height: 42vh;
  }

  body[data-page="supplies"] .supplies-empty__panel {
    padding: 24px 18px;
    border-radius: 14px;
    background: var(--main-card-surface);
  }

  /* Mobile Supplies filter modal: large popup over a dimmed app surface. */
  body[data-page="supplies"] .owned-filter-modal[hidden] {
    display: none;
  }

  body[data-page="supplies"] .owned-filter-modal {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 0 calc(var(--supplies-mobile-footer-height) + env(safe-area-inset-bottom) + 14px);
  }

  body[data-page="supplies"] .owned-filter-modal__backdrop {
    background: rgba(28, 25, 24, 0.5);
    backdrop-filter: blur(2px);
  }

  body[data-page="supplies"] .owned-filter-modal__dialog {
    width: calc(100vw - (2 * var(--supplies-mobile-x)));
    max-width: calc(100vw - (2 * var(--supplies-mobile-x)));
    margin-inline: auto;
    min-height: min(54svh, 520px);
    height: min(62svh, 560px);
    max-height: calc(100svh - var(--supplies-mobile-footer-height) - env(safe-area-inset-bottom) - 92px);
    padding: clamp(16px, 4.4vw, 22px);
    border-radius: 18px;
    background: var(--main-card-surface);
    box-shadow:
      0 28px 72px rgba(47, 41, 53, 0.24),
      0 6px 18px rgba(47, 41, 53, 0.12);
  }

  body[data-page="supplies"] .owned-filter-modal__handle {
    width: 42px;
    height: 5px;
    margin-bottom: clamp(14px, 3.6vw, 18px);
    background: color-mix(in srgb, var(--color-text-muted) 38%, transparent);
  }

  body[data-page="supplies"] .owned-filter-modal__header {
    min-height: 44px;
    margin-bottom: clamp(14px, 4vw, 18px);
  }

  body[data-page="supplies"] .owned-filter-modal__header h2 {
    font-size: clamp(1.28rem, 5.6vw, 1.62rem);
  }

  body[data-page="supplies"] .owned-filter-modal__header:has(.owned-filter-modal__back) h2 {
    font-size: clamp(1rem, 4.4vw, 1.18rem);
  }

  body[data-page="supplies"] .owned-filter-modal__icon-button {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 11px;
  }

  body[data-page="supplies"] .owned-filter-modal__close span {
    font-size: 1.46rem;
  }

  body[data-page="supplies"] .owned-filter-modal__back span {
    font-size: 1.25rem;
  }

  body[data-page="supplies"] .owned-filter-modal__root-list {
    gap: 9px;
    padding-inline: clamp(10px, 3.8vw, 18px);
    padding-bottom: 2px;
  }

  body[data-page="supplies"] .owned-filter-modal__option-list {
    padding-inline: clamp(10px, 3.8vw, 18px);
  }

  body[data-page="supplies"] .owned-filter-modal__choice {
    min-height: 74px;
    padding: 13px 14px;
  }

  body[data-page="supplies"] .owned-filter-modal__choice:first-child {
    padding-inline: 14px;
    border-radius: 10px;
  }

  body[data-page="supplies"] .owned-filter-modal__choice strong,
  body[data-page="supplies"] .owned-filter-modal__option span {
    font-size: clamp(0.92rem, 3.85vw, 1.02rem);
  }

  body[data-page="supplies"] .owned-filter-modal__choice small {
    font-size: clamp(0.78rem, 3.35vw, 0.9rem);
  }

  body[data-page="supplies"] .owned-filter-modal__option {
    min-height: 54px;
    padding-inline: 4px;
  }

  body[data-page="palettes"] .cc-mobile-filter-modal .owned-filter-modal__root-list,
  body[data-page="palettes"] .cc-mobile-filter-modal .owned-filter-modal__option-list {
    padding-inline: clamp(10px, 3.8vw, 18px);
  }

  body.is-owned-filter-modal-open[data-page="supplies"] .supplies-main {
    overflow: hidden;
  }

  /* Mobile fullscreen modal layer: app-screen overlays instead of desktop cards. */
  body[data-page] :is(
    .supplies-modal,
    .supplies-preview-modal,
    .palette-modal,
    .palette-preview-modal,
    .pages-upload-modal,
    .pages-view-modal,
    .palette-tag-modal,
    .pages-tag-modal,
    .palette-details-modal,
    .swatch-capture-modal
  ) {
    z-index: 160;
    place-items: stretch;
    padding: 0;
    background: var(--cc-container-shell-surface);
  }

  body[data-page] :is(
    .supplies-modal__backdrop,
    .supplies-preview-modal__backdrop,
    .palette-tag-modal__backdrop,
    .pages-tag-modal__backdrop,
    .palette-details-modal__backdrop,
    .swatch-capture-modal__backdrop
  ) {
    background: var(--cc-container-shell-surface);
    backdrop-filter: none;
  }

  body[data-page] :is(
    .supplies-modal__dialog,
    .supplies-preview-modal__dialog,
    .palette-modal__dialog,
    .palette-preview-modal__dialog,
    .pages-upload-modal__dialog,
    .pages-view-modal__dialog,
    .palette-tag-modal__dialog,
    .pages-tag-modal__dialog,
    .palette-details-modal__dialog,
    .swatch-capture-modal__dialog
  ) {
    position: relative;
    align-self: stretch;
    justify-self: stretch;
    width: 100%;
    max-width: none;
    height: 100svh;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: clamp(18px, 5vw, 24px);
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--cc-container-shell-surface) !important;
    box-shadow: none !important;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    animation: mobile-modal-screen-in 180ms ease both;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: clamp(14px, 3.8vw, 18px);
    padding: clamp(20px, 5.4vw, 26px) clamp(18px, 5vw, 24px) calc(clamp(20px, 5.4vw, 26px) + env(safe-area-inset-bottom));
    overflow: hidden !important;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px;
    align-items: start;
    gap: 14px;
    min-height: 0;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__body {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    min-height: 0;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__section--page {
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
    gap: clamp(10px, 3vw, 14px);
    min-height: 0;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__image-shell {
    justify-self: center;
    align-self: start;
    width: min(100%, 72svh);
    height: auto;
    max-height: none;
    aspect-ratio: 5 / 4;
  }

  body[data-page] :is(
    .supplies-modal,
    .supplies-preview-modal,
    .palette-modal,
    .palette-preview-modal,
    .pages-upload-modal,
    .pages-view-modal,
    .palette-tag-modal,
    .pages-tag-modal,
    .palette-details-modal,
    .swatch-capture-modal
  ).is-closing :is(
    .supplies-modal__dialog,
    .supplies-preview-modal__dialog,
    .palette-modal__dialog,
    .palette-preview-modal__dialog,
    .pages-upload-modal__dialog,
    .pages-view-modal__dialog,
    .palette-tag-modal__dialog,
    .pages-tag-modal__dialog,
    .palette-details-modal__dialog,
    .swatch-capture-modal__dialog
  ) {
    animation: mobile-modal-screen-out 160ms ease both;
  }

  body[data-page] .supplies-modal__dialog {
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: clamp(12px, 3vw, 16px);
  }

  body[data-page] .supplies-modal__head {
    align-items: center;
  }

  body[data-page] .supplies-modal__head h2 {
    font-size: clamp(2.15rem, 10vw, 3rem);
  }

  body[data-page] .supplies-modal__close.modal-button--icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
    background: var(--main-card-surface);
  }

  body[data-page="palettes"] .palette-details-modal {
    place-items: stretch;
    padding: 0;
    background: var(--cc-container-shell-surface);
  }

  body[data-page="palettes"] .palette-details-modal__dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
    gap: clamp(18px, 5vw, 26px);
    width: 100%;
    height: 100svh;
    min-height: 0;
    padding: clamp(30px, 8vw, 42px) clamp(18px, 5vw, 24px);
    overflow-y: auto;
  }

  body[data-page="palettes"] .palette-details-modal .palette-tag-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
  }

  body[data-page="palettes"] .palette-details-modal .palette-tag-modal__head h3 {
    margin: 0;
    color: var(--color-text);
    font-family: var(--font-title) !important;
    font-size: clamp(2.15rem, 10vw, 3rem);
    font-weight: 820;
    letter-spacing: -0.035em;
    line-height: 0.98;
  }

  body[data-page="palettes"] .palette-details-modal .palette-tag-modal__close.modal-button--icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
    background: var(--main-card-surface);
  }

  body[data-page="palettes"] .palette-details-modal__body {
    display: grid;
    align-content: start;
    gap: 12px;
    width: min(100%, 540px);
    margin: 0 auto;
    padding-top: clamp(2px, 1.5vw, 8px);
  }

  body[data-page="palettes"] .palette-details-modal__field {
    gap: 0;
  }

  body[data-page="palettes"] .palette-details-modal__input,
  body[data-page="palettes"] .palette-details-modal__textarea,
  body[data-page="palettes"] .palette-tag-modal__tag-input {
    border-radius: 12px;
  }

  body[data-page="palettes"] .palette-details-modal__input {
    height: 54px;
    min-height: 54px;
    padding-inline: 18px;
    font-size: 16px;
    font-weight: 650;
  }

  body[data-page="palettes"] .palette-details-modal__textarea {
    min-height: 118px;
    padding: 16px 18px;
    font-size: 16px;
    line-height: 1.35;
  }

  body[data-page="palettes"] .palette-tag-modal__tags-section {
    gap: 10px;
  }

  body[data-page="palettes"] .palette-tag-modal__empty {
    min-height: 64px;
    padding: 14px 18px;
    border-radius: 14px;
  }

  body[data-page="palettes"] .palette-tag-modal__add {
    gap: 10px;
  }

  body[data-page="palettes"] .palette-tag-modal__tag-input--add {
    height: 50px;
    min-height: 50px;
    padding-inline: 18px;
  }

  body[data-page="palettes"] .palette-details-modal__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding-top: clamp(12px, 3vw, 18px);
  }

  body[data-page="palettes"] .palette-details-modal__actions .modal-button {
    min-height: 56px;
    border-radius: 12px;
  }

  body[data-page="pages"] .pages-object-modal {
    place-items: stretch;
    padding: 0;
    background: var(--cc-container-shell-surface);
  }

  body[data-page="pages"] .pages-object-modal__dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
    gap: clamp(18px, 5vw, 26px);
    width: 100%;
    height: 100svh;
    min-height: 0;
    padding: clamp(30px, 8vw, 42px) clamp(18px, 5vw, 24px);
    overflow-y: auto;
  }

  body[data-page="pages"] .pages-object-modal .palette-tag-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
  }

  body[data-page="pages"] .pages-object-modal .palette-tag-modal__head h3 {
    margin: 0;
    color: var(--color-text);
    font-family: var(--font-title) !important;
    font-size: clamp(2.15rem, 10vw, 3rem);
    font-weight: 820;
    letter-spacing: -0.035em;
    line-height: 0.98;
  }

  body[data-page="pages"] .pages-object-modal .palette-tag-modal__close.modal-button--icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
    background: var(--main-card-surface);
  }

  body[data-page="pages"] .pages-object-modal .palette-details-modal__body {
    display: grid;
    align-content: start;
    gap: 12px;
    width: min(100%, 540px);
    margin: 0 auto;
    padding-top: clamp(2px, 1.5vw, 8px);
  }

  body[data-page="pages"] .pages-object-modal .palette-details-modal__field {
    gap: 0;
  }

  body[data-page="pages"] .pages-object-modal .palette-details-modal__input,
  body[data-page="pages"] .pages-object-modal .palette-details-modal__textarea,
  body[data-page="pages"] .pages-object-modal .palette-tag-modal__tag-input {
    border-radius: 12px;
  }

  body[data-page="pages"] .pages-object-modal .palette-details-modal__input {
    height: 54px;
    min-height: 54px;
    padding-inline: 18px;
    font-size: 16px;
    font-weight: 650;
  }

  body[data-page="pages"] .pages-object-modal .palette-details-modal__textarea {
    min-height: 118px;
    padding: 16px 18px;
    font-size: 16px;
    line-height: 1.35;
  }

  body[data-page="pages"] .pages-object-modal .palette-tag-modal__tags-section {
    gap: 10px;
  }

  body[data-page="pages"] .pages-object-modal .palette-tag-modal__empty {
    min-height: 64px;
    padding: 14px 18px;
    border-radius: 14px;
  }

  body[data-page="pages"] .pages-object-modal .palette-tag-modal__add {
    gap: 10px;
  }

  body[data-page="pages"] .pages-object-modal .palette-tag-modal__tag-input--add {
    height: 50px;
    min-height: 50px;
    padding-inline: 18px;
  }

  body[data-page="pages"] .pages-object-modal .palette-details-modal__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding-top: clamp(12px, 3vw, 18px);
  }

  body[data-page="pages"] .pages-object-modal .palette-details-modal__actions .modal-button {
    min-height: 56px;
    border-radius: 12px;
  }

  body[data-page="pages"] .pages-tag-modal {
    place-items: stretch;
    padding: 0;
    background: var(--cc-container-shell-surface);
  }

  body[data-page="pages"] .pages-tag-modal__dialog {
    display: grid;
    grid-template-rows: auto auto auto;
    align-content: start;
    gap: clamp(18px, 5vw, 26px);
    width: 100%;
    height: 100svh;
    min-height: 0;
    padding: clamp(30px, 8vw, 42px) clamp(18px, 5vw, 24px);
    overflow-y: auto;
  }

  body[data-page="pages"] .pages-tag-modal .palette-tag-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
  }

  body[data-page="pages"] .pages-tag-modal .palette-tag-modal__head h3 {
    margin: 0;
    color: var(--color-text);
    font-family: var(--font-title) !important;
    font-size: clamp(2.15rem, 10vw, 3rem);
    font-weight: 820;
    letter-spacing: -0.035em;
    line-height: 0.98;
  }

  body[data-page="pages"] .pages-tag-modal .palette-tag-modal__head p {
    max-width: 22rem;
    margin: 8px 0 0;
    color: rgba(43, 43, 47, 0.62);
    font-size: 16px;
    line-height: 1.3;
  }

  body[data-page="pages"] .pages-tag-modal .palette-tag-modal__close.modal-button--icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
    background: var(--main-card-surface);
  }

  body[data-page="pages"] .pages-tag-modal__body {
    display: grid;
    align-content: start;
    gap: 12px;
    width: min(100%, 540px);
    margin: 0 auto;
    padding-top: clamp(2px, 1.5vw, 8px);
  }

  body[data-page="pages"] .pages-tag-modal__options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body[data-page="pages"] .pages-tag-modal__chip {
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 0 16px;
    border-radius: 12px;
    color: rgba(23, 20, 16, 0.72);
    font-size: 16px;
    font-weight: 690;
    text-align: left;
  }

  body[data-page="pages"] .pages-tag-modal__chip.is-active {
    background: color-mix(in srgb, var(--color-peach-fuzz) 54%, white);
    border-color: color-mix(in srgb, var(--color-peach-fuzz) 62%, var(--paper-border-soft));
    color: var(--color-text);
  }

  body[data-page="pages"] .pages-tag-modal .palette-tag-modal__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: min(100%, 540px);
    margin: 0 auto;
    padding-top: clamp(12px, 3vw, 18px);
  }

  body[data-page="pages"] .pages-tag-modal .palette-tag-modal__actions .modal-button {
    width: 100%;
    min-width: 0;
    min-height: 56px;
    border-radius: 12px;
  }

  body[data-page="supplies"] .supplies-preview-modal.is-set-preview .supplies-preview-modal__dialog {
    --preview-modal-x: clamp(18px, 5vw, 24px);
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    height: 100svh;
    max-height: none;
    padding: clamp(30px, 8vw, 42px) var(--preview-modal-x) 0;
    overflow: hidden;
  }

  body[data-page="supplies"] .supplies-preview-modal.is-set-preview .supplies-preview-modal__dialog::after {
    content: none;
  }

  body[data-page="supplies"] .supplies-preview-modal.is-set-preview .supplies-preview-modal__head {
    top: clamp(18px, 5vw, 24px);
    right: var(--preview-modal-x);
  }

  body[data-page="supplies"] .supplies-preview-modal.is-set-preview .supplies-preview-modal__body {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    height: 100%;
    padding-top: clamp(16px, 4.8vw, 26px);
    overflow: hidden;
  }

  body[data-page="supplies"] .supplies-preview-modal.is-set-preview .supplies-preview-modal__summary {
    padding-right: 58px;
  }

  body[data-page="supplies"] .supplies-preview-modal.is-set-preview .supplies-preview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 0;
    height: 100%;
    padding-bottom: max(clamp(14px, 4vw, 22px), env(safe-area-inset-bottom));
    scroll-padding-bottom: max(clamp(14px, 4vw, 22px), env(safe-area-inset-bottom));
    overflow-y: auto;
    border-bottom: 0;
  }

  body[data-page="supplies"] .supplies-preview-modal.is-marker-preview .supplies-preview-modal__dialog {
    display: grid;
    grid-template-rows: minmax(0, 1fr) !important;
    place-items: center;
    height: 100svh;
    max-height: none !important;
    padding: clamp(30px, 8vw, 42px) clamp(18px, 5vw, 24px) calc(30px + env(safe-area-inset-bottom)) !important;
    overflow: hidden;
  }

  body[data-page="supplies"] .supplies-preview-modal.is-marker-preview .supplies-preview-modal__body {
    display: grid !important;
    place-items: center;
    width: min(100%, 540px);
    min-height: 0;
  }

  body[data-page="supplies"] .supplies-preview-modal.is-marker-preview .supplies-preview-modal__summary {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    justify-items: center;
    align-content: center;
    gap: clamp(14px, 4.4vw, 20px) !important;
    width: min(100%, 292px);
    max-width: calc(100svw - 56px);
    text-align: center;
  }

  body[data-page="supplies"] .supplies-preview-modal.is-marker-preview .supplies-preview-modal__swatch {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    justify-self: center !important;
    width: clamp(104px, 30vw, 128px) !important;
    height: clamp(104px, 30vw, 128px) !important;
    margin: 0 auto !important;
    border-radius: 15px !important;
  }

  body[data-page="supplies"] .supplies-preview-modal.is-marker-preview .supplies-preview-modal__copy {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    display: grid !important;
    justify-items: center;
    gap: 7px !important;
    width: 100%;
    min-width: 0;
  }

  body[data-page="supplies"] .supplies-preview-modal.is-marker-preview .supplies-preview-modal__meta,
  body[data-page="supplies"] .supplies-preview-modal.is-marker-preview .supplies-preview-modal__detail,
  body[data-page="supplies"] .supplies-preview-modal.is-marker-preview .supplies-preview-modal__copy > p:last-child {
    display: block !important;
    text-align: center;
  }

  body[data-page="supplies"] .supplies-preview-modal.is-marker-preview .supplies-preview-modal__meta {
    order: 1;
    max-width: 100%;
    color: rgba(38, 43, 51, 0.58) !important;
    font-size: clamp(0.72rem, 3vw, 0.82rem) !important;
    font-weight: 850 !important;
    letter-spacing: 0.16em !important;
    line-height: 1.08 !important;
    text-transform: uppercase !important;
  }

  body[data-page="supplies"] .supplies-preview-modal.is-marker-preview .supplies-preview-modal__detail {
    order: 2;
    color: rgba(38, 43, 51, 0.62) !important;
    font-size: clamp(0.84rem, 3.4vw, 0.96rem) !important;
    font-weight: 760 !important;
    letter-spacing: 0.08em !important;
    line-height: 1.08 !important;
    text-transform: uppercase !important;
  }

  body[data-page="supplies"] .supplies-preview-modal.is-marker-preview .supplies-preview-modal__copy h4 {
    order: 3;
    max-width: 100% !important;
    margin-top: 4px !important;
    margin-inline: auto !important;
    font-size: clamp(1.55rem, 6.8vw, 2.18rem) !important;
    line-height: 0.98 !important;
    text-align: center;
    text-wrap: balance;
  }

  body[data-page="supplies"] .supplies-preview-modal.is-marker-preview .supplies-preview-modal__copy > p:last-child {
    order: 4;
    justify-self: center;
    margin-top: 2px !important;
    margin-inline: auto !important;
    color: rgba(38, 43, 51, 0.6) !important;
    font-size: clamp(1rem, 4vw, 1.12rem) !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em !important;
    line-height: 1.1 !important;
    text-align: center !important;
  }

  body[data-page="palettes"] .palette-preview-modal.preview-modal {
    padding: 0;
  }

  body[data-page="palettes"] .palette-preview-modal__dialog {
    --preview-modal-x: clamp(18px, 5vw, 24px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 22px;
    width: 100%;
    height: 100svh;
    min-height: 0;
    max-height: none;
    padding: clamp(30px, 8vw, 42px) var(--preview-modal-x) 0;
    overflow: hidden;
  }

  body[data-page="palettes"] .palette-preview-modal__header {
    width: min(100%, 540px);
    margin: 0 auto;
    padding-right: 58px;
  }

  body[data-page="palettes"] .palette-preview-modal__body {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 22px;
    width: min(100%, 540px);
    height: 100%;
    min-height: 0;
    margin: 0 auto;
    overflow: hidden;
  }

  body[data-page="palettes"] .palette-preview-modal__section--page {
    display: none !important;
  }

  body[data-page="palettes"] .palette-preview-modal__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: max-content;
    align-content: start;
    align-items: start;
    gap: clamp(18px, 4.8vw, 24px) clamp(12px, 3.6vw, 18px);
    min-height: 0;
    height: 100%;
    padding: 0 0 max(clamp(14px, 4vw, 22px), env(safe-area-inset-bottom));
    scroll-padding-bottom: max(clamp(14px, 4vw, 22px), env(safe-area-inset-bottom));
    overflow-y: auto;
    border-bottom: 0;
  }

  body[data-page="palettes"] .palette-preview-tile {
    align-self: start;
    gap: 9px;
    min-width: 0;
  }

  body[data-page="palettes"] .palette-preview-tile__swatch {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 11px;
  }

  body[data-page="palettes"] .palette-preview-tile__copy {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  body[data-page="palettes"] .palette-preview-tile__code {
    color: rgba(23, 20, 16, 0.96);
    font-size: clamp(0.76rem, 3.2vw, 0.9rem);
    font-weight: 850;
    line-height: 1;
  }

  body[data-page="palettes"] .palette-preview-tile__brand,
  body[data-page="palettes"] .palette-preview-tile__medium {
    color: rgba(38, 43, 51, 0.64);
    font-family: var(--font-body);
    font-size: clamp(0.72rem, 3vw, 0.86rem);
    font-weight: 500;
    line-height: 1.12;
  }

  body[data-page] .supplies-modal .supplies-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    align-items: center;
    width: 100%;
    overflow: visible;
    border-bottom: 1px solid var(--paper-border-soft);
  }

  body[data-page] .supplies-modal .supplies-tab {
    min-width: 0 !important;
    min-height: 32px !important;
    padding: 0 3px 8px !important;
    font-size: clamp(0.7rem, 3vw, 0.84rem) !important;
    line-height: 1 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body[data-page] .supplies-modal .supplies-search,
  body[data-page] .palette-modal .supplies-search {
    min-height: 0;
  }

  body[data-page] .supplies-modal .supplies-search__toolbar,
  body[data-page] .palette-modal .supplies-search__toolbar {
    gap: 10px;
    padding-top: 2px;
  }

  body[data-page] .supplies-modal .supplies-search__top-row,
  body[data-page] .palette-modal .palette-modal__top-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
  }

  body[data-page] .supplies-modal .supplies-filterbar,
  body[data-page] .palette-modal .supplies-filterbar {
    display: flex;
    flex-wrap: nowrap;
    gap: 9px;
    width: auto;
    min-width: 0;
  }

  body[data-page] .supplies-modal .cc-filter__button,
  body[data-page] .palette-modal .cc-filter__button {
    position: relative;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 12px;
    background: var(--main-card-surface);
  }

  body[data-page] .supplies-modal .cc-filter__button span,
  body[data-page] .palette-modal .cc-filter__button span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  body[data-page] .supplies-modal .cc-filter__button::before,
  body[data-page] .palette-modal .cc-filter__button::before {
    position: static;
    width: 20px;
    height: 20px;
    margin: 0;
    transform: none;
  }

  body[data-page] .supplies-modal .cc-filter__button::after,
  body[data-page] .palette-modal .cc-filter__button::after {
    content: none;
  }

  body[data-page] .supplies-modal .marker-search__input,
  body[data-page] .palette-modal .marker-search__input {
    width: 100%;
    min-width: 0;
  }

}

/* iOS focus safety: focused form controls must be 16px+ or Safari zooms the page. */
@media (max-width: 768px) {
  body[data-page] :is(
    input:not([type="button"]):not([type="checkbox"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="image"]):not([type="radio"]):not([type="range"]):not([type="reset"]):not([type="submit"]),
    textarea,
    select,
    .cc-search__input,
    .marker-search__input,
    .supplies-search__input,
    .pages-upload-modal__input,
    .palette-tag-modal__tag-input,
    .palette-details-modal__input,
    .palette-details-modal__textarea,
    .pages-pin-editor__input,
    .pages-object__name-input,
    .custom-set-workspace input,
    .custom-set-picker__hex input,
    .custom-set-picker__family select,
    .swatch-capture-modal__field input,
    .swatch-capture-modal__capture-input input,
    .supply-card__action--capture-input input
  ) {
    font-size: 16px !important;
    transform: none;
  }

  body[data-page] :is(
    input:not([type="button"]):not([type="checkbox"]):not([type="color"]):not([type="file"]):not([type="hidden"]):not([type="image"]):not([type="radio"]):not([type="range"]):not([type="reset"]):not([type="submit"]),
    textarea,
    .cc-search__input,
    .marker-search__input,
    .supplies-search__input,
    .pages-upload-modal__input,
    .palette-tag-modal__tag-input,
    .palette-details-modal__input,
    .palette-details-modal__textarea,
    .pages-pin-editor__input,
    .pages-object__name-input,
    .custom-set-workspace input,
    .custom-set-picker__hex input,
    .swatch-capture-modal__field input,
    .swatch-capture-modal__capture-input input,
    .supply-card__action--capture-input input
  )::placeholder {
    font-size: 16px !important;
  }

  body[data-page] :is(.pages-pin-editor__input, .custom-set-picker__hex input, .custom-set-picker__family select) {
    height: 36px;
    min-height: 36px;
    line-height: 1.15;
  }

  body[data-page] :is(.supply-card__action--capture-input, .swatch-capture-modal__capture-input) {
    height: 40px;
  }

  body[data-page] :is(.supply-card__action--capture-input input, .swatch-capture-modal__capture-input input) {
    line-height: 1.2;
  }

  body[data-page] :is(.custom-set-workspace__control input, .custom-set-workspace__cell) {
    min-height: 38px;
    line-height: 1.2;
  }
}

@media (max-width: 360px) {
  body[data-page="supplies"] {
    --supplies-mobile-x: 14px;
    --supplies-mobile-gap: 10px;
  }

  body[data-page="supplies"] .supplies-main {
    padding-top: 16px;
  }

  body[data-page="supplies"] .cc-page-title {
    font-size: clamp(2.25rem, 12vw, 2.72rem);
  }

  body[data-page="supplies"] .supplies-overview__filters {
    column-gap: 8px;
  }

  body[data-page="supplies"] .supplies-overview__add-action {
    min-height: 40px;
    padding-inline: 12px;
  }
}

/* Local-only developer utilities. Hidden unless script.js injects them on localhost. */
.local-utility,
.demo-utility {
  position: fixed;
  right: clamp(12px, 2vw, 24px);
  bottom: clamp(12px, 2vw, 24px);
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 24px);
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--paper-border, #d8c8bc) 72%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--main-card-surface, #fffaf1) 94%, white);
  box-shadow: 0 10px 28px rgba(55, 45, 38, 0.14);
  color: var(--color-text, #352d2a);
  font-family: var(--font-body);
}

.local-utility__label,
.demo-utility__label {
  padding-inline: 6px 3px;
  color: color-mix(in srgb, var(--color-text, #352d2a) 72%, transparent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.local-utility__content {
  display: grid;
  gap: 6px;
}

.local-utility__actions,
.demo-utility__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.local-utility__button,
.demo-utility__button {
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--paper-border, #d8c8bc) 82%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--tool-surface, #fff8ed) 88%, white);
  color: color-mix(in srgb, var(--color-text, #352d2a) 84%, black);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.local-utility__button:hover,
.local-utility__button:focus-visible,
.demo-utility__button:hover,
.demo-utility__button:focus-visible {
  border-color: color-mix(in srgb, var(--color-text, #352d2a) 28%, var(--paper-border, #d8c8bc));
  background: white;
}

.local-utility__button--danger,
.demo-utility__button--danger {
  color: #8a3129;
}

.local-utility__status {
  padding-inline: 2px;
  color: color-mix(in srgb, var(--color-text, #352d2a) 68%, transparent);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.25;
}

.local-utility__status.is-error {
  color: #8a3129;
}

.local-utility.is-busy,
.demo-utility.is-busy {
  opacity: 0.72;
  pointer-events: none;
}

@media (max-width: 680px) {
  .local-utility,
  .demo-utility {
    left: 12px;
    right: 12px;
    align-items: flex-start;
    flex-direction: column;
  }

  .local-utility__actions,
  .demo-utility__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  body[data-page="supplies"] .supplies-grid-wrapper,
  body[data-page="supplies"] .supplies-grid-wrapper.is-populated {
    order: 4;
  }
}

@keyframes suppliesOwnedSearchReveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* First-pass shared mobile gallery unification: Pages, Palettes, and Object Tracker follow Supplies. */
@media (max-width: 760px) {
  body:is([data-page="pages"], [data-page="palettes"]) {
    --supplies-mobile-x: 14px;
    --supplies-mobile-gap: 10px;
    --supplies-mobile-footer-height: 76px;
  }

  body:is([data-page="pages"], [data-page="palettes"]) .supplies-main {
    padding:
      16px
      18px
      var(--supplies-mobile-gap);
  }

  body:is([data-page="pages"], [data-page="palettes"]) .cc-gallery {
    display: flex;
    flex-direction: column;
    gap: var(--supplies-mobile-gap);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body:is([data-page="pages"], [data-page="palettes"]) .gallery-page__header.cc-page-header,
  body[data-page="pages"] .pages-object-tracker__top {
    display: contents;
  }

  body:is([data-page="pages"], [data-page="palettes"]) .cc-page-header__copy,
  body[data-page="pages"] .pages-object-tracker__title {
    display: block;
    order: 1;
    margin: 0 0 clamp(6px, 2vw, 8px);
  }

  body:is([data-page="pages"], [data-page="palettes"]) .cc-page-title,
  body[data-page="pages"] .pages-object-tracker__title-view {
    max-width: 100%;
    margin: 0;
    font-size: clamp(2.25rem, 12vw, 2.72rem);
    letter-spacing: -0.028em;
    line-height: 0.92;
  }

  body:is([data-page="pages"], [data-page="palettes"]) .cc-page-description,
  body[data-page="pages"] .pages-object-tracker__mobile-helper {
    max-width: 28rem;
    margin: clamp(7px, 1.9vw, 10px) 0 0;
    color: rgba(47, 41, 53, 0.68);
    font-family: var(--font-copy);
    font-size: clamp(0.92rem, 3.65vw, 1.02rem);
    font-weight: 500;
    line-height: 1.35;
  }

  body:is([data-page="pages"], [data-page="palettes"]) .gallery-viewport,
  body:is([data-page="pages"], [data-page="palettes"]) .cc-gallery__viewport {
    order: 4;
    width: 100%;
    height: auto;
    max-height: none;
    min-height: 0;
    padding: 0;
    overflow: visible;
  }

  body:is([data-page="pages"], [data-page="palettes"]) .gallery-grid-shell.is-populated.cc-gallery__viewport {
    align-self: stretch;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  body:is([data-page="pages"], [data-page="palettes"]) .cc-gallery-grid,
  body[data-page="pages"] .pages-object-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none !important;
    grid-auto-rows: auto;
    align-items: start;
    gap: var(--supplies-mobile-gap);
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    padding: 0;
    margin: 0;
    overflow: visible;
  }

  body:is([data-page="pages"], [data-page="palettes"]) .cc-page-stats {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    width: 100%;
    min-height: calc(var(--supplies-mobile-footer-height) + env(safe-area-inset-bottom));
    margin: 0;
    padding: 10px var(--supplies-mobile-x) calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--paper-border-soft);
    background: var(--cc-container-shell-surface);
    transform: none;
  }

  body:is([data-page="pages"], [data-page="palettes"]) .cc-stat {
    justify-items: center;
    min-width: 0;
    text-align: center;
  }

  body:is([data-page="pages"], [data-page="palettes"]) .cc-stat + .cc-stat {
    border-left: 1px solid var(--paper-border-soft);
  }

  body:is([data-page="pages"], [data-page="palettes"]) .cc-stat__value {
    font-size: clamp(1.45rem, 6vw, 1.82rem);
    font-weight: 820;
    letter-spacing: -0.045em;
    line-height: 1;
  }

  body:is([data-page="pages"], [data-page="palettes"]) .cc-stat__label {
    margin-top: 5px;
    color: var(--color-text-muted);
    font-size: clamp(0.56rem, 2.4vw, 0.68rem);
    font-weight: 780;
    letter-spacing: 0.075em;
    line-height: 1;
  }

  body:is([data-page="pages"], [data-page="palettes"]) .cc-mobile-filter-modal[hidden] {
    display: none;
  }

  body:is([data-page="pages"], [data-page="palettes"]) .cc-mobile-filter-modal {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 0 calc(var(--supplies-mobile-footer-height) + env(safe-area-inset-bottom) + 14px);
  }

  body:is([data-page="pages"], [data-page="palettes"]) .cc-mobile-filter-modal .owned-filter-modal__backdrop {
    background: rgba(28, 25, 24, 0.5);
    backdrop-filter: blur(2px);
  }

  body:is([data-page="pages"], [data-page="palettes"]) .cc-mobile-filter-modal .owned-filter-modal__dialog {
    width: calc(100vw - (2 * var(--supplies-mobile-x)));
    max-width: calc(100vw - (2 * var(--supplies-mobile-x)));
    min-height: min(54svh, 520px);
    height: min(62svh, 560px);
    max-height: calc(100svh - var(--supplies-mobile-footer-height) - env(safe-area-inset-bottom) - 92px);
    padding: clamp(16px, 4.4vw, 22px);
    border-radius: 18px;
    background: var(--main-card-surface);
    box-shadow:
      0 28px 72px rgba(47, 41, 53, 0.24),
      0 6px 18px rgba(47, 41, 53, 0.12);
  }

  body[data-page="pages"] .pages-gallery-tile,
  body[data-page="pages"] .pages-object.palette-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 148px !important;
    min-height: 148px;
    max-height: 148px;
    padding: 0;
    border-radius: 12px;
    background: var(--main-card-surface);
    border: 1px solid color-mix(in srgb, var(--gallery-card-accent, var(--paper-border)) 34%, var(--paper-border-soft));
    box-shadow: var(--shadow-sm);
    transform: none;
    filter: none;
    overflow: visible;
  }

  body[data-page="pages"] .pages-gallery-tile.palette-card::after {
    content: none;
  }

  body[data-page="pages"] .pages-gallery-tile__button {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: center;
    gap: 15px;
    height: 100%;
    min-height: 0;
    padding: 14px 16px 14px 14px;
    border-radius: 12px;
  }

  body[data-page="pages"] .pages-gallery-tile__frame {
    grid-column: 1;
    grid-row: 1;
    width: 104px;
    height: 104px;
    aspect-ratio: 1;
    min-height: 0;
    align-self: center;
    border-radius: 10px;
    background: var(--tool-surface);
    box-shadow:
      inset 0 0 0 1px color-mix(in srgb, var(--paper-border) 64%, var(--paper-border-soft)),
      0 4px 10px rgba(60, 45, 20, 0.04);
  }

  body[data-page="pages"] .pages-gallery-tile__frame::after,
  body[data-page="pages"] .pages-gallery-tile__title {
    display: none;
  }

  body[data-page="pages"] .pages-gallery-tile__content {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: flex-start;
    align-self: start;
    min-width: 0;
    height: auto;
    padding: 13px 40px 0 0;
  }

  body[data-page="pages"] .pages-gallery-tile__mobile-title,
  body[data-page="pages"] .pages-object__name {
    display: block;
    align-self: center;
    margin: 0;
    color: var(--color-text);
    font-size: clamp(1.24rem, 4.9vw, 1.42rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.04;
    text-wrap: pretty;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  body[data-page="pages"] .pages-gallery-tile__source {
    margin-top: 6px;
    color: rgba(47, 41, 53, 0.62);
    font-size: clamp(0.72rem, 2.92vw, 0.82rem);
    font-weight: 650;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }

  body[data-page="pages"] .pages-gallery-tile__divider {
    display: none;
  }

  body[data-page="pages"] .pages-gallery-tile__footer {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    align-self: end;
    min-height: 24px;
    padding: 0 40px 8px 0;
  }

  body[data-page="pages"] .pages-gallery-tile__object-count {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    min-width: max-content;
    color: var(--color-text-muted);
    font-weight: 760;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
  }

  body[data-page="pages"] .pages-gallery-tile__object-count strong {
    display: inline-block;
    color: var(--color-text);
    font-size: clamp(0.92rem, 3.8vw, 1.05rem);
    font-weight: 820;
    letter-spacing: 0;
    line-height: 1;
  }

  body[data-page="pages"] .pages-gallery-tile__object-count span {
    display: inline-block;
    color: var(--color-text-muted);
    font-size: clamp(0.5rem, 2vw, 0.56rem);
    font-weight: 780;
    letter-spacing: 0.058em;
    line-height: 1;
    text-transform: uppercase;
  }

  body[data-page="pages"] .pages-gallery-tile__tag-space {
    display: block;
    flex: 1 1 auto;
    min-width: 28px;
    min-height: 18px;
  }

  body[data-page="pages"] .pages-gallery-tile > .gallery-card__actions,
  body[data-page="pages"] .pages-object__actions {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 12 !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  body[data-page="pages"] .pages-gallery-tile > .gallery-card__actions::before {
    content: none;
  }

  body[data-page="pages"] .pages-object__actions::before {
    content: "...";
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: color-mix(in srgb, var(--color-text) 78%, var(--color-text-muted));
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
  }

  body[data-page="pages"] .pages-gallery-tile > .gallery-card__actions > *,
  body[data-page="pages"] .pages-object__actions > * {
    display: none !important;
  }

  body[data-page="pages"] .pages-gallery-tile > .gallery-card__actions > .pages-gallery-tile__action-menu {
    display: grid !important;
  }

  body[data-page="pages"] .pages-gallery-tile > .gallery-card__actions > .pages-gallery-tile__quick-action {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: color-mix(in srgb, var(--color-text) 78%, var(--color-text-muted));
    box-shadow: none;
    cursor: pointer;
    touch-action: manipulation;
    transition:
      background-color 160ms ease,
      transform 160ms ease;
  }

  body[data-page="pages"] .pages-gallery-tile > .gallery-card__actions > .pages-gallery-tile__quick-action::before {
    content: none;
  }

  body[data-page="pages"] .pages-gallery-tile > .gallery-card__actions > .pages-gallery-tile__quick-action span {
    display: block;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
  }

  body[data-page="pages"] .pages-gallery-tile > .gallery-card__actions > .pages-gallery-tile__quick-action:active {
    transform: scale(0.96);
  }

  body[data-page="pages"] .pages-gallery-tile > .gallery-card__actions.is-open > .pages-gallery-tile__quick-action {
    background: color-mix(in srgb, var(--gallery-card-accent, var(--paper-border)) 10%, transparent);
  }

  body[data-page="pages"] .pages-gallery-tile__action-menu {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 40;
    display: grid !important;
    width: 132px;
    padding: 6px;
    border: 1px solid color-mix(in srgb, var(--paper-border-soft) 72%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--main-card-surface) 93%, transparent);
    box-shadow:
      0 14px 28px rgba(56, 44, 35, 0.13),
      0 2px 8px rgba(56, 44, 35, 0.07);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px) scale(0.98);
    transform-origin: top right;
    transition:
      opacity 160ms ease,
      transform 160ms ease;
  }

  body[data-page="pages"] .pages-gallery-tile > .gallery-card__actions.is-open .pages-gallery-tile__action-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  body[data-page="pages"] .pages-gallery-tile__action-menu .palette-card__action-menu-item.palette-card__action-menu-item {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr) !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 9px !important;
    min-height: 38px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 0 9px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: var(--color-text) !important;
    box-shadow: none !important;
    font-family: var(--font-ui) !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    text-align: left !important;
  }

  body[data-page="pages"] .pages-gallery-tile__action-menu .palette-card__action-menu-item span:not(.palette-card__action-menu-icon) {
    min-width: 0;
  }

  body[data-page="pages"] .pages-gallery-tile__action-menu .palette-card__action-menu-item:active {
    background: color-mix(in srgb, var(--gallery-card-accent, var(--paper-border)) 14%, transparent) !important;
  }

  body[data-page="pages"] .pages-gallery-tile__action-menu .palette-card__action-menu-item--delete {
    color: color-mix(in srgb, #d93f3f 86%, var(--color-text)) !important;
  }

  body[data-page="pages"] .pages-gallery-tile__action-menu .palette-card__action-menu-item--delete.is-confirm {
    background: color-mix(in srgb, #d93f3f 10%, transparent) !important;
  }

  body[data-page="pages"] .pages-gallery-tile__action-menu .palette-card__action-menu-item:hover,
  body[data-page="pages"] .pages-gallery-tile__action-menu .palette-card__action-menu-item:focus-visible {
    transform: none !important;
  }

  body[data-page="pages"] .pages-gallery-tile__action-menu .palette-card__action-menu-icon {
    display: block;
    width: 17px;
    height: 17px;
    background: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
  }

  body[data-page="pages"] .pages-gallery-tile__action-menu .palette-card__action-menu-icon--view {
    -webkit-mask-image: url("./assets/icons/actions/view.svg");
    mask-image: url("./assets/icons/actions/view.svg");
  }

  body[data-page="pages"] .pages-gallery-tile__action-menu .palette-card__action-menu-icon--edit {
    -webkit-mask-image: url("./assets/icons/mediums/colored-pencil.svg");
    mask-image: url("./assets/icons/mediums/colored-pencil.svg");
  }

  body[data-page="pages"] .pages-gallery-tile__action-menu .palette-card__action-menu-icon--delete {
    -webkit-mask-image: url("./assets/icons/actions/delete.svg");
    mask-image: url("./assets/icons/actions/delete.svg");
  }

  body[data-page="pages"] .pages-object.palette-card {
    min-height: clamp(148px, 38vw, 172px);
  }

  body[data-page="pages"] .pages-object__frame.palette-card__frame {
    position: relative;
    display: grid;
    grid-template-rows: auto auto auto minmax(34px, auto);
    gap: 9px;
    width: 100%;
    min-height: 0 !important;
    height: auto;
    padding: 14px 14px 0;
    border-radius: 12px;
    background: transparent;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-object__logo,
  body[data-page="pages"] .pages-object__check,
  body[data-page="pages"] .pages-object__solid-divider {
    display: none;
  }

  body[data-page="pages"] .pages-object__top {
    min-height: 0;
  }

  body[data-page="pages"] .pages-object__content.palette-card__body {
    position: static;
    display: block;
    width: 100%;
    max-width: 100%;
    padding-right: 38px;
  }

  body[data-page="pages"] .pages-object__name {
    max-width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  body[data-page="pages"] .pages-object__divider {
    display: block;
    width: 100%;
    margin: 0;
    border-top: 1px dashed color-mix(in srgb, var(--palette-accent, var(--paper-border)) 16%, var(--paper-border-soft));
  }

  body[data-page="pages"] .pages-object__meta {
    position: static;
    display: flex;
    align-self: start;
    align-items: center;
    justify-content: flex-end;
    min-height: 0;
    max-height: none;
    padding: 0;
    opacity: 1;
    transform: none;
  }

  body[data-page="pages"] .pages-object__tag-list {
    justify-content: flex-end;
    gap: 6px;
    width: 100%;
    overflow: hidden;
  }

  body[data-page="pages"] .cc-card-pill {
    min-height: 22px;
    height: 22px;
    max-width: 100%;
    padding: 0 8px;
    border-radius: 7px;
    font-size: clamp(0.62rem, 2.6vw, 0.7rem);
    font-weight: 560;
  }

  body[data-page="pages"] .pages-object__footer.palette-card__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    min-height: 0;
    margin: 0 -14px;
    padding: 0;
    border-top: 0;
  }

  body[data-page="pages"] .pages-object__count.palette-card__count {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 0 14px;
    border-right: 0;
  }

  body[data-page="pages"] .pages-object__count strong {
    font-size: clamp(1.18rem, 5vw, 1.38rem);
    font-weight: 820;
    letter-spacing: -0.04em;
    line-height: 1;
  }

  body[data-page="pages"] .pages-object__count span {
    color: var(--color-text-muted);
    font-size: clamp(0.55rem, 2.25vw, 0.62rem);
    font-weight: 760;
    letter-spacing: 0.058em;
    line-height: 1;
  }

  body[data-page="pages"] .pages-object__swatch-field.palette-card__swatch-field {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  body[data-page="pages"] .pages-object__preview-swatches.palette-card__swatches {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    min-height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-object__swatch-segment.palette-card__swatch-segment {
    flex: 1 1 0;
    min-height: 36px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body[data-page="pages"] .pages-object__summary {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
  }

  body[data-page="pages"] .pages-object__details {
    display: none;
  }

  body[data-page="pages"] .pages-object-tracker__mobile-controls,
  body[data-page="pages"] .pages-object-tracker__mobile-helper,
  body[data-page="pages"] .pages-object-tracker__mobile-stats {
    display: grid;
  }

  body[data-page="pages"] .pages-workspace.split-workspace {
    display: block;
  }

  body[data-page="pages"] .pages-workspace.split-workspace > .pages-preview-panel {
    display: none;
  }

  body[data-page="pages"] .pages-workspace.split-workspace > .pages-object-tracker {
    display: flex;
    flex-direction: column;
    gap: var(--supplies-mobile-gap);
    width: 100%;
    padding: 0;
  }

  body[data-page="pages"] .pages-object-tracker__shell {
    order: 4;
    flex: 0 0 auto;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  body[data-page="pages"] .pages-object-tracker__actions {
    display: none;
  }

  body[data-page="pages"] .pages-object-tracker > .palette-editor__footer {
    display: contents;
  }

  body[data-page="pages"] .pages-object-tracker > .palette-editor__footer > [data-pages-add-object] {
    display: none;
  }

  body[data-page="pages"] .pages-object-tracker__mobile-stats {
    position: fixed;
  }
}

@media (min-width: 761px) {
  body[data-page="pages"] .pages-object-tracker__mobile-controls,
  body[data-page="pages"] .pages-object-tracker__mobile-helper,
  body[data-page="pages"] .pages-object-tracker__mobile-stats,
  body:is([data-page="pages"], [data-page="palettes"]) .cc-mobile-search-strip {
    display: none;
  }
}

@media (max-width: 760px) {
  body[data-page="pages"] .pages-object__actions .gallery-card__action {
    display: none !important;
  }

  body[data-page="pages"] .pages-object__actions > * {
    display: none !important;
  }

  body[data-page="pages"] .pages-gallery-tile .pages-gallery-tile__action-menu {
    display: grid !important;
    grid-auto-rows: minmax(38px, auto) !important;
    width: 132px !important;
    height: auto !important;
    max-height: none !important;
    padding: 6px !important;
    border: 1px solid color-mix(in srgb, var(--paper-border-soft) 72%, transparent) !important;
    border-radius: 12px !important;
    background: color-mix(in srgb, var(--main-card-surface) 93%, transparent) !important;
    box-shadow:
      0 14px 28px rgba(56, 44, 35, 0.13),
      0 2px 8px rgba(56, 44, 35, 0.07) !important;
    overflow: visible !important;
  }

  body[data-page="pages"] .pages-gallery-tile .pages-gallery-tile__action-menu .pages-gallery-tile__action-menu-item {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr) !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 9px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 38px !important;
    padding: 0 9px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--color-text) !important;
    font-family: var(--font-ui) !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    line-height: 1 !important;
    text-align: left !important;
    opacity: 1 !important;
    transform: none !important;
  }

  body[data-page="pages"] .pages-gallery-tile .pages-gallery-tile__action-menu .pages-gallery-tile__action-menu-item--delete,
  body[data-page="pages"] .pages-gallery-tile .pages-gallery-tile__action-menu .pages-gallery-tile__action-menu-item--delete.is-confirm {
    color: color-mix(in srgb, #d93f3f 86%, var(--color-text)) !important;
  }

  body[data-page="pages"] .pages-gallery-tile .pages-gallery-tile__action-menu .pages-gallery-tile__action-menu-item--delete.is-confirm {
    background: color-mix(in srgb, #d93f3f 10%, transparent) !important;
  }
}

@media (max-width: 760px) {
  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card {
    display: block;
    width: 100%;
    min-height: 0;
    height: auto;
    padding: 0;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__frame.palette-card__frame {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-height: 0;
    height: auto;
    padding: 14px 14px 0;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__top.palette-card__top {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__content.palette-card__body {
    position: static;
    top: auto;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__meta.palette-card__meta {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    padding: 0;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__footer.palette-card__footer {
    display: grid;
    grid-template-rows: auto 36px;
    gap: 8px;
    width: calc(100% + 28px);
    height: auto;
    min-height: 0;
    margin: 0 -14px;
    padding: 0;
    overflow: visible;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__count.palette-card__count {
    min-height: 0;
    padding: 0 14px;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__preview-swatches.palette-card__swatches {
    display: flex;
    width: 100%;
    min-height: 36px;
    height: 36px;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__swatch-segment.palette-card__swatch-segment {
    min-height: 36px;
    height: 36px;
  }

  body[data-page="pages"] .pages-workspace.split-workspace > .pages-object-tracker {
    width: calc(100% + 28px);
    max-width: calc(100% + 28px);
    margin-inline: -14px;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density] .pages-object-list > .gallery-card.pages-object.palette-card.cc-card {
    max-height: none;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density] .pages-object-list > .gallery-card.pages-object.palette-card.cc-card .pages-object__frame.palette-card__frame {
    padding: 14px 14px 0;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density] .pages-object-list > .gallery-card.pages-object.palette-card.cc-card .pages-object__footer.palette-card__footer {
    width: calc(100% + 28px);
    padding: 0;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density] .pages-object-list > .gallery-card.pages-object.palette-card.cc-card .pages-object__top.palette-card__top {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    padding-left: 0;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density] .pages-object-list > .gallery-card.pages-object.palette-card.cc-card .pages-object__meta.palette-card__meta {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    padding-left: 0;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density] .pages-object-list > .gallery-card.pages-object.palette-card.cc-card .pages-object__count.palette-card__count {
    min-height: 26px;
    height: 26px;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density] .pages-object-list > .gallery-card.pages-object.palette-card.cc-card .pages-object__summary {
    min-height: 0;
    height: auto;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density] .pages-object-list > .gallery-card.pages-object.palette-card.cc-card .pages-object__content.palette-card__body {
    margin: 0;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density] .pages-object-list > .gallery-card.pages-object.palette-card.cc-card .pages-object__divider.palette-card__divider {
    width: 100%;
    margin-left: 0;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density] .pages-object-list > .gallery-card.pages-object.palette-card.cc-card .pages-object__preview-swatches.palette-card__swatches {
    flex: 1 1 auto;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) {
    display: block;
    width: 100%;
    min-height: 0;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) > .palettes-gallery-panel {
    display: none;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) > .palette-editor {
    display: flex;
    flex-direction: column;
    gap: var(--supplies-mobile-gap);
    width: 100%;
    min-height: 0;
    padding: 0 0 calc(var(--supplies-mobile-footer-height) + 28px);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__top {
    display: contents;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__title-block {
    display: block;
    order: 1;
    margin: 0 0 clamp(4px, 1.6vw, 7px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__title-view {
    max-width: 100%;
    margin: 0;
    color: var(--color-text);
    font-size: clamp(2.12rem, 10.8vw, 2.62rem);
    letter-spacing: -0.028em;
    line-height: 0.92;
    text-wrap: pretty;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__description-block {
    display: block;
    order: 2;
    width: 100%;
    margin: 0 0 4px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__description-view {
    max-width: 28rem;
    min-height: 1.35em;
    margin: 0;
    color: rgba(47, 41, 53, 0.68);
    font-family: var(--font-copy);
    font-size: clamp(0.92rem, 3.65vw, 1.02rem);
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__description-view:empty::before {
    content: "A place to review, filter and refine this palette.";
    color: rgba(47, 41, 53, 0.58);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__header-actions {
    order: 3;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    width: 100%;
    margin: 0 0 clamp(5px, 1.8vw, 7px);
    padding: 0;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__medium-filter {
    min-width: 0;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__header-actions .cc-filter__button,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__close.modal-button--icon {
    min-width: 0 !important;
    min-height: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    border: 1px solid var(--paper-border-soft) !important;
    background: var(--cc-container-shell-surface) !important;
    color: var(--color-text) !important;
    box-shadow: none !important;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__medium-toggle {
    width: auto !important;
    min-width: 96px !important;
    max-width: 150px;
    padding: 0 12px !important;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__visibility-toggle,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__close.modal-button--icon {
    display: grid !important;
    place-items: center;
    flex: 0 0 40px;
    width: 40px !important;
    padding: 0 !important;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__close.modal-button--icon {
    margin-left: auto;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__medium-menu {
    top: calc(100% + 8px);
    right: auto;
    left: 0;
    width: min(300px, calc(100vw - 36px)) !important;
    max-height: min(54svh, 420px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__stack-shell {
    order: 4;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-height: 320px;
    max-height: none;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack {
    height: auto;
    min-height: 320px;
    max-height: none;
    border-radius: 12px;
    overflow: hidden;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__item {
    flex: 0 0 54px;
    min-height: 54px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__overlay {
    opacity: 1;
    pointer-events: auto;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__info {
    left: 12px;
    max-width: 58%;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__actions {
    right: 8px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    height: calc(var(--supplies-mobile-footer-height) + env(safe-area-inset-bottom));
    min-height: calc(var(--supplies-mobile-footer-height) + env(safe-area-inset-bottom));
    margin: 0;
    padding: 10px var(--supplies-mobile-x) calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--paper-border-soft);
    background: var(--cc-container-shell-surface);
    border-radius: 0;
    transform: none;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__action-helper-wrap {
    min-width: 0;
    flex: 1 1 0;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer-actions {
    display: flex;
    flex: 0 0 auto;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer .gallery-footer-tray__button {
    width: 100%;
    min-height: 44px;
    border-radius: 10px;
  }
}

@media (max-width: 760px) {
  body[data-page="pages"] .pages-object-tracker > .palette-editor__footer > [data-pages-add-object] {
    display: none !important;
  }

  body[data-page="pages"] .pages-gallery-tile {
    height: 148px !important;
    min-height: 148px !important;
    max-height: 148px !important;
  }

  body[data-page="pages"] .pages-gallery-tile__button {
    grid-template-columns: 100px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    height: 100%;
    min-height: 0;
    padding: 14px;
  }

  body[data-page="pages"] .pages-gallery-tile__frame {
    width: 100px;
    height: 100px;
    aspect-ratio: 1;
    min-height: 0;
    align-self: center;
  }

  body[data-page="pages"] .pages-gallery-tile__content {
    align-items: flex-start;
    align-self: start;
    height: auto;
    padding: 12px 40px 0 0;
  }

  body[data-page="pages"] .pages-gallery-tile__meta {
    -webkit-line-clamp: 2;
  }

  body[data-page="pages"] .pages-gallery-tile__mobile-title {
    margin-top: 0;
    font-size: clamp(1.14rem, 4.55vw, 1.32rem);
    line-height: 1.06;
    -webkit-line-clamp: 2;
  }

  body[data-page="pages"] .pages-gallery-tile__source {
    margin-top: 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }

  body[data-page="pages"] .pages-gallery-tile__divider {
    display: none;
  }

  body[data-page="pages"] .pages-gallery-tile__footer {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    min-height: 24px;
    padding: 0 40px 8px 0;
  }

  body[data-page="pages"] .pages-gallery-tile__object-count strong {
    font-size: clamp(1rem, 4.15vw, 1.14rem);
  }

  body[data-page="pages"] .pages-gallery-tile__object-count span {
    font-size: clamp(0.52rem, 2.1vw, 0.58rem);
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card {
    min-height: 0;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card .pages-object__frame.palette-card__frame {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "top top"
      "divider divider"
      "count meta"
      "strip strip";
    gap: 7px 10px;
    padding: 13px 14px 0;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card .pages-object__top.palette-card__top {
    grid-area: top;
    min-height: 0;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card .pages-object__content.palette-card__body {
    padding-right: 30px;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card .pages-object__name {
    font-size: clamp(0.92rem, 3.65vw, 1.04rem);
    line-height: 1.08;
    -webkit-line-clamp: 2;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card .pages-object__divider.palette-card__divider {
    grid-area: divider;
    width: 100%;
    margin: 0;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card .pages-object__meta.palette-card__meta {
    grid-area: meta;
    align-self: center;
    min-height: 24px;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card .pages-object__tag-list {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card .pages-object__footer.palette-card__footer {
    display: contents;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card .pages-object__count.palette-card__count {
    grid-area: count;
    align-self: center;
    height: auto;
    min-height: 24px;
    padding: 0;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card .pages-object__count strong {
    font-size: clamp(1.18rem, 5.25vw, 1.42rem);
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card .pages-object__swatch-field.palette-card__swatch-field {
    grid-area: strip;
    width: calc(100% + 28px);
    margin: 0 -14px;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card .pages-object__preview-swatches.palette-card__swatches {
    width: 100%;
    min-width: 100%;
    height: 34px;
    min-height: 34px;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card .pages-object__swatch-segment.palette-card__swatch-segment {
    height: 34px;
    min-height: 34px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__item {
    flex-basis: 64px;
    min-height: 64px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__info {
    display: none;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__hex-cell {
    position: absolute;
    inset: 0 auto 0 14px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__hex {
    font-family: var(--font-body) !important;
    font-size: clamp(1rem, 4vw, 1.14rem) !important;
    font-weight: 820 !important;
    letter-spacing: -0.03em !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card {
    height: 148px !important;
    min-height: 148px !important;
    max-height: 148px !important;
    overflow: visible !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card,
  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:hover,
  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:focus-visible,
  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:focus-within,
  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:active,
  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card.is-selected {
    background: var(--main-card-surface) !important;
    box-shadow: var(--shadow-sm) !important;
    transform: none !important;
    filter: none !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card {
    border-color: color-mix(in srgb, var(--gallery-card-accent, var(--paper-border)) 34%, var(--paper-border-soft)) !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:hover,
  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:focus-visible,
  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:focus-within {
    border-color: color-mix(in srgb, var(--gallery-card-accent, var(--paper-border)) 70%, var(--paper-border-strong)) !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card.is-selected {
    border-color: color-mix(in srgb, var(--gallery-card-accent, var(--paper-border)) 68%, var(--paper-border-strong)) !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:has(.gallery-card__actions.is-open),
  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:focus-within {
    z-index: 40 !important;
    overflow: visible !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card > .gallery-card__actions.is-open {
    z-index: 50 !important;
    overflow: visible !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card > .gallery-card__actions.is-open .pages-gallery-tile__action-menu {
    display: grid !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__button {
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card {
    height: 142px !important;
    min-height: 142px !important;
    max-height: 142px !important;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__frame.palette-card__frame {
    position: relative;
    display: block;
    height: 100%;
    min-height: 0;
    padding: 13px 14px 0;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__top.palette-card__top {
    min-height: 0;
    max-height: none;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__summary {
    min-height: 0;
    height: auto;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__content.palette-card__body {
    position: static;
    padding-right: 30px;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__divider.palette-card__divider {
    position: absolute;
    top: auto !important;
    left: 14px;
    right: 14px;
    bottom: 70px;
    width: auto;
    margin: 0;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__meta.palette-card__meta {
    position: absolute;
    top: auto !important;
    right: 14px;
    bottom: 44px;
    left: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 24px;
    max-height: 24px;
    overflow: hidden;
    transform: none !important;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__footer.palette-card__footer {
    display: block;
    margin: 0;
    padding: 0;
    width: auto;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__count.palette-card__count {
    position: absolute;
    top: auto !important;
    left: 14px;
    bottom: 44px;
    height: 24px;
    min-height: 24px;
    padding: 0;
    transform: none !important;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__swatch-field.palette-card__swatch-field {
    position: absolute;
    top: auto !important;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__preview-swatches.palette-card__swatches {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 34px;
    min-height: 34px;
  }

  body[data-page="pages"] .pages-workspace.split-workspace > .pages-object-tracker {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__name {
    max-width: calc(100% - 34px);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__count.palette-card__count {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: baseline;
    gap: 8px;
    width: auto;
    white-space: nowrap;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.palette-card.cc-card .pages-object__count span {
    display: inline;
    white-space: nowrap;
  }

  body[data-page="pages"] .pages-object-tracker__mobile-stats .cc-stat {
    display: grid;
    justify-items: center;
    gap: 5px;
    text-align: center;
  }

  body[data-page="pages"] .pages-object-tracker__mobile-stats .cc-stat__label {
    display: block;
    margin-top: 0;
    text-transform: uppercase;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__actions {
    display: none;
  }

  body[data-page="pages"] .pages-object-tracker__title-view {
    font-family: "Fraunces", Georgia, serif !important;
    font-weight: 760;
    letter-spacing: -0.028em;
  }
}

@media screen and (max-width: 760px) {
  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    align-content: start;
    align-items: stretch;
    justify-content: stretch;
    gap: var(--supplies-mobile-gap, clamp(10px, 3vw, 14px));
    width: 100%;
    max-width: 100%;
    padding-bottom: calc(var(--supplies-mobile-footer-height) + env(safe-area-inset-bottom) + var(--supplies-mobile-gap, clamp(10px, 3vw, 14px)));
    scroll-padding-bottom: calc(var(--supplies-mobile-footer-height) + env(safe-area-inset-bottom) + var(--supplies-mobile-gap, clamp(10px, 3vw, 14px)));
  }

  body[data-page="pages"] :is(.cc-gallery-grid[data-pages-gallery], .pages-object-list) {
    padding-bottom: calc(var(--supplies-mobile-footer-height) + env(safe-area-inset-bottom) + var(--supplies-mobile-gap, 10px));
    scroll-padding-bottom: calc(var(--supplies-mobile-footer-height) + env(safe-area-inset-bottom) + var(--supplies-mobile-gap, 10px));
  }

  body:is([data-page="pages"], [data-page="palettes"]) {
    --cc-mobile-gallery-scroll-clearance: calc(
      var(--supplies-mobile-footer-height) + env(safe-area-inset-bottom) + var(--supplies-mobile-gap, 10px)
    );
  }

  body[data-page="palettes"] .cc-mobile-gallery {
    padding-bottom: 0;
  }

  body[data-page="pages"] :is(.cc-gallery-grid[data-pages-gallery], .pages-object-list) {
    padding-bottom: 0;
  }

  body[data-page="palettes"] .cc-mobile-gallery::after,
  body[data-page="pages"] :is(.cc-gallery-grid[data-pages-gallery], .pages-object-list)::after {
    content: "";
    display: block;
    grid-column: 1 / -1;
    flex: 0 0 var(--cc-mobile-gallery-scroll-clearance);
    width: 100%;
    height: var(--cc-mobile-gallery-scroll-clearance);
    min-height: var(--cc-mobile-gallery-scroll-clearance);
    pointer-events: none;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery > .cc-mobile-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: clamp(124px, 32vw, 140px);
    min-height: clamp(124px, 32vw, 140px);
    max-height: none;
    padding: 0;
    border-radius: 12px;
    background: var(--main-card-surface);
    box-shadow: var(--shadow-sm);
    transform: none;
    filter: none;
  }

  body[data-page="supplies"] .cc-mobile-gallery > .cc-mobile-card {
    height: auto;
    min-height: clamp(132px, 34vw, 146px);
    border: 1px solid color-mix(in srgb, var(--supply-accent, var(--paper-border)) 34%, var(--paper-border-soft));
    overflow: visible;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card--palette {
    height: clamp(148px, 38vw, 164px);
    min-height: clamp(148px, 38vw, 164px);
    border: 1px solid color-mix(in srgb, var(--palette-accent, var(--paper-border)) 34%, var(--paper-border-soft));
    overflow: visible;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card--palette:has(.cc-mobile-card__actions.is-open) {
    z-index: 40;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__frame {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(88px, auto);
    grid-template-rows: minmax(42px, auto) auto minmax(28px, 1fr);
    grid-template-areas:
      "header header"
      "divider divider"
      "footer meta";
    align-items: center;
    align-content: start;
    column-gap: 10px;
    row-gap: 9px;
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
    padding: 18px;
    overflow: visible;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__frame {
    grid-template-rows: minmax(42px, auto) auto minmax(28px, 1fr) 30px;
    grid-template-areas:
      "header header"
      "divider divider"
      "footer meta"
      "strip strip";
    height: 100%;
    min-height: 0;
    padding: 18px;
    overflow: visible;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-card-logo,
  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-card-status,
  body[data-page="supplies"] .cc-mobile-gallery > .cc-mobile-card.cc-card .gallery-card__actions,
  body[data-page="supplies"] .cc-mobile-gallery > .cc-mobile-card.cc-card .supply-card__swatches {
    display: none;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__header {
    grid-area: header;
    display: block;
    min-width: 0;
    min-height: 0;
    max-height: none;
    align-self: end;
    text-align: left;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__heading {
    position: static;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-right: 48px;
    text-align: left;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__eyebrow {
    min-height: 0;
    max-width: 100%;
    color: var(--color-text-muted);
    font-size: clamp(0.56rem, 2.25vw, 0.64rem);
    font-weight: 780;
    letter-spacing: 0.075em;
    line-height: 1.05;
    text-align: left;
    text-transform: uppercase;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__eyebrow {
    display: block;
    min-height: 0;
    margin: 0;
  }

  body[data-page="supplies"] .cc-mobile-gallery > .cc-mobile-card.cc-card--supply .supply-card__eyebrow {
    display: block;
    min-height: 0;
    margin: 0;
    gap: 0;
  }

  body[data-page="supplies"] .cc-mobile-gallery > .cc-mobile-card.cc-card--supply .supply-card__brand {
    display: inline-flex;
    min-height: 0;
    margin: 0;
    color: var(--color-text-muted);
    font-size: clamp(0.56rem, 2.25vw, 0.64rem);
    font-weight: 780;
    letter-spacing: 0.075em;
    line-height: 1.05;
    text-transform: uppercase;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__title {
    display: block;
    width: 100%;
    margin: 6px 0 0;
    color: var(--color-text);
    font-size: clamp(0.92rem, 3.72vw, 1.06rem);
    font-weight: 720;
    letter-spacing: -0.035em;
    line-height: 1.08;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: clip;
    text-align: left;
    text-wrap: pretty;
  }

  body[data-page="supplies"] .cc-mobile-gallery > .cc-mobile-card.cc-card--supply .cc-mobile-card__title {
    margin-top: 14px;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__actions {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 12;
    display: block;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__actions {
    display: block;
    width: auto;
    height: auto;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__quick-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: color-mix(in srgb, var(--color-text) 78%, var(--color-text-muted));
    box-shadow: none;
    touch-action: manipulation;
    transition:
      background-color 160ms ease,
      transform 160ms ease;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__quick-action span {
    display: block;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__quick-action:active {
    transform: scale(0.96);
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__actions.is-open .palette-card__quick-action {
    background: color-mix(in srgb, var(--palette-accent, var(--paper-border)) 10%, transparent);
  }

	  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__action-menu {
	    position: absolute;
	    top: calc(100% + 7px);
	    right: 0;
	    z-index: 40;
	    display: grid;
	    width: var(--cc-action-menu-width, 132px);
    padding: 6px;
    border: 1px solid color-mix(in srgb, var(--paper-border-soft) 72%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--main-card-surface) 93%, transparent);
    box-shadow:
      0 14px 28px rgba(56, 44, 35, 0.13),
      0 2px 8px rgba(56, 44, 35, 0.07);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px) scale(0.98);
    transform-origin: top right;
    transition:
      opacity 160ms ease,
      transform 160ms ease;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__actions.is-open .palette-card__action-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__action-menu .palette-card__action-menu-item.palette-card__action-menu-item {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr) !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 9px !important;
    min-height: 38px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 0 9px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: var(--color-text) !important;
    box-shadow: none !important;
    font-family: var(--font-ui) !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    text-align: left !important;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__action-menu .palette-card__action-menu-item span:not(.palette-card__action-menu-icon) {
    min-width: 0;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__action-menu .palette-card__action-menu-item:active {
    background: color-mix(in srgb, var(--palette-accent, var(--paper-border)) 14%, transparent) !important;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__action-menu .palette-card__action-menu-item.palette-card__action-menu-item--delete {
    color: color-mix(in srgb, #d93f3f 86%, var(--color-text)) !important;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__action-menu .palette-card__action-menu-item.palette-card__action-menu-item--delete.is-confirm {
    background: color-mix(in srgb, #d93f3f 10%, transparent) !important;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__action-menu .palette-card__action-menu-item:hover,
  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__action-menu .palette-card__action-menu-item:focus-visible {
    transform: none !important;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__action-menu-icon {
    display: block;
    width: 17px;
    height: 17px;
    background: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__action-menu-icon--view {
    -webkit-mask-image: url("./assets/icons/actions/view.svg");
    mask-image: url("./assets/icons/actions/view.svg");
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__action-menu-icon--edit {
    -webkit-mask-image: url("./assets/icons/mediums/colored-pencil.svg");
    mask-image: url("./assets/icons/mediums/colored-pencil.svg");
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__action-menu-icon--delete {
    -webkit-mask-image: url("./assets/icons/actions/delete.svg");
    mask-image: url("./assets/icons/actions/delete.svg");
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__actions::before {
    content: none;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__actions > .palette-card__quick-action {
    display: inline-flex;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__divider {
    grid-area: divider;
    display: block;
    width: 100%;
    margin: 0;
    align-self: center;
    border-top: 1px dashed color-mix(in srgb, var(--gallery-card-accent, var(--supply-accent, var(--palette-accent, var(--paper-border)))) 16%, var(--paper-border-soft));
  }

  body[data-page="supplies"] .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__divider {
    transform: translateY(5px);
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__divider {
    transform: translateY(5px);
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__supporting,
  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__footer {
    grid-area: footer;
    display: block;
    min-width: 0;
    align-self: end;
    margin: 0;
    padding: 0;
    border-top: 0;
  }

  body[data-page="supplies"] .cc-mobile-gallery > .cc-mobile-card.cc-card--supply .cc-mobile-card__footer {
    display: contents;
  }

  body[data-page="supplies"] .cc-mobile-gallery > .cc-mobile-card.cc-card--supply .cc-mobile-card__count,
  body[data-page="supplies"] .cc-mobile-gallery > .cc-mobile-card.cc-card--supply .cc-mobile-card__meta {
    align-self: end;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__footer {
    display: contents;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__count,
  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__meta {
    align-self: end;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__count {
    justify-self: start;
    width: auto;
    max-width: max-content;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    gap: 8px !important;
    min-height: 0 !important;
    padding: 0 !important;
    border-right: 0 !important;
    transform: none !important;
    white-space: nowrap !important;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__count strong {
    font-size: clamp(1.18rem, 5vw, 1.38rem) !important;
    font-weight: 820 !important;
    letter-spacing: -0.04em !important;
    line-height: 1 !important;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__count span {
    display: inline !important;
    margin-top: 0 !important;
    color: var(--color-text-muted) !important;
    font-size: clamp(0.55rem, 2.25vw, 0.62rem) !important;
    font-weight: 760 !important;
    letter-spacing: 0.058em !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__meta {
    grid-area: meta;
    position: static;
    display: flex;
    align-self: end;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    width: auto;
    max-width: min(54vw, 190px);
    min-width: 0;
    min-height: 0;
    max-height: 24px;
    margin: 0;
    padding: 0;
    opacity: 1;
    transform: none;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__meta {
    max-height: 28px;
    overflow: visible;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__tags {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: visible;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__tag {
    box-sizing: border-box;
    height: 24px;
    min-height: 24px;
    min-width: 0;
    max-width: 8.5ch;
    line-height: 1;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__tag--source,
  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__tag--overflow {
    flex: 0 0 auto;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-card-pill {
    min-height: 24px !important;
    height: 24px !important;
    max-width: 100% !important;
    padding: 0 8px !important;
    border-radius: 7px !important;
    font-size: clamp(0.62rem, 2.6vw, 0.7rem) !important;
    font-weight: 560 !important;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-card-pill--icon {
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    padding: 0 !important;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .palette-card__solid-divider {
    display: none;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__swatches {
    grid-area: strip;
    position: static;
    box-sizing: border-box;
    display: block;
    justify-self: stretch;
    align-self: end;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    transform: none;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__swatch-strip {
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 20px;
    min-height: 20px;
    margin: 0;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--palette-accent, var(--paper-border)) 62%, transparent);
    border-radius: 10px;
    overflow: hidden;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__swatch-strip .palette-card__swatch-segment {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: 20px;
    min-height: 20px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette:not(.is-expanded) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 150px !important;
    min-height: 150px !important;
    max-height: 150px !important;
    padding: 0 !important;
    border-radius: 12px;
    background: var(--main-card-surface) !important;
    border: 1px solid color-mix(in srgb, var(--palette-accent, var(--paper-border)) 34%, var(--paper-border-soft)) !important;
    box-shadow: var(--shadow-sm) !important;
    transform: none !important;
    filter: none !important;
    overflow: visible !important;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette:has(.cc-mobile-card__actions.is-open) {
    z-index: 40;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette:not(.is-expanded) .cc-mobile-card__frame {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(88px, auto) !important;
    grid-template-rows: minmax(42px, auto) auto minmax(28px, auto) 30px !important;
    grid-template-areas:
      "header header"
      "divider divider"
      "footer meta"
      "strip strip" !important;
    align-items: center !important;
    align-content: start !important;
    column-gap: 10px !important;
    row-gap: 9px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: calc(100% - 2px) !important;
    min-height: 0 !important;
    padding: 16px 18px 10px !important;
    overflow: visible !important;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__header {
    grid-area: header;
    display: flex;
    align-items: flex-start;
    gap: 0;
    min-width: 0;
    min-height: 0;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .pages-object__summary {
    display: block !important;
    width: 100%;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: left;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-card-logo,
  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-card-status,
  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .palette-card__solid-divider,
  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .pages-object__description {
    display: none !important;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__heading {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 48px 0 0 !important;
    text-align: left;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__eyebrow {
    display: block;
    min-height: 0;
    max-width: 100%;
    color: var(--color-text-muted);
    font-size: clamp(0.56rem, 2.25vw, 0.64rem);
    font-weight: 780;
    letter-spacing: 0.075em;
    line-height: 1.05;
    text-align: left;
    text-transform: uppercase;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__title {
    display: -webkit-box !important;
    width: 100%;
    max-width: 100% !important;
    margin: 6px 0 0 !important;
    overflow: hidden !important;
    color: var(--color-text);
    font-size: clamp(0.92rem, 3.72vw, 1.06rem) !important;
    font-weight: 720;
    letter-spacing: -0.035em;
    line-height: 1.08;
    text-align: left;
    text-overflow: clip;
    text-wrap: pretty;
    white-space: normal !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__actions {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 12 !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    padding: 0 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__actions::before {
    content: none !important;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__actions > * {
    display: none !important;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__actions > .palette-card__quick-action {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: color-mix(in srgb, var(--color-text) 78%, var(--color-text-muted));
    box-shadow: none;
    touch-action: manipulation;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .palette-card__quick-action span {
    display: block;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__actions.is-open .palette-card__quick-action {
    background: color-mix(in srgb, var(--palette-accent, var(--paper-border)) 10%, transparent);
  }

	  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__actions > .palette-card__action-menu {
	    position: absolute;
	    top: calc(100% + 7px);
	    right: 0;
	    z-index: 40;
	    display: grid !important;
	    width: var(--cc-action-menu-width, 158px);
    padding: 6px;
    border: 1px solid color-mix(in srgb, var(--paper-border-soft) 72%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--main-card-surface) 93%, transparent);
    box-shadow:
      0 14px 28px rgba(56, 44, 35, 0.13),
      0 2px 8px rgba(56, 44, 35, 0.07);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px) scale(0.98);
    transform-origin: top right;
    transition:
      opacity 160ms ease,
      transform 160ms ease;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__actions.is-open .palette-card__action-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .palette-card__action-menu .palette-card__action-menu-item.palette-card__action-menu-item {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr) !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 9px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    height: auto !important;
    padding: 0 9px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: var(--color-text) !important;
    box-shadow: none !important;
    font-family: var(--font-ui) !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    text-align: left !important;
    white-space: nowrap !important;
    transform: none !important;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .palette-card__action-menu .palette-card__action-menu-item span:not(.palette-card__action-menu-icon) {
    min-width: 0;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .palette-card__action-menu .palette-card__action-menu-item:active {
    background: color-mix(in srgb, var(--palette-accent, var(--paper-border)) 14%, transparent) !important;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .palette-card__action-menu .palette-card__action-menu-item.palette-card__action-menu-item--delete {
    color: color-mix(in srgb, #d93f3f 86%, var(--color-text)) !important;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .palette-card__action-menu .palette-card__action-menu-item.palette-card__action-menu-item--delete.is-confirm {
    background: color-mix(in srgb, #d93f3f 10%, transparent) !important;
    color: color-mix(in srgb, #d93f3f 86%, var(--color-text)) !important;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .palette-card__action-menu .palette-card__action-menu-item:hover,
  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .palette-card__action-menu .palette-card__action-menu-item:focus-visible {
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .palette-card__action-menu-icon {
    display: block;
    width: 17px;
    height: 17px;
    background: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .palette-card__action-menu-icon--view {
    -webkit-mask-image: url("./assets/icons/ui/colour-palette.svg");
    mask-image: url("./assets/icons/ui/colour-palette.svg");
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .palette-card__action-menu-icon--edit {
    -webkit-mask-image: url("./assets/icons/mediums/colored-pencil.svg");
    mask-image: url("./assets/icons/mediums/colored-pencil.svg");
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .palette-card__action-menu-icon--delete {
    -webkit-mask-image: url("./assets/icons/actions/delete.svg");
    mask-image: url("./assets/icons/actions/delete.svg");
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__divider {
    grid-area: divider;
    display: block;
    width: 100%;
    margin: 0 !important;
    align-self: center;
    border-top: 1px dashed color-mix(in srgb, var(--palette-accent, var(--paper-border)) 16%, var(--paper-border-soft));
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__footer {
    display: contents !important;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__count,
  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__meta {
    align-self: start;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__count {
    grid-area: footer;
    justify-self: start;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: baseline;
    gap: 8px;
    width: auto;
    max-width: max-content;
    min-height: 0;
    height: auto;
    padding: 0 !important;
    border: 0;
    transform: none !important;
    white-space: nowrap;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__count strong {
    font-size: clamp(1.18rem, 5vw, 1.38rem) !important;
    font-weight: 820;
    letter-spacing: -0.04em;
    line-height: 1;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__count span {
    display: inline;
    margin-top: 0;
    color: var(--color-text-muted);
    font-size: clamp(0.55rem, 2.25vw, 0.62rem);
    font-weight: 760;
    letter-spacing: 0.058em;
    line-height: 1;
    text-transform: uppercase;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__meta {
    grid-area: meta;
    position: static !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    width: auto;
    max-width: min(54vw, 190px);
    min-width: 0;
    min-height: 0;
    max-height: 28px;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible;
    opacity: 1;
    transform: none !important;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__tags {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: visible;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .palette-card__tag {
    box-sizing: border-box;
    height: 24px;
    min-height: 24px;
    min-width: 0;
    max-width: min(100%, 14rem);
    line-height: 1;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .palette-card__tag--overflow {
    flex: 0 0 auto;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-card-pill {
    min-height: 22px;
    height: 22px;
    max-width: 100%;
    padding: 0 8px;
    border-radius: 7px;
    font-size: clamp(0.62rem, 2.6vw, 0.7rem);
    font-weight: 560;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__swatches {
    grid-area: strip;
    position: static !important;
    box-sizing: border-box;
    display: block;
    justify-self: stretch;
    align-self: end;
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    transform: translateY(-4px);
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__swatch-strip {
    box-sizing: border-box;
    display: flex !important;
    align-items: stretch;
    gap: 0;
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    height: 20px !important;
    min-height: 20px !important;
    margin: 0;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--palette-accent, var(--paper-border)) 62%, transparent);
    border-radius: 10px !important;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__swatch-strip .palette-card__swatch-segment {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: 20px !important;
    min-height: 20px !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette:not(.is-expanded) {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 150px !important;
    min-height: 150px !important;
    max-height: none !important;
    padding: 0 !important;
    border: 1px solid color-mix(in srgb, var(--palette-accent, var(--paper-border)) 34%, var(--paper-border-soft)) !important;
    border-radius: 12px !important;
    background: var(--main-card-surface) !important;
    box-shadow: var(--shadow-sm) !important;
    overflow: visible !important;
    transform: none !important;
    filter: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette::before,
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette::after {
    content: none !important;
    display: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette:not(.is-expanded) .pages-object__frame.palette-card__frame.cc-mobile-card__frame {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(88px, auto) !important;
    grid-template-rows: 42px 1px 28px 30px !important;
    grid-template-areas:
      "header header"
      "divider divider"
      "footer meta"
      "strip strip" !important;
    align-items: center !important;
    align-content: start !important;
    column-gap: 10px !important;
    row-gap: 9px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: calc(100% - 2px) !important;
    min-height: 0 !important;
    padding: 16px 18px 10px !important;
    border-radius: 12px !important;
    background: #faf6f0 !important;
    overflow: visible !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette .pages-object__top.palette-card__top.cc-mobile-card__header {
    grid-area: header !important;
    display: block !important;
    align-self: end !important;
    text-align: left !important;
    gap: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette .pages-object__summary {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette .pages-object__content.palette-card__body.cc-mobile-card__heading {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 48px 0 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette .pages-object__eyebrow.palette-card__eyebrow {
    display: block !important;
    min-height: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette .pages-object__eyebrow .cc-mobile-card__eyebrow {
    display: block !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette .pages-object__name.cc-mobile-card__title {
    display: -webkit-box !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 10px 0 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    color: var(--color-text) !important;
    font-size: clamp(0.92rem, 3.72vw, 1.06rem) !important;
    font-weight: 720 !important;
    letter-spacing: -0.035em !important;
    line-height: 1.08 !important;
    text-overflow: clip !important;
    white-space: normal !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette .pages-object__divider.palette-card__divider.cc-mobile-card__divider {
    position: static !important;
    grid-area: divider !important;
    display: block !important;
    width: 100% !important;
    height: 1px !important;
    min-height: 0 !important;
    margin: 0 !important;
    border-top: 1px dashed color-mix(in srgb, var(--palette-accent, var(--paper-border)) 16%, var(--paper-border-soft)) !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette .pages-object__meta.palette-card__meta.cc-mobile-card__meta {
    position: static !important;
    grid-area: meta !important;
    display: flex !important;
    align-self: start !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: auto !important;
    max-width: min(54vw, 190px) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: 28px !important;
    height: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette .pages-object__footer.palette-card__footer.cc-mobile-card__footer {
    display: contents !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette .pages-object__count.palette-card__count.cc-mobile-card__count {
    position: static !important;
    grid-area: footer !important;
    justify-self: start !important;
    align-self: start !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: baseline !important;
    gap: 8px !important;
    width: auto !important;
    max-width: max-content !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    white-space: nowrap !important;
    transform: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette .pages-object__swatch-field.palette-card__swatch-field.cc-mobile-card__swatches {
    position: static !important;
    grid-area: strip !important;
    display: block !important;
    justify-self: stretch !important;
    align-self: end !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 30px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: translateY(-4px) !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette .pages-object__preview-swatches.palette-card__swatches.cc-mobile-card__swatch-strip {
    display: flex !important;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 30px !important;
    min-height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--palette-accent, var(--paper-border)) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette .pages-object__swatch-segment.palette-card__swatch-segment {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    height: 30px !important;
    min-height: 30px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  body[data-page="pages"] .pages-object-list {
    gap: var(--supplies-mobile-gap, clamp(10px, 3vw, 14px)) !important;
    grid-auto-rows: auto !important;
    align-items: stretch !important;
    overflow: visible !important;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density] .cc-mobile-gallery {
    grid-auto-rows: auto;
    gap: var(--supplies-mobile-gap, clamp(10px, 3vw, 14px));
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density] .cc-mobile-gallery > .cc-mobile-card.cc-card {
    height: clamp(124px, 32vw, 140px);
    min-height: clamp(124px, 32vw, 140px);
    max-height: none;
  }

  body[data-page="palettes"] .gallery-page[data-gallery-density] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette {
    height: 150px;
    min-height: 150px;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density] .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__frame {
    padding: 18px;
    min-height: 0;
  }

  body[data-page="palettes"] .gallery-page[data-gallery-density] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__frame {
    grid-template-rows: minmax(42px, auto) auto minmax(28px, auto) 30px;
    height: calc(100% - 2px);
    min-height: 0;
    padding: 16px 18px 10px;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density] .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__header {
    min-height: 0;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density] .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__heading {
    position: static;
    inset: auto;
    width: 100%;
    max-width: 100%;
    padding-right: 48px;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density] .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__title {
    margin-top: 6px;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density] .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__meta {
    flex: initial;
    min-height: 0;
    max-height: 24px;
    padding-left: 0;
  }

  body:is([data-page="supplies"], [data-page="palettes"]) .gallery-page[data-gallery-density] .cc-mobile-gallery > .cc-mobile-card.cc-card .cc-mobile-card__footer {
    padding-top: 0;
  }
}

@media (max-width: 760px) {
  body[data-page] .cc-page-header__copy {
    order: 1;
  }

  body[data-page] .cc-gallery-actions-row {
    position: relative;
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 12px;
    order: 2;
    width: 100%;
    margin: 0 0 clamp(5px, 1.8vw, 7px);
  }

  body[data-page] .cc-gallery-actions-row .supplies-filterbar {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    min-width: 0;
    width: auto;
  }

  body[data-page] .cc-gallery-actions-row .cc-mobile-control-button {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    max-width: none;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid var(--paper-border-soft);
    border-radius: 10px;
    background: var(--cc-container-shell-surface);
    color: var(--color-text);
    line-height: 1;
    box-shadow: none;
  }

  body[data-page] .cc-gallery-actions-row .cc-mobile-control-button.has-selection,
  body[data-page] .cc-gallery-actions-row .cc-mobile-control-button.is-active {
    border-color: color-mix(in srgb, var(--color-peach-fuzz) 82%, var(--paper-border));
    background: color-mix(in srgb, var(--color-peach-fuzz) 46%, var(--main-card-surface));
    box-shadow: none !important;
  }

  body[data-page] .cc-gallery-actions-row .cc-mobile-control-button span {
    display: none;
    font-size: 0;
  }

  body[data-page] .cc-gallery-actions-row .cc-mobile-control-button::after {
    content: none;
  }

  body[data-page] .cc-gallery-actions-row .cc-mobile-control-button::before {
    content: "";
    display: block;
    position: absolute;
    left: calc(50% + 0.5px);
    top: calc(50% + 0.5px);
    width: 18px;
    height: 18px;
    background-color: currentColor;
    opacity: 0.76;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    transform: translate(-50%, -50%);
  }

  body[data-page] .cc-gallery-actions-row :is([data-owned-search-toggle], [data-pages-gallery-search-toggle], [data-palette-gallery-search-toggle], [data-pages-object-search-toggle])::before {
    width: 19px;
    height: 19px;
    -webkit-mask-image: url("./assets/icons/actions/search.svg");
    mask-image: url("./assets/icons/actions/search.svg");
    transform: translate(-50%, -50%) scale(0.98);
  }

  body[data-page] .cc-gallery-actions-row :is([data-owned-filter-trigger="medium"], [data-pages-gallery-filter-root], [data-palette-gallery-filter-root], [data-pages-object-filter-root])::before {
    -webkit-mask-image: url("./assets/icons/actions/filter-svgrepo-com.svg");
    mask-image: url("./assets/icons/actions/filter-svgrepo-com.svg");
  }

  body[data-page] .cc-gallery-actions-row [data-owned-filter-trigger="sort"]::before {
    width: 19px;
    height: 19px;
    -webkit-mask-image: url("./assets/icons/actions/sort.svg");
    mask-image: url("./assets/icons/actions/sort.svg");
    transform: translate(-50%, -50%) scale(0.94);
  }

  body[data-page] .cc-gallery-actions-row .cc-gallery-add-action {
    min-height: 44px;
    padding: 0 clamp(14px, 4vw, 20px);
  }

  body[data-page] .cc-mobile-search-strip {
    position: relative;
    order: 3;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 30px;
    align-items: center;
    gap: clamp(8px, 2.4vw, 12px);
    width: 100%;
    min-height: 44px;
    margin: 0 0 clamp(6px, 1.8vw, 8px);
    padding: 0 clamp(10px, 3vw, 14px);
    border: 0 !important;
    border-block: 0 !important;
    border-radius: 0;
    background:
      linear-gradient(
        180deg,
        color-mix(in srgb, var(--cc-container-shell-surface) 96%, white),
        color-mix(in srgb, var(--main-card-surface) 96%, white)
      );
    animation: suppliesOwnedSearchReveal 180ms ease-out both;
    box-shadow: none !important;
  }

  body[data-page] .cc-mobile-search-strip[hidden] {
    display: none;
  }

  body[data-page] .cc-mobile-search-strip .supplies-owned-search-strip__icon {
    display: block;
    width: 19px;
    height: 19px;
    background: color-mix(in srgb, var(--color-text) 78%, transparent);
    opacity: 1;
    -webkit-mask: url("./assets/icons/actions/search.svg") center / contain no-repeat;
    mask: url("./assets/icons/actions/search.svg") center / contain no-repeat;
  }

  body[data-page] .cc-mobile-search-strip .supplies-owned-search-strip__input {
    width: 100%;
    min-width: 0;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    color: var(--color-text);
    font-family: var(--font-copy);
    font-size: 16px;
    font-weight: 560;
    letter-spacing: 0;
    line-height: 42px;
    box-shadow: none !important;
    transition: none !important;
    -webkit-text-size-adjust: 100%;
  }

  body[data-page] .cc-mobile-search-strip .supplies-owned-search-strip__input:focus,
  body[data-page] .cc-mobile-search-strip .supplies-owned-search-strip__input:focus-visible,
  body[data-page] .cc-mobile-search-strip .supplies-owned-search-strip__input:active {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  body[data-page] .cc-mobile-search-strip .supplies-owned-search-strip__input::placeholder {
    color: color-mix(in srgb, var(--color-text) 44%, transparent);
    opacity: 1;
  }

  body[data-page] .cc-mobile-search-strip .supplies-owned-search-strip__clear {
    display: inline-grid;
    place-items: center;
    justify-self: end;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: color-mix(in srgb, var(--color-text) 58%, transparent);
    box-shadow: none !important;
    outline: 0;
  }

  body[data-page] .cc-mobile-search-strip .supplies-owned-search-strip__clear:is(:hover, :focus, :focus-visible, :active) {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
  }

  body[data-page] .cc-mobile-search-strip .supplies-owned-search-strip__clear span,
  body[data-page] .cc-mobile-search-strip .supplies-owned-search-strip__clear span::before,
  body[data-page] .cc-mobile-search-strip .supplies-owned-search-strip__clear span::after {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  body[data-page] .cc-mobile-search-strip .supplies-owned-search-strip__clear span {
    position: relative;
    transform: rotate(45deg);
  }

  body[data-page] .cc-mobile-search-strip .supplies-owned-search-strip__clear span::before,
  body[data-page] .cc-mobile-search-strip .supplies-owned-search-strip__clear span::after {
    content: "";
    position: absolute;
    left: 0;
  }

  body[data-page] .cc-mobile-search-strip .supplies-owned-search-strip__clear span::before {
    display: none;
  }

  body[data-page] .cc-mobile-search-strip .supplies-owned-search-strip__clear span::after {
    top: 0;
    transform: rotate(90deg);
  }
}

/* Final mobile palette workspace pass: keep desktop untouched and let the stack own the viewport. */
@media (max-width: 760px) {
  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) .site-shell,
  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) .cc-shell,
  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) .canvas-card,
  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) .cc-shell__surface {
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;
    overflow: hidden;
  }

  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) .canvas-card,
  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) .cc-shell__surface {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) .supplies-main {
    display: flex;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    padding:
      16px
      18px
      calc(var(--supplies-mobile-footer-height) + env(safe-area-inset-bottom) + 10px);
    background: var(--cc-container-shell-surface);
    overflow: hidden;
  }

  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) .palettes-shell,
  body[data-page="palettes"]:has(.palettes-workspace:not(.is-gallery-mode)) .palettes-workspace,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) > .palette-editor {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) > .palette-editor {
    flex-direction: column;
    gap: clamp(8px, 2.5vw, 11px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__top,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__title-block,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__description-block,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__header-actions {
    flex: 0 0 auto !important;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__title-block {
    margin: 0 !important;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__title-view {
    max-width: 11ch;
    color: rgba(28, 26, 28, 0.98);
    font-family: var(--font-display) !important;
    font-size: clamp(2.45rem, 13.2vw, 3.08rem);
    font-weight: 790;
    font-variation-settings: "SOFT" 80, "WONK" 0, "opsz" 72;
    letter-spacing: -0.028em;
    line-height: 0.9;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__description-block {
    margin: 0;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__description-view {
    max-width: 26rem;
    font-size: clamp(0.9rem, 3.55vw, 1rem);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__header-actions {
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 clamp(3px, 1.2vw, 5px);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__close.modal-button--icon {
    margin-left: 0 !important;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__medium-toggle {
    display: grid !important;
    place-items: center;
    flex: 0 0 44px;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__medium-toggle::before {
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__medium-label,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__medium-chevron {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__medium-menu {
    top: calc(100% + 8px) !important;
    right: -96px !important;
    left: auto !important;
    width: min(300px, calc(100vw - 36px)) !important;
    max-width: calc(100vw - 36px) !important;
    transform-origin: top right;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__visibility-toggle[aria-pressed="true"] {
    background: color-mix(in srgb, var(--color-peach-fuzz) 58%, white) !important;
    border-color: color-mix(in srgb, var(--color-peach-fuzz) 72%, var(--paper-border)) !important;
    color: var(--color-text) !important;
    box-shadow: none !important;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__visibility-toggle[aria-pressed="true"]::before {
    opacity: 0.9;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__stack-shell,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__item {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    container-type: size;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__overlay {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content max-content;
    align-items: center;
    gap: clamp(7px, 2.1vw, 10px);
    padding: clamp(10px, 4.2cqh, 16px) clamp(14px, 4.4vw, 18px);
    opacity: 1;
    pointer-events: auto;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__info,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__hex-cell,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__actions {
    position: static;
    inset: auto;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__info {
    display: flex !important;
    max-width: none;
    min-width: 0;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__copy {
    gap: clamp(2px, 1.2cqh, 5px);
    min-width: 0;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__meta {
    display: inline-flex !important;
    max-width: 100%;
    color: var(--palette-hover-ink-muted, var(--palette-hover-ink, #fff8f0)) !important;
    font-family: var(--font-body);
    font-size: clamp(0.55rem, min(9.5cqh, 2.4vw), 0.72rem) !important;
    font-weight: 760;
    letter-spacing: 0.09em;
    line-height: 1;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__identity {
    display: grid;
    gap: clamp(1px, 1cqh, 4px);
    min-width: 0;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__marker-code {
    display: block !important;
    max-width: 12ch;
    font-family: var(--font-title) !important;
    font-size: clamp(1.48rem, min(34cqh, 8.6vw), 2.25rem) !important;
    font-weight: 850 !important;
    letter-spacing: -0.035em !important;
    line-height: 0.95;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__marker-name {
    display: block !important;
    max-width: 16ch;
    font-family: var(--font-title) !important;
    font-size: clamp(0.72rem, min(14cqh, 3.6vw), 1.02rem) !important;
    font-weight: 820 !important;
    letter-spacing: -0.035em !important;
    line-height: 1.02;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__hex-cell {
    display: flex;
    justify-content: flex-end;
    min-width: 5.6rem;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__hex {
    font-family: var(--font-title) !important;
    font-size: clamp(0.94rem, min(19cqh, 4.6vw), 1.28rem) !important;
    font-weight: 850 !important;
    letter-spacing: -0.02em !important;
    white-space: nowrap;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__actions {
    display: grid !important;
    grid-auto-flow: column;
    justify-content: end;
    column-gap: clamp(2px, 1.1vw, 5px);
    min-width: max-content;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__copy-button,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__icon-button,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__reorder-handle {
    display: inline-flex !important;
    width: 24px;
    min-width: 24px;
    height: 24px;
    min-height: 24px;
    opacity: 0.94;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__copy-button-icons,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__copy-icon,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__copy-tick,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__delete-icon {
    width: 17px;
    height: 17px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__reorder-icon {
    width: 5px;
    height: 18px;
    background-size: 5px 7px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer .palette-editor__action-helper-wrap {
    min-width: 0;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer .palette-editor__action-helper-wrap--add {
    flex: 1 1 auto;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer-actions .palette-editor__action-helper-wrap {
    flex: 0 0 auto;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer .gallery-footer-tray__button {
    min-height: 44px;
    padding: 0 clamp(10px, 2.8vw, 14px);
    font-size: clamp(0.76rem, 3.15vw, 0.88rem);
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer [data-open-palette-modal] {
    width: 100%;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer [data-clone-palette],
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer [data-clear-palette] {
    width: auto;
    min-width: 66px;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-editor__footer [data-clone-palette] {
    min-width: 104px;
  }
}

@media (max-width: 760px) {
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__overlay {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack.palette-stack--show-all .palette-stack__overlay,
  body[data-page="palettes"] .palettes-workspace:not(.is-gallery-mode) .palette-stack__item:focus-within .palette-stack__overlay {
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body[data-page="palettes"] .palette-stack__item--drag-ghost {
    flex: none !important;
    min-height: 0 !important;
    contain: layout paint;
    container-type: size;
    overflow: hidden;
    border-radius: 12px !important;
    transform: none !important;
  }

  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__overlay {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content max-content;
    align-items: center;
    gap: clamp(7px, 2.1vw, 10px);
    padding: clamp(10px, 4.2cqh, 16px) clamp(14px, 4.4vw, 18px);
    opacity: 1 !important;
    pointer-events: none !important;
  }

  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__info,
  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__hex-cell,
  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__actions {
    position: static !important;
    inset: auto !important;
  }

  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__info {
    display: flex !important;
    max-width: none !important;
    min-width: 0;
  }

  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__copy {
    display: grid !important;
    gap: clamp(2px, 1.2cqh, 5px);
    min-width: 0;
  }

  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__identity {
    display: grid !important;
    gap: clamp(1px, 1cqh, 4px);
    min-width: 0;
  }

  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__meta {
    display: inline-flex !important;
    max-width: 100%;
    color: var(--palette-hover-ink-muted, var(--palette-hover-ink, #fff8f0)) !important;
    font-size: clamp(0.55rem, min(9.5cqh, 2.4vw), 0.72rem) !important;
    font-weight: 760;
    letter-spacing: 0.09em;
    line-height: 1;
  }

  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__marker-code {
    display: block !important;
    max-width: 12ch;
    font-family: var(--font-title) !important;
    font-size: clamp(1.48rem, min(34cqh, 8.6vw), 2.25rem) !important;
    font-weight: 850 !important;
    letter-spacing: -0.035em !important;
    line-height: 0.95;
  }

  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__marker-name {
    display: block !important;
    max-width: 16ch;
    font-family: var(--font-title) !important;
    font-size: clamp(0.72rem, min(14cqh, 3.6vw), 1.02rem) !important;
    font-weight: 820 !important;
    letter-spacing: -0.035em !important;
    line-height: 1.02;
  }

  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__hex-cell {
    display: flex !important;
    justify-content: flex-end;
    min-width: 5.6rem;
  }

  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__hex {
    font-family: var(--font-title) !important;
    font-size: clamp(0.94rem, min(19cqh, 4.6vw), 1.28rem) !important;
    font-weight: 850 !important;
    letter-spacing: -0.02em !important;
    white-space: nowrap;
  }

  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__actions {
    display: grid !important;
    grid-auto-flow: column;
    justify-content: end;
    column-gap: clamp(2px, 1.1vw, 5px);
    min-width: max-content;
  }

  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__copy-button,
  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__icon-button,
  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__reorder-handle {
    display: inline-flex !important;
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
    opacity: 0.94;
  }

  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__copy-button-icons,
  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__copy-icon,
  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__copy-tick,
  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__delete-icon {
    width: 17px !important;
    height: 17px !important;
  }

  body[data-page="palettes"] .palette-stack__item--drag-ghost .palette-stack__reorder-icon {
    width: 5px !important;
    height: 18px !important;
    background-size: 5px 7px !important;
  }
}

/* Mobile Add Page modal: mirror the Add Palette full-screen form rhythm. */
@media (max-width: 760px) {
  body[data-page="pages"] .pages-upload-modal {
    place-items: stretch;
    padding: 0;
    background: var(--cc-container-shell-surface);
  }

  body[data-page="pages"] .pages-upload-modal__dialog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
    gap: clamp(18px, 5vw, 26px);
    width: 100% !important;
    max-width: none !important;
    height: 100svh !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: clamp(30px, 8vw, 42px) clamp(18px, 5vw, 24px) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--cc-container-shell-surface) !important;
    box-shadow: none !important;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body[data-page="pages"] .pages-upload-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
  }

  body[data-page="pages"] .pages-upload-modal__head h2 {
    margin: 0;
    color: var(--color-text);
    font-family: var(--font-title) !important;
    font-size: clamp(2.15rem, 10vw, 3rem);
    font-weight: 820;
    letter-spacing: -0.035em;
    line-height: 0.98;
  }

  body[data-page="pages"] .pages-upload-modal .supplies-modal__close.modal-button--icon {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    border-radius: 12px;
    background: var(--main-card-surface);
  }

  body[data-page="pages"] .pages-upload-modal__workspace {
    display: grid;
    align-content: start;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    gap: 12px;
    width: min(100%, 540px);
    min-height: 0;
    margin: 0 auto;
    padding-top: clamp(2px, 1.5vw, 8px);
  }

  body[data-page="pages"] .pages-upload-modal__media,
  body[data-page="pages"] .pages-upload-modal__details,
  body[data-page="pages"] .pages-upload-modal__fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    min-height: 0;
  }

  body[data-page="pages"] .pages-upload-modal__image-topline {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    gap: 10px;
  }

  body[data-page="pages"] .pages-upload-modal__image-tabs {
    justify-self: start;
  }

  body[data-page="pages"] .pages-upload-modal__image-helper {
    margin: 0;
    color: rgba(47, 41, 53, 0.68);
    font-family: var(--font-copy);
    font-size: clamp(0.92rem, 3.65vw, 1.02rem);
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
  }

  body[data-page="pages"] .pages-upload-modal__dropzone {
    min-height: clamp(158px, 28svh, 220px) !important;
    border-radius: 14px !important;
  }

  body[data-page="pages"] .pages-upload-modal__dropzone-copy {
    gap: 10px;
    padding: 16px;
  }

  body[data-page="pages"] .pages-upload-modal__dropzone-copy strong {
    font-family: var(--font-title);
    font-size: clamp(0.92rem, 3.8vw, 1.05rem);
    font-weight: 760;
    letter-spacing: -0.035em;
  }

  body[data-page="pages"] .pages-upload-modal__input {
    height: 54px;
    min-height: 54px;
    padding-inline: 18px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 650;
  }

  body[data-page="pages"] .pages-upload-modal__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    justify-content: stretch;
    padding-top: clamp(12px, 3vw, 18px);
  }

  body[data-page="pages"] .pages-upload-modal__actions .modal-button {
    width: 100%;
    min-width: 0;
    min-height: 56px;
    border-radius: 12px;
  }
}

@media (max-width: 760px) and (max-height: 740px) {
  body[data-page="pages"] .pages-upload-modal__dialog {
    gap: 12px;
    padding: 22px clamp(16px, 5vw, 22px) calc(18px + env(safe-area-inset-bottom)) !important;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  body[data-page="pages"] .pages-upload-modal__head h2 {
    font-size: clamp(1.86rem, 9vw, 2.42rem);
  }

  body[data-page="pages"] .pages-upload-modal .supplies-modal__close.modal-button--icon {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }

  body[data-page="pages"] .pages-upload-modal__workspace,
  body[data-page="pages"] .pages-upload-modal__media,
  body[data-page="pages"] .pages-upload-modal__details,
  body[data-page="pages"] .pages-upload-modal__fields {
    gap: 9px;
  }

  body[data-page="pages"] .pages-upload-modal__image-topline {
    gap: 7px;
  }

  body[data-page="pages"] .pages-upload-modal__image-helper {
    font-size: 0.9rem;
    line-height: 1.25;
  }

  body[data-page="pages"] .pages-upload-modal__dropzone {
    min-height: clamp(108px, 20svh, 132px) !important;
  }

  body[data-page="pages"] .pages-upload-modal__dropzone-copy {
    gap: 7px;
    padding: 12px;
  }

  body[data-page="pages"] .pages-upload-modal__dropzone .supply-card__plus {
    width: 46px;
    height: 46px;
  }

  body[data-page="pages"] .pages-upload-modal__input {
    height: 50px;
    min-height: 50px;
  }

  body[data-page="pages"] .pages-upload-modal__actions {
    gap: 10px;
    padding-top: 6px;
  }

  body[data-page="pages"] .pages-upload-modal__actions .modal-button {
    min-height: 52px;
  }
}

/* Mobile page cards: match the desktop page-card anatomy. */
@media (max-width: 760px) {
  body[data-page="pages"] .gallery-page .cc-gallery-grid {
    gap: 13px !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card {
    --gallery-card-accent: var(--page-card-accent, var(--paper-border));
    --page-card-preview-surface: color-mix(in srgb, var(--page-card-accent, var(--paper-border)) 11%, #fff8ec);
    --page-card-preview-border: color-mix(in srgb, var(--page-card-accent, var(--paper-border)) 26%, var(--paper-border));
    width: 100% !important;
    height: var(--collection-gallery-row-height, 190px) !important;
    min-height: var(--collection-gallery-card-min-height, 190px) !important;
    max-height: var(--collection-gallery-card-max-height, 190px) !important;
    padding: 5px !important;
    border: 1px solid color-mix(in srgb, var(--gallery-card-accent, var(--paper-border)) 34%, var(--paper-border-soft)) !important;
    border-radius: 16px !important;
    background: var(--main-card-surface) !important;
    box-shadow: none !important;
    overflow: visible !important;
    transform: none !important;
    filter: none !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:nth-child(6n + 1) {
    --page-card-accent: #8fa1a0;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:nth-child(6n + 2) {
    --page-card-accent: #e7bdc3;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:nth-child(6n + 3) {
    --page-card-accent: #9fb8cc;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:nth-child(6n + 4) {
    --page-card-accent: #ddb96e;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:nth-child(6n + 5) {
    --page-card-accent: #f2cf7c;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:nth-child(6n + 6) {
    --page-card-accent: #d8b99d;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card:is(:hover, :focus-visible, :focus-within, :active, .is-selected) {
    background: var(--main-card-surface) !important;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__button {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: max-content minmax(0, 1fr) !important;
    grid-template-areas:
      "title"
      "thumb" !important;
    align-items: stretch !important;
    align-content: stretch !important;
    row-gap: 11px !important;
    column-gap: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 16px 22px 15px !important;
    border-radius: 12px !important;
    background: #faf6f0 !important;
    overflow: hidden !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__frame {
    grid-area: thumb !important;
    align-self: stretch !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    border-radius: 8px !important;
    border: 1px solid var(--page-card-preview-border) !important;
    background: var(--page-card-preview-surface) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.7),
      0 6px 14px rgba(60, 45, 20, 0.035) !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__frame::after,
  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__title {
    display: none !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    transform: none !important;
    filter: none !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__content {
    display: contents !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__source {
    display: none !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__mobile-title {
    grid-area: title !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    padding: 0 46px !important;
    color: var(--color-text) !important;
    font-family: var(--font-title) !important;
    font-size: clamp(1.1rem, 4.35vw, 1.26rem) !important;
    font-weight: 830 !important;
    letter-spacing: -0.034em !important;
    line-height: 1.08 !important;
    text-align: center !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__divider {
    display: none !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__footer {
    display: none !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__object-count {
    display: none !important;
    align-items: baseline !important;
    gap: 7px !important;
    min-width: 0 !important;
    width: max-content !important;
    height: auto !important;
    min-height: 0 !important;
    color: var(--color-text-muted) !important;
    line-height: 0.92 !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__object-count strong {
    color: var(--color-text) !important;
    font-size: clamp(1.02rem, 4.18vw, 1.22rem) !important;
    font-weight: 850 !important;
    letter-spacing: -0.04em !important;
    line-height: 0.92 !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card .pages-gallery-tile__object-count span {
    color: var(--color-text-muted) !important;
    font-size: clamp(0.52rem, 2.06vw, 0.6rem) !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em !important;
    line-height: 0.92 !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card > .gallery-card__actions {
    top: 13px !important;
    right: 16px !important;
    z-index: 12 !important;
  }

  body[data-page="pages"] .gallery-page .cc-gallery-grid > .pages-gallery-tile.cc-card > .gallery-card__actions > .pages-gallery-tile__quick-action {
    width: 34px !important;
    height: 30px !important;
    padding: 0 !important;
    border-radius: 10px !important;
  }
}

/* Page gallery ellipsis buttons stay visually static on every viewport. */
body[data-page="pages"] .pages-gallery-tile > .gallery-card__actions > .pages-gallery-tile__quick-action,
body[data-page="pages"] .pages-gallery-tile > .gallery-card__actions > .pages-gallery-tile__quick-action:hover,
body[data-page="pages"] .pages-gallery-tile > .gallery-card__actions > .pages-gallery-tile__quick-action:focus-visible,
body[data-page="pages"] .pages-gallery-tile > .gallery-card__actions > .pages-gallery-tile__quick-action:active,
body[data-page="pages"] .pages-gallery-tile > .gallery-card__actions.is-open > .pages-gallery-tile__quick-action {
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  transition: none !important;
}

body[data-page="pages"] .pages-gallery-tile > .gallery-card__actions:not(.is-open) > .pages-gallery-tile__action-menu {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(-4px) scale(0.98) !important;
}

body[data-page="palettes"] .palette-card__quick-action,
body[data-page="palettes"] .palette-card__quick-action:hover,
body[data-page="palettes"] .palette-card__quick-action:focus-visible,
body[data-page="palettes"] .palette-card__quick-action:active,
body[data-page="palettes"] [data-palette-card-actions].is-open .palette-card__quick-action,
body[data-page="supplies"] .supply-card__quick-action,
body[data-page="supplies"] .supply-card__quick-action:hover,
body[data-page="supplies"] .supply-card__quick-action:focus-visible,
body[data-page="supplies"] .supply-card__quick-action:active,
body[data-page="supplies"] [data-supply-card-actions].is-open .supply-card__quick-action {
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  transition: none !important;
}

body[data-page="supplies"] .supply-card__action-menu-icon--edit {
  -webkit-mask: url("./assets/icons/mediums/colored-pencil.svg") center / contain no-repeat !important;
  mask: url("./assets/icons/mediums/colored-pencil.svg") center / contain no-repeat !important;
}

body[data-page="supplies"] .supply-card__action-menu-icon--delete,
body[data-page="supplies"] .supply-card__action-menu-item--delete .supply-card__action-menu-icon {
  -webkit-mask: url("./assets/icons/actions/delete.svg") center / contain no-repeat !important;
  mask: url("./assets/icons/actions/delete.svg") center / contain no-repeat !important;
}

/* Final no-glow guard for gallery search and filter controls. */
body[data-page] :is(
  .cc-gallery-actions-row .cc-mobile-control-button,
  .cc-gallery-actions-row .cc-filter__button,
  .cc-gallery-actions-row .site-filter-button,
  .cc-filter .cc-search__input,
  .cc-mobile-search-strip,
  .cc-mobile-search-strip .supplies-owned-search-strip__input,
  .cc-mobile-search-strip .supplies-owned-search-strip__clear,
  .supplies-modal .marker-search__input,
  .palette-modal .marker-search__input,
  .pages-upload-modal .marker-search__input
):is(:hover, :focus, :focus-visible, :focus-within, :active, .is-active, .has-selection, [aria-pressed="true"]) {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  filter: none !important;
  outline: 0 !important;
}

body[data-page] .cc-mobile-search-strip {
  border: 0 !important;
  border-block: 0 !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  filter: none !important;
  outline: 0 !important;
}

body[data-page] .cc-mobile-search-strip .supplies-owned-search-strip__input,
body[data-page] .cc-mobile-search-strip .supplies-owned-search-strip__input:is(:hover, :focus, :focus-visible, :active) {
  background: transparent !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  filter: none !important;
  outline: 0 !important;
}

body[data-page] :is(
  .cc-search,
  .marker-search,
  .supplies-owned-search-strip
):focus-within {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  filter: none !important;
  outline: 0 !important;
}

body[data-page] :is(
  input[type="search"],
  .cc-search__input,
  .marker-search__input,
  .supplies-search__input,
  .supplies-owned-search-strip__input
),
body[data-page] :is(
  input[type="search"],
  .cc-search__input,
  .marker-search__input,
  .supplies-search__input,
  .supplies-owned-search-strip__input
):is(:hover, :focus, :focus-visible, :active) {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  filter: none !important;
  outline: 0 !important;
}

body[data-page] .cc-mobile-search-strip :is(
  input[type="search"],
  .supplies-owned-search-strip__input
),
body[data-page] .cc-mobile-search-strip :is(
  input[type="search"],
  .supplies-owned-search-strip__input
):is(:hover, :focus, :focus-visible, :focus-within, :active) {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  filter: none !important;
  outline: 0 !important;
  outline-color: transparent !important;
  -webkit-tap-highlight-color: transparent !important;
}

body[data-page] .cc-mobile-search-strip :is(
  input[type="search"],
  .supplies-owned-search-strip__input
)::-webkit-search-decoration,
body[data-page] .cc-mobile-search-strip :is(
  input[type="search"],
  .supplies-owned-search-strip__input
)::-webkit-search-cancel-button,
body[data-page] .cc-mobile-search-strip :is(
  input[type="search"],
  .supplies-owned-search-strip__input
)::-webkit-search-results-button,
body[data-page] .cc-mobile-search-strip :is(
  input[type="search"],
  .supplies-owned-search-strip__input
)::-webkit-search-results-decoration {
  display: none !important;
}

body[data-page] .cc-search__input:is(:focus, :focus-visible, :active),
body[data-page] input[type="search"].cc-search__input:is(:focus, :focus-visible, :active) {
  border-color: color-mix(in srgb, var(--paper-border) 58%, transparent) !important;
}

body[data-page] :is(
  .marker-search__input,
  .supplies-search__input
):is(:focus, :focus-visible, :active) {
  border-color: var(--modal-field-border, var(--paper-border-soft)) !important;
}

@media (max-width: 760px) {
  body[data-page] .cc-mobile-search-strip,
  body[data-page] .cc-mobile-search-strip:is(:hover, :focus-within, :active) {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-block: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    filter: none !important;
    outline: 0 !important;
  }
}

body[data-page] .cc-gallery-actions-row :is(
  .cc-mobile-control-button,
  .cc-filter__button,
  .site-filter-button
):is(.is-active, .has-selection, [aria-pressed="true"]) {
  background: var(--cc-container-shell-surface) !important;
  border-color: var(--paper-border-soft) !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  filter: none !important;
}

body[data-page="palettes"] .cc-gallery-actions-row [data-gallery-used-pages-toggle]:is(.is-active, .has-selection, [aria-pressed="true"]) {
  background: color-mix(in srgb, var(--color-peach-fuzz) 58%, white) !important;
  border-color: color-mix(in srgb, var(--paper-border) 72%, transparent) !important;
  color: var(--color-text);
}

body[data-page] .cc-gallery-actions-row :is(
  .cc-mobile-control-button,
  .cc-filter__button,
  .site-filter-button
)::before,
body[data-page] .cc-gallery-actions-row :is(
  .cc-mobile-control-button,
  .cc-filter__button,
  .site-filter-button
)::after {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  filter: none !important;
}

/* Mobile palette cards: thinner, crisper swatch strips. */
@media (max-width: 760px) {
  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__swatches,
  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__swatches,
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette .pages-object__swatch-field.palette-card__swatch-field.cc-mobile-card__swatches {
    display: grid !important;
    align-self: center !important;
    align-items: center !important;
    height: 14px !important;
    min-height: 14px !important;
    max-height: 14px !important;
    overflow: visible !important;
    transform: none !important;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__swatch-strip,
  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__swatch-strip,
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette .pages-object__preview-swatches.palette-card__swatches.cc-mobile-card__swatch-strip {
    align-self: center !important;
    height: 14px !important;
    min-height: 14px !important;
    max-height: 14px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    overflow: hidden !important;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__swatch-strip::after,
  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__swatch-strip::after,
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette .pages-object__preview-swatches.palette-card__swatches.cc-mobile-card__swatch-strip::after {
    inset: 0 !important;
    border: 1px solid color-mix(in srgb, var(--palette-accent, var(--paper-border)) 58%, rgba(23, 20, 16, 0.18)) !important;
    border-radius: inherit !important;
    box-shadow: none !important;
  }

  body[data-page="palettes"] .cc-mobile-gallery > .cc-mobile-card.cc-card--palette .cc-mobile-card__swatch-strip .palette-card__swatch-segment,
  body[data-page="pages"] .pages-object-list > .pages-object.cc-mobile-card--palette .cc-mobile-card__swatch-strip .palette-card__swatch-segment,
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette .pages-object__swatch-segment.palette-card__swatch-segment {
    height: 14px !important;
    min-height: 14px !important;
    max-height: 14px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    filter: none !important;
    transform: none !important;
  }
}

/* Mobile search strips: hard-reset the native search field paint. */
@media (max-width: 760px) {
  body[data-page] #ownedSuppliesSearchStrip,
  body[data-page] #pagesGallerySearchStrip,
  body[data-page] #pagesObjectSearchStrip,
  body[data-page] #paletteGallerySearchStrip {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    filter: none !important;
    outline: 0 !important;
  }

  body[data-page] #ownedSuppliesSearchInput,
  body[data-page] #pagesGallerySearchInput,
  body[data-page] #pagesObjectSearchInput,
  body[data-page] #paletteGallerySearchInput,
  body[data-page] [data-owned-supplies-search-input],
  body[data-page] [data-pages-gallery-search-strip-input],
  body[data-page] [data-pages-object-search-strip-input],
  body[data-page] [data-palette-gallery-search-strip-input] {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    background-clip: padding-box !important;
    border: 0 !important;
    border-color: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: inset 0 0 0 1000px transparent !important;
    filter: none !important;
    outline: 0 !important;
    outline-color: transparent !important;
    outline-offset: 0 !important;
  }

  body[data-page] #ownedSuppliesSearchInput:hover,
  body[data-page] #ownedSuppliesSearchInput:focus,
  body[data-page] #ownedSuppliesSearchInput:focus-visible,
  body[data-page] #ownedSuppliesSearchInput:active,
  body[data-page] #pagesGallerySearchInput:hover,
  body[data-page] #pagesGallerySearchInput:focus,
  body[data-page] #pagesGallerySearchInput:focus-visible,
  body[data-page] #pagesGallerySearchInput:active,
  body[data-page] #pagesObjectSearchInput:hover,
  body[data-page] #pagesObjectSearchInput:focus,
  body[data-page] #pagesObjectSearchInput:focus-visible,
  body[data-page] #pagesObjectSearchInput:active,
  body[data-page] #paletteGallerySearchInput:hover,
  body[data-page] #paletteGallerySearchInput:focus,
  body[data-page] #paletteGallerySearchInput:focus-visible,
  body[data-page] #paletteGallerySearchInput:active {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-color: transparent !important;
    box-shadow: none !important;
    -webkit-box-shadow: inset 0 0 0 1000px transparent !important;
    filter: none !important;
    outline: 0 !important;
    outline-color: transparent !important;
  }

  body[data-page] #ownedSuppliesSearchInput::-webkit-search-decoration,
  body[data-page] #ownedSuppliesSearchInput::-webkit-search-cancel-button,
  body[data-page] #ownedSuppliesSearchInput::-webkit-search-results-button,
  body[data-page] #ownedSuppliesSearchInput::-webkit-search-results-decoration,
  body[data-page] #pagesGallerySearchInput::-webkit-search-decoration,
  body[data-page] #pagesGallerySearchInput::-webkit-search-cancel-button,
  body[data-page] #pagesGallerySearchInput::-webkit-search-results-button,
  body[data-page] #pagesGallerySearchInput::-webkit-search-results-decoration,
  body[data-page] #pagesObjectSearchInput::-webkit-search-decoration,
  body[data-page] #pagesObjectSearchInput::-webkit-search-cancel-button,
  body[data-page] #pagesObjectSearchInput::-webkit-search-results-button,
  body[data-page] #pagesObjectSearchInput::-webkit-search-results-decoration,
  body[data-page] #paletteGallerySearchInput::-webkit-search-decoration,
  body[data-page] #paletteGallerySearchInput::-webkit-search-cancel-button,
  body[data-page] #paletteGallerySearchInput::-webkit-search-results-button,
  body[data-page] #paletteGallerySearchInput::-webkit-search-results-decoration {
    display: none !important;
  }
}

/* Mobile page upload modal: keep the artwork well clear of the title fields. */
@media (max-width: 760px) {
  body[data-page="pages"] .pages-upload-modal__dialog {
    --pages-upload-mobile-gap: clamp(8px, 2svh, 14px);
    gap: var(--pages-upload-mobile-gap) !important;
    padding:
      clamp(22px, 5.5svh, 36px)
      clamp(18px, 5vw, 24px)
      calc(clamp(18px, 4svh, 28px) + env(safe-area-inset-bottom)) !important;
  }

  body[data-page="pages"] .pages-upload-modal__workspace {
    gap: var(--pages-upload-mobile-gap) !important;
    padding-top: 0 !important;
  }

  body[data-page="pages"] .pages-upload-modal__media,
  body[data-page="pages"] .pages-upload-modal__details,
  body[data-page="pages"] .pages-upload-modal__fields {
    gap: clamp(8px, 1.6svh, 12px) !important;
  }

  body[data-page="pages"] .pages-upload-modal__image-topline {
    gap: clamp(7px, 1.4svh, 10px) !important;
  }

  body[data-page="pages"] .pages-upload-modal__image-helper {
    font-size: clamp(0.82rem, 3.35vw, 0.96rem) !important;
    line-height: 1.24 !important;
    max-height: calc(1.24em * 2) !important;
    overflow: hidden !important;
  }

  body[data-page="pages"] .pages-upload-modal__dropzone {
    display: grid !important;
    place-items: center !important;
    height: clamp(136px, 22svh, 194px) !important;
    min-height: 0 !important;
    max-height: 194px !important;
    margin: 0 0 clamp(8px, 1.8svh, 14px) !important;
    padding: clamp(8px, 2vw, 12px) !important;
    overflow: hidden !important;
    transform: none !important;
  }

  body[data-page="pages"] .pages-upload-modal__dropzone:hover,
  body[data-page="pages"] .pages-upload-modal__dropzone:focus-visible {
    transform: none !important;
  }

  body[data-page="pages"] .pages-upload-modal__preview-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: calc(14px - 2px) !important;
  }

  body[data-page="pages"] .pages-upload-modal__dropzone.is-filled {
    padding: 0 !important;
  }

  body[data-page="pages"] .pages-upload-modal__dropzone-copy {
    min-height: 0 !important;
    gap: clamp(6px, 1.4svh, 9px) !important;
    padding: 10px !important;
  }

  body[data-page="pages"] .pages-upload-modal__dropzone .supply-card__plus {
    width: clamp(42px, 11vw, 54px) !important;
    height: clamp(42px, 11vw, 54px) !important;
  }

  body[data-page="pages"] .pages-upload-modal__dropzone-copy strong {
    font-size: clamp(0.86rem, 3.45vw, 1rem) !important;
    line-height: 1.08 !important;
  }

  body[data-page="pages"] .pages-upload-modal__input {
    height: clamp(46px, 6.4svh, 54px) !important;
    min-height: 0 !important;
    padding-inline: clamp(12px, 3.4vw, 16px) !important;
    font-size: 16px !important;
    line-height: 1.12 !important;
  }

  body[data-page="pages"] .pages-upload-modal__input::placeholder {
    font-size: clamp(0.78rem, 3.05vw, 0.92rem) !important;
    font-weight: 650 !important;
    letter-spacing: -0.025em !important;
    opacity: 1 !important;
  }

  body[data-page="pages"] .pages-upload-modal__actions {
    gap: clamp(10px, 3vw, 12px) !important;
    padding-top: clamp(6px, 1.4svh, 12px) !important;
  }

  body[data-page="pages"] .pages-upload-modal__actions .modal-button {
    min-height: clamp(50px, 6.8svh, 58px) !important;
  }
}

@media (max-width: 760px) and (max-height: 700px) {
  body[data-page="pages"] .pages-upload-modal__head h2 {
    font-size: clamp(1.82rem, 8.2vw, 2.28rem) !important;
  }

  body[data-page="pages"] .pages-upload-modal .supplies-modal__close.modal-button--icon {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
  }

  body[data-page="pages"] .pages-upload-modal__dropzone {
    height: clamp(108px, 18svh, 138px) !important;
    max-height: 138px !important;
  }

  body[data-page="pages"] .pages-upload-modal__image-helper {
    max-height: 1.24em !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

/* Mobile page preview modal: let the heading use the full modal width. */
@media (max-width: 760px) {
  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__header,
  body[data-page="pages"] .pages-view-modal__header {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: clamp(8px, 2.4vw, 12px) !important;
    padding-right: 0 !important;
    padding-top: 2px !important;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__heading,
  body[data-page="pages"] .pages-view-modal__heading {
    width: 100% !important;
    min-width: 0 !important;
    padding-right: 0 !important;
    gap: clamp(5px, 1.6vw, 8px) !important;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .preview-modal__title,
  body[data-page="pages"] .pages-view-modal__header .preview-modal__title {
    display: -webkit-box !important;
    width: 100% !important;
    max-width: calc(100% - 48px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    font-size: clamp(2.2rem, 10vw, 3rem) !important;
    line-height: 0.98 !important;
    text-overflow: ellipsis !important;
    text-wrap: balance !important;
    white-space: normal !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__meta-line,
  body[data-page="pages"] .pages-view-modal__meta-line {
    max-width: 100% !important;
    margin: 0 !important;
    color: rgba(38, 43, 51, 0.64) !important;
    font-size: clamp(0.95rem, 4.05vw, 1.08rem) !important;
    font-weight: 650 !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__objects,
  body[data-page="pages"] .pages-view-modal__objects {
    max-width: 100% !important;
    margin: 4px 0 0 !important;
    gap: 10px !important;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__objects-count strong,
  body[data-page="pages"] .pages-view-modal__objects-count strong {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 34px !important;
    padding: 0 14px !important;
    border: 1px solid color-mix(in srgb, var(--paper-border) 66%, transparent) !important;
    border-radius: 10px !important;
    background: var(--main-card-surface) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64) !important;
    color: rgba(38, 43, 51, 0.74) !important;
    font-family: var(--font-body) !important;
    font-size: 0.94rem !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    line-height: 1 !important;
    text-transform: none !important;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .preview-modal__header .supplies-modal__close,
  body[data-page="pages"] .pages-view-modal__header .supplies-modal__close {
    position: absolute !important;
    top: clamp(18px, 2.4vw, 32px) !important;
    right: clamp(18px, 2.4vw, 32px) !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }
}

/* Mobile page preview modal: match palette preview header/frame rhythm. */
@media (max-width: 760px) {
  body[data-page="pages"] .pages-view-modal.preview-modal {
    padding: 0 !important;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__dialog {
    --preview-modal-x: clamp(18px, 5vw, 24px);
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    gap: 22px !important;
    width: 100% !important;
    height: 100svh !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: clamp(30px, 8vw, 42px) var(--preview-modal-x) 0 !important;
    overflow: hidden !important;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__header {
    position: static !important;
    display: block !important;
    width: min(100%, 540px) !important;
    margin: 0 auto !important;
    padding-right: 58px !important;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__heading {
    display: grid !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding-right: 0 !important;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .preview-modal__title {
    display: block !important;
    width: 100% !important;
    max-width: 46rem !important;
    overflow: visible !important;
    font-size: clamp(2.2rem, 10vw, 3rem) !important;
    line-height: 0.98 !important;
    text-overflow: clip !important;
    text-wrap: balance !important;
    white-space: normal !important;
    -webkit-line-clamp: initial !important;
    -webkit-box-orient: initial !important;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__meta-line {
    display: block !important;
    width: calc(100% + 58px) !important;
    max-width: calc(100% + 58px) !important;
    overflow: visible !important;
    font-size: clamp(0.78rem, 3.1vw, 0.9rem) !important;
    font-weight: 650 !important;
    line-height: 1.18 !important;
    margin-right: -58px !important;
    text-overflow: clip !important;
    text-wrap: pretty !important;
    white-space: normal !important;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__objects {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    justify-content: flex-start !important;
    margin: 4px 0 0 !important;
    padding: 0 !important;
    max-width: none !important;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__body {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    gap: 22px !important;
    width: min(100%, 540px) !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    overflow: hidden !important;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__section--page {
    grid-template-rows: auto minmax(0, 1fr) !important;
    gap: clamp(14px, 3.4vw, 18px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__image-controls {
    gap: 0 !important;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__image-shell {
    justify-self: center;
    align-self: start;
    width: min(100%, 72svh);
    height: auto;
    max-height: none;
    aspect-ratio: 5 / 4;
  }

  body[data-page="pages"] .pages-view-modal.pages-view-modal .preview-modal__header .supplies-modal__close,
  body[data-page="pages"] .pages-view-modal.pages-view-modal .pages-view-modal__header .supplies-modal__close {
    position: absolute !important;
    top: clamp(18px, 2.4vw, 32px) !important;
    right: clamp(18px, 2.4vw, 32px) !important;
  }
}

body[data-page="pages"] .pages-object-tracker__share-action {
  display: none;
}

/* Mobile object tracker: footer actions replace tracker filters/stats. */
@media (max-width: 760px) {
  body[data-page="pages"] .pages-object-tracker__mobile-controls,
  body[data-page="pages"] .pages-object-tracker .cc-mobile-search-strip,
  body[data-page="pages"] .pages-object-tracker__mobile-stats {
    display: none !important;
  }

  body[data-page="pages"] .pages-workspace.split-workspace > .pages-object-tracker {
    padding-bottom: calc(var(--supplies-mobile-footer-height) + env(safe-area-inset-bottom) + 28px) !important;
  }

  body[data-page="pages"] .pages-object-tracker > .palette-editor__footer {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 60 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    height: calc(var(--supplies-mobile-footer-height) + env(safe-area-inset-bottom)) !important;
    min-height: calc(var(--supplies-mobile-footer-height) + env(safe-area-inset-bottom)) !important;
    margin: 0 !important;
    padding: 10px var(--supplies-mobile-x) calc(12px + env(safe-area-inset-bottom)) !important;
    border-top: 1px solid var(--paper-border-soft) !important;
    border-radius: 0 !important;
    background: var(--cc-container-shell-surface) !important;
    transform: none !important;
  }

  body[data-page="pages"] .pages-object-tracker > .palette-editor__footer > [data-pages-add-object],
  body[data-page="pages"] .pages-object-tracker > .palette-editor__footer > .pages-object-tracker__share-action {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    margin: 0 !important;
    border-radius: 10px !important;
    font-size: clamp(0.82rem, 3.35vw, 0.94rem) !important;
    line-height: 1 !important;
  }

  body[data-page="pages"] .pages-object-tracker > .palette-editor__footer > [data-pages-add-object] {
    grid-column: 1 !important;
  }

  body[data-page="pages"] .pages-object-tracker > .palette-editor__footer > .pages-object-tracker__share-action {
    grid-column: 2 !important;
  }
}

@media (max-width: 760px) {
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded {
    display: flex !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    border: 1px solid color-mix(in srgb, var(--palette-accent, var(--paper-border)) 34%, var(--paper-border-soft)) !important;
    border-radius: 12px !important;
    background: var(--main-card-surface) !important;
    box-shadow: var(--shadow-sm) !important;
    overflow: visible !important;
    transform: none !important;
    filter: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__frame.palette-card__frame.cc-mobile-card__frame {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(88px, auto) !important;
    grid-template-rows: minmax(42px, auto) 1px minmax(28px, auto) 30px auto !important;
    grid-template-areas:
      "header header"
      "divider divider"
      "footer meta"
      "strip strip"
      "details details" !important;
    align-items: center !important;
    align-content: start !important;
    column-gap: 10px !important;
    row-gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 16px 18px 14px !important;
    border-radius: 12px !important;
    background: #faf6f0 !important;
    overflow: visible !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__details {
    grid-area: details !important;
    display: grid !important;
    grid-template-rows: 1fr !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin-top: -2px !important;
    overflow: visible !important;
    opacity: 1 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__details-inner {
    display: grid !important;
    gap: 0 !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    opacity: 1 !important;
    transform: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-list {
    display: grid;
    gap: 0;
    padding: 6px 0 0;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-list::before {
    content: none;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row {
    grid-template-columns: 38px minmax(0, 1fr) max-content;
    gap: 10px;
    min-height: 56px;
    padding: 8px 0;
    border-radius: 0;
    background: transparent;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row:not(:last-child)::after {
    left: 0;
    right: 0;
    background: var(--page-divider-color, rgba(205, 192, 177, 0.48));
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__swatch {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.48),
      0 2px 6px rgba(83, 60, 48, 0.08);
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__copy {
    gap: 1px;
    min-width: 0;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__meta {
    display: flex;
    align-items: center;
    gap: 0;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__brand,
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__medium {
    min-width: max-content;
    color: var(--color-text-muted);
    font-size: clamp(0.54rem, 2.08vw, 0.61rem);
    font-weight: 780;
    letter-spacing: 0.045em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__brand {
    flex: 0 0 auto;
    max-width: none;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__brand::after {
    content: none;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__medium {
    flex: 0 1 auto;
    max-width: 13ch;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__medium::before {
    content: "\2022";
    display: inline-block;
    margin: 0 4px 1px 4px;
    opacity: 0.48;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__code {
    color: #302c38;
    font-size: clamp(0.96rem, 3.75vw, 1.08rem);
    font-weight: 840;
    letter-spacing: -0.035em;
    line-height: 1.04;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__side {
    justify-items: end;
    min-width: 0;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__roles {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    max-width: min(46vw, 176px);
    overflow: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-role-tag {
    height: 21px;
    min-height: 21px;
    max-width: 100%;
    padding: 0 6px;
    border-radius: 7px;
    font-size: clamp(0.52rem, 1.95vw, 0.58rem);
    font-weight: 650;
    text-overflow: ellipsis;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row:hover,
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row:focus-within {
    background: transparent;
    box-shadow: none;
    transform: none;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row:hover .pages-colour-row__roles,
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row:focus-within .pages-colour-row__roles {
    opacity: 1;
    transform: none;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__actions,
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__add-tags {
    display: none;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row--empty {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 50px;
    padding: 8px 0 2px;
    background: transparent;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row--empty .pages-colour-row__swatch--empty {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row--empty .pages-colour-row__meta {
    display: none;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__copy--empty .pages-colour-row__copy--empty-title {
    color: #4a465a;
    font-family: var(--font-ui);
    font-size: clamp(0.86rem, 3.2vw, 0.98rem);
    font-weight: 780;
    letter-spacing: -0.025em;
    line-height: 1;
  }
}

/* Compact object tracker expanded-card layout: same design language, tighter rhythm. */
@media (max-width: 760px) {
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__frame.palette-card__frame.cc-mobile-card__frame {
    grid-template-rows: 38px 1px 24px auto !important;
    grid-template-areas:
      "header header"
      "divider divider"
      "footer meta"
      "details details" !important;
    row-gap: 7px !important;
    padding: 13px 16px 12px !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .cc-mobile-card__heading {
    padding-right: 48px !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__name.cc-mobile-card__title {
    margin-top: 7px !important;
    font-size: clamp(0.92rem, 3.72vw, 1.06rem) !important;
    font-weight: 720 !important;
    line-height: 1.08 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__divider.palette-card__divider.cc-mobile-card__divider {
    justify-self: center !important;
    width: min(46%, 170px) !important;
    margin: 0 !important;
    border-top: 0 !important;
    background-image: repeating-linear-gradient(
      to right,
      color-mix(in srgb, var(--palette-accent, var(--paper-border)) 22%, transparent) 0 3px,
      transparent 3px 9px
    ) !important;
    opacity: 0.58 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__count.palette-card__count.cc-mobile-card__count,
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__meta.palette-card__meta.cc-mobile-card__meta {
    align-self: start !important;
    height: 22px !important;
    max-height: 24px !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__count strong {
    font-size: clamp(1.1rem, 4.65vw, 1.28rem) !important;
    line-height: 1 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__count span {
    font-size: clamp(0.55rem, 2.25vw, 0.62rem) !important;
    letter-spacing: 0.058em !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__tag-list {
    gap: 5px !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object-tag.cc-card-pill {
    height: 22px !important;
    min-height: 22px !important;
    padding: 0 7px !important;
    border-radius: 7px !important;
    font-size: clamp(0.58rem, 2.45vw, 0.66rem) !important;
    font-weight: 560 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__swatch-field.palette-card__swatch-field.cc-mobile-card__swatches {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    border: 0 !important;
    background: transparent !important;
    transform: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__preview-swatches.palette-card__swatches.cc-mobile-card__swatch-strip {
    display: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__swatch-segment.palette-card__swatch-segment {
    display: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__details {
    margin-top: -6px !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-list {
    gap: 0 !important;
    padding-top: 0 !important;
    border-top: 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-list::before {
    display: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row {
    grid-template-columns: 38px minmax(0, 1fr) max-content !important;
    column-gap: 9px !important;
    min-height: 58px !important;
    padding: 7px 0 7px 10px !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row:not(:last-child)::after {
    display: block !important;
    left: 10px !important;
    right: 0 !important;
    height: 1px !important;
    background-image: repeating-linear-gradient(
      to right,
      color-mix(in srgb, var(--paper-border) 52%, transparent) 0 2px,
      transparent 2px 7px
    ) !important;
    opacity: 0.7 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__swatch {
    width: 34px !important;
    height: 34px !important;
    border-radius: 9px !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__copy {
    gap: 2px !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__brand,
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__medium {
    font-size: clamp(0.57rem, 2.12vw, 0.63rem) !important;
    font-weight: 800 !important;
    letter-spacing: 0.045em !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__code {
    font-size: clamp(0.98rem, 3.82vw, 1.1rem) !important;
    line-height: 1.02 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__side {
    align-self: center !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-role-tag {
    height: 23px !important;
    min-height: 23px !important;
    padding: 0 8px !important;
    border-radius: 8px !important;
    font-size: clamp(0.58rem, 2.16vw, 0.66rem) !important;
    font-weight: 650 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row--empty {
    grid-template-columns: 38px minmax(0, 1fr) max-content !important;
    min-height: 50px !important;
    padding: 6px 0 3px 10px !important;
    align-items: center !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row--empty .pages-colour-row__swatch--empty {
    width: 31px !important;
    height: 31px !important;
    border-radius: 8px !important;
    border-color: color-mix(in srgb, var(--paper-border) 84%, transparent) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.46),
      0 1px 3px rgba(83, 60, 48, 0.06) !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__copy--empty .pages-colour-row__copy--empty-title {
    color: color-mix(in srgb, #4a465a 88%, var(--color-text-muted)) !important;
    font-size: clamp(0.9rem, 3.35vw, 0.98rem) !important;
    font-weight: 680 !important;
    letter-spacing: -0.012em !important;
    line-height: 1.08 !important;
  }
}

/* Modal swatches share the same crisp edge treatment across desktop and mobile. */
body[data-page] :is(
  .supplies-modal,
  .supplies-preview-modal,
  .palette-modal,
  .palette-preview-modal,
  .pages-view-modal
) :is(
  .palette-modal__swatch,
  .supplies-preview-modal__swatch,
  .supplies-preview-tile__swatch,
  .palette-preview-tile__swatch,
  .search-marker__swatch,
  .pages-colour-row__swatch
) {
  border: 1px solid rgba(23, 20, 16, 0.28);
}

@media (min-width: 761px) {
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.is-expanded .pages-object__footer.palette-card__footer {
    display: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card:has([data-pages-object-card-actions].is-open) {
    z-index: 40;
    overflow: visible !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card:has([data-pages-colour-row-actions].is-open) {
    z-index: 80;
    overflow: visible !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card:has([data-pages-object-card-actions].is-open) .pages-object__frame.palette-card__frame {
    overflow: visible !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card:has([data-pages-colour-row-actions].is-open) .pages-object__frame.palette-card__frame,
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card:has([data-pages-colour-row-actions].is-open) .pages-object__details,
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card:has([data-pages-colour-row-actions].is-open) .pages-object__details-inner {
    overflow: visible !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-object__actions.gallery-card__actions {
    position: absolute !important;
    top: 10px !important;
    right: 12px !important;
    z-index: 50 !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    padding: 0 !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-object__actions.gallery-card__actions > * {
    display: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-object__actions.gallery-card__actions > .pages-object__quick-action.palette-card__quick-action {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 34px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent !important;
    color: rgba(23, 20, 16, 0.92);
    box-shadow: none !important;
    cursor: pointer;
    filter: none !important;
    transform: none !important;
    transition: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-object__quick-action.palette-card__quick-action span {
    display: block;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-object__quick-action.palette-card__quick-action:hover,
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-object__quick-action.palette-card__quick-action:focus-visible,
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card [data-pages-object-card-actions].is-open .pages-object__quick-action.palette-card__quick-action {
    background: transparent !important;
    outline: 0;
    transform: none !important;
  }

	  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-object__actions.gallery-card__actions > .pages-object__action-menu.palette-card__action-menu {
	    position: absolute;
	    top: calc(100% + 6px);
	    right: 0;
	    z-index: 40;
	    display: grid !important;
	    width: var(--cc-action-menu-width, 158px);
    padding: 6px;
    border: 1px solid color-mix(in srgb, var(--paper-border-soft) 72%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--main-card-surface) 94%, transparent);
    box-shadow:
      0 14px 28px rgba(56, 44, 35, 0.13),
      0 2px 8px rgba(56, 44, 35, 0.07);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px) scale(0.98);
    transform-origin: top right;
    transition:
      opacity 160ms ease,
      transform 160ms ease;
  }

	  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card [data-pages-object-card-actions].is-open::after {
	    content: "";
	    position: absolute;
	    top: 100%;
	    right: 0;
	    width: var(--cc-action-menu-width, 158px);
    height: 8px;
    background: transparent;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card [data-pages-object-card-actions].is-open > .pages-object__action-menu.palette-card__action-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-object__action-menu.palette-card__action-menu .palette-card__action-menu-item.palette-card__action-menu-item {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr) !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 9px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px !important;
    height: auto !important;
    padding: 0 9px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--color-text) !important;
    font-family: var(--font-ui) !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    line-height: 1 !important;
    text-align: left !important;
    white-space: nowrap !important;
    transform: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-object__action-menu.palette-card__action-menu .palette-card__action-menu-item span:not(.palette-card__action-menu-icon) {
    min-width: 0;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-object__action-menu.palette-card__action-menu .palette-card__action-menu-item:hover,
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-object__action-menu.palette-card__action-menu .palette-card__action-menu-item:focus-visible {
    background: color-mix(in srgb, var(--palette-accent, var(--paper-border)) 10%, transparent) !important;
    outline: 0;
    transform: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-object__action-menu.palette-card__action-menu .palette-card__action-menu-item--delete {
    color: color-mix(in srgb, #d93f3f 86%, var(--color-text)) !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-object__action-menu.palette-card__action-menu .palette-card__action-menu-item--delete.is-confirm {
    background: color-mix(in srgb, #d93f3f 10%, transparent) !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-object__action-menu.palette-card__action-menu .palette-card__action-menu-icon {
    display: block;
    width: 17px;
    height: 17px;
    background: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-object__action-menu.palette-card__action-menu .palette-card__action-menu-icon--view {
    -webkit-mask-image: url("./assets/icons/ui/colour-palette.svg");
    mask-image: url("./assets/icons/ui/colour-palette.svg");
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-object__action-menu.palette-card__action-menu .palette-card__action-menu-icon--edit {
    -webkit-mask-image: url("./assets/icons/mediums/colored-pencil.svg");
    mask-image: url("./assets/icons/mediums/colored-pencil.svg");
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-object__action-menu.palette-card__action-menu .palette-card__action-menu-icon--delete {
    -webkit-mask-image: url("./assets/icons/actions/delete.svg");
    mask-image: url("./assets/icons/actions/delete.svg");
  }
}

/* Shared ellipsis action menu behavior; feature selectors keep their existing layout. */
body[data-page] [data-action-menu] {
  overflow: visible;
}

body[data-page] :is(
  [data-action-menu-kind="page"],
  [data-action-menu-kind="palette"],
  [data-action-menu-kind="supply"],
  [data-action-menu-kind="object"]
) {
  --cc-action-menu-width: 166px;
}

body[data-page] [data-action-menu] > [data-action-menu-panel] {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 40;
  display: grid;
  width: var(--cc-action-menu-width, 132px);
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--paper-border-soft) 72%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--main-card-surface) 93%, transparent);
  box-shadow:
    0 14px 28px rgba(56, 44, 35, 0.13),
    0 2px 8px rgba(56, 44, 35, 0.07);
  backdrop-filter: blur(10px);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top right;
  transition:
    visibility 0ms linear 160ms,
    opacity 160ms ease,
    transform 160ms ease;
}

body[data-page] [data-action-menu].is-open::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: var(--cc-action-menu-width, 132px);
  height: 8px;
  background: transparent;
}

body[data-page] [data-action-menu].is-open > [data-action-menu-panel] {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition:
    visibility 0ms linear,
    opacity 160ms ease,
    transform 160ms ease;
}

body[data-page] :is(
  [data-action-menu-kind="page"],
  [data-action-menu-kind="palette"],
  [data-action-menu-kind="supply"],
  [data-action-menu-kind="object"]
) > [data-action-menu-panel] {
  top: 0 !important;
  right: calc(100% + 8px) !important;
  transform: translateX(4px) scale(0.98);
  transform-origin: top right;
}

body[data-page] :is(
  [data-action-menu-kind="page"],
  [data-action-menu-kind="palette"],
  [data-action-menu-kind="supply"],
  [data-action-menu-kind="object"]
).is-open::after {
  top: 0 !important;
  right: 100% !important;
  width: 8px !important;
  height: min(100%, var(--cc-action-menu-width, 166px));
}

body[data-page] :is(
  [data-action-menu-kind="page"],
  [data-action-menu-kind="palette"],
  [data-action-menu-kind="supply"],
  [data-action-menu-kind="object"]
).is-open > [data-action-menu-panel] {
  transform: translateX(0) scale(1);
}

body[data-page] .cc-action-menu__item {
  appearance: none;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 9px;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  height: auto;
  padding: 0 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
  color: var(--color-text);
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
}

body[data-page] .cc-action-menu__item:hover,
body[data-page] .cc-action-menu__item:focus-visible {
  background: color-mix(in srgb, var(--palette-accent, var(--gallery-card-accent, var(--paper-border))) 10%, transparent);
  outline: 0;
}

body[data-page] .cc-action-menu__item:disabled,
body[data-page] .cc-action-menu__item[aria-disabled="true"] {
  cursor: default;
}

body[data-page] .cc-action-menu__item.is-saving,
body[data-page] .cc-action-menu__item.is-saved,
body[data-page] .cc-action-menu__item.is-failed,
body[data-page] .cc-action-menu__item.is-auth-required {
  background: color-mix(in srgb, var(--palette-accent, var(--gallery-card-accent, var(--paper-border))) 12%, transparent);
}

body[data-page] .cc-action-menu__item.is-saved {
  color: color-mix(in srgb, #16825b 86%, var(--color-text));
}

body[data-page] .cc-action-menu__item.is-failed,
body[data-page] .cc-action-menu__item.is-auth-required {
  color: color-mix(in srgb, #b35625 82%, var(--color-text));
}

body[data-page] .cc-action-menu__item--danger {
  color: color-mix(in srgb, #d93f3f 86%, var(--color-text));
}

body[data-page] .cc-action-menu__item--danger:hover,
body[data-page] .cc-action-menu__item--danger:focus-visible,
body[data-page] .cc-action-menu__item--danger:is(.is-confirm, .cc-action-menu__item--confirm) {
  background: color-mix(in srgb, #d93f3f 10%, transparent);
}

body[data-page] .cc-action-menu__icon {
  display: block;
  width: 17px;
  height: 17px;
  background: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

body[data-page] .cc-action-menu__icon--view {
  -webkit-mask-image: url("./assets/icons/actions/view.svg");
  mask-image: url("./assets/icons/actions/view.svg");
}

body[data-page] .cc-action-menu__icon--clone {
  -webkit-mask-image: url("./assets/icons/actions/copy.svg");
  mask-image: url("./assets/icons/actions/copy.svg");
}

body[data-page] .cc-action-menu__icon--edit {
  -webkit-mask-image: url("./assets/icons/mediums/colored-pencil.svg");
  mask-image: url("./assets/icons/mediums/colored-pencil.svg");
}

body[data-page] .cc-action-menu__icon--delete {
  -webkit-mask-image: url("./assets/icons/actions/delete.svg");
  mask-image: url("./assets/icons/actions/delete.svg");
}

body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row {
  position: relative !important;
  z-index: 1 !important;
  --pages-colour-row-title-size: clamp(1rem, 1.05vw, 1.14rem);
  --pages-colour-row-title-line: calc(var(--pages-colour-row-title-size) * 1.08);
  grid-template-columns: 38px minmax(0, 1fr) !important;
  grid-template-rows: max-content max-content !important;
  overflow: visible !important;
}

body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row:has(.pages-colour-row__actions.is-open) {
  z-index: 300 !important;
}

body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row__side {
  position: relative !important;
  display: flex !important;
  grid-column: 2 !important;
  grid-row: 3 !important;
  align-items: center !important;
  align-self: start !important;
  justify-content: flex-end !important;
  justify-items: end !important;
  min-width: 0 !important;
  padding-right: 0 !important;
  overflow: visible !important;
}

body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row__copy {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 24px !important;
  grid-template-rows: max-content max-content !important;
  align-items: start !important;
  column-gap: 8px !important;
}

body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row__meta {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row__headline {
  grid-column: 1 !important;
  grid-row: 2 !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 22px !important;
  min-width: 0 !important;
}

body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row__roles {
  justify-self: end !important;
  display: inline-flex !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding-right: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row__roles--inline {
  flex: 0 1 auto !important;
  margin-left: auto !important;
  white-space: nowrap !important;
}

body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row__roles--inline .pages-role-tag {
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 7px !important;
  border-radius: 7px !important;
  font-size: clamp(0.58rem, 2.45vw, 0.66rem) !important;
  font-weight: 560 !important;
}

body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row__headline .pages-colour-row__code {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row__side:empty {
  display: none !important;
}

body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row__actions {
  position: relative !important;
  grid-column: 2 !important;
  grid-row: 2 !important;
  justify-self: end !important;
  align-self: center !important;
  --cc-action-menu-width: 158px;
  top: auto !important;
  right: auto !important;
  z-index: 2 !important;
  display: inline-grid !important;
  place-items: center !important;
  width: 24px !important;
  min-width: 24px !important;
  max-width: 24px !important;
  height: var(--pages-colour-row-title-line) !important;
  padding: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row__actions.is-open {
  z-index: 400 !important;
}

body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row__actions > :not(.pages-colour-row__menu-toggle):not(.pages-colour-row__action-panel) {
  display: none !important;
}

body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row__actions > .pages-colour-row__menu-toggle {
  display: inline-flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5px;
  width: 24px;
  height: var(--pages-colour-row-title-line);
  min-width: 24px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent !important;
  color: rgba(23, 20, 16, 0.74);
  box-shadow: none !important;
  cursor: pointer;
  transform: none !important;
  transition: none !important;
}

body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row__menu-toggle span {
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row__menu-toggle:hover,
body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row__menu-toggle:focus-visible,
body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row__actions.is-open .pages-colour-row__menu-toggle {
  background: transparent !important;
  color: rgba(23, 20, 16, 0.92);
  outline: 0;
  transform: none !important;
}

body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card .pages-colour-row__actions > .pages-colour-row__action-panel {
  display: grid !important;
  top: calc(100% + 6px);
  right: 0;
  width: 158px;
  background: color-mix(in srgb, var(--main-card-surface) 94%, transparent);
}

/* Colour rows now use the ellipsis menu as the only action surface. */
body[data-page="pages"] .pages-object .pages-colour-row .pages-colour-row__roles,
body[data-page="pages"] .pages-object .pages-colour-row:hover .pages-colour-row__roles,
body[data-page="pages"] .pages-object .pages-colour-row:focus-within .pages-colour-row__roles,
body[data-page="pages"] .pages-object .pages-colour-row__copy:hover ~ .pages-colour-row__side .pages-colour-row__roles,
body[data-page="pages"] .pages-object .pages-colour-row__copy:focus-within ~ .pages-colour-row__side .pages-colour-row__roles,
body[data-page="pages"] .pages-object .pages-colour-row__side:hover .pages-colour-row__roles,
body[data-page="pages"] .pages-object .pages-colour-row__side:focus-within .pages-colour-row__roles {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

body[data-page="pages"] .pages-object .pages-colour-row .pages-colour-row__actions,
body[data-page="pages"] .pages-object .pages-colour-row:hover .pages-colour-row__actions,
body[data-page="pages"] .pages-object .pages-colour-row:focus-within .pages-colour-row__actions,
body[data-page="pages"] .pages-object .pages-colour-row__copy:hover ~ .pages-colour-row__side .pages-colour-row__actions,
body[data-page="pages"] .pages-object .pages-colour-row__copy:focus-within ~ .pages-colour-row__side .pages-colour-row__actions,
body[data-page="pages"] .pages-object .pages-colour-row__side:hover .pages-colour-row__actions,
body[data-page="pages"] .pages-object .pages-colour-row__side:focus-within .pages-colour-row__actions,
body[data-page="pages"] .pages-object .pages-colour-row__actions:hover,
body[data-page="pages"] .pages-object .pages-colour-row__actions:focus-within {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

@media (min-width: 761px) {
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__details-inner {
    padding-bottom: 6px !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.is-expanded .pages-colour-row--empty {
    min-height: 48px !important;
    padding-top: 5px !important;
    padding-bottom: 1px !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__content.palette-card__body {
    left: 82px !important;
    width: calc(100% - 82px) !important;
    max-width: calc(100% - 82px) !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__divider.palette-card__divider {
    margin-left: 82px !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__meta.palette-card__meta {
    padding-left: 82px !important;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density="relaxed"] .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__frame.palette-card__frame {
    padding: 11px 22px 8px !important;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density="relaxed"] .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__top.palette-card__top {
    flex: 0 0 72px !important;
    min-height: 72px !important;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density="relaxed"] .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__content.palette-card__body {
    left: 82px !important;
    top: 9px !important;
    width: calc(100% - 82px) !important;
    max-width: calc(100% - 82px) !important;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density="relaxed"] .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__content.palette-card__body h2.pages-object__name {
    margin-top: 10px !important;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density="compact"] .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__frame.palette-card__frame {
    padding: 10px 20px 8px !important;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density="compact"] .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__top.palette-card__top {
    flex: 0 0 66px !important;
    min-height: 66px !important;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density="compact"] .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__content.palette-card__body {
    left: 82px !important;
    top: 7px !important;
    width: calc(100% - 82px) !important;
    max-width: calc(100% - 82px) !important;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density="compact"] .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__content.palette-card__body h2.pages-object__name {
    margin-top: 7px !important;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density="safe"] .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__frame.palette-card__frame {
    padding: 7px 18px 5px !important;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density="safe"] .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__top.palette-card__top {
    flex: 0 0 54px !important;
    min-height: 54px !important;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density="safe"] .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__logo.palette-card__logo {
    width: 52px !important;
    height: 52px !important;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density="safe"] .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__content.palette-card__body {
    left: 70px !important;
    top: 5px !important;
    width: calc(100% - 70px) !important;
    max-width: calc(100% - 70px) !important;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density="safe"] .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__content.palette-card__body h2.pages-object__name {
    margin-top: 5px !important;
  }

  body[data-page="pages"] .pages-object-tracker[data-gallery-density="safe"] .pages-object-list > .pages-object.palette-card.is-expanded .pages-object__meta.palette-card__meta {
    padding-left: 70px !important;
  }
}

@media (max-width: 760px) {
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__frame.palette-card__frame.cc-mobile-card__frame {
    grid-template-columns: minmax(0, 1fr) minmax(88px, auto) !important;
    grid-template-rows: 42px 1px 28px auto !important;
    grid-template-areas:
      "header header"
      "divider divider"
      "footer meta"
      "details details" !important;
    row-gap: 9px !important;
    padding: 16px 18px 14px !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__top.palette-card__top.cc-mobile-card__header {
    display: block !important;
    align-self: end !important;
    min-height: 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__summary {
    display: block !important;
    min-height: 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__logo.palette-card__logo.cc-card-logo {
    display: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__content.palette-card__body.cc-mobile-card__heading {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 48px 0 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__name.cc-mobile-card__title {
    margin: 10px 0 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__divider.palette-card__divider.cc-mobile-card__divider {
    justify-self: stretch !important;
    width: 100% !important;
    margin: 0 !important;
    border-top: 1px dashed color-mix(in srgb, var(--palette-accent, var(--paper-border)) 16%, var(--paper-border-soft)) !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__count.palette-card__count.cc-mobile-card__count,
  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__meta.palette-card__meta.cc-mobile-card__meta {
    align-self: start !important;
    height: 24px !important;
    max-height: 28px !important;
    padding: 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-object__details {
    margin-top: 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-list {
    width: auto !important;
    margin: 1px -6px 0 !important;
    padding-top: 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-list::after {
    left: 6px !important;
    right: 6px !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row {
    --pages-colour-row-title-size: clamp(0.98rem, 3.82vw, 1.1rem);
    --pages-colour-row-title-line: calc(var(--pages-colour-row-title-size) * 1.02);
    grid-template-columns: 38px minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    align-items: center !important;
    column-gap: 8px !important;
    row-gap: 4px !important;
    min-height: 62px !important;
    padding: 8px 6px !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row--has-tags {
    grid-template-rows: auto !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row:not(:last-child)::after {
    left: 6px !important;
    right: 6px !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__copy {
    display: grid !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, max-content) 14px !important;
    grid-template-rows: max-content max-content !important;
    align-self: center !important;
    align-items: center !important;
    align-content: center !important;
    column-gap: 5px !important;
    row-gap: 1px !important;
    min-width: 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__swatch {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: center !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row--has-tags .pages-colour-row__swatch {
    grid-row: 1 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__meta {
    grid-column: 1 / 3 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__headline {
    display: contents !important;
    min-height: 22px !important;
    min-width: 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__code {
    grid-column: 1 !important;
    grid-row: 2 !important;
    align-self: center !important;
    min-width: 0 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__side {
    display: flex !important;
    grid-column: 2 !important;
    grid-row: 2 !important;
    align-self: start !important;
    justify-self: end !important;
    justify-content: flex-end !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin-top: 2px !important;
    overflow: visible !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row--plain .pages-colour-row__side {
    display: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__side:empty {
    display: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__roles {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    grid-area: auto !important;
    grid-column: 2 !important;
    grid-row: 2 !important;
    align-self: center !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    justify-self: end !important;
    margin-left: 0 !important;
    max-width: min(34vw, 132px) !important;
    overflow: hidden !important;
    transform: none !important;
    white-space: nowrap !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__roles--inline .pages-role-tag {
    height: 22px !important;
    min-height: 22px !important;
    padding: 0 6px !important;
    border-radius: 7px !important;
    font-size: clamp(0.56rem, 2.35vw, 0.64rem) !important;
    font-weight: 560 !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__roles:empty {
    display: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__actions {
    grid-area: auto !important;
    grid-column: 3 !important;
    grid-row: 1 / span 2 !important;
    align-self: center !important;
    justify-self: end !important;
    display: inline-grid !important;
    place-items: center !important;
    width: 14px !important;
    min-width: 14px !important;
    height: calc(var(--pages-colour-row-title-line) + 8px) !important;
    margin-right: -7px !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__actions > .pages-colour-row__menu-toggle {
    height: var(--pages-colour-row-title-line) !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row--empty {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    align-items: center !important;
    min-height: 44px !important;
    padding: 4px 6px !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row--empty .pages-colour-row__swatch--empty {
    width: 34px !important;
    height: 34px !important;
    border-radius: 9px !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row--empty .pages-colour-row__copy {
    align-self: center !important;
  }

  body[data-page="pages"] .pages-object-tracker .pages-object-list > .pages-object.palette-card.cc-card.cc-mobile-card--palette.is-expanded .pages-colour-row__copy--empty .pages-colour-row__copy--empty-title {
    font-size: clamp(0.9rem, 3.35vw, 0.98rem) !important;
    line-height: 1 !important;
  }
}
