:root {
  color-scheme: light;
  --paper: #f4f1e9;
  --ink: #20201e;
  --muted: #77756e;
  --line: #d7d1c5;
  --acid: #dbe83f;
  --card: #faf8f2;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --shadow: 0 16px 44px rgba(38, 34, 27, 0.10);
  --soft-shadow: 0 8px 24px rgba(38, 34, 27, 0.055);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,.78), transparent 34%),
    var(--paper);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, label { -webkit-tap-highlight-color: transparent; }

.shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 22px env(safe-area-inset-bottom);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: inherit;
  font-weight: 760;
  font-size: 20px;
  text-decoration: none;
  letter-spacing: .05em;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border: 6px solid var(--ink);
  border-radius: 50% 50% 50% 5px;
  transform: rotate(-45deg);
}

.topbar > p, footer {
  margin: 0;
  color: var(--muted);
  font: 600 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
}

.intro { padding-top: 58px; }
.download-nav { display: inline-flex; gap: 12px; align-items: center; padding: 10px 17px; border: 1px solid var(--ink); border-radius: var(--radius-pill); color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 700; }
.download-nav:hover { background: var(--acid); }
.app-download-callout { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -12px 0 26px; padding: 18px 20px; background: var(--acid); border-radius: var(--radius-md); color: var(--ink); text-decoration: none; }
.app-download-callout strong, .app-download-callout small { display: block; }
.app-download-callout strong { font-size: 16px; margin-bottom: 5px; }
.app-download-callout small { font-size: 12px; line-height: 1.6; }
.app-download-callout > span:last-child { font-size: 25px; }
.download-intro { padding: 54px 0 26px; }
.download-intro h1 { font-size: clamp(36px, 8vw, 56px); margin-bottom: 18px; letter-spacing: -.04em; }
.download-intro p { color: var(--muted); line-height: 1.8; }
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.download-card { display: flex; flex-direction: column; align-items: stretch; padding: 26px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.download-platform-title { display: flex; align-items: center; gap: 13px; margin: 18px 0 12px; }
.download-platform-title h2 { margin: 0; font-size: 25px; }
.download-app-icon { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 13px; box-shadow: 0 5px 16px rgba(38, 34, 27, .12); }
.download-card p { flex: 1; margin-bottom: 22px; font-size: 14px; line-height: 1.8; color: var(--muted); }
.download-card .primary-button { text-decoration: none; background: var(--ink); color: var(--paper); padding: 16px; min-height: 52px; width: 100%; }
.download-card .download-pending { display: grid; place-items: center; min-height: 52px; border: 1px dashed var(--line); border-radius: var(--radius-pill); font-size: 14px; color: var(--muted); }
.release-tag { display: inline-block; border-radius: var(--radius-pill); padding: 5px 10px; background: var(--acid); font-size: 11px; font-weight: 700; }
.release-tag.is-pending { background: #e8e4db; }
.download-card .release-tag { align-self: flex-start; }
.download-showcase { margin-top: 24px; padding: 30px 26px 26px; overflow: hidden; background: var(--ink); border-radius: var(--radius-lg); color: var(--paper); }
.download-showcase-head { max-width: 560px; margin-bottom: 24px; }
.download-showcase-head .eyebrow { color: var(--acid); }
.download-showcase-head h2 { margin-bottom: 12px; font-size: clamp(25px, 5vw, 36px); line-height: 1.2; letter-spacing: -.025em; }
.download-showcase-head > p:last-child { margin-bottom: 0; color: rgba(244, 241, 233, .68); font-size: 14px; line-height: 1.8; }
.download-screenshots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.download-screenshots figure { min-width: 0; margin: 0; }
.download-screenshots img { display: block; width: 100%; height: auto; border: 1px solid rgba(255,255,255,.16); border-radius: 15px; background: var(--paper); }
.download-screenshots figcaption { padding-top: 10px; }
.download-screenshots figcaption strong, .download-screenshots figcaption span { display: block; }
.download-screenshots figcaption strong { font-size: 12px; }
.download-screenshots figcaption span { margin-top: 4px; color: rgba(244, 241, 233, .58); font-size: 10px; line-height: 1.5; }
.download-help { margin-top: 24px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.download-help h2 { font-size: 19px; }
.download-help p, .download-help li { color: var(--muted); font-size: 14px; line-height: 1.9; }
.download-help ol { padding-left: 20px; }
.download-help a, .download-footer a { color: inherit; text-underline-offset: 4px; }
.download-footer { margin: 32px 0; font-size: 12px; line-height: 2; color: var(--muted); text-align: center; }
@media (max-width: 560px) {
  .download-grid { grid-template-columns: 1fr; }
  .download-intro { padding-top: 36px; }
  .download-showcase { padding-inline: 20px; }
  .download-screenshots { grid-auto-flow: column; grid-auto-columns: minmax(190px, 68vw); grid-template-columns: none; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .download-screenshots::-webkit-scrollbar { display: none; }
  .download-screenshots figure { scroll-snap-align: start; }
}
.eyebrow {
  margin: 0 0 14px;
  color: #66645d;
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .15em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

.intro h1, .workspace-head h1 {
  margin-bottom: 18px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(42px, 10vw, 67px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.045em;
}

.lede {
  max-width: 560px;
  margin-bottom: 36px;
  color: #66645d;
  font-size: 15px;
  line-height: 1.75;
}

.capture-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 40px 24px 30px;
  overflow: hidden;
  background: #292a27;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.capture-card::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 5%, rgba(255,255,255,.08), transparent 30%),
    repeating-linear-gradient(115deg, transparent 0 28px, rgba(255,255,255,.015) 29px 30px);
  content: "";
}

.capture-graphic { position: absolute; inset: 25px; }
.corner { position: absolute; width: 36px; height: 36px; border-color: rgba(255,255,255,.48); }
.top-left { top: 0; left: 0; border-top: 1px solid; border-left: 1px solid; }
.top-right { top: 0; right: 0; border-top: 1px solid; border-right: 1px solid; }
.bottom-left { bottom: 0; left: 0; border-bottom: 1px solid; border-left: 1px solid; }
.bottom-right { right: 0; bottom: 0; border-right: 1px solid; border-bottom: 1px solid; }
.focus-dot {
  position: absolute;
  top: calc(50% - 4px);
  left: calc(50% - 4px);
  width: 8px;
  height: 8px;
  background: var(--acid);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(219,232,63,.12);
}

.primary-button, .outline-button {
  position: relative;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  min-height: 54px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--acid);
  color: #20211d;
  cursor: pointer;
  font-weight: 750;
  letter-spacing: .02em;
}

.primary-button svg { width: 21px; fill: currentColor; }
.primary-button:active, .outline-button:active { transform: translateY(1px); }

.secondary-actions {
  position: absolute;
  bottom: 28px;
  display: flex;
  gap: 12px;
  align-items: center;
  color: rgba(255,255,255,.65);
  font-size: 12px;
}
.secondary-actions label, .secondary-actions button { cursor: pointer; }
.secondary-actions button { padding: 0; border: 0; background: none; color: inherit; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(250,248,242,.62);
}
.steps > div { padding: 22px 14px; border-right: 1px solid var(--line); }
.steps > div:last-child { border-right: 0; }
.steps span { display: block; margin-bottom: 13px; color: #969188; font: 600 10px ui-monospace, monospace; }
.steps strong, .steps small { display: block; }
.steps strong { margin-bottom: 6px; font-size: 13px; }
.steps small { color: var(--muted); font-size: 11px; line-height: 1.45; }

.is-hidden { display: none; }
.workspace { padding-top: 48px; }
.workspace-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 26px; }
.workspace-head h1 { margin: 0; font-size: clamp(34px, 7vw, 52px); }
.text-button { padding: 9px 14px; border-radius: var(--radius-pill); background: #e9e4d8; cursor: pointer; font-size: 12px; }

.photo-card {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  background: #d8d4ca;
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  touch-action: none;
  user-select: none;
}
.photo-stage {
  position: absolute;
  inset: 0;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: 0 0;
  will-change: transform;
}
#photoCanvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
#recolorCanvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
#recolorSelectionCanvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.photo-card[data-photo-mode="pan"] #photoCanvas { cursor: grab; }
.photo-card[data-photo-mode="recolor"] #photoCanvas { cursor: cell; }
.photo-card[data-photo-mode="recolor"][data-recolor-tool="add"] #photoCanvas { cursor: crosshair; }
.photo-card[data-photo-mode="recolor"][data-recolor-tool="subtract"] #photoCanvas { cursor: not-allowed; }
.photo-card.is-gesturing #photoCanvas { cursor: grabbing; }
.photo-card.is-comparing #recolorCanvas, .photo-card.is-comparing #recolorSelectionCanvas { opacity: 0; }
.photo-card:not([data-photo-mode="recolor"]) #recolorSelectionCanvas { opacity: 0; }
.photo-card[data-photo-mode="recolor"] .picker-layer { opacity: .28; }
.photo-hint {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 4;
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  background: rgba(20,20,18,.75);
  color: white;
  font-size: 10px;
  letter-spacing: .04em;
  backdrop-filter: blur(8px);
}
.photo-toolbar {
  position: absolute;
  bottom: 12px;
  left: 50%;
  z-index: 6;
  display: flex;
  gap: 4px;
  align-items: center;
  max-width: calc(100% - 24px);
  min-height: 48px;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-pill);
  background: rgba(25,26,23,.86);
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  color: white;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}
.photo-toolbar button {
  min-width: 38px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.1);
  color: inherit;
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
}
.photo-toolbar button[aria-pressed="true"] { background: var(--acid); color: var(--ink); }
.photo-mode-switch { display: flex; gap: 3px; }
.photo-toolbar output { min-width: 43px; font: 700 10px ui-monospace, monospace; text-align: center; }
.recolor-photo-tools {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 7;
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius-pill);
  background: rgba(25,26,23,.86);
  box-shadow: 0 7px 20px rgba(0,0,0,.18);
  backdrop-filter: blur(12px);
}
.recolor-photo-tools[hidden] { display: none; }
.recolor-photo-tools button { min-height: 34px; padding: 0 10px; border: 0; border-radius: var(--radius-pill); background: transparent; color: white; font-size: 9px; font-weight: 750; }
.recolor-photo-tools button[aria-pressed="true"] { background: var(--acid); color: var(--ink); }
.recolor-panel {
  margin: 14px 0 35px;
  padding: 18px;
  border: 1px solid #d5cec1;
  border-radius: var(--radius-xl);
  background: #eee9df;
  box-shadow: var(--soft-shadow);
}
.recolor-panel[hidden] { display: none; }
.recolor-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.recolor-head h2 { margin: 3px 0 0; font-size: 22px; }
.recolor-head > span { flex: 0 0 auto; padding: 6px 9px; border-radius: var(--radius-pill); background: #ded8cc; color: var(--muted); font: 700 8px ui-monospace, monospace; }
.recolor-intro { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 8px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.recolor-intro span, .recolor-intro strong { padding: 5px 8px; border-radius: var(--radius-pill); background: #dfd9cd; }
.recolor-intro strong { background: var(--ink); color: white; }
.recolor-color-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.recolor-color {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 50px;
  padding: 7px 10px;
  border: 1px solid #cec7ba;
  border-radius: 14px;
  background: #fffdf8;
  cursor: pointer;
}
.recolor-color input { width: 36px; height: 36px; padding: 0; overflow: hidden; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.recolor-color input::-webkit-color-swatch-wrapper { padding: 0; }
.recolor-color input::-webkit-color-swatch { border: 1px solid rgba(0,0,0,.1); border-radius: 9px; }
.recolor-color span, .recolor-color small, .recolor-color strong { display: block; }
.recolor-color small { margin-bottom: 2px; color: var(--muted); font-size: 8px; }
.recolor-color strong { font: 750 10px ui-monospace, monospace; }
.recolor-color-row button, .recolor-actions button {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #cbc4b7;
  border-radius: 12px;
  background: #fffdf8;
  color: inherit;
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
}
.recolor-color-row button:disabled, .recolor-color input:disabled { cursor: default; opacity: .42; }
.recolor-quick-colors { display: flex; gap: 6px; margin: 9px 0 13px; }
.recolor-quick-colors button { flex: 1 1 34px; height: 31px; min-width: 24px; padding: 0; border: 2px solid transparent; border-radius: 9px; background: var(--quick-color); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); cursor: pointer; }
.recolor-quick-colors button[aria-pressed="true"] { border-color: #fff; outline: 2px solid var(--ink); }
.recolor-quick-colors button:disabled { cursor: default; filter: grayscale(.65); opacity: .38; }
.recolor-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 12px; border-radius: 14px; background: #e3ddd1; }
.recolor-controls label > span { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 9px; }
.recolor-controls output { color: var(--muted); font: 700 8px ui-monospace, monospace; }
.recolor-controls input { width: 100%; accent-color: var(--ink); }
.recolor-regions { display: flex; gap: 6px; overflow-x: auto; margin-top: 12px; padding: 2px 1px 5px; scrollbar-width: thin; }
.recolor-regions:empty { display: none; }
.recolor-region {
  display: grid;
  grid-template-columns: 25px auto;
  gap: 2px 7px;
  align-items: center;
  flex: 0 0 auto;
  min-width: 104px;
  padding: 7px 9px;
  border: 1px solid #d0c9bc;
  border-radius: 12px;
  background: #fffdf8;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.recolor-region i { grid-row: 1 / 3; width: 25px; height: 32px; border-radius: 8px; background: var(--region-color); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.recolor-region strong { font-size: 9px; }
.recolor-region small { color: var(--muted); font: 650 7px ui-monospace, monospace; }
.recolor-region[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.recolor-status { min-height: 18px; margin: 8px 1px 4px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.recolor-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.recolor-actions button:disabled { cursor: default; opacity: .38; }
.recolor-actions .is-primary { border-color: var(--ink); background: var(--ink); color: white; }
.picker-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.color-pin {
  position: absolute;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 3px solid white;
  border-radius: 50%;
  outline: 1px solid rgba(0,0,0,.26);
  background: var(--pin-color, #000);
  box-shadow: 0 2px 8px rgba(0,0,0,.34);
  color: white;
  cursor: grab;
  font: 700 8px ui-monospace, monospace;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(var(--pin-scale, 1));
  transition: width .15s, height .15s, box-shadow .15s;
}
.color-pin::after {
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  content: "";
}
.color-pin[aria-pressed="true"] {
  width: 38px;
  height: 38px;
  box-shadow: 0 3px 13px rgba(0,0,0,.44), 0 0 0 3px rgba(255,255,255,.5);
}
.color-loupe {
  position: absolute;
  z-index: 5;
  display: none;
  width: 76px;
  height: 76px;
  border: 4px solid white;
  border-radius: 50%;
  outline: 1px solid rgba(0,0,0,.3);
  box-shadow: 0 5px 18px rgba(0,0,0,.38);
  image-rendering: pixelated;
  pointer-events: none;
  transform: translate(-50%, -100%);
}
.color-loupe.is-visible { display: block; }

.palette-section { margin: 35px 0; }
.palette-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin: -3px 0 10px; }
.palette-actions > span { margin-right: auto; color: var(--muted); font: 700 9px ui-monospace, monospace; }
.palette-actions button { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 11px; background: #fffdf8; color: inherit; font-size: 9px; font-weight: 700; }
.palette-actions button:disabled { opacity: .38; }
.section-title { display: flex; align-items: end; justify-content: space-between; margin-bottom: 15px; }
.section-title h2 { margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-size: 24px; font-weight: 500; }
.section-title > span { color: var(--muted); font: 600 10px ui-monospace, monospace; letter-spacing: .1em; }
.palette { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; padding: 6px; border-radius: var(--radius-md); background: #e6e1d6; box-shadow: var(--soft-shadow); }
.palette button {
  position: relative;
  height: 68px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--swatch);
  color: white;
  cursor: pointer;
  transition: transform .2s;
}
.palette button span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 2px 3px;
  background: rgba(0,0,0,.42);
  border-radius: var(--radius-pill);
  font: 600 7px ui-monospace, monospace;
  letter-spacing: -.02em;
}
.palette button:hover { transform: translateY(-3px); }
.palette button[aria-pressed="true"]::after {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(255,255,255,.96);
  box-shadow: 0 2px 6px rgba(31,30,27,.22);
  color: var(--ink);
  content: "✓";
  font: 900 9px/1 system-ui, sans-serif;
}
.palette button[aria-pressed="true"] { z-index: 1; transform: translateY(-2px) scale(1.025); box-shadow: 0 7px 14px rgba(31,30,27,.15); }

.update-note {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,253,248,.62);
}
.update-note summary { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; min-height: 54px; padding: 0 16px; cursor: pointer; list-style: none; }
.update-note summary::-webkit-details-marker { display: none; }
.update-note summary span { padding: 4px 7px; border-radius: var(--radius-pill); background: var(--acid); font: 800 8px ui-monospace, monospace; letter-spacing: .08em; }
.update-note summary strong { font-size: 12px; }
.update-note summary em { color: var(--muted); font-size: 9px; font-style: normal; }
.update-note[open] summary em { font-size: 0; }
.update-note[open] summary em::after { font-size: 9px; content: "收起"; }
.update-note > div { padding: 0 16px 14px; color: #6e6a62; font-size: 10px; line-height: 1.65; }
.update-note p { margin: 0; padding-top: 10px; border-top: 1px solid var(--line); }
.update-note p + p { margin-top: 8px; }

.color-card, .recipe-card, .coverage-card {
  margin-bottom: 14px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--soft-shadow);
}
.color-summary { display: grid; grid-template-columns: 68px 1fr auto; gap: 16px; align-items: center; }
.selected-swatch { width: 68px; height: 68px; border-radius: var(--radius-md); background: #000; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.color-summary p { overflow: hidden; margin-bottom: 5px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.color-summary h2 { overflow: hidden; margin: 0; font: 500 27px/1 ui-monospace, SFMono-Regular, monospace; letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap; }
.color-summary button { padding: 9px 13px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: transparent; cursor: pointer; font-size: 11px; white-space: nowrap; }
.color-card-actions { display: flex; gap: 6px; align-items: center; min-height: 38px; }
.color-card-actions #gamutCorrectButton { border-color: #b8c81a; background: var(--accent); color: var(--ink); font-weight: 800; }
.color-card-actions #gamutUndoButton { border-color: #c7bfb2; background: #ebe6dc; }
.values { display: grid; grid-template-columns: 1fr 1fr; margin-top: 18px; border-top: 1px solid var(--line); }
.values div { padding-top: 14px; }
.values div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.values span, .values strong { display: block; }
.values span { margin-bottom: 5px; color: var(--muted); font: 600 9px ui-monospace, monospace; letter-spacing: .12em; }
.values strong { overflow: hidden; font: 500 12px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }

.recipe-card, .coverage-card { padding: 24px 20px; }
.recipe-card .section-title, .coverage-card .section-title { align-items: center; }
.recipe-card .eyebrow, .coverage-card .eyebrow { margin-bottom: 8px; }
.paint-hero-icons {
  display: flex;
  gap: 0;
  align-items: end;
  height: 46px;
  padding: 0 3px 2px 0;
}
.paint-hero-icons .paint-icon:nth-child(1) { transform: rotate(-6deg) translateY(3px); }
.paint-hero-icons .paint-icon:nth-child(2) { transform: rotate(-2deg); }
.paint-hero-icons .paint-icon:nth-child(3) { transform: rotate(2deg); }
.paint-hero-icons .paint-icon:nth-child(4) { transform: rotate(6deg) translateY(2px); }
.paint-icon {
  --paint: #787a73;
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  background-image: url('assets/paint-icons/paint-jars-sprite-web-v1.png');
  background-repeat: no-repeat;
  background-size: 200% 200%;
  filter: drop-shadow(0 2px 2px rgba(31,29,24,.13));
  pointer-events: none;
  vertical-align: middle;
}
.paint-icon--jar { background-position: 0 0; }
.paint-icon--aqueous { background-position: 100% 0; }
.paint-icon--mr { background-position: 0 100%; }
.paint-icon--acrysion { background-position: 100% 100%; }
.paint-icon--vallejo { background-position: 0 100%; }
.paint-icon--domestic { background-position: 100% 100%; }
.paint-icon--shockwave { background-position: 100% 100%; }
.paint-icon--gaia { background-position: 0 100%; }
.paint-icon--citadel { background-position: 0 100%; }
.paint-icon.is-large { width: 43px; height: 43px; transform-origin: bottom center; }
.paint-icon.is-row-icon::after,
.paint-icon.is-recipe-icon::after,
.paint-icon.is-inventory-icon::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 8px;
  height: 8px;
  border: 2px solid #fffdf8;
  border-radius: 50%;
  background: var(--paint);
  box-shadow: 0 1px 2px rgba(0,0,0,.22);
  content: "";
}
.paint-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 20px 0 10px;
}
.paint-tabs button {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 54px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f1ede4;
  color: #6e6a62;
  cursor: pointer;
  text-align: left;
}
.paint-tabs button[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: white; box-shadow: var(--soft-shadow); }
.paint-tabs span { font-size: 13px; font-weight: 780; }
.paint-tabs small { grid-column: 1 / -1; margin-top: 3px; color: currentColor; font-size: 9px; opacity: .66; }
.paint-tabs strong { min-width: 38px; padding: 4px 7px; border-radius: var(--radius-pill); background: rgba(255,255,255,.76); color: #383834; font: 700 9px ui-monospace, monospace; text-align: center; }
.brand-switch {
  display: flex;
  gap: 4px;
  margin: 10px 0 18px;
  padding: 3px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  background: #e8e3d9;
  cursor: grab;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  touch-action: pan-x;
  user-select: none;
}
.brand-switch.is-dragging { cursor: grabbing; }
.brand-switch.is-dragging button { pointer-events: none; }
.brand-switch::-webkit-scrollbar { display: none; }
.brand-switch button {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
  align-items: center;
  min-height: 40px;
  padding: 5px 11px 5px 7px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #79756c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.brand-switch .paint-icon { width: 30px; height: 30px; }
.brand-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
}
.catalog-browser { margin: -8px 0 16px; border: 1px solid #d5cec2; border-radius: 18px; background: #f5f1e8; }
.catalog-browser > summary { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 9px 13px; cursor: pointer; list-style: none; }
.catalog-browser > summary::-webkit-details-marker { display: none; }
.catalog-browser > summary span, .catalog-browser > summary strong, .catalog-browser > summary small { display: block; }
.catalog-browser > summary strong { margin-bottom: 3px; font-size: 11px; }
.catalog-browser > summary small { color: var(--muted); font-size: 8px; }
.catalog-browser > summary b { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: #e4dfd4; font: 750 8px ui-monospace, monospace; }
.catalog-browser[open] > summary { border-bottom: 1px solid #ddd6ca; }
.catalog-browser-body { padding: 12px; }
.catalog-browser-head, .catalog-series-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.catalog-browser-head { margin-bottom: 8px; font-size: 9px; font-weight: 750; }
.catalog-browser-head small { color: var(--muted); font-size: 8px; font-weight: 500; }
.catalog-brand-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 6px; }
.catalog-brand-list button, .catalog-series-list button { border: 1px solid #d4cdbf; background: #fffdf8; color: inherit; cursor: pointer; text-align: left; }
.catalog-brand-list button { min-height: 46px; padding: 8px 9px; border-radius: 13px; }
.catalog-brand-list button strong, .catalog-brand-list button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-brand-list button strong { margin-bottom: 3px; font-size: 10px; }
.catalog-brand-list button small { color: var(--muted); font: 650 7px ui-monospace, monospace; }
.catalog-brand-list button[aria-busy="true"] { opacity: .62; }
.catalog-brand-list button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: white; }
.catalog-brand-list button[aria-pressed="true"] small { color: #cfcbc2; }
.catalog-series-panel { margin-top: 10px; padding: 11px; border-radius: 15px; background: #e9e4da; }
.catalog-series-panel[hidden] { display: none; }
.catalog-series-head span, .catalog-series-head strong, .catalog-series-head small { display: block; }
.catalog-series-head strong { margin-bottom: 3px; font-size: 12px; }
.catalog-series-head small { color: var(--muted); font-size: 8px; }
.catalog-series-head button { min-height: 31px; padding: 0 10px; border: 1px solid #ccc5b8; border-radius: 10px; background: #fffdf8; color: inherit; cursor: pointer; font-size: 8px; font-weight: 700; }
.catalog-category-summary { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.catalog-category-summary span, .catalog-kind { padding: 4px 6px; border-radius: 7px; background: #d9d3c8; color: #625e57; font: 700 7px ui-monospace, monospace; }
.catalog-category-summary span[data-category="ordinary"] { background: #fffdf8; color: var(--ink); }
.catalog-series-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; }
.catalog-series-list button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 48px; padding: 7px 8px 7px 10px; border-radius: 12px; }
.catalog-series-list button > span { min-width: 0; }
.catalog-series-list button strong, .catalog-series-list button small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-series-list button strong { margin-bottom: 3px; font-size: 9px; }
.catalog-series-list button small { color: var(--muted); font-size: 7px; }
.catalog-series-list button[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.catalog-disclaimer { margin: 10px 2px 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.target-vault { margin: -6px 0 10px; padding: 13px; border: 1px solid #d7d0c3; border-radius: 17px; background: #f4f0e7; }
.target-vault-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.target-vault-head strong, .target-vault-head small { display: block; }
.target-vault-head strong { margin-bottom: 3px; font-size: 11px; }
.target-vault-head small { color: var(--muted); font-size: 8px; line-height: 1.45; }
.target-vault-head > span { flex: 0 0 auto; padding: 5px 8px; border-radius: var(--radius-pill); background: #e2ddd2; font: 700 8px ui-monospace, monospace; }
.saved-target-list { display: flex; gap: 7px; min-height: 42px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.saved-target-list::-webkit-scrollbar { display: none; }
.saved-target-empty { display: flex; align-items: center; min-height: 42px; color: #817c73; font-size: 9px; }
.saved-target { position: relative; flex: 0 0 auto; min-height: 42px; padding-right: 24px; border: 1px solid #d2cbbf; border-radius: 13px; background: #fffdf8; color: inherit; }
.saved-target[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.saved-target-load { display: grid; grid-template-columns: 26px auto; gap: 7px; align-items: center; min-height: 40px; padding: 5px 4px 5px 6px; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.saved-target-load > i { width: 26px; height: 26px; border: 1px solid rgba(0,0,0,.09); border-radius: 9px; background: var(--target-color); }
.saved-target-load > span strong, .saved-target-load > span small { display: block; }
.saved-target-load > span strong { font: 700 9px ui-monospace, monospace; }
.saved-target-load > span small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.saved-target-delete { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #9a4d46; cursor: pointer; font-size: 13px; }
.saved-target-delete.is-confirming { background: #9a4d46; color: white; }
.saved-palette-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #d8d1c5; }
.saved-palette-head span, .saved-palette-head strong, .saved-palette-head small { display: block; }
.saved-palette-head strong { margin-bottom: 3px; font-size: 10px; }
.saved-palette-head small { color: var(--muted); font-size: 8px; }
.saved-palette-head > b { padding: 5px 8px; border-radius: 999px; background: #e2ddd2; font: 700 8px ui-monospace, monospace; }
.saved-palette-list { display: grid; gap: 6px; margin-top: 8px; }
.saved-palette-empty { color: var(--muted); font-size: 8px; line-height: 1.5; }
.saved-palette-set { overflow: hidden; border: 1px solid #d4cdc0; border-radius: 13px; background: #fffdf8; }
.saved-palette-set > summary { display: grid; grid-template-columns: minmax(92px, 1fr) minmax(95px, auto) 16px; gap: 9px; align-items: center; min-height: 45px; padding: 7px 9px; cursor: pointer; list-style: none; }
.saved-palette-set > summary::-webkit-details-marker { display: none; }
.saved-palette-set > summary > span:nth-child(2) { min-width: 0; }
.saved-palette-set > summary strong, .saved-palette-set > summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-palette-set > summary strong { margin-bottom: 3px; font-size: 9px; }
.saved-palette-set > summary small { color: var(--muted); font-size: 7px; }
.saved-palette-set > summary > b { transition: transform .18s; }
.saved-palette-set[open] > summary > b { transform: rotate(180deg); }
.saved-palette-strip { display: flex; height: 30px; overflow: hidden; border: 1px solid rgba(0,0,0,.07); border-radius: 9px; }
.saved-palette-strip i { flex: 1 1 12px; min-width: 9px; background: var(--saved-color); }
.saved-palette-detail { padding: 9px; border-top: 1px solid #e2dcd0; }
.saved-palette-detail > div { display: flex; flex-wrap: wrap; gap: 5px; }
.saved-palette-detail > div span { display: grid; grid-template-columns: 16px auto; gap: 2px 5px; align-items: center; padding: 5px 6px; border-radius: 9px; background: #eee9df; }
.saved-palette-detail i { grid-row: 1 / 3; width: 16px; height: 28px; border-radius: 6px; background: var(--saved-color); }
.saved-palette-detail b, .saved-palette-detail code { font: 650 7px ui-monospace, monospace; }
.saved-palette-detail code { color: var(--muted); }
.saved-palette-detail p { margin: 8px 1px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.saved-palette-detail footer { display: flex; gap: 6px; }
.saved-palette-detail button { min-height: 34px; padding: 0 11px; border: 1px solid #cbc4b7; border-radius: 10px; background: #fffdf8; color: inherit; font-size: 8px; font-weight: 750; }
.saved-palette-detail button:first-child { border-color: var(--ink); background: var(--ink); color: white; }
.saved-palette-detail button:last-child { color: #9a4d46; }
.paint-scope { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; padding: 9px 10px 9px 12px; border-radius: 15px; background: #e9e4da; }
.paint-scope > span strong, .paint-scope > span small { display: block; }
.paint-scope > span strong { margin-bottom: 2px; font-size: 10px; }
.paint-scope > span small { color: var(--muted); font-size: 8px; }
.paint-scope > div { display: grid; grid-template-columns: 1fr 1fr; flex: 0 0 190px; gap: 2px; padding: 3px; border-radius: 12px; background: #d9d3c7; }
.paint-scope button { min-height: 32px; border: 0; border-radius: 9px; background: transparent; color: #706c64; cursor: pointer; font-size: 9px; font-weight: 750; }
.paint-scope button[aria-pressed="true"] { background: #fffdf8; color: var(--ink); box-shadow: 0 1px 4px rgba(50,46,39,.09); }
.match-empty { padding: 18px 14px; border: 1px dashed #cbc4b8; border-radius: 14px; color: #777269; font-size: 10px; line-height: 1.55; text-align: center; }
.inventory-panel { margin-top: 2px; padding: 16px; border-radius: var(--radius-md); background: #eae5da; }
.inventory-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.inventory-head strong, .inventory-head small { display: block; }
.inventory-head strong { margin-bottom: 4px; font-size: 12px; }
.inventory-head small { color: #77736b; font-size: 9px; }
.inventory-head button, .inventory-actions button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  color: #55524c;
  cursor: pointer;
  font-size: 10px;
}
.inventory-panel input {
  width: 100%;
  height: 38px;
  margin: 14px 0 8px;
  padding: 0 11px;
  border: 1px solid #d2ccbf;
  border-radius: var(--radius-sm);
  outline: 0;
  background: #f8f5ed;
  color: inherit;
  font-size: 11px;
}
.inventory-panel input:focus { border-color: #777269; }
.inventory-actions { display: flex; gap: 14px; margin: 5px 0 10px; }
.custom-paint-add { margin: 0 0 10px; padding: 9px 10px; border: 1px solid #d0c9bd; border-radius: 13px; background: #f5f1e9; }
.custom-paint-add summary { cursor: pointer; color: #5f5b54; font-size: 9px; font-weight: 750; }
.custom-paint-add > div { display: grid; grid-template-columns: .7fr 1fr auto auto; gap: 6px; margin-top: 9px; }
.custom-paint-add input { height: 36px; margin: 0; }
.custom-paint-add label { display: flex; gap: 5px; align-items: center; color: #777269; font-size: 8px; }
.custom-paint-add input[type="color"] { width: 40px; padding: 3px; }
.custom-paint-add button { min-height: 36px; padding: 0 10px; border: 0; border-radius: 10px; background: var(--ink); color: white; font-size: 9px; font-weight: 750; }
.custom-paint-add > small { display: block; margin-top: 7px; color: #817c73; font-size: 8px; line-height: 1.45; }
.inventory-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  max-height: 260px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
  background: #d7d1c5;
}
.inventory-item {
  display: grid;
  grid-template-columns: 17px 30px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 39px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #f8f5ed;
  cursor: pointer;
}
.inventory-item input { width: 13px; height: 13px; margin: 0; accent-color: #252522; }
.inventory-item .paint-icon { width: 28px; height: 28px; }
.inventory-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inventory-item strong { display: block; margin-bottom: 2px; font: 700 10px ui-monospace, monospace; }
.inventory-item small { display: block; overflow: hidden; color: #858077; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.inventory-item > b { color: #777269; font: 700 8px ui-monospace, monospace; white-space: nowrap; }
.records-panel { margin-top: 2px; padding: 16px; border-radius: var(--radius-md); background: #eae5da; }
.records-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.records-head strong, .records-head small { display: block; }
.records-head strong { margin-bottom: 4px; font-size: 12px; }
.records-head small { color: #77736b; font-size: 9px; line-height: 1.45; }
.records-head button { padding: 0; border: 0; border-bottom: 1px solid currentColor; background: none; color: #55524c; cursor: pointer; font-size: 10px; }
.records-list { display: grid; gap: 9px; }
.records-empty { padding: 34px 18px; border: 1px dashed #c9c2b5; border-radius: var(--radius-md); color: #77736b; text-align: center; }
.records-empty strong, .records-empty span { display: block; }
.records-empty strong { margin-bottom: 6px; color: var(--ink); font-size: 12px; }
.records-empty span { font-size: 9px; line-height: 1.55; }
.record-item { overflow: hidden; border: 1px solid #d4cec1; border-radius: 16px; background: #f8f5ed; }
.record-summary { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 14px; gap: 9px; align-items: center; min-height: 58px; padding: 9px 10px; cursor: pointer; list-style: none; }
.record-summary::-webkit-details-marker { display: none; }
.record-swatch { width: 40px; height: 40px; border: 1px solid rgba(0,0,0,.08); border-radius: 12px; background: var(--record-color); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.record-title { min-width: 0; }
.record-title strong, .record-title span { display: block; }
.record-title strong { margin-bottom: 5px; font: 750 12px ui-monospace, monospace; }
.record-title span { overflow: hidden; color: #79756d; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.record-date { align-self: start; color: #8b867c; font: 600 8px ui-monospace, monospace; white-space: nowrap; }
.record-expand { color: #777269; font-size: 12px; transition: transform .18s; }
.record-item[open] .record-expand { transform: rotate(180deg); }
.record-detail { border-top: 1px solid #ddd7cb; }
.record-attributes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; border-top: 1px solid #ddd7cb; border-bottom: 1px solid #ddd7cb; background: #ddd7cb; }
.record-attributes span { padding: 8px 10px; background: #f2eee5; color: #6f6b63; font-size: 8px; line-height: 1.45; }
.record-attributes strong { color: var(--ink); }
.record-recipe { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 11px 5px; }
.record-recipe span { padding: 5px 7px; border-radius: var(--radius-pill); background: #e6e1d7; font: 650 8px ui-monospace, monospace; }
.record-note { display: block; padding: 6px 11px 10px; }
.record-note span { display: block; margin-bottom: 5px; color: #77736b; font-size: 8px; }
.record-note textarea { width: 100%; min-height: 52px; resize: vertical; padding: 8px 9px; border: 1px solid #d7d0c4; border-radius: 10px; outline: 0; background: #fffdf8; color: inherit; font: 10px/1.5 system-ui, sans-serif; }
.record-note textarea:focus { border-color: #777269; }
.record-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 2px 11px 11px; }
.record-actions button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #ccc5b8;
  border-radius: 12px;
  background: #fffdf8;
  color: #5f5b54;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
  touch-action: manipulation;
}
.record-actions .record-load { border-color: #22221f; background: #22221f; color: #fffdf8; }
.record-actions .record-delete { color: #9a4d46; }
.record-actions .record-delete.is-confirming { border-color: #9a4d46; background: #9a4d46; color: #fff; }
.free-mix-panel { margin-top: 2px; padding: 16px; border-radius: var(--radius-md); background: #eae5da; }
.free-mix-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.free-mix-head strong, .free-mix-head small { display: block; }
.free-mix-head strong { margin-bottom: 5px; font-size: 13px; }
.free-mix-head small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.free-mix-head button, .free-mix-actions button, .free-paint-add button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #cbc5b9;
  border-radius: 12px;
  background: #fffdf8;
  color: inherit;
  cursor: pointer;
  font-size: 10px;
  font-weight: 720;
}
.free-paint-add { margin-bottom: 13px; }
.free-paint-add > label { display: block; margin-bottom: 7px; color: #716d65; font-size: 9px; }
.free-paint-add > div { display: grid; grid-template-columns: 42px 1fr auto; gap: 7px; }
.free-paint-preview { position: relative; display: grid; place-items: center; width: 42px; height: 42px; overflow: hidden; border: 1px solid #cbc5b9; border-radius: 12px; background: #fffdf8; }
.free-paint-preview i { width: 28px; height: 28px; border: 1px solid rgba(0,0,0,.1); border-radius: 9px; background: var(--free-color, transparent); }
.free-paint-preview b { position: absolute; right: 2px; bottom: 2px; padding: 1px 3px; border-radius: 5px; background: rgba(32,32,30,.82); color: white; font: 700 7px ui-monospace, monospace; }
.free-paint-preview[hidden] { display: none; }
.free-paint-add select {
  min-width: 0;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #cbc5b9;
  border-radius: 12px;
  outline: 0;
  background: #fffdf8;
  color: inherit;
  font-size: 11px;
}
.free-mix-list { display: grid; gap: 7px; }
.free-mix-empty { padding: 28px 14px; border: 1px dashed #c6bfb2; border-radius: 14px; color: #77736b; font-size: 10px; line-height: 1.6; text-align: center; }
.free-mix-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 82px;
  padding: 9px 10px;
  border: 1px solid #d5cec1;
  border-radius: 14px;
  background: #f8f5ed;
}
.free-mix-swatch { width: 34px; height: 34px; border: 1px solid rgba(0,0,0,.1); border-radius: 11px; background: var(--free-color); }
.free-mix-name { min-width: 0; }
.free-mix-name strong, .free-mix-name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.free-mix-name strong { margin-bottom: 3px; font: 750 11px ui-monospace, monospace; }
.free-mix-name span { color: var(--muted); font-size: 9px; }
.free-part-control { display: grid; grid-template-columns: minmax(120px, 1fr) 56px; grid-column: 2 / -1; gap: 10px; align-items: center; }
.free-part-control input { width: 100%; height: 32px; margin: 0; accent-color: var(--ink); cursor: ew-resize; touch-action: pan-y; }
.free-remove {
  min-width: 48px;
  height: 36px;
  padding: 0;
  border: 1px solid #d1cabd;
  border-radius: 10px;
  background: #fffdf8;
  color: inherit;
  cursor: pointer;
  font-size: 10px;
  font-weight: 720;
}
.free-part-control output { font: 750 10px ui-monospace, monospace; text-align: center; }
.free-remove { grid-column: 3; grid-row: 1; border-color: #dfc9c5; background: #fffaf6; color: #9a4d46; }
.free-mix-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border-radius: 16px;
  background: var(--ink);
  color: white;
}
.free-result-swatches { display: flex; gap: 8px; align-items: center; }
.free-result-swatches > div { display: flex; gap: 6px; align-items: center; color: #d2cec4; font-size: 9px; }
.free-result-swatches i { width: 31px; height: 31px; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; background: var(--free-preview, transparent); }
.free-mix-result > div:last-child { text-align: right; }
.free-mix-result strong, .free-mix-result > div:last-child span { display: block; }
.free-mix-result strong { margin-bottom: 4px; font: 750 15px ui-monospace, monospace; }
.free-mix-result > div:last-child span { color: #c7c3b9; font-size: 9px; }
.free-direction {
  display: grid;
  grid-template-columns: 174px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 9px;
  padding: 12px;
  border: 1px solid #d2cbbf;
  border-radius: 17px;
  background: #f8f5ed;
}
.free-direction[hidden] { display: none; }
.free-direction-map {
  position: relative;
  width: 174px;
  height: 174px;
  overflow: hidden;
  border: 1px solid rgba(32,32,30,.12);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(33,143,89,.22), transparent 44%, transparent 56%, rgba(214,58,62,.22)),
    linear-gradient(0deg, rgba(45,89,184,.22), transparent 44%, transparent 56%, rgba(236,194,39,.24)),
    #f4f1e9;
}
.free-direction-map svg { width: 100%; height: 100%; }
.direction-axis { stroke: rgba(32,32,30,.18); stroke-width: 1; stroke-dasharray: 3 4; }
.direction-arrow { stroke: #20201e; stroke-width: 2.3; fill: none; }
#freeArrowHead path { fill: #20201e; }
.direction-target { fill: #f8f5ed; stroke: #20201e; stroke-width: 2.5; }
.direction-current { fill: var(--direction-current, #777); stroke: white; stroke-width: 3; filter: drop-shadow(0 1px 2px rgba(0,0,0,.28)); }
.axis-label { position: absolute; z-index: 2; color: #6d6961; font-size: 8px; font-weight: 800; pointer-events: none; }
.axis-label.is-red { right: 8px; top: 50%; transform: translateY(-50%); }
.axis-label.is-green { left: 8px; top: 50%; transform: translateY(-50%); }
.axis-label.is-yellow { left: 50%; top: 7px; transform: translateX(-50%); }
.axis-label.is-blue { left: 50%; bottom: 7px; transform: translateX(-50%); }
.free-direction-copy small, .free-direction-copy strong { display: block; }
.free-direction-copy small { margin-bottom: 7px; color: #817c73; font: 700 8px ui-monospace, monospace; letter-spacing: .06em; }
.free-direction-copy strong { font-size: 12px; line-height: 1.45; }
.free-direction-copy p { margin: 5px 0 9px; color: #716d65; font-size: 9px; line-height: 1.55; }
.free-direction-copy > div { display: flex; flex-wrap: wrap; gap: 5px; }
.free-direction-copy b,
.free-direction-copy button { padding: 6px 8px; border: 0; border-radius: 9px; background: #e9e4d9; color: inherit; font: 720 8px ui-monospace, monospace; }
.free-direction-copy button { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.free-direction-copy button:hover { background: #ded8cc; }
.free-direction-copy button:active { transform: translateY(1px); }
.free-direction-copy button:disabled { cursor: not-allowed; opacity: .42; }
.free-direction-copy button i { width: 11px; height: 11px; flex: none; border: 1px solid rgb(0 0 0 / .1); border-radius: 50%; background: var(--free-color); }
.free-mix-actions { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 7px; margin-top: 9px; }
.free-mix-actions .is-primary { border-color: var(--ink); background: var(--ink); color: white; }
.free-mix-note { margin: 12px 2px 0; color: #77736b; font-size: 9px; line-height: 1.55; }
.special-panel { margin-top: 2px; padding: 18px; border: 1px solid #d9d3c8; border-radius: 22px; background: linear-gradient(145deg, #f3efe7, #ebe6dc); box-shadow: inset 0 1px 0 rgba(255,255,255,.72); }
.special-head, .special-base-row, .special-reference { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.special-head strong, .special-head small, .special-base-row strong, .special-base-row small, .special-reference strong, .special-reference small { display: block; }
.special-title { display: flex; gap: 10px; align-items: center; }
.special-title > i { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.34); border-radius: 50%; background: radial-gradient(circle at 30% 25%, #fff 0 5%, #6d7897 25%, #273044 62%, #11141b 100%); box-shadow: inset -7px -8px 14px rgba(0,0,0,.35), 0 7px 16px rgba(29,32,39,.18); }
.special-head strong { margin-bottom: 4px; font-size: 14px; }
.special-head small, .special-base-row small, .special-reference small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.special-badge { flex: 0 0 auto; padding: 6px 9px; border-radius: var(--radius-pill); background: var(--ink); color: var(--acid); font: 750 8px ui-monospace, monospace; letter-spacing: .08em; }
.special-toolbar { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px; margin: 16px 0 12px; }
.special-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; border-radius: 14px; background: #ded8cc; }
.special-mode button { min-height: 38px; border: 0; border-radius: 11px; background: transparent; color: #777269; font-size: 11px; font-weight: 750; }
.special-mode button[aria-pressed="true"] { background: #fffdf8; color: var(--ink); box-shadow: 0 1px 4px rgba(50,46,39,.08); }
.special-product { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; padding-left: 11px; border: 1px solid #d1cabf; border-radius: 14px; background: rgba(255,253,248,.7); color: #777168; font-size: 9px; font-weight: 700; }
.special-product select { width: 100%; height: 42px; padding: 0 30px 0 8px; border: 0; background: transparent; color: var(--ink); font-size: 10px; font-weight: 700; }
.special-layer-manager { margin: 0 0 13px; padding: 11px; border: 1px solid #cec7ba; border-radius: 17px; background: #f5f1e8; }
.special-layer-manager[hidden] { display: none; }
.special-layer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.special-layer-head strong, .special-layer-head small { display: block; }
.special-layer-head strong { margin-bottom: 3px; font-size: 11px; }
.special-layer-head small { color: var(--muted); font-size: 8px; }
.special-layer-head button { min-height: 34px; padding: 0 10px; border: 1px solid #292925; border-radius: 10px; background: #292925; color: white; font-size: 8px; font-weight: 750; }
.special-layer-list { display: grid; gap: 5px; }
.special-layer-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; padding: 5px; border: 1px solid transparent; border-radius: 12px; background: #e7e1d6; }
.special-layer-item.is-active { border-color: #292925; background: #fffdf8; }
.special-layer-item.is-hidden { opacity: .48; }
.special-layer-select { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: center; min-width: 0; padding: 0; border: 0; background: none; color: inherit; text-align: left; }
.special-layer-select i { width: 30px; height: 30px; border: 1px solid rgba(0,0,0,.08); border-radius: 9px; background: var(--layer-color); }
.special-layer-select strong, .special-layer-select small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.special-layer-select strong { margin-bottom: 3px; font-size: 9px; }
.special-layer-select small { color: var(--muted); font-size: 7px; }
.special-layer-actions { display: flex; align-items: center; gap: 2px; }
.special-layer-actions button { width: 28px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: rgba(255,255,255,.55); color: #5f5b54; font-size: 11px; }
.special-layer-actions button:disabled { opacity: .25; }
.special-base-layer { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; margin-top: 5px; padding: 6px; border-top: 1px solid #d6cfc2; color: var(--muted); }
.special-base-layer i { width: 30px; height: 30px; border-radius: 9px; }
.special-base-layer strong, .special-base-layer small { display: block; }
.special-base-layer strong { color: var(--ink); font-size: 9px; }
.special-base-layer small, .special-base-layer b { font-size: 7px; font-weight: 600; }
.special-workbench { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(260px, .82fr); gap: 12px; align-items: stretch; }
.special-canvas-wrap { position: relative; min-width: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 22px; background: #12151b; box-shadow: 0 16px 32px rgba(31,33,39,.16), inset 0 0 0 1px rgba(0,0,0,.45); touch-action: none; }
.special-canvas-wrap.is-transparent-preview { border-color: #d7dde2; background: #eef1f4; box-shadow: 0 14px 30px rgba(63,72,82,.12), inset 0 1px 0 rgba(255,255,255,.8); }
.special-canvas-wrap canvas { display: block; width: 100%; height: 100%; min-height: 330px; object-fit: cover; }
.special-canvas-wrap #specialWebGLCanvas[hidden] { display: none; }
.special-canvas-wrap.is-webgl-ready #specialCanvas { display: none; }
.special-canvas-wrap.is-webgl-ready #specialWebGLCanvas { display: block; }
.special-canvas-meta { position: absolute; top: 14px; left: 15px; color: white; pointer-events: none; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.special-canvas-meta small, .special-canvas-meta strong { display: block; }
.special-canvas-meta small { margin-bottom: 5px; color: rgba(255,255,255,.48); font: 650 7px ui-monospace, monospace; letter-spacing: .15em; }
.special-canvas-meta strong { font-size: 10px; font-weight: 700; }
.special-canvas-wrap.is-transparent-preview .special-canvas-meta { color: #27313b; text-shadow: 0 1px 0 rgba(255,255,255,.8); }
.special-canvas-wrap.is-transparent-preview .special-canvas-meta small { color: rgba(39,49,59,.48); }
.special-canvas-wrap > span { position: absolute; right: 12px; bottom: 12px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-pill); background: rgba(15,17,22,.46); color: rgba(255,255,255,.72); font-size: 8px; backdrop-filter: blur(10px); }
.special-canvas-wrap.is-transparent-preview > span { border-color: rgba(48,62,74,.12); background: rgba(255,255,255,.62); color: #55616c; }
.special-settings { min-width: 0; padding: 14px; border: 1px solid #d6cfc3; border-radius: 20px; background: rgba(255,253,248,.74); }
.special-base-row { align-items: center; }
.special-base-actions { display: flex; gap: 6px; }
.special-base-actions button, .special-base-actions label, .special-reference > label { display: inline-flex; align-items: center; min-height: 32px; padding: 0 9px; border: 1px solid #d0c9bd; border-radius: 10px; background: #fffdf8; color: inherit; cursor: pointer; font-size: 8px; font-weight: 700; }
.special-base-actions input { width: 20px; height: 20px; margin-left: 5px; padding: 0; border: 0; border-radius: 6px; background: none; }
.special-base-actions label:has(input:disabled) { opacity: .42; }
.special-presets { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin: 11px 0 16px; }
.special-presets button { position: relative; min-width: 0; min-height: 39px; padding: 27px 0 0; border: 0; background: transparent; color: #777168; font-size: 7px; }
.special-presets button::before { position: absolute; top: 0; left: 50%; width: 23px; height: 23px; border: 1px solid rgba(0,0,0,.12); border-radius: 8px; background: var(--base); box-shadow: inset 0 1px 1px rgba(255,255,255,.35); content: ""; transform: translateX(-50%); }
.special-presets button[data-transparent-base]::before, .special-base-layer.is-transparent i { background-color: #edf0f3; background-image: linear-gradient(45deg, #cbd0d5 25%, transparent 25%), linear-gradient(-45deg, #cbd0d5 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #cbd0d5 75%), linear-gradient(-45deg, transparent 75%, #cbd0d5 75%); background-position: 0 0, 0 6px, 6px -6px, -6px 0; background-size: 12px 12px; }
.special-presets button[aria-pressed="true"]::before { outline: 2px solid var(--ink); outline-offset: 2px; }
.special-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 13px; padding-top: 14px; border-top: 1px solid #ddd6ca; }
.special-controls label > span { display: flex; justify-content: space-between; margin-bottom: 8px; color: #656159; font-size: 9px; font-weight: 700; }
.special-controls output { color: #827d74; font: 700 9px ui-monospace, monospace; }
.special-controls input { width: 100%; height: 16px; margin: 0; accent-color: var(--ink); }
.special-result { margin-top: 15px; padding: 12px 14px; border-radius: 14px; background: var(--ink); color: #d7d3c9; font-size: 10px; line-height: 1.6; }
.special-result strong { color: white; }
.special-reference { align-items: center; margin-top: 11px; padding: 12px; border: 1px solid #d1cabd; border-radius: 15px; background: #f5f1e8; }
.special-note { margin: 12px 2px; color: #77736b; font-size: 9px; line-height: 1.6; }
.match-hero {
  display: grid;
  grid-template-columns: 74px 18px 74px 1fr;
  gap: 10px;
  align-items: center;
  padding: 18px 0 22px;
  border-bottom: 1px solid var(--line);
}
.match-swatch {
  position: relative;
  width: 74px;
  height: 74px;
  background: var(--match-color);
  border: 1px solid rgba(0,0,0,.09);
  border-radius: var(--radius-md);
}
.match-swatch small {
  position: absolute;
  bottom: 4px;
  left: 5px;
  padding: 2px 4px;
  background: rgba(255,255,255,.76);
  border-radius: var(--radius-pill);
  color: #333;
  font: 600 8px ui-monospace, monospace;
}
.match-arrow { color: #918b81; text-align: center; }
.match-copy { min-width: 0; padding-left: 3px; }
.match-copy p { margin: 0 0 5px; color: #656258; font: 700 10px ui-monospace, monospace; letter-spacing: .06em; }
.match-copy h3 { margin: 0 0 7px; font: 700 20px/1 ui-monospace, monospace; }
.match-copy strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.match-choice-label { margin: 15px 0 8px; color: #777269; font-size: 10px; }
.mix-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 14px 0 20px;
  padding: 3px;
  border-radius: 14px;
  background: #e8e3d9;
}
.mix-mode-switch button {
  min-height: 34px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #777269;
  font-size: 11px;
  font-weight: 700;
}
.mix-mode-switch button[aria-pressed="true"] {
  background: #fffdf8;
  color: var(--ink);
  box-shadow: 0 1px 4px rgb(50 46 39 / 8%);
}
.mix-mode-switch button:disabled {
  cursor: not-allowed;
  opacity: .48;
}
.match-list { display: grid; gap: 6px; margin: 0 0 22px; }
.match-row {
  display: grid;
  grid-template-columns: 30px 78px 1fr auto;
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.match-row:hover { background: #f3efe5; }
.match-row[aria-pressed="true"] { position: relative; z-index: 1; border-color: #b9b3a6; background: #e7e4d4; box-shadow: inset 3px 0 0 var(--ink), var(--soft-shadow); }
.match-row[aria-pressed="true"] > span:first-child { color: var(--ink); }
.match-row > span:first-child { color: #99948a; font: 600 9px ui-monospace, monospace; }
.match-row .paint-code { font: 700 11px ui-monospace, monospace; }
.match-row .paint-name { display: flex; gap: 5px; align-items: center; min-width: 0; overflow: hidden; color: #706d65; font-size: 11px; white-space: nowrap; }
.match-row .paint-name em { overflow: hidden; font-style: normal; text-overflow: ellipsis; }
.paint-icon.is-row-icon { width: 25px; height: 25px; }
.match-row .delta { color: #807b72; font: 600 10px ui-monospace, monospace; }
.blend-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.blend-head span, .blend-head small { display: block; }
.blend-head span { margin-bottom: 5px; font-size: 13px; font-weight: 750; }
.blend-head small { color: var(--muted); font-size: 10px; }
.blend-head strong { color: #68645c; font: 700 10px ui-monospace, monospace; }
.recipe-bar { display: flex; height: 12px; margin: 22px 0; overflow: hidden; border-radius: var(--radius-pill); background: #e8e3d9; }
.recipe-bar span { min-width: 2px; }
.blend-preview {
  display: grid;
  grid-template-columns: auto 18px auto 1fr;
  gap: 9px;
  align-items: center;
  margin: -6px 0 22px;
  color: #8A867D;
  font-size: 10px;
}
.blend-preview > div { display: flex; gap: 6px; align-items: center; }
.blend-preview i { width: 22px; height: 22px; border: 1px solid rgba(0,0,0,.1); border-radius: 7px; background: var(--preview); }
.blend-preview strong { color: #666158; font: 600 10px ui-monospace, monospace; text-align: right; }
.recipe-list { display: grid; gap: 12px; }
.recipe-row { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; min-height: 48px; padding: 7px 11px; border-radius: var(--radius-sm); background: #f1ede4; }
.paint-icon.is-recipe-icon { width: 30px; height: 30px; }
.recipe-row strong { font-size: 13px; }
.recipe-row span:last-child { color: var(--muted); font: 600 12px ui-monospace, monospace; }
.recipe-tip { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: #66645d; font-size: 12px; line-height: 1.65; }
.tuning-guide {
  margin-top: 14px;
  padding: 13px 14px;
  background: #efebdf;
  border-radius: var(--radius-md);
  color: #625f58;
  font-size: 11px;
  line-height: 1.65;
}
.tuning-guide strong { color: var(--ink); }
.save-recipe { margin-top: 14px; }
.save-recipe button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 46px; padding: 0 14px; border: 0; border-radius: 15px; background: var(--ink); color: white; cursor: pointer; box-shadow: var(--soft-shadow); }
.save-recipe button span { font-size: 12px; font-weight: 760; }
.save-recipe button strong { padding: 4px 7px; border-radius: var(--radius-pill); background: rgba(255,255,255,.13); font: 700 9px ui-monospace, monospace; }
.save-recipe button.is-saved { background: #395c4d; }
.save-recipe p { min-height: 16px; margin: 7px 2px 0; color: #8a867d; font-size: 9px; line-height: 1.5; }
.chart-source { margin: 14px 0 0; color: #8A867D; font-size: 9px; line-height: 1.55; }
.chart-source a { color: inherit; text-decoration-color: #aaa49a; text-underline-offset: 2px; }

.coverage-card { margin-top: 14px; }
.coverage-intro { margin: -2px 0 22px; color: #706d65; font-size: 11px; line-height: 1.65; }
.coverage-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.coverage-label strong { font-size: 12px; }
.coverage-label span { color: var(--muted); font: 600 9px ui-monospace, monospace; }
.primer-switch { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 22px; }
.primer-switch button {
  display: grid;
  gap: 6px;
  justify-items: center;
  min-width: 0;
  padding: 7px 3px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #f6f2e9;
  color: inherit;
  cursor: pointer;
}
.primer-switch button[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.primer-switch button:disabled { opacity: .35; cursor: not-allowed; filter: grayscale(.45); }
.primer-switch i { width: 28px; height: 28px; border: 1px solid rgba(0,0,0,.12); border-radius: 9px; background: var(--primer); }
.primer-switch span, .primer-switch small { display: block; }
.primer-switch span { font: 700 8px ui-monospace, monospace; }
.primer-switch small { margin-top: 2px; color: var(--muted); font: 500 8px system-ui, sans-serif; }
.coverage-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 22px; }
.coverage-strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 3px; border-radius: 13px; background: #e8e3d9; }
.coverage-strength button { min-height: 34px; padding: 0 7px; border: 0; border-radius: 10px; background: transparent; color: #777269; font-size: 10px; font-weight: 700; }
.coverage-strength button[aria-pressed="true"] { background: #fffdf8; color: var(--ink); box-shadow: 0 1px 4px rgb(50 46 39 / 8%); }
.coat-control { display: block; }
.coat-control > span { display: flex; justify-content: space-between; margin-bottom: 13px; font-size: 12px; }
.coat-control output { color: var(--muted); font: 600 10px ui-monospace, monospace; }
.coat-control input { width: 100%; accent-color: var(--ink); }
.coverage-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.coverage-preview > div { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #f4f0e7; }
.coverage-preview i { display: block; width: 100%; aspect-ratio: 1.25; margin-bottom: 9px; border: 1px solid rgba(0,0,0,.08); border-radius: 12px; background: var(--coverage-color, #888); }
.coverage-preview span, .coverage-preview strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coverage-preview span { margin-bottom: 3px; color: var(--muted); font-size: 9px; }
.coverage-preview strong { font: 700 9px ui-monospace, monospace; }
.coverage-result { margin: 14px 0 0; padding: 12px 14px; border-radius: var(--radius-md); background: #eae5da; color: #5f5b54; font-size: 11px; line-height: 1.6; }
.coverage-method { margin: 12px 0 0; color: #8a867d; font-size: 9px; line-height: 1.55; }

.notice { display: grid; grid-template-columns: 24px 1fr; gap: 11px; padding: 17px 18px; border-radius: var(--radius-lg); background: #e9e4d8; }
.notice > span { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid #78746c; border-radius: 50%; font: 700 11px serif; }
.notice p { margin: 0; color: #6c6962; font-size: 11px; line-height: 1.65; }
.notice strong { color: var(--ink); }
.outline-button { width: 100%; margin-top: 14px; background: transparent; border: 1px solid var(--ink); }

footer { padding: 56px 0 30px; text-align: center; }
.promo-url-badge {
  position: fixed;
  z-index: 99;
  bottom: 26px;
  left: 50%;
  display: flex;
  gap: 10px;
  align-items: center;
  width: max-content;
  padding: 11px 18px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius-pill);
  background: rgba(27,28,25,.94);
  box-shadow: 0 8px 24px rgba(0,0,0,.24);
  color: white;
  pointer-events: none;
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}
.promo-url-badge[hidden] { display: none; }
.promo-url-badge span { color: var(--acid); font-size: 10px; font-weight: 750; letter-spacing: .08em; }
.promo-url-badge strong { font: 800 15px ui-monospace, monospace; letter-spacing: .02em; }
.native-dock[hidden] { display: none; }
.native-dock {
  position: fixed;
  right: 12px;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 12px;
  z-index: 100;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  max-width: 520px;
  margin: auto;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 22px;
  background: rgba(28,29,26,.92);
  box-shadow: 0 12px 34px rgba(0,0,0,.28);
  backdrop-filter: blur(16px);
}
.native-dock button {
  display: grid;
  gap: 3px;
  justify-items: center;
  min-height: 51px;
  padding: 5px 4px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #d1cec5;
  font-size: 9px;
}
.native-dock button span { color: var(--acid); font-size: 18px; line-height: 1; }
.native-dock button:active { background: rgba(255,255,255,.1); }
html.is-native-app body { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
html.is-native-app .topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  margin: 0 -22px;
  padding: 0 22px;
  background: rgba(244,241,233,.9);
  backdrop-filter: blur(14px);
}

@media (max-width: 520px) {
  .shell { padding-right: 16px; padding-left: 16px; }
  .intro { padding-top: 42px; }
  .capture-card { min-height: 300px; }
  .steps { grid-template-columns: 1fr; }
  .steps > div { display: grid; grid-template-columns: 34px 1fr; padding: 16px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .steps > div:last-child { border-bottom: 0; }
  .steps span { grid-row: 1 / 3; margin: 3px 0 0; }
  .steps strong { margin-bottom: 2px; }
  .palette button { height: 62px; }
  .workspace { padding-top: 36px; }
  .photo-toolbar { bottom: 9px; min-height: 46px; }
  .photo-toolbar button { min-width: 35px; min-height: 35px; padding: 0 8px; }
  .photo-hint { top: 9px; right: 9px; font-size: 9px; }
  .photo-card[data-photo-mode="recolor"] .photo-hint { display: none; }
  .recolor-photo-tools { top: 9px; left: 9px; }
  .recolor-photo-tools button { min-height: 32px; padding: 0 8px; font-size: 8px; }
  .recolor-panel { padding: 14px; }
  .recolor-color-row { grid-template-columns: 1fr; }
  .recolor-controls { grid-template-columns: 1fr; gap: 10px; }
  .recolor-actions { grid-template-columns: 1fr 1fr; }
  .color-summary { grid-template-columns: 58px 1fr auto; gap: 12px; }
  .selected-swatch { width: 58px; height: 58px; }
  .color-summary h2 { font-size: 22px; }
  .color-card-actions { display: grid; gap: 4px; align-content: center; min-height: 68px; }
  .color-summary button { padding: 7px 9px; font-size: 9px; }
  .match-hero { grid-template-columns: 60px 14px 60px 1fr; gap: 7px; }
  .match-swatch { width: 60px; height: 60px; }
  .match-copy h3 { font-size: 16px; }
  .match-row { grid-template-columns: 26px 68px 1fr auto; padding-right: 6px; padding-left: 6px; }
  .blend-preview { grid-template-columns: auto 14px auto; }
  .blend-preview strong { grid-column: 1 / -1; text-align: left; }
  .inventory-list { grid-template-columns: 1fr; }
  .custom-paint-add > div { grid-template-columns: 1fr 1fr; }
  .custom-paint-add button { grid-column: 1 / -1; }
  .paint-scope { display: block; }
  .paint-scope > div { width: 100%; margin-top: 8px; }
  .paint-tabs { grid-template-columns: repeat(2, 1fr); }
  .paint-tabs button { grid-template-columns: 1fr auto; align-content: center; }
  .paint-tabs button strong { justify-self: start; margin-top: 4px; }
  .paint-tabs small { display: none; }
  .record-summary { grid-template-columns: 44px minmax(0, 1fr) 14px; }
  .record-swatch { grid-row: 1 / 3; width: 44px; height: 44px; }
  .record-date { grid-column: 2; margin-top: -8px; }
  .record-expand { grid-column: 3; grid-row: 1; }
  .free-mix-head { display: block; }
  .free-mix-head button { width: 100%; margin-top: 10px; }
  .free-mix-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .free-part-control { grid-column: 1 / -1; width: 100%; }
  .free-remove { grid-column: 3; grid-row: 1; }
  .free-mix-result { align-items: start; }
  .free-direction { grid-template-columns: 1fr; }
  .free-direction-map { width: min(174px, 100%); margin: auto; }
  .free-mix-actions { grid-template-columns: 1fr 1fr; }
  .free-mix-actions .is-primary { grid-column: 1 / -1; }
  .free-result-swatches { align-items: start; }
  .special-toolbar, .special-workbench { grid-template-columns: 1fr; }
  .special-canvas-wrap canvas { min-height: 280px; }
  .special-base-row, .special-reference { align-items: stretch; flex-direction: column; }
  .special-base-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .special-reference > label { justify-content: center; }
  .special-layer-head { align-items: stretch; flex-direction: column; }
  .special-layer-head button { width: 100%; }
  .special-layer-actions button { width: 30px; }
  .primer-switch { grid-template-columns: repeat(3, 1fr); }
  .coverage-controls { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 360px) {
  .special-controls { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Native option menus cannot display reliable swatches on iOS. */
#freePaintSelect[hidden] { display: none; }
#freePaintPickerOpen { min-width: 0; text-align: left; overflow-wrap: anywhere; }
.paint-picker { box-sizing: border-box; width: min(440px, calc(100vw - 24px)); max-height: 80dvh; padding: 16px; border: 1px solid #cbc5b9; border-radius: 22px; background: #faf7ef; color: #242422; }
.paint-picker::backdrop { background: rgb(0 0 0 / .35); }
.paint-picker header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.paint-picker header button { padding: 10px; border: 0; border-radius: 10px; cursor: pointer; }
.paint-picker input { box-sizing: border-box; width: 100%; padding: 12px; font-size: 16px; border: 1px solid #cbc5b9; border-radius: 12px; margin-bottom: 12px; }
.paint-picker-choices { display: grid; gap: 6px; max-height: 55dvh; overflow-y: auto; }
.paint-picker-choices button { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px; border: 1px solid transparent; border-radius: 12px; background: #fffdf8; color: inherit; text-align: left; cursor: pointer; font-size: 14px; line-height: 1.5; }
.paint-picker-choices button[aria-pressed="true"] { border-color: #242422; }
.paint-picker-choices i { flex: 0 0 32px; height: 32px; border: 1px solid rgb(0 0 0 / .15); border-radius: 9px; background: var(--free-color); }
.paint-picker-choices span { overflow-wrap: anywhere; }

/* Palette collection actions must remain usable in mobile and embedded browsers. */
#paletteSetSubmit { display: block; width: 100%; min-height: 44px; padding: 10px 16px; border: 0; border-radius: var(--radius-sm); background: var(--ink); color: var(--paper); font: inherit; cursor: pointer; }
#paletteSetNameLabel { display: block; margin-bottom: 6px; }
#paletteSetNameLabel[hidden] { display: none; }
