:root {
  --bg: #ffffff;
  --ink: #1b1a18;
  --soft: rgba(27, 26, 24, 0.58);
  --line: rgba(27, 26, 24, 0.1);
  --accent: #e2832c;
  --pad: #f7f3ee;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.pf { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 13px; width: min(340px, 100%); padding: 16px; border-radius: 26px; background: #ffffff; box-shadow: inset 0 0 0 1.500px var(--line), 0 30px 44px -30px rgba(27, 26, 24, 0.4); }
.pf__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 2px; }
.pf__what { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; min-width: 0; }
.pf__what strong { font-size: 16px; line-height: 20px; font-weight: 740; letter-spacing: -0.01em; white-space: nowrap; }
.pf__clip { display: block; height: 16px; line-height: 16px; overflow: hidden; white-space: nowrap; font-size: 12px; font-weight: 600; color: var(--soft); }
.pf__clip span { display: block; overflow: hidden; text-overflow: ellipsis; }

/* the hopper: a small tank that goes down with every portion */
.pf__hop { flex: none; display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 7px; border-radius: 13px; background: rgba(27, 26, 24, 0.05); font-size: 12px; font-weight: 620; color: var(--soft); white-space: nowrap; }
.pf__hop b { font-weight: 740; color: var(--ink); }
.pf__tank { position: relative; display: block; width: 8px; height: 14px; border-radius: 3px; background: rgba(27, 26, 24, 0.12); overflow: hidden; }
.pf__tank i { position: absolute; inset: 0; background: var(--accent); transform-origin: 50% 100%; transform: scaleY(0.62); }

.pf__pad { border-radius: 18px; background: var(--pad); overflow: hidden; }
.pf__svg { display: block; width: 100%; height: auto; aspect-ratio: 300 / 112; }
.pf__spout { fill: var(--ink); }
.pf__shade { fill: rgba(27, 26, 24, 0.1); }
.pf__bowl { fill: #ffffff; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.pf__rim { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.pf__k { fill: var(--accent); }
.pf__k--b { fill: color-mix(in srgb, var(--accent) 78%, #5a2c06); }

.pf__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 2px 0 4px; }
.pf__label { font-size: 13px; font-weight: 640; color: var(--soft); }
.pf__step { display: grid; grid-template-columns: 34px 64px 34px; align-items: center; height: 38px; padding: 2px; border-radius: 19px; background: rgba(27, 26, 24, 0.055); }
.pf__pm { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 1px rgba(27, 26, 24, 0.08), 0 5px 10px -6px rgba(27, 26, 24, 0.35); transition: opacity 0.25s ease; }
.pf__pm svg { display: block; width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 1.800; stroke-linecap: round; }
.pf__pm[disabled] { opacity: 0.4; cursor: default; }
.pf__pm:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink); }
.pf__val { display: block; text-align: center; }
.pf__clip--val { height: 20px; line-height: 20px; font-size: 15px; font-weight: 740; color: var(--ink); }

/* the button: the label, and a fill that sweeps across while the feeder is dispensing */
.pf__btn { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; height: 46px; border-radius: 23px; background: var(--ink); color: #ffffff; font-size: 14.500px; font-weight: 720; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 12px 16px -10px rgba(27, 26, 24, 0.7); }
.pf__btn:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink); }
.pf__btn[aria-busy="true"] { cursor: default; }
.pf__fill { position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.pf__in { position: relative; display: flex; align-items: center; justify-content: center; max-width: 100%; }
.pf__tick { flex: none; display: block; width: 0; height: 16px; fill: none; stroke: #ffffff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.pf__tick path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.pf__clip--btn { height: 20px; line-height: 20px; font-size: 14.500px; font-weight: 720; color: #ffffff; }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #17171a; stroke: #ffffff; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); z-index: 6; }

@media (max-width: 350px) { .pf { padding: 14px 12px; } }
@media (max-height: 400px) { .pf { gap: 10px; } }
@media (prefers-reduced-motion: reduce) { .pf__pm { transition: none; } }
