:root {
  --bg: #ffffff;
  --ink: #18181c;
  --soft: rgba(24, 24, 28, 0.58);
  --line: rgba(24, 24, 28, 0.1);
  --accent: #5a54d6;
}

*, *::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; text-align: left; }
ul { list-style: none; }
.live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.ap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: min(352px, 100%); padding: 16px 14px 12px; border-radius: 26px; background: #ffffff; box-shadow: inset 0 0 0 1.500px var(--line), 0 30px 44px -30px rgba(24, 24, 28, 0.4); }
.ap__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 4px; }
.ap__what { display: grid; gap: 1px; min-width: 0; }
.ap__what strong { font-size: 16px; line-height: 20px; font-weight: 740; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap__what span { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap__mine { flex: none; height: 26px; padding: 0 11px; border-radius: 13px; background: rgba(24, 24, 28, 0.05); font-size: 12px; line-height: 26px; font-weight: 620; color: var(--soft); white-space: nowrap; }
.ap__mine b { font-weight: 760; color: var(--ink); }

/* one row per time: the tint behind it is as wide as the share of people who can make it */
.ap__list { display: grid; gap: 6px; }
.ap__slot { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; height: 50px; padding: 0 11px 0 10px; border-radius: 16px; background: rgba(24, 24, 28, 0.035); overflow: hidden; box-shadow: inset 0 0 0 1.500px transparent; transition: box-shadow 0.3s ease; }
.ap__slot[aria-pressed="true"] { box-shadow: inset 0 0 0 1.500px color-mix(in srgb, var(--accent) 55%, transparent); }
.ap__slot:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink); }
.ap__fill { position: absolute; inset: 0; background: color-mix(in srgb, var(--accent) 13%, transparent); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }
.ap__box { position: relative; flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: #ffffff; box-shadow: inset 0 0 0 1.500px rgba(24, 24, 28, 0.22); transition: background-color 0.25s ease, box-shadow 0.25s ease; }
.ap__slot[aria-pressed="true"] .ap__box { background: var(--accent); box-shadow: inset 0 0 0 1.500px var(--accent); }
.ap__box svg { display: block; width: 16px; height: 16px; fill: none; stroke: #ffffff; stroke-width: 2.200; stroke-linecap: round; stroke-linejoin: round; }
.ap__box path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.ap__when { position: relative; display: grid; gap: 0; min-width: 0; }
.ap__when strong { font-size: 13.500px; line-height: 17px; font-weight: 720; white-space: nowrap; }
.ap__when span { font-size: 11.500px; line-height: 14px; font-weight: 600; color: var(--soft); white-space: nowrap; }
.ap__best { position: relative; flex: none; height: 18px; padding: 0 7px; border-radius: 9px; background: var(--accent); color: #ffffff; font-size: 10.500px; line-height: 18px; font-weight: 740; opacity: 0; transform: scale(0.6); }
.ap__who { position: relative; display: flex; flex-direction: row-reverse; justify-content: flex-start; margin-left: auto; padding-left: 6px; }
.ap__av { flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin-left: -6px; border-radius: 50%; background: #e7e7ea; box-shadow: 0 0 0 1.500px #ffffff; font-size: 10px; font-weight: 760; color: rgba(24, 24, 28, 0.7); }
.ap__av--me { font-size: 8.500px; }
.ap__av--me { background: var(--accent); color: #ffffff; }
.ap__n { position: relative; flex: none; width: 40px; text-align: right; }
.ap__clip { display: block; height: 16px; line-height: 16px; overflow: hidden; white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--ink); }
.ap__clip span { display: block; }
.ap__foot { padding: 0 4px; }
.ap__clip--foot { font-weight: 620; color: var(--soft); }
.ap__clip--foot span { overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) { .ap__slot:hover .ap__box { box-shadow: inset 0 0 0 1.500px rgba(24, 24, 28, 0.5); } .ap__slot[aria-pressed="true"]:hover .ap__box { box-shadow: inset 0 0 0 1.500px var(--accent); } }

.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) { .ap { padding: 14px 10px 10px; } .ap__slot { gap: 8px; padding: 0 9px 0 8px; } .ap__n { width: 38px; } }
@media (max-height: 400px) { .ap { gap: 10px; } .ap__slot { height: 46px; } .ap__list { gap: 5px; } }
@media (prefers-reduced-motion: reduce) { .ap__slot, .ap__box { transition: none; } }
