:root {
  --bg: #f6f3ee;
  --card: #fffdf9;
  --ink: #1b1a18;
  --soft: rgba(27, 26, 24, 0.56);
  --line: rgba(27, 26, 24, 0.1);
  --accent: #e6a400;
}

*, *::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; }

.pd { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: min(348px, 100%); padding: 18px 16px 16px; border-radius: 26px; background: var(--card); box-shadow: inset 0 0 0 1.500px var(--line), 0 30px 44px -30px rgba(60, 40, 20, 0.45); }
.pd__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 2px; }
.pd__head strong { font-size: 16px; line-height: 20px; font-weight: 740; letter-spacing: -0.01em; }
.pd__unit { font-size: 12.500px; line-height: 16px; font-weight: 660; color: var(--soft); }

.pd__seg { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); height: 38px; padding: 3px; border-radius: 13px; background: rgba(27, 26, 24, 0.06); }
.pd__pick { position: absolute; left: 3px; top: 3px; bottom: 3px; width: calc((100% - 6px) / 2); border-radius: 10px; background: #ffffff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 4px 8px -4px rgba(27, 26, 24, 0.35), 0 0 0 1px rgba(27, 26, 24, 0.05); }
.pd__opt { position: relative; display: grid; place-items: center; height: 32px; border-radius: 10px; font-size: 12.500px; font-weight: 680; color: var(--soft); white-space: nowrap; transition: color 0.25s; }
.pd__opt[aria-pressed="true"] { color: var(--ink); }
.pd__opt:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }

/* three steps side by side, the tallest in the middle; the people are placed on top of them by the script */
.pd__stage { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; align-items: end; height: 166px; padding-top: 78px; }
.pd__step { display: block; border-radius: 12px 12px 4px 4px; background: rgba(27, 26, 24, 0.09); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6); transform-origin: 50% 100%; }
.pd__step[data-step="0"] { height: 88px; background: var(--accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 14px 18px -14px var(--accent); }
.pd__step[data-step="1"] { height: 62px; }
.pd__step[data-step="2"] { height: 44px; }
.pd__who { position: absolute; left: 0; bottom: 0; display: grid; justify-items: center; gap: 2px; width: 96px; padding: 0; border-radius: 12px; text-align: center; }
.pd__face { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 2px; border-radius: 50%; background: var(--ink); color: #ffffff; font-size: 14px; line-height: 1; font-weight: 740; box-shadow: 0 8px 10px -8px rgba(27, 26, 24, 0.8); transform-origin: 50% 100%; transition: background-color 0.25s; }
.pd__who b { font-size: 13px; line-height: 16px; font-weight: 720; }
.pd__who i { font-style: normal; font-size: 11.500px; line-height: 14px; font-weight: 640; color: var(--soft); font-variant-numeric: tabular-nums; }
.pd__who.is-on .pd__face { background: var(--accent); color: #1b1a18; }
.pd__who:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }

.pd__note { padding: 10px 12px; border-radius: 14px; background: rgba(27, 26, 24, 0.045); }
.pd__clip { display: block; height: 18px; overflow: hidden; white-space: nowrap; font-size: 13px; line-height: 18px; font-weight: 660; font-variant-numeric: tabular-nums; }
.pd__clip span { display: block; overflow: hidden; text-overflow: ellipsis; }

.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: #1b1a18; 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 (hover: hover) { .pd__opt:hover { color: var(--ink); } }
@media (max-width: 350px) { .pd { padding: 16px 13px 14px; } .pd__who { width: 90px; } .pd__clip { font-size: 12.500px; } }
@media (prefers-reduced-motion: reduce) { .pd__opt, .pd__face { transition: none; } }
