:root {
  --bg: #ffffff;
  --ink: #1c1a17;
  --soft: rgba(28, 26, 23, 0.58);
  --line: rgba(28, 26, 23, 0.1);
  --pad: #f6f2ea;
  --carrier: #efe2c0;
  --lavender: #8f7fd4;
  --bergamot: #d3a92a;
  --cedar: #a8623a;
}

*, *::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: 8px 12px;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
ul { list-style: none; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ob { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 11px; width: min(340px, 100%); padding: 16px 16px 10px; border-radius: 26px; background: #ffffff; box-shadow: inset 0 0 0 1.500px var(--line), 0 30px 44px -30px rgba(28, 26, 23, 0.4); }
.ob__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 2px; }
.ob__what { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; min-width: 0; }
.ob__what strong { font-size: 16px; line-height: 20px; font-weight: 740; letter-spacing: -0.01em; white-space: nowrap; }
.ob__clip { display: block; height: 16px; line-height: 16px; overflow: hidden; white-space: nowrap; font-size: 12px; font-weight: 600; color: var(--soft); }
.ob__clip span { display: block; overflow: hidden; text-overflow: ellipsis; }
.ob__total { flex: none; height: 26px; padding: 0 11px; border-radius: 13px; background: rgba(28, 26, 23, 0.05); font-size: 12px; line-height: 26px; font-weight: 620; color: var(--soft); white-space: nowrap; transition: background-color 0.3s ease, color 0.3s ease; }
.ob__total b { font-weight: 760; color: var(--ink); transition: color 0.3s ease; }
.ob__total.is-full { background: var(--ink); color: rgba(255, 255, 255, 0.7); }
.ob__total.is-full b { color: #ffffff; }

/* the bottle and the pipette: level, colour and ripple are written by the script */
.ob__pad { border-radius: 18px; background: var(--pad); overflow: hidden; }
.ob__svg { display: block; width: 100%; height: auto; aspect-ratio: 300 / 112; }
.ob__shade { fill: rgba(28, 26, 23, 0.1); }
.ob__tube { fill: rgba(255, 255, 255, 0.75); stroke: var(--ink); stroke-width: 1.500; stroke-linejoin: round; }
.ob__oil { fill: var(--lavender); }
.ob__drop { fill: var(--lavender); opacity: 0; }
.ob__liquid { fill: var(--carrier); }
.ob__glass { fill: rgba(255, 255, 255, 0.28); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.ob__shine { fill: none; stroke: rgba(255, 255, 255, 0.85); stroke-width: 2.500; stroke-linecap: round; }
.ob__lip { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }

/* the three oils: the count wears the oil's colour */
.ob__list { display: grid; }
.ob__oilrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0 6px 4px; border-top: 1.500px solid var(--line); }
.ob__name { display: grid; gap: 0; min-width: 0; }
.ob__name strong { font-size: 13.500px; line-height: 17px; font-weight: 700; }
.ob__name span { font-size: 11.500px; line-height: 14px; font-weight: 600; color: var(--soft); white-space: nowrap; }
.ob__step { flex: none; display: grid; grid-template-columns: 30px 38px 30px; align-items: center; height: 34px; padding: 2px; border-radius: 17px; background: rgba(28, 26, 23, 0.055); }
.ob__step button { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 1px rgba(28, 26, 23, 0.08), 0 5px 10px -6px rgba(28, 26, 23, 0.35); transition: opacity 0.25s ease; }
.ob__step svg { display: block; width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 1.800; stroke-linecap: round; }
.ob__step button[disabled] { opacity: 0.4; cursor: default; }
.ob__step button:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink); }
.ob__val { display: block; text-align: center; }
.ob__clip--val { height: 20px; line-height: 20px; font-size: 15px; font-weight: 780; color: color-mix(in srgb, var(--c) 78%, #1c1a17); }

.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) { .ob { padding: 14px 12px 8px; } }
@media (max-height: 400px) { .ob { gap: 9px; } .ob__oilrow { padding-top: 5px; padding-bottom: 5px; } }
@media (prefers-reduced-motion: reduce) { .ob__total, .ob__total b, .ob__step button { transition: none; } }
