:root {
  --bg: #000000;
  --card: #111214;
  --card-hi: #1a1b1e;
  --ink: #f5f4f0;
  --soft: rgba(245, 244, 240, 0.5);
  --line: rgba(255, 255, 255, 0.09);
  --accent: #ffb020;
  --lane: 22px; /* the column of the bay letters */
  --gap: 4px;
}

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

.dk {
  width: min(348px, 100%);
  padding: 14px 14px 11px;
  border-radius: 26px;
  background: linear-gradient(180deg, var(--card-hi), var(--card));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px var(--line), 0 34px 70px -34px color-mix(in srgb, var(--accent) 30%, transparent);
}
.dk__head { display: flex; align-items: baseline; justify-content: space-between; }
.dk__title { font-size: 15px; font-weight: 680; font-stretch: 108%; letter-spacing: -0.008em; }
.dk__free { font-size: 12px; font-weight: 480; color: var(--soft); }
.dk__free b { display: inline-block; font-weight: 680; color: var(--ink); }

.dk__board {
  position: relative;
  display: grid;
  grid-template-columns: var(--lane) repeat(6, minmax(0, 1fr));
  grid-auto-rows: clamp(28px, 8.200vh, 36px);
  grid-template-rows: 38px;
  gap: var(--gap);
  margin-top: 8px;
}
.dk__hour { align-self: end; padding-bottom: 3px; font-size: 10.500px; font-weight: 560; color: var(--soft); transition: color 0.3s ease; }
.dk__hour.is-now { color: var(--ink); }
.dk__bay { align-self: center; font-size: 12px; font-weight: 680; color: var(--soft); }

.slot {
  position: relative;
  min-width: 0;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  color: inherit;
  font: inherit;
  cursor: pointer;
  outline: none;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: box-shadow 0.2s ease, background-color 0.2s ease, opacity 0.4s ease;
}
.slot__plus { position: absolute; inset: 0; margin: auto; width: 12px; height: 12px; fill: none; stroke: var(--accent); stroke-width: 1.700; stroke-linecap: round; opacity: 0; transform: scale(0.5); transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1); }
.slot.is-peek { background: color-mix(in srgb, var(--accent) 9%, transparent); box-shadow: inset 0 0 0 1.500px color-mix(in srgb, var(--accent) 70%, transparent); }
.slot.is-peek .slot__plus { opacity: 1; transform: scale(1); }
.slot:focus-visible { box-shadow: inset 0 0 0 2px #ffffff; }
.slot.is-past { opacity: 0.4; cursor: default; }
/* a booking of yours: the fill is a child, so the script can spring it without touching the slot's own box */
.slot__mine {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 9px;
  background: var(--accent);
  color: #201400;
  font-size: 10.500px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
}
.slot__mine svg { flex: none; width: 17px; height: 10px; fill: #201400; }
.slot.is-mine { box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--accent) 80%, transparent); overflow: visible; }

.taken {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 6px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 10.500px;
  font-weight: 600;
  color: rgba(245, 244, 240, 0.78);
  transition: opacity 0.4s ease;
}
.taken span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.taken.is-past { opacity: 0.4; }

/* the line of now: it runs over the six columns only, whatever the lane and the gaps measure */
.dk__now {
  position: absolute;
  top: 20px;
  bottom: -2px;
  left: calc(var(--lane) + var(--gap) + (100% - var(--lane) - var(--gap)) * var(--t, 0.3));
  width: 0;
  border-left: 1.500px solid var(--accent);
  pointer-events: none;
  z-index: 2;
}
.dk__now i {
  position: absolute;
  left: 0;
  top: -18px;
  transform: translateX(-50%);
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #201400;
  font-style: normal;
  font-size: 10px;
  line-height: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.dk__say { height: 19px; margin-top: 9px; overflow: hidden; font-size: 12.500px; line-height: 19px; font-weight: 520; text-align: center; color: var(--soft); }
.dk__say span { display: block; white-space: nowrap; }
.dk.has-mine .dk__say { color: var(--ink); }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #ffffff;
  stroke: #14151a;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.6));
  opacity: 0;
  visibility: hidden;
  z-index: 5;
}

/* larger on a desktop-sized window, so the piece fills the frame; the phone box and the narrow Playground stay as they are */
@media (min-width: 700px) and (min-height: 500px) { .dk { zoom: 1.25; } }
@media (min-width: 1100px) and (min-height: 760px) { .dk { zoom: 1.6; } }
