:root {
  --bg: #0b0c10;
  --card: #15171d;
  --tile: #1f222b;
  --ink: #f3f4f8;
  --soft: rgba(243, 244, 248, 0.6);
  --faint: rgba(243, 244, 248, 0.36);
  --line: rgba(243, 244, 248, 0.09);
  --accent: #8b7bff;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: radial-gradient(80% 55% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 72%), 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;
}

.sw { position: relative; width: min(324px, 100%); padding: 14px; border-radius: 26px; background: linear-gradient(180deg, #191b22, var(--card)); box-shadow: 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 40px 60px -30px rgba(0, 0, 0, 0.8); }

.sw__head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px; }
.sw__head h1 { font-size: 15px; line-height: 20px; font-weight: 720; letter-spacing: -0.01em; }
.sw__hours { display: flex; align-items: baseline; gap: 6px; font-size: 11.500px; font-weight: 560; color: var(--soft); }
.sw__hours b { min-width: 32px; text-align: right; font-size: 13px; font-weight: 720; color: var(--ink); font-variant-numeric: tabular-nums; }

.sw__pair { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.sw__who { display: flex; align-items: center; gap: 6px; height: 20px; margin-bottom: 6px; padding-left: 2px; font-size: 12px; font-weight: 640; color: var(--soft); }
.sw__face { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: #2a2d38; color: var(--ink); font-style: normal; font-size: 9.500px; font-weight: 760; box-shadow: inset 0 0 0 1px var(--line); }
.sw__slot.is-you .sw__face { background: var(--accent); color: #0b0c10; box-shadow: none; }
.sw__slot.is-you .sw__who { color: var(--ink); }
.sw__roll { height: 16px; line-height: 16px; overflow: hidden; }
.sw__roll span { display: block; }

/* the frame is the place a shift belongs to: it shows when the shift has lifted away */
.sw__frame { position: relative; height: 94px; border-radius: 16px; background: rgba(243, 244, 248, 0.025); box-shadow: inset 0 0 0 1px var(--line); }
.sw__frame::before { content: ""; position: absolute; inset: 0; border-radius: 16px; border: 1.500px dashed rgba(243, 244, 248, 0.16); }
.sw__slot.is-you .sw__frame::before { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }

.tk { position: absolute; inset: 0; border-radius: 16px; background: linear-gradient(180deg, #262a35, var(--tile)); box-shadow: inset 0 0 0 1px rgba(243, 244, 248, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 14px 22px -14px rgba(0, 0, 0, 0.9); will-change: transform; }
[data-ticket-a] { z-index: 2; }
.tk__in { display: grid; align-content: start; justify-items: start; height: 100%; padding: 11px 12px; }
.tk__bar { width: 18px; height: 3px; border-radius: 2px; background: var(--faint); }
[data-ticket-a] .tk__bar { background: var(--accent); }
.tk__day { margin-top: 8px; font-size: 17px; line-height: 21px; font-weight: 740; letter-spacing: -0.015em; white-space: nowrap; }
.tk__time { margin-top: 1px; font-size: 12px; line-height: 16px; font-weight: 560; color: var(--soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tk__tag { margin-top: 7px; height: 18px; padding: 0 7px; border-radius: 6px; background: rgba(243, 244, 248, 0.07); font-style: normal; font-size: 10.500px; line-height: 18px; font-weight: 640; color: var(--soft); white-space: nowrap; }

.sw__turn { position: absolute; left: 50%; top: 59px; width: 28px; height: 28px; margin-left: -14px; border-radius: 50%; display: grid; place-items: center; background: #0f1015; box-shadow: 0 0 0 1px var(--line), 0 6px 10px -6px rgba(0, 0, 0, 0.9); z-index: 4; }
.sw__turn svg { width: 16px; height: 16px; fill: none; stroke: var(--soft); stroke-width: 1.500; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.3s ease; }
.sw.is-swapped .sw__turn svg { stroke: var(--accent); }

.sw__with { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); height: 34px; margin-top: 12px; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, 0.32); box-shadow: inset 0 0 0 1px var(--line); transition: opacity 0.3s ease; }
.sw.is-locked .sw__with { opacity: 0.42; }
.sw__pick { position: absolute; left: 3px; top: 3px; width: calc((100% - 6px) / 3); height: 28px; border-radius: 9px; background: #2b2e3a; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 8px -4px rgba(0, 0, 0, 0.8); }
.sw__chip { position: relative; height: 28px; border: 0; border-radius: 9px; background: transparent; color: var(--soft); font: inherit; font-size: 12.500px; font-weight: 640; cursor: pointer; outline: none; transition: color 0.25s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.sw__chip[aria-checked="true"] { color: var(--ink); }
.sw__chip:focus-visible, .sw__go:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
@media (hover: hover) { .sw__chip:hover { color: var(--ink); } }

.sw__say { height: 16px; margin-top: 10px; overflow: hidden; font-size: 11.500px; line-height: 16px; font-weight: 560; color: var(--soft); text-align: center; white-space: nowrap; }
.sw__say span { display: block; overflow: hidden; text-overflow: ellipsis; }
.sw.is-swapped .sw__say { color: color-mix(in srgb, var(--accent) 70%, var(--ink)); }

.sw__go { position: relative; display: block; width: 100%; height: 44px; margin-top: 10px; border: 0; border-radius: 14px; background: var(--accent); color: #0b0c10; font: inherit; font-size: 13.500px; font-weight: 720; cursor: pointer; outline: none; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 14px 22px -14px color-mix(in srgb, var(--accent) 90%, transparent); transition: background-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.sw__go:disabled { cursor: default; }
.sw.is-pending .sw__go { background: #262933; color: var(--soft); box-shadow: inset 0 0 0 1px var(--line); }
.sw.is-swapped .sw__go { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(243, 244, 248, 0.2); }
.sw__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.sw__gotext { display: block; height: 20px; line-height: 20px; overflow: hidden; }
.sw__gotext span { display: block; white-space: nowrap; }
@media (hover: hover) { .sw:not(.is-pending):not(.is-swapped) .sw__go:hover { background: color-mix(in srgb, var(--accent) 86%, #ffffff); } .sw.is-swapped .sw__go:hover { background: rgba(243, 244, 248, 0.06); } }

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

@media (max-width: 340px) {
  .tk__day { font-size: 15.500px; }
  .tk__time { font-size: 11px; }
  .tk__in { padding: 10px 10px; }
}
