:root {
  --bg: #000000;
  --card: #141416;
  --ink: #f4f3f0;
  --soft: rgba(244, 243, 240, 0.56);
  --line: rgba(244, 243, 240, 0.1);
  --fresh: #3ecf8e;
  --warm: #f2b84b;
  --late: #ff6b5a;
}

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

.kd { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; width: min(348px, 100%); }
.kd__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 4px; }
.kd__head strong { font-size: 16px; line-height: 20px; font-weight: 720; letter-spacing: -0.01em; }
.kd__sum { display: block; height: 16px; overflow: hidden; font-size: 12.500px; line-height: 16px; font-weight: 660; color: var(--soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
.kd__sum span { display: block; }

/* three slots, 88 pixels apart: the script moves each ticket to its slot */
.kd__rail { position: relative; height: 256px; }
.kd__t { position: absolute; left: 0; top: 0; display: grid; grid-template-columns: minmax(0, 1fr) 68px; gap: 10px; width: 100%; height: 80px; padding: 10px 10px 10px 16px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.06); overflow: hidden; }
.kd__t::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tone); transition: background-color 0.4s; }
.kd__t[data-tone="fresh"] { --tone: var(--fresh); }
.kd__t[data-tone="warm"] { --tone: var(--warm); }
.kd__t[data-tone="late"] { --tone: var(--late); }
.kd__body { display: grid; grid-template-columns: minmax(0, 1fr); align-content: space-between; min-width: 0; }
.kd__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.kd__top b { font-size: 13.500px; line-height: 17px; font-weight: 720; white-space: nowrap; }
.kd__time { font-size: 12.500px; line-height: 17px; font-weight: 700; color: var(--tone); white-space: nowrap; font-variant-numeric: tabular-nums; transition: color 0.4s; }
.kd__items { display: grid; grid-template-columns: minmax(0, 1fr); list-style: none; }
.kd__item { display: block; width: 100%; height: 20px; font-size: 12.500px; line-height: 20px; font-weight: 580; color: rgba(244, 243, 240, 0.86); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.3s; }
.kd__item span { background: linear-gradient(currentColor, currentColor) 0 55% / 0 1.500px no-repeat; transition: background-size 0.3s; }
.kd__item[aria-pressed="true"] { color: rgba(244, 243, 240, 0.4); }
.kd__item[aria-pressed="true"] span { background-size: 100% 1.500px; }
.kd__item:focus-visible { box-shadow: inset 0 0 0 1.500px var(--ink); border-radius: 5px; }
.kd__bump { position: relative; display: grid; place-items: center; height: 60px; border-radius: 12px; font-size: 13px; font-weight: 720; color: var(--ink); background: rgba(244, 243, 240, 0.09); transition: background-color 0.3s, color 0.3s, box-shadow 0.3s; }
.kd__t.is-ready .kd__bump { background: var(--fresh); color: #06281a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 14px -8px var(--fresh); }
.kd__bump:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.kd__clear { position: absolute; left: 0; right: 0; top: 0; display: grid; place-items: center; height: 80px; border-radius: 18px; font-size: 13px; font-weight: 640; color: var(--soft); box-shadow: inset 0 0 0 1px var(--line); opacity: 0; pointer-events: none; }

.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: #f4f3f0; stroke: #000000; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); z-index: 6; }

@media (hover: hover) { .kd__t:not(.is-ready) .kd__bump:hover { background: rgba(244, 243, 240, 0.16); } }
@media (max-width: 350px) { .kd__t { grid-template-columns: minmax(0, 1fr) 62px; padding-left: 14px; } }
@media (prefers-reduced-motion: reduce) { .kd__t::before, .kd__time, .kd__item, .kd__item span, .kd__bump { transition: none; } }
