:root {
  --paper: #f5ede0;
  --cream: #efe5d3;
  --ink: #4a3a33;
  --muted: #917a63;
  --wine: #753b47;
  --gold: #bda075;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans", sans-serif;
  min-height: 100dvh;
}
.shell { max-width: 460px; margin: 0 auto; padding: 14px 16px 28px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.brand { text-decoration: none; color: var(--ink); display: flex; align-items: baseline; gap: 8px; }
.brand b { font-family: Georgia, "Songti SC", serif; font-size: 24px; font-weight: 400; }
.brand span { font-size: 9px; letter-spacing: 3px; color: var(--muted); }
.top-actions { display: flex; gap: 8px; align-items: center; }
.ghost-btn, .dl-mini {
  font-size: 12px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(189,160,117,.55); background: var(--cream);
  color: var(--ink); text-decoration: none; cursor: pointer;
}
.dl-mini { background: var(--wine); color: var(--paper); border-color: transparent; font-weight: 500; }
.compact-box {
  background: var(--cream); border-radius: 28px;
  border: 1px solid rgba(189,160,117,.55);
  box-shadow: 0 12px 28px rgba(74,58,51,.1);
  overflow: hidden;
}
.challenge-banner {
  background: var(--wine); color: var(--paper); text-align: center;
  font-size: 12px; padding: 8px 14px; letter-spacing: .4px;
}
.hidden { display: none !important; }
.lid { padding: 14px 16px 10px; text-align: center; }
.eyebrow { font-size: 9px; letter-spacing: 2px; color: var(--muted); margin-bottom: 10px; }
.mirror {
  background: linear-gradient(180deg, var(--paper), var(--cream));
  border: 1px solid rgba(189,160,117,.65); border-radius: 46px;
  padding: 18px 16px;
}
.pan-ring {
  width: 108px; height: 108px; margin: 0 auto; padding: 6px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--paper), var(--gold));
  box-shadow: 0 6px 14px rgba(74,58,51,.12);
}
.pan-large { width: 132px; height: 132px; margin: 0; flex-shrink: 0; }
.powder {
  width: 100%; height: 100%; border-radius: 50%; position: relative;
  display: flex; align-items: center; justify-content: center;
  background-color: #d9c4a6;
  background-image: radial-gradient(circle at 30% 25%, rgba(255,255,255,.22), transparent 55%, rgba(0,0,0,.12));
  transition: background-color .18s ease;
}
.empty-plus { font-size: 28px; font-weight: 200; color: var(--muted); }
.stamp-svg { width: 64%; height: 64%; color: rgba(90,45,45,.45); filter: drop-shadow(1px 1px 0 rgba(255,255,255,.6)); }
.shade-name { font-family: Georgia, "Songti SC", serif; font-size: 28px; font-weight: 400; margin: 12px 0 4px; }
.shade-sub { font-size: 11px; color: var(--muted); margin: 0; }
.hinge {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  height: 14px; color: var(--gold); font-size: 10px;
  background: linear-gradient(180deg, rgba(189,160,117,.35), var(--paper), rgba(189,160,117,.45));
}
.hinge span { width: 64px; height: 2px; border-radius: 2px; background: rgba(189,160,117,.65); }
.pan { padding: 14px 16px 18px; }
.status-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.status-kicker { font-size: 10px; letter-spacing: 1px; color: var(--muted); }
.status-msg { font-family: Georgia, "Songti SC", serif; font-size: 19px; margin-top: 2px; }
.hint-text { font-size: 11px; color: var(--wine); margin-top: 3px; min-height: 15px; }
.score-box { text-align: right; }
.score-num { font-family: Georgia, serif; font-size: 34px; font-weight: 300; line-height: 1; }
.stars { font-size: 12px; color: var(--wine); letter-spacing: 2px; margin-top: 2px; }
.mix-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.drop-panel { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.drop-dots { display: flex; gap: 6px; }
.dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(189,160,117,.7); background: transparent; }
.drop-count { font-size: 11px; color: var(--muted); }
.tool-btns { display: flex; gap: 8px; width: 100%; }
.pill-btn {
  flex: 1; height: 40px; border-radius: 999px; border: 1px solid rgba(189,160,117,.5);
  background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 500;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.pill-btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn { flex: 0 0 44px; font-size: 16px; }
.pigments { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px 4px; margin-bottom: 14px; }
.pigment-btn {
  background: none; border: 0; padding: 2px 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative;
}
.pigment-btn:disabled { opacity: .45; cursor: not-allowed; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%;
  box-shadow: inset 0 2px 4px rgba(255,255,255,.35), 0 2px 4px rgba(74,58,51,.18);
  position: relative;
}
.badge-cnt {
  position: absolute; top: -4px; right: -4px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--wine); color: #fff;
  font-size: 10px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.pigment-name { font-size: 10px; color: var(--muted); line-height: 1.15; text-align: center; }
.primary-btn {
  width: 100%; height: 48px; border-radius: 999px; border: 0;
  background: var(--wine); color: var(--paper); font-size: 14px; font-weight: 500;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.primary-btn:disabled { opacity: .45; cursor: not-allowed; }
.result-card {
  margin-top: 14px; padding: 14px; border-radius: 18px;
  background: var(--paper); border: 1px solid rgba(189,160,117,.55);
}
.vs-line { font-size: 14px; font-weight: 600; color: var(--wine); text-align: center; margin-bottom: 6px; }
.recipe-line { font-size: 11px; color: var(--muted); text-align: center; margin: 0 0 12px; }
.result-actions { display: flex; flex-direction: column; gap: 8px; }
.secondary-row { display: flex; gap: 8px; }
.foot { text-align: center; font-size: 10px; color: var(--muted); letter-spacing: 1px; margin-top: 16px; }

.swatch.p-0  { background-color: #E1B38D; }
.swatch.p-1  { background-color: #B35970; }
.swatch.p-2  { background-color: #CF8E91; }
.swatch.p-3  { background-color: #B97455; }
.swatch.p-4  { background-color: #A899BB; }
.swatch.p-5  { background-color: #F2DFC5; }
.swatch.p-6  { background-color: #D9683A; }
.swatch.p-7  { background-color: #C0282D; }
.swatch.p-8  { background-color: #7A2E5E; }
.swatch.p-9  { background-color: #E8B7B0; }
.swatch.p-10 { background-color: #6B4332; }
.swatch.p-11 { background-color: #D8B77A; }
