/* Four printed wedges turn under a stationary index. The same angle positions
   the paper and keeps its flavor names upright while the guest turns it. */
#wheel-counter {
  container: drink-wheel / inline-size;
  width: 100%;
  min-width: 0;
  color: #303a2d;
  --wheel-ink: #344333;
  --wheel-paper: #f8efda;
  --wheel-rule: #a89a7c;
  --wheel-display: var(--serif, Georgia, serif);
  --wheel-mono: var(--mono, "Courier New", monospace);
}
.wheel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.wheel-heading h2 {
  margin: 0;
  color: var(--wheel-ink);
  font: 700 clamp(25px, 6cqi, 34px)/1.04 var(--wheel-display);
  letter-spacing: -.045em;
}
.wheel-heading p {
  margin: 0;
  color: #575644;
  font: italic 15px/1.4 var(--wheel-display);
}
.wheel-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}
.wheel-instrument { position: relative; min-width: 0; }
.wheel-dial {
  position: relative; isolation: isolate;
  width: min(69%, 218px); aspect-ratio: 1;
  margin: 4px auto;
  border-radius: 50%;
  touch-action: pan-y pinch-zoom;
  -webkit-user-select: none; user-select: none;
}
.wheel-rotor {
  --wheel-turn: 0deg;
  position: absolute; inset: 0;
  overflow: hidden; border-radius: 50%;
  background: var(--wheel-paper);
  transform: rotate(var(--wheel-turn));
  transition: transform 390ms cubic-bezier(.22,.71,.24,1);
}
.wheel-rotor:before, .wheel-rotor:after {
  content: ""; position: absolute; pointer-events: none;
}
.wheel-rotor:before {
  z-index: 2; inset: 4px; border-radius: 50%;
  background: repeating-conic-gradient(from -.4deg, #3c3e2b9e 0 .65deg, transparent .95deg 6deg);
  mask-image: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4.8px));
}
.wheel-rotor:after {
  z-index: 1; inset: 0;
  background: repeating-conic-gradient(from -45deg, #3e3c2f85 0 .35deg, transparent .55deg 90deg);
}
.wheel-sector {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 50%;
  border: 0; margin: 0; padding: 0;
  border-radius: 0; text-align: center;
  transform-origin: 50% 100%;
  transform: rotate(calc(var(--sector-index) * 90deg));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  touch-action: pan-y pinch-zoom;
  cursor: grab;
}
.wheel-sector[data-flavor=cascadel] { background: #e0b76a; color: #382b1b; }
.wheel-sector[data-flavor=eagle-eye] { background: #a54d39; color: #fff7e5; }
.wheel-sector[data-flavor=manzanita] { background: #e7c9bb; color: #482f2b; }
.wheel-sector[data-flavor=lumberjack] { background: #627451; color: #fff8de; }
.wheel-word {
  position: absolute; top: 41%; left: 50%;
  font: 700 italic clamp(13.5px, 3.65cqi, 21px)/1.2 var(--wheel-display);
  letter-spacing: -.045em; white-space: nowrap;
  transform: translate(-50%, -50%) rotate(calc(0deg - var(--wheel-turn) - var(--sector-index) * 90deg));
  transition: transform 390ms cubic-bezier(.22,.71,.24,1);
}
.wheel-sector:hover .wheel-word, .wheel-sector:focus-visible .wheel-word {
  text-decoration: underline; text-underline-offset: 3px;
}
.wheel-sector:focus-visible { outline: 0; }
.wheel-sector:focus-visible .wheel-word {
  outline: 2px solid currentColor; outline-offset: 2px; border-radius: 1px;
}
.wheel-rim {
  position: absolute; inset: 0; border: 1.5px solid #4c4936;
  border-radius: 50%; pointer-events: none;
  box-shadow: 0 2px 0 #776b51, 1px 3px 2px #55442740;
}
.wheel-rim:after {
  content: ""; position: absolute; inset: 4%;
  border: 1px solid #3b3b2755; border-radius: 50%;
}
.wheel-pointer {
  position: absolute; top: -7px; left: 50%; width: 17px; height: 19px;
  transform: translateX(-50%); pointer-events: none;
  background: #303d2c; clip-path: polygon(0 0,100% 0,50% 100%);
}
.wheel-hub {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 29%; height: 29%; min-height: 44px; min-width: 44px;
  padding: 0; display: grid; place-content: center; justify-items: center; gap: 3px;
  color: var(--wheel-ink); background: var(--wheel-paper);
  border: 1px solid #625c47; border-radius: 50%;
  box-shadow: 1px 2px 0 #4d493b64;
  font: 700 italic clamp(14px,3cqi,18px)/1.1 var(--wheel-display);
}
.wheel-hub:after {
  content: ""; position: absolute; inset: 3px; border: 1px solid #a99d7f; border-radius: 50%;
}
.wheel-pin {
  width: 8px; height: 8px; border-radius: 50%; border: 1px solid #6c5836;
  background: #ba9658; box-shadow: inset 1px 1px 0 #e9cea0;
}
.wheel-dial.is-turning, .wheel-dial.is-turning .wheel-sector { cursor: grabbing; }
.wheel-dial.is-turning .wheel-rotor, .wheel-dial.is-turning .wheel-word { transition: none; }
.wheel-steppers {
  position: absolute; top: 50%; left: 0; right: 0;
  transform: translateY(-50%);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  pointer-events: none;
}
.wheel-steppers button {
  position: relative; width: 44px; height: 44px; padding: 0; border: 0; margin: 0;
  color: var(--wheel-ink); background: transparent;
  font: 22px/1 Georgia,serif; pointer-events: auto; text-align: center;
}
.wheel-steppers button span {
  display: grid; place-items: center; margin: auto;
  height: 31px; width: 31px; border: 1px solid #918b74; border-radius: 50%;
}
.wheel-steppers button:hover span, .wheel-steppers button:focus-visible span {
  color: var(--wheel-paper); background: var(--wheel-ink); border-color: var(--wheel-ink);
}
.wheel-pages {
  display: none; color: #5e5d47;
  font: 12px/1 var(--wheel-mono);
}
.wheel-pages b { color: var(--wheel-ink); font-weight: 700; }
.wheel-drink {
  min-width: 0;
  border-top: 2px solid var(--wheel-ink);
  padding: 11px 0 0;
}
.wheel-recipe h3 {
  margin: 0;
  font: 700 clamp(29px, 6.9cqi, 39px)/1 var(--wheel-display);
  letter-spacing: -.055em; color: #733c2c;
}
.wheel-recipe p {
  margin: 7px 0 12px;
  font: 15px/1.38 var(--sans, Arial, sans-serif);
  color: #4b493c;
}
.wheel-price-line {
  display: flex; gap: 8px; align-items: center;
  padding: 2px 0; border-block: 1px solid var(--wheel-rule);
  font: 700 13px/1.25 var(--wheel-mono);
}
.wheel-price-line label { color: #595545; font-weight: 400; }
.wheel-price-line select {
  appearance: auto; background: transparent; color: #293a2b;
  border: 0; padding: 3px 2px; font: inherit; min-height: 40px; max-width: 100px;
}
.wheel-price-line output { margin-left: auto; font: 700 18px/1 var(--wheel-mono); }
.wheel-build {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; width: 100%; margin-top: 10px; min-height: 44px; padding: 9px 12px;
  color: #fff6df; background: #354936; border: 1px solid #293a2b;
  text-align: left; border-radius: 2px; font: 700 14px/1.2 var(--sans,Arial,sans-serif);
}
.wheel-build:hover { background: #263b28; }
@container drink-wheel (min-width: 390px) {
  .wheel-workspace { grid-template-columns: minmax(0,1.22fr) minmax(150px,1fr); gap: clamp(13px,4cqi,27px); }
  .wheel-heading { margin-bottom: 19px; border-bottom: 1px solid var(--wheel-rule); padding-bottom: 12px; }
  .wheel-dial { width: min(100%, 318px); }
  .wheel-steppers {
    position: static; transform: none;
    justify-content: center; gap: 8px; margin-top: 4px;
  }
  .wheel-pages { display: inline; }
  .wheel-drink { align-self: center; border-top: 0; padding: 0; }
  .wheel-word { font-size: clamp(14px,3.3cqi,21px); }
  .wheel-recipe p { min-height: 3.7em; }
}
@media(prefers-reduced-motion:reduce) {
  .wheel-rotor, .wheel-word { transition: none; }
}
