/* ═══════════════════════════════════════════════════════════
   小狗绞胎 · style.css
   ═══════════════════════════════════════════════════════════ */

/* ── 1. Design Tokens ─────────────────────────────────────── */
:root {
  --primary:       #E8704A;
  --primary-soft:  #F2A684;
  --primary-tint:  #FCEFE7;
  --primary-press: #D45D3A;

  --bg:          #FAF6EF;
  --bg-elevated: #FFFCF6;
  --bg-card:     #FFFFFF;

  --ink-1: #2A2620;
  --ink-2: #6B6358;
  --ink-3: #9C9387;
  --ink-4: #C8BFB1;
  --line:        #ECE6DB;
  --line-strong: #DCD4C5;

  --warn:      #C9583E;
  --warn-soft: #F8E6E0;
  --success:   #5A8F6E;

  --r-card:   18px;
  --r-button: 14px;
  --shadow-card: 0 1px 2px rgba(60,45,25,0.04), 0 8px 24px -8px rgba(60,45,25,0.08);
  --shadow-pop:  0 1px 2px rgba(60,45,25,0.05), 0 16px 36px -10px rgba(60,45,25,0.14);

  --font-cn:  -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-num: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
}

/* ── 2. Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100vh;
  height: 100dvh;
}

body {
  font-family: var(--font-cn);
  color: var(--ink-1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ── 3. Page System ───────────────────────────────────────── */
/* Each screen is a fixed full-viewport layer; only .active is shown. */
.page {
  display: none;
  position: fixed;
  inset: 0;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}
.page.active { display: flex; }

/* ── 4. Safe-area spacers ─────────────────────────────────── */
/* Replaces the React version's fixed 56 px PhoneStatusBar.
   With viewport-fit=cover in the meta tag, this fills the real
   status-bar area on every iPhone model. Falls back to 0 on desktop. */
.status-spacer {
  height: env(safe-area-inset-top, 0px);
  flex-shrink: 0;
}

/* ── 5. Typography helpers ────────────────────────────────── */
.t-display { font-family: var(--font-cn); font-weight: 600; letter-spacing: -0.02em; }
.t-num     { font-family: var(--font-num); font-feature-settings: "tnum" 1; letter-spacing: -0.01em; }

/* ── 6. App chrome ────────────────────────────────────────── */
.app-screen {
  width: 100%; height: 100%;
  background: var(--bg);
  font-family: var(--font-cn);
  color: var(--ink-1);
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}

.app-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.app-scroll::-webkit-scrollbar { display: none; }

/* ── 7. Top bar ───────────────────────────────────────────── */
.top-bar {
  height: 48px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
  position: relative; z-index: 4;
}
.top-bar__left  { width: 64px; display: flex; justify-content: flex-start; }
.top-bar__title { flex: 1; text-align: center; font-size: 16px; font-weight: 500; color: var(--ink-1); }
.top-bar__right { width: 64px; display: flex; justify-content: flex-end; }

/* ── 8. Buttons ───────────────────────────────────────────── */
.btn-primary {
  height: 52px; border: 0;
  border-radius: var(--r-button);
  background: var(--primary);
  color: #fff;
  font-family: var(--font-cn); font-weight: 500; font-size: 16px; letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: transform .15s, background .15s, box-shadow .2s;
  box-shadow: 0 4px 12px -2px rgba(232,112,74,0.32);
}
.btn-primary:active  { transform: scale(0.98); background: var(--primary-press); }
.btn-primary:disabled { background: var(--ink-4); box-shadow: none; cursor: not-allowed; }

.btn-ghost {
  height: 44px; border: 0; border-radius: var(--r-button);
  background: transparent; color: var(--ink-2);
  font-family: var(--font-cn); font-size: 15px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}

/* Back chevron — btn-ghost variant */
.back-btn { height: 32px; padding: 0 4px 0 0; }

/* Save pill in recipe top-bar */
.save-btn {
  height: 32px; padding: 0 12px; border-radius: 16px;
  background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 500;
  border: 0; cursor: pointer; font-family: var(--font-cn);
  transition: background .15s;
}
.save-btn:disabled { background: var(--ink-4); opacity: 0.65; cursor: not-allowed; }

/* Generic transparent icon button (trash, etc.) */
.icon-btn {
  border: 0; background: transparent; padding: 6px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* ─────────────────────────────────────────────────────────────
   9. Screen: Home
   ───────────────────────────────────────────────────────────── */
.home-logo { padding: 12px 24px 0; }
.home-logo__row { display: flex; align-items: center; gap: 10px; }
.home-wordmark {
  font-family: var(--font-cn); font-weight: 600;
  font-size: 18px; letter-spacing: 0.18em; color: var(--ink-1);
}

.home-scroll {
  padding: 40px 24px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column;
}

.home-greeting { margin-top: 16px; }
.home-greeting__l1 { font-size: 30px; line-height: 1.25; color: var(--ink-1); }
.home-greeting__l2 { font-size: 30px; line-height: 1.25; color: var(--ink-2); }

.home-new-card {
  margin-top: 36px; height: 168px;
  border: 0; border-radius: calc(var(--r-card) + 4px);
  background: linear-gradient(160deg, #FFE9DC 0%, #FCD3BB 100%);
  color: var(--ink-1);
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: space-between;
  padding: 20px; cursor: pointer;
  box-shadow: var(--shadow-card);
  font-family: var(--font-cn); text-align: left;
  position: relative; overflow: hidden;
  width: 100%;
  transition: transform .15s;
}
.home-new-card:active { transform: scale(0.98); }

.home-new-card__blob {
  position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(232,112,74,0.14); pointer-events: none;
}
.home-new-card__icon {
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px -4px rgba(232,112,74,0.5); flex-shrink: 0;
}
.home-new-card__title { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.home-new-card__sub   { font-size: 13px; color: var(--ink-2); }

.home-history-btn {
  margin-top: 14px; height: 64px;
  border: 0; border-radius: var(--r-card);
  background: var(--bg-card);
  display: flex; align-items: center; padding: 0 18px; gap: 14px;
  cursor: pointer; box-shadow: var(--shadow-card);
  font-family: var(--font-cn); width: 100%;
  transition: transform .15s;
}
.home-history-btn:active { transform: scale(0.98); }

.home-history-btn__icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--primary-tint);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.home-history-btn__body { flex: 1; text-align: left; }
.home-history-btn__title { font-size: 15px; font-weight: 500; color: var(--ink-1); }
.home-history-btn__sub   { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ─────────────────────────────────────────────────────────────
   10. Screen: Color Count
   ───────────────────────────────────────────────────────────── */
.count-scroll {
  padding: 8px 24px calc(24px + env(safe-area-inset-bottom, 0px));
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Image preview (has-image state) */
.count-preview {
  aspect-ratio: 1; border-radius: var(--r-card); overflow: hidden;
  background: #fff; box-shadow: var(--shadow-card); position: relative;
  cursor: pointer;
}
.count-preview__vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.06));
  pointer-events: none;
}
.count-preview__filename {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 8px; padding: 4px 10px;
  font-size: 11px; color: var(--ink-2); font-family: var(--font-num);
}

/* Upload placeholder (no-image state) */
.count-upload-empty {
  width: 100%; aspect-ratio: 1;
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-card);
  background: rgba(255,255,255,0.5);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; cursor: pointer; font-family: var(--font-cn); padding: 24px;
  transition: background .15s;
}
.count-upload-empty:active { background: rgba(255,255,255,0.7); }

.count-upload-empty__illus   { position: relative; width: 76px; height: 64px; }
.count-upload-empty__paper-b {
  position: absolute; top: 6px; left: 12px; width: 56px; height: 48px;
  border-radius: 8px; background: var(--primary-tint);
  transform: rotate(-6deg); box-shadow: inset 0 0 0 1px rgba(232,112,74,0.18);
}
.count-upload-empty__paper-f {
  position: absolute; top: 8px; left: 18px; width: 56px; height: 48px;
  border-radius: 8px; background: #fff;
  box-shadow: 0 4px 12px -4px rgba(60,45,25,0.18), inset 0 0 0 1px var(--line);
  display: flex; align-items: center; justify-content: center;
  transform: rotate(3deg);
}
.count-upload-empty__title { font-size: 15px; font-weight: 500; color: var(--ink-1); }
.count-upload-empty__hint  { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* Prompt text */
.count-prompt { margin-top: 28px; text-align: center; }
.count-prompt__title { font-size: 19px; }
.count-prompt__sub   { font-size: 13px; color: var(--ink-3); margin-top: 6px; }

/* Stepper group — dimmed when no image */
.stepper-row {
  margin-top: 18px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.stepper-row--dim { opacity: 0.4; pointer-events: none; }

.stepper-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  font-size: 22px; font-weight: 400; line-height: 1; font-family: var(--font-num);
  background: var(--bg-card); color: var(--ink-1); box-shadow: var(--shadow-card);
  transition: transform .12s, background .15s;
}
.stepper-btn:disabled { background: var(--line); color: var(--ink-4); box-shadow: none; cursor: not-allowed; }
.stepper-btn:not(:disabled):active { transform: scale(0.92); }

.count-display {
  width: 96px; height: 76px; border-radius: 18px;
  background: var(--bg-card); box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.count-display__num  { font-size: 44px; font-weight: 600; color: var(--primary); line-height: 1; }
.count-display__unit { position: absolute; right: 14px; bottom: 12px; font-size: 11px; color: var(--ink-3); }

.count-range-hint { margin-top: 10px; text-align: center; font-size: 11px; color: var(--ink-3); }

/* "揉泥" loading dot */
.kneading-dot {
  display: inline-block; width: 16px; height: 16px;
  background: #fff; opacity: 0.95;
  animation: knead 1.2s infinite ease-in-out;
}

/* ─────────────────────────────────────────────────────────────
   11. Screen: Recipe
   ───────────────────────────────────────────────────────────── */
.recipe-scroll {
  padding: 4px 16px 24px;
}

/* Fixed-bottom save bar — sits below the scroll area as a natural flex child */
.recipe-action-bar {
  flex-shrink: 0;
  padding: 12px 24px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  border-top: 0.5px solid var(--line);
}

/* Design thumb + SumRing bar */
.recipe-thumb-bar {
  display: flex; gap: 14px; align-items: center;
  padding: 12px 16px 12px 12px;
  border-radius: var(--r-card);
  background: var(--bg-card); box-shadow: var(--shadow-card);
}
.recipe-thumb {
  width: 64px; height: 64px; border-radius: 12px;
  overflow: hidden; background: #fff; flex-shrink: 0;
}
.recipe-thumb-meta        { flex: 1; min-width: 0; }
.recipe-thumb-meta__name  { font-size: 14px; color: var(--ink-1); font-weight: 500; }
.recipe-thumb-meta__detail { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; font-family: var(--font-num); }

/* SumRing */
.sum-ring         { width: 64px; height: 64px; position: relative; flex-shrink: 0; }
.sum-ring__center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-num); line-height: 1;
}
.sum-ring__pct   { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.sum-ring__label { font-size: 8.5px; color: var(--ink-3); margin-top: 3px; font-family: var(--font-cn); letter-spacing: 0.04em; }
/* color set inline: var(--primary) when ok, var(--warn) when not */

/* Warning bar */
.warn-bar {
  margin-top: 10px; padding: 10px 14px; border-radius: 12px;
  background: var(--warn-soft); color: var(--warn);
  font-size: 12.5px; line-height: 1.5;
  display: flex; align-items: flex-start; gap: 8px;
  animation: fade-up .22s ease;
}

/* Total weight row */
.weight-row {
  margin-top: 14px; padding: 14px 16px;
  border-radius: var(--r-card);
  background: var(--bg-card); box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: space-between;
}
.weight-row__label { font-size: 13px; color: var(--ink-2); }
.weight-row__sub   { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.weight-row__value {
  display: flex; align-items: baseline; gap: 4px;
  background: var(--primary-tint); border-radius: 10px; padding: 8px 14px;
}
.weight-row__num  { font-size: 22px; font-weight: 600; color: var(--ink-1); }
.weight-row__unit { font-size: 12px; color: var(--ink-2); }
.weight-row__input {
  width: 86px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink-1);
  font-size: 22px;
  font-weight: 600;
  text-align: right;
}
.weight-row__input::-webkit-outer-spin-button,
.weight-row__input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}
.weight-row__input[type="number"] {
  -moz-appearance: textfield;
}

/* Color cards stack */
.color-cards { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }

.color-card {
  padding: 14px 14px 12px; border-radius: var(--r-card);
  background: var(--bg-card); box-shadow: var(--shadow-card);
}
/* staggered entrance — reset by JS on navigation */
.color-card:nth-child(1) { animation: fade-up .25s ease   0ms both; }
.color-card:nth-child(2) { animation: fade-up .25s ease  40ms both; }
.color-card:nth-child(3) { animation: fade-up .25s ease  80ms both; }
.color-card:nth-child(4) { animation: fade-up .25s ease 120ms both; }
.color-card:nth-child(5) { animation: fade-up .25s ease 160ms both; }
.color-card:nth-child(6) { animation: fade-up .25s ease 200ms both; }

.color-card__row    { display: flex; align-items: center; gap: 12px; }
.color-card__swatch {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05), 0 2px 6px -2px rgba(0,0,0,0.15);
}
.color-card__info   { flex: 1; min-width: 0; }
.color-card__hex    { font-family: var(--font-num); font-size: 14px; font-weight: 500; color: var(--ink-1); letter-spacing: 0.04em; }
.color-card__area-row { margin-top: 4px; display: flex; align-items: baseline; gap: 4px; }
.color-card__area-lbl { font-size: 11px; color: var(--ink-3); }
.color-card__area-btn {
  border: 0; background: transparent; padding: 0;
  font-family: var(--font-num); font-size: 13px; color: var(--primary);
  font-weight: 500; cursor: pointer;
  border-bottom: 1px dashed var(--primary-soft);
}

.color-card__values { text-align: right; }
.color-card__clay-num   { font-family: var(--font-num); font-size: 16px; font-weight: 600; color: var(--ink-1); }
.color-card__clay-unit  { font-size: 11px; color: var(--ink-3); margin-left: 2px; }
.color-card__clay-label { font-size: 11px; color: var(--ink-3); margin-left: 4px; }
.color-card__powder     { margin-top: 3px; font-family: var(--font-num); }
.color-card__powder-num    { font-size: 13px; font-weight: 500; color: var(--primary); }
.color-card__powder-unit   { font-size: 10px; color: var(--primary-soft); margin-left: 2px; }
.color-card__powder-label  { font-size: 10px; color: var(--ink-3); margin-left: 4px; }

/* Ratio slider row */
.color-card__slider-row { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.color-card__slider-lbl { font-size: 11px; color: var(--ink-3); width: 36px; flex-shrink: 0; }
.color-card__slider-val { width: 42px; text-align: right; font-size: 13px; font-weight: 500; color: var(--ink-2); flex-shrink: 0; }

/* Custom range-slider track + thumb overlay */
.ratio-slider {
  flex: 1; position: relative; height: 22px;
  display: flex; align-items: center;
}
.ratio-slider__track {
  position: absolute; left: 0; right: 0;
  height: 4px; border-radius: 2px; background: var(--line);
}
.ratio-slider__fill {
  position: absolute; left: 0;
  height: 4px; border-radius: 2px; background: var(--primary-soft);
  /* width set inline via JS */
}
.ratio-slider__thumb {
  position: absolute;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.04);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  /* left set inline via JS: calc(pct% - 11px) */
}
.ratio-slider__dot { width: 8px; height: 8px; border-radius: 50%; }
.ratio-slider__input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
  width: 100%; height: 100%; margin: 0; padding: 0;
}

/* Footer total (dark band) */
.recipe-footer {
  margin-top: 16px; padding: 14px 16px;
  background: var(--ink-1); border-radius: var(--r-card);
  color: #fff; display: flex; align-items: center; justify-content: space-between;
}
.recipe-footer__label { font-size: 11px; opacity: 0.6; }
.recipe-footer__num   { font-size: 22px; font-weight: 600; margin-top: 2px; }
.recipe-footer__unit  { font-size: 12px; opacity: 0.6; margin-left: 2px; }
.recipe-footer__dots  { display: flex; gap: 6px; }
.recipe-footer__dot   {
  width: 18px; height: 18px; border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

/* Save toast — centered above bottom edge */
.toast-anchor {
  position: absolute;
  bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  left: 0; right: 0;
  display: flex; justify-content: center;
  pointer-events: none; z-index: 100;
}
.save-toast {
  background: rgba(42,38,32,0.94); color: #fff;
  padding: 12px 18px 12px 14px; border-radius: 16px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; white-space: nowrap;
  animation: pop-in .35s cubic-bezier(.5,1.6,.6,1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

/* ─────────────────────────────────────────────────────────────
   12. Screen: History
   ───────────────────────────────────────────────────────────── */
.history-scroll {
  padding: 8px 20px calc(24px + env(safe-area-inset-bottom, 0px));
}

.recipe-card {
  display: flex; gap: 14px; padding: 12px;
  border-radius: var(--r-card);
  background: var(--bg-card); box-shadow: var(--shadow-card);
  margin-bottom: 10px;
}
.recipe-card:nth-child(1) { animation: fade-up .25s ease   0ms both; }
.recipe-card:nth-child(2) { animation: fade-up .25s ease  40ms both; }
.recipe-card:nth-child(3) { animation: fade-up .25s ease  80ms both; }

.recipe-card__thumb   { width: 76px; height: 76px; border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.recipe-card__content {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between;
}
.recipe-card__strip {
  display: flex; height: 18px; border-radius: 5px; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}
.recipe-card__date { font-size: 11px; color: var(--ink-3); font-family: var(--font-num); }
.recipe-card__meta { font-size: 11px; color: var(--ink-2); font-family: var(--font-num); }

/* Empty state */
.empty-history {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 32px;
}
.history-scroll .empty-history { min-height: calc(100% - 32px); }
.empty-history__dog-wrap { position: relative; width: 120px; height: 100px; margin-bottom: 20px; }
.empty-history__shadow {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 18px; border-radius: 50%;
  background: rgba(232,112,74,0.12); filter: blur(2px);
}
.empty-history__dog { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); }
.empty-history__zzz {
  position: absolute; top: 8px; right: 10px;
  font-family: var(--font-num); font-size: 14px; color: var(--ink-3); opacity: 0.6;
}
.empty-history__title { font-size: 16px; color: var(--ink-1); font-weight: 500; }
.empty-history__sub   { font-size: 13px; color: var(--ink-3); margin-top: 6px; text-align: center; line-height: 1.5; }

/* ─────────────────────────────────────────────────────────────
   13. Screen: Detail
   ───────────────────────────────────────────────────────────── */
.detail-scroll {
  padding: 0 20px calc(32px + env(safe-area-inset-bottom, 0px));
}

.detail-image { aspect-ratio: 1; border-radius: var(--r-card); overflow: hidden; background: #fff; box-shadow: var(--shadow-card); }

.detail-strip {
  margin-top: 16px; height: 28px;
  display: flex; border-radius: 8px; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}

.detail-meta-row { margin-top: 12px; display: flex; align-items: flex-end; justify-content: space-between; }
.detail-meta-date { font-size: 12px; color: var(--ink-3); font-family: var(--font-num); }
.detail-meta-weight { text-align: right; }
.detail-meta-weight__lbl  { font-size: 11px; color: var(--ink-3); }
.detail-meta-weight__num  { font-size: 18px; font-weight: 600; color: var(--ink-1); }
.detail-meta-weight__unit { font-size: 11px; color: var(--ink-3); }

.detail-divider {
  margin-top: 18px; display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--ink-3); letter-spacing: 0.1em;
}
.detail-divider__line { flex: 1; height: 1px; background: var(--line); }

.detail-color-rows { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }

.detail-color-row {
  display: grid; grid-template-columns: 36px 1fr auto;
  align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px;
  background: var(--bg-card); box-shadow: var(--shadow-card);
}
.detail-color-row__swatch { width: 36px; height: 36px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05); }
.detail-color-row__hex    { font-family: var(--font-num); font-size: 13px; color: var(--ink-1); letter-spacing: 0.04em; }
.detail-color-row__detail { font-size: 11px; color: var(--ink-3); margin-top: 2px; font-family: var(--font-num); }
.detail-color-row__values { text-align: right; }
.detail-color-row__clay   { font-size: 14px; font-weight: 600; color: var(--ink-1); font-family: var(--font-num); }
.detail-color-row__clay-u { font-size: 10px; color: var(--ink-3); }
.detail-color-row__powder { font-size: 12px; color: var(--primary); margin-top: 1px; font-family: var(--font-num); }
.detail-color-row__powd-u { font-size: 9px; color: var(--primary-soft); }

.detail-footer {
  margin-top: 14px; padding: 14px 18px;
  background: var(--ink-1); border-radius: 14px;
  color: #fff; display: flex; align-items: center; justify-content: space-between;
}
.detail-footer__label { font-size: 13px; opacity: 0.7; }
.detail-footer__num   { font-size: 20px; font-weight: 600; font-family: var(--font-num); }
.detail-footer__unit  { font-size: 12px; opacity: 0.6; margin-left: 2px; }

/* ─────────────────────────────────────────────────────────────
   14. DesignArt SVG helper
   ───────────────────────────────────────────────────────────── */
.design-art { display: block; width: 100%; height: 100%; object-fit: cover; }
.design-art--image { background: #fff; }

/* ─────────────────────────────────────────────────────────────
   15. Animations
   ───────────────────────────────────────────────────────────── */
@keyframes knead {
  0%   { transform: translate(0,0)    rotate(0deg)  scale(1,1);       border-radius: 38% 62% 55% 45% / 50% 60% 40% 50%; }
  25%  { transform: translate(2px,-3px) rotate(8deg)  scale(1.05,.95); border-radius: 60% 40% 38% 62% / 45% 55% 45% 55%; }
  50%  { transform: translate(-1px,2px) rotate(-6deg) scale(.96,1.06); border-radius: 50% 50% 62% 38% / 55% 38% 62% 45%; }
  75%  { transform: translate(-3px,-1px)rotate(4deg)  scale(1.04,.98); border-radius: 42% 58% 50% 50% / 60% 40% 60% 40%; }
  100% { transform: translate(0,0)    rotate(0deg)  scale(1,1);       border-radius: 38% 62% 55% 45% / 50% 60% 40% 50%; }
}

@keyframes wag {
  0%   { transform: rotate(-18deg); }
  50%  { transform: rotate(22deg);  }
  100% { transform: rotate(-18deg); }
}

@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1);  }
  95%, 98%      { transform: scaleY(0.1); }
}

@keyframes pop-in {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1);    opacity: 1; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}

@keyframes shimmer {
  0%   { background-position: -200px 0; }
  100% { background-position:  200px 0; }
}
