/* Temporary palette controls keep a neutral surface while the invitation changes. */
.palette-launcher, .palette-editor { font-family: 'Segoe UI', sans-serif; letter-spacing: 0; color-scheme: light; }
.palette-launcher[hidden], .palette-editor[hidden] { display: none; }
.palette-launcher { position: fixed; right: 27px; bottom: 24px; z-index: 40; display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 10px 15px; color: #f8f5ed; background: #283342; border: 1px solid #a28e705e; border-radius: 40px; box-shadow: 0 5px 25px #0003; font-size: 11px; cursor: pointer; }
.palette-launcher svg { width: 20px; height: 20px; color: #e2bf88; }
.palette-launcher:hover { background: #384453; }
.palette-launcher:focus-visible { outline: 2px solid #d4ad74; outline-offset: 4px; }
.palette-editing .palette-launcher { display: none; }
.palette-editor { position: fixed; z-index: 60; inset: 16px 16px 16px auto; width: 368px; max-width: calc(100vw - 24px); display: flex; flex-direction: column; border: 1px solid #d1c8b9; border-radius: 12px; overflow: hidden; background: #fcfaf6; color: #30383d; box-shadow: 0 20px 70px #080e1a4d; }
.palette-editor-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 22px 22px 17px; }
.editor-eyebrow { font-size: 8px; letter-spacing: .17em; text-transform: uppercase; color: #7d6f5c; }
.palette-editor h2 { font-family: Georgia, serif; font-weight: 400; font-size: 26px; color: #30383d; margin: 6px 0 0; }
.editor-close { border: 1px solid #e4dfd6; background: #f3efe7; color: #4f554f; font-size: 24px; line-height: 1; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; flex-shrink: 0; }
.editor-preview-bar { display: flex; align-items: center; padding: 0 22px 17px; gap: 6px; border-bottom: 1px solid #e6e0d5; }
.editor-preview-bar > span { margin-right: auto; font-size: 10px; color: #7b7469; }
.editor-preview-bar button { background: transparent; color: #6b6f6b; padding: 8px 11px; min-height: 34px; border: 1px solid #e1dbd0; border-radius: 5px; cursor: pointer; font-size: 10px; }
.editor-preview-bar button[aria-pressed="true"] { background: #34433c; border-color: #34433c; color: #fffdf7; }
.editor-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c9c2b5 transparent; padding: 18px 22px 22px; }
.editor-note { font-size: 10px; color: #777064; line-height: 1.7; margin-bottom: 21px; }
.editor-section + .editor-section { border-top: 1px solid #e6e0d5; margin-top: 23px; padding-top: 21px; }
.palette-editor h3 { margin: 0; color: #354139; font-size: 12px; font-weight: 600; }
.editor-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.editor-section-heading > span { color: #827769; font-size: 9px; text-align: right; }
.palette-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.palette-preset { min-width: 0; border: 1px solid #ded8cc; border-radius: 6px; overflow: hidden; padding: 4px; background: #fffdf9; text-align: left; cursor: pointer; color: #51554f; }
.palette-preset:hover { border-color: #8e9c8d; }
.palette-preset[aria-pressed="true"] { border-color: #52684f; box-shadow: 0 0 0 1px #52684f; }
.palette-swatches { display: flex; height: 23px; border-radius: 3px; overflow: hidden; }
.palette-swatches span { flex: 1; }
.palette-preset-name { display: flex; justify-content: space-between; align-items: center; gap: 3px; margin: 7px 3px 3px; font-size: 9px; white-space: nowrap; }
.palette-preset[aria-pressed="true"] .palette-preset-name::after { content: '✓'; color: #52684f; }
.palette-custom-fields { display: grid; gap: 10px; }
.palette-color-row { display: grid; grid-template-columns: 1fr 34px 86px; align-items: center; gap: 10px; }
.palette-color-label { font-size: 11px; color: #5d645b; }
.palette-color-input { width: 34px; height: 34px; padding: 0; border: 1px solid #cfc6b8; background: none; border-radius: 5px; overflow: hidden; cursor: pointer; }
.palette-hex-input, .editor-export input, .palette-editor textarea { width: 100%; border: 1px solid #d9d1c4; border-radius: 5px; background: #fffefb; color: #49574b; font-family: 'Segoe UI', sans-serif; }
.palette-hex-input { height: 34px; padding: 7px 8px; font-size: 11px; letter-spacing: .025em; }
.palette-hex-input[aria-invalid="true"], .palette-editor textarea[aria-invalid="true"] { border-color: #ac4b3f; }
.editor-help { font-size: 10px; line-height: 1.7; color: #7d756a; margin-top: 9px; }
.editor-field-label { display: block; font-size: 9px; color: #71695e; margin: 13px 0 7px; }
.palette-editor textarea { resize: vertical; min-height: 66px; max-height: 150px; padding: 10px; font-size: 11px; line-height: 1.6; }
.palette-editor textarea::placeholder { color: #9a9285; }
.editor-primary { width: 100%; display: flex; justify-content: space-between; align-items: center; min-height: 40px; margin-top: 9px; padding: 10px 13px; background: #34433c; color: #fffdf7; border: 1px solid #34433c; border-radius: 5px; font-size: 11px; cursor: pointer; }
.editor-primary:hover { background: #45564b; }
.editor-mapping { font-size: 9px; }
.editor-export input { padding: 9px; font-size: 10px; height: 36px; }
.editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; }
.editor-secondary { background: #eeeae1; color: #4f5f51; border: 1px solid #ded7c9; border-radius: 5px; padding: 9px 11px; min-height: 36px; cursor: pointer; font-size: 10px; }
.editor-reset { background: transparent; border: 0; border-bottom: 1px solid #b4a590; padding: 8px 0; min-height: 36px; cursor: pointer; color: #83705b; font-size: 10px; }
.editor-status { color: #526b4a; font-size: 10px; line-height: 1.7; }
.editor-status:not(:empty) { margin-top: 15px; }.editor-status.is-error { color: #9c4338; }
.palette-editor button:focus-visible, .palette-editor input:focus-visible, .palette-editor textarea:focus-visible { outline: 2px solid #7e9674; outline-offset: 3px; }
.preview-immediate .invitation { animation: none; }
@media (min-width: 1000px) { body.palette-editing { padding-right: 400px; } }
@media (max-width: 999px) {
  .palette-editor { inset: auto 12px 12px; width: auto; max-width: none; max-height: 55svh; }
  .palette-editor-header { padding-top: 16px; padding-bottom: 12px; }.palette-editor h2 { font-size: 23px; }
  .editor-preview-bar { padding-bottom: 12px; }.editor-scroll { padding-top: 14px; }
  .palette-presets { grid-template-columns: repeat(4, minmax(0, 1fr)); }.palette-preset-name { font-size: 8px; white-space: normal; min-height: 18px; }
  .palette-editing .save-the-date { padding-top: 28px; padding-bottom: 58svh; }
  .palette-editing .masthead .announcement { display: none; }
  .palette-editing .couple { font-size: 29px; margin-top: 12px; }
  .palette-editing .keepsake { min-height: 260px; width: min(100%, 390px); margin: 0; padding-top: 30px; }
  .palette-editing .envelope-wrap { top: 36px; }
  .palette-editing .page-footer { display: none; }
  .palette-editing .is-open.keepsake { padding-top: 25px; }
}
@media (max-width: 440px) {
  .palette-launcher { right: 19px; bottom: 19px; font-size: 10px; min-height: 40px; }
  .palette-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .palette-editor { max-height: 54svh; }
  .palette-editing .envelope { width: 78%; }.palette-editing .envelope-wrap { top: 30px; }
}
@media (prefers-reduced-motion: reduce) { .palette-launcher, .palette-editor { scroll-behavior: auto; } }

/* Role tools and the saved library stay neutral while the live invitation changes. */
.palette-editor { width: 392px; }
.palette-editor [hidden] { display: none !important; }
.palette-editor button:disabled { opacity: .48; cursor: default; }
.editor-note { margin: 0 0 18px; }
.editor-section-heading > span { max-width: 52%; line-height: 1.5; overflow-wrap: anywhere; }
.palette-custom-fields { gap: 12px; margin-top: 13px; }
.palette-text-heading { margin-top: 22px; padding-top: 18px; border-top: 1px solid #e6e0d5; }
.palette-text-heading .editor-help { margin-bottom: 0; }
.palette-text-disclosure { margin-top: 14px; }
.palette-color-row.palette-text-row { grid-template-columns: 38px minmax(70px, 1fr) 64px; }
.palette-text-auto[aria-pressed="true"] { background: #e6eadd; border-color: #8e9c8d; color: #34433c; }
.palette-color-row { grid-template-columns: 38px minmax(70px, 1fr) 64px 48px; gap: 7px; }
.palette-color-label { grid-column: 1 / -1; font-size: 11px; font-weight: 600; }
.palette-color-input { width: 38px; height: 40px; }
.palette-hex-input { height: 40px; min-width: 0; }
.palette-row-action { min-height: 40px; padding: 6px; border: 1px solid #d9d1c4; border-radius: 5px; color: #4f5f51; background: #f1ede5; font: inherit; font-size: 10px; cursor: pointer; }
.palette-row-action:hover { border-color: #6c8266; background: #e6eadd; }
.palette-swap[aria-pressed="true"], .palette-row-action[aria-expanded="true"] { color: #fff; background: #34433c; border-color: #34433c; }
.palette-shade-panel { grid-column: 1 / -1; border: 1px solid #e1dacc; background: #f4f0e8; border-radius: 6px; padding: 10px; }
.palette-shade-panel .editor-help { margin: 0 0 10px; }
.palette-shade-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.palette-shade-strip button { position: relative; height: 38px; min-width: 0; border: 1px solid #0002; border-radius: 4px; cursor: pointer; }
.palette-shade-strip button[aria-pressed="true"]::after { content: '✓'; font-size: 18px; font-weight: 600; }
.editor-text-input { width: 100%; min-height: 40px; min-width: 0; border: 1px solid #d9d1c4; border-radius: 5px; padding: 9px 10px; background: #fffefb; color: #49574b; font: inherit; font-size: 12px; }
.palette-save-actions { align-items: stretch; }
.palette-save-actions button { flex: 1; width: auto; margin: 0; justify-content: center; min-height: 42px; }
.palette-saved-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; max-height: 272px; overflow-y: auto; padding: 2px; }
.palette-saved .palette-preset-name { white-space: normal; line-height: 1.5; min-height: 27px; overflow-wrap: anywhere; }
.palette-saved-location { display: block; font-size: 8px; color: #6d7369; margin: 4px; }
.palette-account { margin-top: 15px; border: 1px solid #e1dacc; background: #f5f1e9; border-radius: 6px; padding: 12px; }
.palette-editor summary { color: #4f5f51; font-size: 11px; cursor: pointer; min-height: 24px; line-height: 1.6; }
.palette-account .editor-secondary { margin-top: 10px; }
.palette-preset-disclosure .palette-presets { margin-top: 14px; }
.palette-editor details summary:focus-visible { outline: 2px solid #7e9674; outline-offset: 3px; }

/* Color pairings preview the envelope, card and scene together. */
.palette-recommendations { margin: 16px 0; padding: 12px; border: 1px solid #d6ddce; border-radius: 9px; background: #f2f4ed; scroll-margin-top: 12px; }
.palette-recommendations > summary { position: relative; padding-right: 34px; min-height: 44px; }
.palette-recommendations > summary::after { content: ''; position: absolute; right: 2px; top: 5px; width: 24px; height: 24px; border: 2px solid #fffdf7; border-radius: 50%; background: conic-gradient(#7f927e 0 33%, #f2e5d0 33% 66%, #b78478 66%); box-shadow: 0 0 0 1px #c7cebd; }
.palette-recommendations-summary-title { font-size: 12px; font-weight: 600; color: #354139; }
.palette-recommendations-summary-note { display: block; margin: 4px 0 0 14px; color: #66715f; font-size: 10px; }
.palette-recommendations-body > .editor-help { margin: 10px 0; color: #626c5c; }
.palette-recommendation-seed-row { display: grid; grid-template-columns: minmax(0, 1fr) 28px auto; align-items: center; gap: 8px; }
.palette-recommendation-seed-row select { min-height: 44px; padding-right: 4px; }
.palette-recommendation-seed-swatch { width: 28px; height: 28px; border: 1px solid #0002; border-radius: 50%; }
.palette-recommendation-seed-hex { color: #58644f; font-size: 10px; font-variant-numeric: tabular-nums; }
.palette-recommendation-lock-label { margin: 15px 0 8px; color: #495644; font-size: 10px; }
.palette-recommendation-locks { display: flex; flex-wrap: wrap; gap: 5px; }
.palette-recommendation-lock { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 6px 9px; background: #fffef9; border: 1px solid #cdd5c5; border-radius: 18px; color: #59624f; font: inherit; font-size: 10px; cursor: pointer; }
.palette-recommendation-lock[aria-pressed="true"] { background: #e0e8d9; border-color: #7c906f; color: #34452f; box-shadow: inset 0 0 0 1px #7c906f; }
.palette-recommendation-lock[aria-pressed="true"]::after { content: '✓'; font-size: 10px; }
.palette-editor .palette-recommendation-lock:disabled { opacity: 1; }
.palette-recommendation-lock-swatch { width: 12px; height: 12px; flex-shrink: 0; border: 1px solid #0002; border-radius: 50%; }
.palette-recommendation-list { display: grid; gap: 10px; margin-top: 14px; }
.palette-recommendation { min-width: 0; padding: 10px; border: 1px solid #d7dacd; border-radius: 8px; background: #fffdf8; box-shadow: 0 2px 5px #33482d06; }
.palette-recommendation-main { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; align-items: center; }
.palette-recommendation-copy { min-width: 0; }
.palette-recommendation-title { color: #354139; margin: 0; font: 500 17px/1.2 Georgia, serif; }
.palette-recommendation-description { color: #68705f; margin: 6px 0 9px; font-size: 10px; line-height: 1.5; }
.palette-recommendation-preview { position: relative; height: 100px; overflow: hidden; border: 1px solid #0000000d; border-radius: 5px; isolation: isolate; }
.palette-recommendation-envelope { position: absolute; display: block; left: 8px; bottom: 12px; width: 72px; height: 46px; border: 1px solid #0002; border-radius: 2px; transform: rotate(-9deg); box-shadow: 0 2px 5px #0002; }
.palette-recommendation-envelope::after { content: ''; display: block; position: absolute; inset: 0; clip-path: polygon(0 0, 50% 65%, 100% 0); background: #ffffff20; border-top: 1px solid #fff4; }
.palette-recommendation-paper { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; top: 10px; left: 17px; width: 58px; height: 72px; padding: 5px; border: 1px solid #0001; box-shadow: 0 3px 8px #0002; text-align: center; transform: rotate(5deg); }
.palette-recommendation-overline { font: 5px/1.2 'Segoe UI', sans-serif; letter-spacing: .1em; }
.palette-recommendation-names { font: italic 12px/1.1 Georgia, serif; }
.palette-recommendation-rule { width: 20px; height: 1px; }
.palette-recommendation-message { font: 5px/1.3 Georgia, serif; }
.palette-recommendation-seal { position: absolute; right: 9px; bottom: 9px; display: grid; place-items: center; width: 21px; height: 21px; border: 2px solid #ffffff25; border-radius: 50%; font: 12px/1 Georgia, serif; box-shadow: 0 1px 3px #0003; }
.palette-recommendation-swatches { display: flex; height: 17px; border: 1px solid #0001; border-radius: 3px; overflow: hidden; }
.palette-recommendation-swatches > span { flex: 1; min-width: 0; }
.palette-recommendation-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; margin-top: 10px; }
.palette-recommendation-actions .editor-secondary { min-width: 0; min-height: 44px; padding: 7px 5px; font-size: 10px; line-height: 1.3; }
.palette-recommendation-actions [data-recommendation-action="suite"] { background: #34433c; border-color: #34433c; color: #fffdf7; }
.palette-recommendation-actions [data-recommendation-action="suite"]:enabled:hover { background: #45564b; }
.palette-recommendation-status { min-height: 34px; }
.palette-find-matches { display: block; width: 100%; min-height: 44px; margin-top: 12px; }
.palette-editor select:focus-visible { outline: 2px solid #7e9674; outline-offset: 3px; }
@media (max-width: 360px) {
  .palette-recommendations { padding: 9px; }
  .palette-recommendation { padding: 8px; }
  .palette-recommendation-main { grid-template-columns: 76px minmax(0, 1fr); gap: 8px; }
  .palette-recommendation-paper { left: 10px; }
  .palette-recommendation-envelope { left: 4px; width: 65px; }
  .palette-recommendation-title { font-size: 16px; }
}
@media (min-width: 1000px) { body.palette-editing { padding-right: 424px; } }
@media (max-width: 999px) { .palette-editor { width: auto; } }
@media (max-width: 440px) {
  .editor-scroll { padding-left: 16px; padding-right: 16px; }
  .palette-color-row { grid-template-columns: 36px minmax(64px, 1fr) 58px 44px; gap: 6px; }
  .palette-color-row.palette-text-row { grid-template-columns: 36px minmax(64px, 1fr) 58px; }
  .palette-color-input { width: 36px; }
  .palette-color-input, .palette-hex-input, .palette-row-action { min-height: 44px; height: 44px; }
  .palette-shade-strip button { height: 44px; }
}

.palette-star-control { margin-top: 18px; }
.palette-star-control label { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: #354139; }
.palette-star-control output { font-variant-numeric: tabular-nums; }
.palette-star-control input { width: 100%; margin: 12px 0 0; accent-color: #657b5d; }

/* The color studio shares the editor's quiet ivory surface and sage details. */
.palette-color-row > * { min-width: 0; }
.palette-color-input.palette-picker-trigger {
  position: relative;
  border: 4px solid #fffdf9;
  border-radius: 8px;
  background: var(--picker-color, #354139);
  box-shadow: 0 0 0 1px #cfc6b8, inset 0 0 0 1px #00000010;
  transition: box-shadow .16s ease, transform .16s ease;
}
.palette-picker-trigger::after {
  content: '';
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 7px;
  height: 7px;
  border: 1px solid #00000020;
  border-radius: 50%;
  background: #fffdf9;
  box-shadow: 0 1px 3px #0003;
}
.palette-color-input.palette-picker-trigger:hover { box-shadow: 0 0 0 1px #71816a, 0 2px 5px #35413915; }
.palette-color-input.palette-picker-trigger[aria-expanded="true"] { box-shadow: 0 0 0 2px #657b5d, 0 0 0 4px #657b5d18; }
.palette-color-studio {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 14px;
  margin-top: 3px;
  border: 1px solid #d9d4c7;
  border-radius: 10px;
  background: #f6f3ec;
  box-shadow: 0 5px 14px #35413908;
}
.palette-picker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}
.palette-picker-heading > span { color: #354139; font-family: Georgia, serif; font-size: 17px; line-height: 1.35; }
.palette-picker-heading > span::before {
  content: 'Color studio';
  display: block;
  margin-bottom: 4px;
  color: #82745e;
  font-family: 'Segoe UI', sans-serif;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.palette-picker-close {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #ded8cd;
  border-radius: 50%;
  background: #fffdf8;
  color: #64705f;
  font-family: 'Segoe UI', sans-serif;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}
.palette-picker-close:hover { border-color: #9ba68e; background: #ecefe4; }
.palette-picker-surface {
  position: relative;
  width: 100%;
  height: 150px;
  overflow: hidden;
  border: 1px solid #00000012;
  border-radius: 7px;
  background-color: var(--picker-hue, #00ff00);
  background-image: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, #fff0);
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.palette-picker-surface:focus-visible { outline: 2px solid #7e9674; outline-offset: 3px; }
.palette-picker-marker {
  position: absolute;
  width: 17px;
  height: 17px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #0007, 0 1px 5px #0005;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.palette-picker-preview-row { display: flex; align-items: center; gap: 9px; margin: 12px 0 3px; min-width: 0; }
.palette-picker-preview {
  flex: 0 0 32px;
  height: 32px;
  border: 3px solid #fffdf9;
  border-radius: 7px;
  background: var(--picker-color, #354139);
  box-shadow: 0 0 0 1px #d4ccbe, inset 0 0 0 1px #00000010;
}
.palette-picker-value { color: #4d5d49; font-family: 'Segoe UI', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.palette-picker-original {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-left: auto;
  min-height: 36px;
  max-width: 55%;
  padding: 5px 7px;
  border: 1px solid #dcd5c9;
  border-radius: 5px;
  background: #fffdf9;
  color: #746e60;
  font-family: 'Segoe UI', sans-serif;
  font-size: 9px;
  line-height: 1.3;
  cursor: pointer;
}
.palette-picker-original::before { content: ''; flex: 0 0 16px; height: 16px; border: 1px solid #0002; border-radius: 3px; background: var(--swatch-color, #fff); }
.palette-picker-original:hover { border-color: #95a08a; color: #34433c; }
.palette-picker-sliders { display: grid; margin: 4px 0 9px; }
.palette-picker-slider { display: grid; grid-template-columns: 60px minmax(0, 1fr) 31px; align-items: center; gap: 8px; min-height: 44px; }
.palette-picker-slider-label { color: #706e62; font-size: 10px; }
.palette-picker-slider-value { color: #5b6557; font-size: 10px; text-align: right; font-variant-numeric: tabular-nums; }
.palette-picker-slider input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  min-width: 0;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--picker-track, linear-gradient(90deg, #dedccd, #657b5d)) center / 100% 10px no-repeat;
  cursor: pointer;
  touch-action: pan-y;
}
.palette-picker-slider input[type="range"]::-webkit-slider-runnable-track { height: 10px; border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px #00000012; }
.palette-picker-slider input[type="range"]::-moz-range-track { height: 10px; border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px #00000012; }
.palette-picker-slider input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 19px; height: 19px; margin-top: -4.5px; border: 3px solid #fffdf9; border-radius: 50%; background: #657b5d; box-shadow: 0 0 0 1px #756d5e77, 0 1px 4px #0003; }
.palette-picker-slider input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border: 3px solid #fffdf9; border-radius: 50%; background: #657b5d; box-shadow: 0 0 0 1px #756d5e77, 0 1px 4px #0003; }
.palette-picker-rgb { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 12px; border-top: 1px solid #e2dcd0; }
.palette-picker-channel { display: flex; align-items: center; gap: 6px; padding: 0 8px; min-width: 0; border: 1px solid #d9d1c4; border-radius: 5px; background: #fffdf9; }
.palette-picker-channel > span { color: #918574; font-size: 9px; font-weight: 600; }
.palette-picker-channel input {
  appearance: textfield;
  -moz-appearance: textfield;
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #49574b;
  font-family: 'Segoe UI', sans-serif;
  font-size: 11px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.palette-picker-channel input::-webkit-inner-spin-button, .palette-picker-channel input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.palette-picker-channel:focus-within { border-color: #7e9674; outline: 2px solid #7e967433; outline-offset: 1px; }
.palette-picker-channel input:focus-visible { outline: none; }
.palette-picker-channel input[aria-invalid="true"] { color: #ac4b3f; }
.palette-picker-error { margin: 8px 0 0; color: #9c4338; font-size: 10px; line-height: 1.5; }
.palette-picker-swatches-section { margin-top: 15px; }
.palette-picker-section-label { display: block; margin-bottom: 7px; color: #7c7465; font-size: 9px; letter-spacing: .025em; }
.palette-picker-swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.palette-picker-swatch {
  position: relative;
  min-width: 0;
  height: 27px;
  padding: 0;
  border: 2px solid #fffdf9;
  border-radius: 5px;
  background: var(--swatch-color, #354139);
  box-shadow: 0 0 0 1px #d6cebf;
  cursor: pointer;
}
.palette-picker-swatch:hover { box-shadow: 0 0 0 1px #657b5d, 0 2px 4px #35413925; }
.palette-picker-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px #657b5d; }
.palette-picker-empty { margin: 0; color: #928878; font-size: 9px; line-height: 1.6; }
.palette-shade-panel { padding: 12px; border-radius: 8px; }
.palette-shade-strip button { height: 44px; transition: box-shadow .15s ease; }
.palette-shade-strip button:hover { box-shadow: 0 0 0 2px #fffdf9, 0 0 0 3px #7e9674; }
.palette-shade-strip button[aria-pressed="true"] { box-shadow: 0 0 0 2px #fffdf9, 0 0 0 3px #657b5d; }
@media (max-width: 440px) {
  .palette-color-studio { padding: 12px; }
  .palette-picker-heading { margin-bottom: 11px; }
  .palette-picker-surface { height: 140px; }
  .palette-picker-close { width: 38px; height: 38px; }
  .palette-picker-original { min-height: 44px; }
  .palette-picker-channel { padding: 0 7px; }
  .palette-picker-channel input { height: 42px; }
  .palette-picker-swatches { gap: 5px; }
  .palette-picker-swatch { height: 32px; }
}
@media (max-width: 350px) {
  .palette-color-studio { padding: 10px; }
  .palette-picker-heading > span { font-size: 16px; }
  .palette-picker-surface { height: 130px; }
  .palette-picker-slider { grid-template-columns: 53px minmax(0, 1fr) 28px; gap: 6px; }
  .palette-picker-slider-label, .palette-picker-slider-value { font-size: 9px; }
  .palette-picker-rgb { gap: 6px; }
  .palette-picker-swatches { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .palette-picker-original { gap: 5px; padding-left: 5px; padding-right: 5px; font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .palette-color-input.palette-picker-trigger, .palette-shade-strip button { transition: none; }
}

/* A focused workspace: one tool at a time, with a stable action bar. */
.palette-editor[data-workspace-ready] { width: 416px; font-size: 13px; line-height: 1.5; border-radius: 16px; }
.palette-editor[data-workspace-ready] .palette-editor-header { flex: 0 0 auto; padding: 19px 22px 15px; }
.palette-editor[data-workspace-ready] .editor-eyebrow { margin: 0; font-size: 10px; letter-spacing: .12em; }
.palette-editor[data-workspace-ready] h2 { margin-top: 4px; font-size: 27px; }
.palette-editor[data-workspace-ready] h3 { font-size: 16px; line-height: 1.35; }
.palette-editor[data-workspace-ready] .editor-preview-bar { flex: 0 0 auto; padding: 0 22px 15px; gap: 7px; }
.palette-editor[data-workspace-ready] .editor-preview-bar > span { font-size: 12px; }
.palette-editor[data-workspace-ready] .editor-preview-bar button { min-height: 36px; font-size: 12px; padding: 6px 12px; border-radius: 7px; }
.palette-workspace-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); flex: 0 0 auto; padding: 8px 14px 0; gap: 2px; border-bottom: 1px solid #e1e3d8; background: #f5f5ef; }
.palette-workspace-tab { position: relative; min-width: 0; min-height: 45px; padding: 9px 3px 12px; border: 0; background: transparent; color: #687160; font: 500 13px/1.3 'Segoe UI', sans-serif; cursor: pointer; }
.palette-workspace-tab[aria-selected="true"] { color: #2e4734; font-weight: 650; }
.palette-workspace-tab[aria-selected="true"]::after { content: ''; position: absolute; bottom: -1px; height: 3px; left: 13px; right: 13px; border-radius: 3px 3px 0 0; background: #55734e; }
.palette-editor[data-workspace-ready] .editor-scroll { padding: 21px 22px 23px; overflow-x: hidden; scroll-padding: 12px; }
.palette-workspace-panel { min-width: 0; }
.palette-workspace-panel > .editor-section { border: 0; padding: 0; margin: 0; }
.palette-editor[data-workspace-ready] .editor-section-heading { align-items: flex-start; margin-bottom: 9px; }
.palette-editor[data-workspace-ready] .editor-section-heading > span { font-size: 11px; }
.palette-editor[data-workspace-ready] .editor-help { font-size: 12px; line-height: 1.55; color: #69715f; margin: 8px 0 12px; }
.palette-editor[data-workspace-ready] .editor-field-label { font-size: 12px; font-weight: 500; margin: 16px 0 7px; }
.palette-editor[data-workspace-ready] :is(.editor-secondary, .editor-reset, .editor-primary, .palette-row-action, .palette-hex-input) { font-size: 12px; }
.palette-editor[data-workspace-ready] :is(.editor-secondary, .editor-primary, .palette-row-action, .palette-hex-input) { min-height: 40px; border-radius: 7px; }
.palette-editor[data-workspace-ready] .editor-text-input { font-size: 14px; border-radius: 7px; }
.palette-editor[data-workspace-ready] .palette-custom-fields { gap: 0; margin-top: 14px; }
.palette-editor[data-workspace-ready] .palette-color-row { gap: 7px; padding: 13px 0; border-top: 1px solid #e7e7dd; grid-template-columns: 40px minmax(70px, 1fr) 64px 50px; }
.palette-editor[data-workspace-ready] .palette-color-label { font-size: 13px; font-weight: 500; }
.palette-editor[data-workspace-ready] .palette-color-input { width: 40px; height: 40px; }
.palette-editor[data-workspace-ready] .palette-text-row { grid-template-columns: 40px minmax(70px, 1fr) 64px; }
.palette-workspace-disclosure { margin-top: 20px; padding-top: 16px; border-top: 1px solid #dedfd3; }
.palette-editor[data-workspace-ready] .palette-workspace-disclosure > summary { min-height: 36px; font-size: 13px; font-weight: 500; }
.palette-workspace-disclosure > .editor-section { border: 0; margin: 18px 0 0; padding: 0; }
.palette-workspace-disclosure .palette-star-control { margin-top: 12px; }
.palette-workspace-disclosure .palette-text-heading { margin-top: 12px; border: 0; padding: 0; }
.palette-editor[data-workspace-ready] .palette-star-control button { min-height: 40px; margin-top: 12px; padding: 8px 12px; background: #eeeae1; border: 1px solid #ded7c9; border-radius: 7px; color: #4f5f51; font: inherit; cursor: pointer; }
.palette-workspace-footer { flex: 0 0 auto; padding: 12px 22px 16px; background: #f6f6ef; border-top: 1px solid #dedfd3; }
.palette-workspace-preview-note { margin: 0 0 8px; color: #6d7665; font-size: 11px; }
.palette-workspace-draft-state { margin: 0 0 3px; color: #395638; font-size: 12px; font-weight: 600; }
.palette-workspace-draft-state.is-error { color: #943d2e; }
.palette-workspace-footer-top { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.palette-editor[data-workspace-ready] .palette-workspace-footer-top > button { padding: 8px 6px; }
.palette-editor[data-workspace-ready] .palette-workspace-footer .editor-primary { margin: 0; min-height: 42px; justify-content: center; font-size: 13px; }
.palette-editor[data-workspace-ready] .palette-workspace-footer .editor-reset { border: 1px solid #d6dacb; border-radius: 7px; min-height: 42px; color: #54654c; }
.palette-editor[data-workspace-ready] .editor-status { margin: 9px 0 0; font-size: 12px; line-height: 1.45; }
.palette-workspace-footer .editor-status:empty { display: none; }
.palette-library-tabs, .palette-text-tool-tabs, .palette-recommendation-tabs { display: flex; gap: 4px; margin: 0 0 20px; padding: 4px; border-radius: 9px; background: #ecefe5; }
:is(.palette-library-tabs, .palette-text-tool-tabs, .palette-recommendation-tabs) > button { flex: 1; min-width: 0; min-height: 38px; padding: 7px 5px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #65725b; font: 12px/1.3 'Segoe UI', sans-serif; cursor: pointer; }
:is(.palette-library-tabs, .palette-text-tool-tabs, .palette-recommendation-tabs) > button[aria-selected="true"] { border-color: #d8ddcf; background: #fffef9; color: #354c32; box-shadow: 0 1px 3px #2939270d; }
.palette-editor[data-workspace-ready] .palette-saved-list { max-height: none; overflow: visible; padding: 0; gap: 10px; }
.palette-editor[data-workspace-ready] .palette-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.palette-editor[data-workspace-ready] .palette-preset { padding: 6px; border-radius: 8px; }
.palette-editor[data-workspace-ready] .palette-swatches { height: 28px; }
.palette-editor[data-workspace-ready] .palette-preset-name { white-space: normal; font-size: 12px; line-height: 1.4; min-height: 34px; margin: 9px 3px 4px; }
.palette-editor[data-workspace-ready] .palette-saved-location { font-size: 10px; }
.palette-collection-pages { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 15px; }
.palette-collection-pages > span { color: #6d7664; font-size: 12px; font-variant-numeric: tabular-nums; }
.palette-editor[data-workspace-ready] summary { font-size: 13px; }
.palette-editor[data-workspace-ready] .palette-recommendations { margin: 0; padding: 0; border: 0; background: transparent; }
.palette-editor[data-workspace-ready] .palette-recommendations > summary { display: none; }
.palette-editor[data-workspace-ready] .palette-recommendations-body > .editor-help { margin: 0 0 18px; font-size: 13px; }
.palette-editor[data-workspace-ready] .palette-recommendations-body > .editor-field-label { margin-top: 0; }
.palette-editor[data-workspace-ready] .palette-recommendation-tabs { margin-top: 17px; margin-bottom: 16px; }
.palette-recommendation-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.palette-recommendation-options { margin: 16px 0 20px; border-bottom: 1px solid #e0e3d6; padding-bottom: 12px; }
.palette-recommendation-options-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; }
.palette-recommendation-options-summary::-webkit-details-marker { display: none; }
.palette-recommendation-options-summary::before { content: '+'; font-size: 19px; color: #637653; }
.palette-recommendation-options[open] > summary::before { content: '−'; }
.palette-recommendation-options .palette-recommendation-lock-label { margin: 0 auto 0 0; font-size: 12px; }
.palette-recommendation-lock-count { color: #75816a; font-size: 11px; }
.palette-recommendation-locks { padding-top: 12px; gap: 6px; }
.palette-editor[data-workspace-ready] .palette-recommendation-lock { min-height: 38px; font-size: 12px; padding: 7px 10px; }
.palette-editor[data-workspace-ready] .palette-recommendation-list { margin-top: 0; }
.palette-editor[data-workspace-ready] .palette-recommendation { padding: 14px; border-radius: 11px; }
.palette-editor[data-workspace-ready] .palette-recommendation-main { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }
.palette-editor[data-workspace-ready] .palette-recommendation-preview { height: 128px; }
.palette-editor[data-workspace-ready] .palette-recommendation-paper { left: 23px; top: 17px; width: 68px; height: 84px; }
.palette-editor[data-workspace-ready] .palette-recommendation-envelope { left: 10px; bottom: 17px; width: 88px; height: 53px; }
.palette-editor[data-workspace-ready] .palette-recommendation-title { font-size: 21px; }
.palette-editor[data-workspace-ready] .palette-recommendation-description { font-size: 12px; line-height: 1.5; margin: 8px 0 12px; }
.palette-editor[data-workspace-ready] .palette-recommendation-swatches { height: 22px; }
.palette-editor[data-workspace-ready] .palette-recommendation-actions { gap: 8px; margin-top: 16px; }
.palette-editor[data-workspace-ready] .palette-recommendation-actions button { font-size: 12px; min-height: 44px; }
.palette-editor[data-workspace-ready] .palette-recommendation-status { min-height: 0; margin: 14px 0 0; }
.palette-recommendation-seed-hex { font-size: 12px; }
.palette-editor[data-workspace-ready] .inline-editor-section { border: 0; padding: 0; margin: 0; }
.palette-editor[data-workspace-ready] .inline-editor-section > .editor-field-label:first-of-type { margin-top: 0; }
.palette-editor[data-workspace-ready] .inline-editor-toggle-row { border-top: 1px solid #e0e3d6; padding-top: 17px; margin-top: 22px; }
.palette-editor[data-workspace-ready] #palette-preferences-status.is-error { color: #a13e31; }
.palette-editor[data-workspace-ready] #palette-design-panel-settings .inline-editor-toggle-row { margin-bottom: 22px; }
.palette-editor[data-workspace-ready] .inline-font-heading { margin: 23px 0 12px; }
.palette-editor[data-workspace-ready] .inline-font-select { font-size: 14px; min-height: 44px; }
.palette-editor[data-workspace-ready] .inline-google-fonts { min-height: 44px; font-size: 13px; }
.palette-editor[data-workspace-ready] .inline-selection-label { font-size: 12px; margin-bottom: 17px; }
.palette-editor[data-workspace-ready] .inline-text-color-row { font-size: 13px; }
.palette-editor[data-workspace-ready] .inline-wording-editor { margin-top: 0; }
.palette-editor[data-workspace-ready] .inline-wording-input { min-height: 100px; font-size: 15px; }
.palette-editor[data-workspace-ready] .inline-wording-reset, .palette-editor[data-workspace-ready] .inline-wording-count { font-size: 12px; }
.palette-editor[data-workspace-ready] .inline-wording-hint { font-size: 12px; margin-top: 10px; }
.palette-editor[data-workspace-ready] .palette-text-tool-tabs { margin-bottom: 15px; }
.palette-editor[data-workspace-ready] :is(.palette-picker-slider-label, .palette-picker-slider-value, .palette-picker-channel, .palette-picker-field-label, .palette-picker-original) { font-size: 11px; }
.palette-editor[data-workspace-ready] :is(.palette-workspace-panel, .palette-recommendation):focus-visible { outline: 2px solid #7e9674; outline-offset: 3px; }
@media (min-width: 1000px) { body.palette-editing { padding-right: 448px; } }
@media (max-width: 999px) {
  .palette-editor[data-workspace-ready] { inset: auto 12px 12px; width: auto; height: min(740px, 80dvh); max-height: 80dvh; }
  .palette-editor[data-workspace-ready] .palette-editor-header { padding: 14px 18px 12px; }
  .palette-editor[data-workspace-ready] .editor-eyebrow { display: none; }
  .palette-editor[data-workspace-ready] h2 { font-size: 23px; margin: 0; }
  .palette-editor[data-workspace-ready] .editor-preview-bar { padding: 0 18px 12px; }
  .palette-editor[data-workspace-ready] .editor-scroll { padding: 18px; }
  .palette-workspace-footer { padding: 10px 18px 13px; }
  .palette-editing .save-the-date { padding-bottom: 83dvh; }
}
@media (max-width: 360px) {
  .palette-editor[data-workspace-ready] { inset: auto 6px 6px; }
  .palette-editor[data-workspace-ready] .editor-scroll { padding: 16px 14px; }
  .palette-editor[data-workspace-ready] .palette-color-row { grid-template-columns: 36px minmax(60px, 1fr) 58px 44px; gap: 5px; }
  .palette-editor[data-workspace-ready] .palette-text-row { grid-template-columns: 36px minmax(60px, 1fr) 58px; }
  .palette-editor[data-workspace-ready] .palette-color-input { width: 36px; }
  .palette-editor[data-workspace-ready] .palette-recommendation-main { grid-template-columns: 86px minmax(0, 1fr); gap: 10px; }
  .palette-editor[data-workspace-ready] .palette-recommendation-paper { left: 12px; width: 60px; }
  .palette-editor[data-workspace-ready] .palette-recommendation-envelope { left: 4px; width: 75px; }
  .palette-editor[data-workspace-ready] .palette-recommendation { padding: 11px; }
  .palette-editor[data-workspace-ready] .palette-recommendation-title { font-size: 19px; }
}

.inline-appearance-layer .inline-appearance-popover .editor-field-label { font-size: 12px; }
.inline-appearance-layer .inline-text-tabs button { min-height: 40px; font-size: 13px; }
.inline-appearance-layer .inline-selection-label { font-size: 12px; }
.inline-appearance-layer .inline-font-select { font-size: 14px; }
.inline-appearance-layer .inline-google-fonts { min-height: 42px; font-size: 12px; }
.inline-appearance-layer .inline-popover-color { font-size: 13px; }
.inline-appearance-layer .inline-wording-hint { font-size: 12px; }
.inline-appearance-layer :is(.inline-wording-reset, .inline-wording-count, .inline-text-reset) { font-size: 12px; }

.registry-audience-settings { margin-top: 22px; padding-top: 20px; border-top: 1px solid #dedfd3; }
.registry-audience-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 60px; padding: 12px 0; cursor: pointer; }
.registry-audience-row strong { display: block; color: #304735; font: 600 13px/1.5 'Segoe UI', sans-serif; }
.registry-audience-row small { display: block; margin-top: 4px; color: #58634f; font: 12px/1.5 'Segoe UI', sans-serif; }
.registry-audience-row input { appearance: none; position: relative; flex: 0 0 44px; width: 44px; height: 26px; margin: 0; border: 1px solid #77816d; border-radius: 20px; background: #dce0d4; cursor: pointer; }
.registry-audience-row input::before { content: ''; display: block; width: 18px; height: 18px; margin: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0003; }
.registry-audience-row input:checked { background: #4d6a45; border-color: #4d6a45; }
.registry-audience-row input:checked::before { transform: translateX(18px); }
.registry-audience-row input:focus-visible { outline: 2px solid #304735; outline-offset: 4px; }
.registry-audience-row input:disabled { opacity: .55; cursor: wait; }
#registry-audience-status { min-height: 20px; margin-top: 10px; }
