:root {
  --bg: #0b0a0b;
  --ink: #f5f1ee;
  --soft: rgba(245, 241, 238, 0.56);
  --chip: #1a1819;
  --line: rgba(245, 241, 238, 0.1);
  --accent: #e5484d;
}

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

.bt { width: min(318px, 100%); }

.bt__head { display: flex; align-items: center; gap: 12px; height: clamp(46px, 14vh, 58px); margin-bottom: clamp(6px, 2.400vh, 16px); }
.bt__type { min-width: 2.050em; font-size: clamp(40px, 12.500vh, 52px); line-height: 1; font-weight: 400; letter-spacing: -0.04em; font-variation-settings: "wght" 700, "wdth" 92; color: var(--accent); white-space: nowrap; }
.bt__say { display: flex; flex-direction: column; min-width: 0; }
.bt__tag { display: block; height: 16px; overflow: hidden; font-size: 11.5px; line-height: 16px; font-weight: 660; letter-spacing: 0.04em; text-transform: uppercase; color: var(--soft); white-space: nowrap; }
.bt__line { display: block; height: 22px; overflow: hidden; font-size: 15.5px; line-height: 22px; font-weight: 620; font-stretch: 104%; white-space: nowrap; }
.bt__tag span, .bt__line span { display: block; }

.bt__board { position: relative; display: flex; flex-direction: column; }
.bt__label { font-size: 11px; line-height: 16px; font-weight: 640; letter-spacing: 0.05em; text-transform: uppercase; color: var(--soft); }
.bt__label:first-child { margin-bottom: 5px; }
.bt__label:last-child { margin-top: 5px; }
.bt__row { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; }

/* each type is a real button; the lit state is a child, so GSAP can spring the button itself */
.bt__chip {
  position: relative;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: var(--chip);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--soft);
  font: inherit;
  font-size: 12px;
  font-weight: 680;
  font-stretch: 92%;
  letter-spacing: -0.01em;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: color 0.3s ease, box-shadow 0.3s ease;
}
.bt__chip i { position: absolute; inset: 0; border-radius: inherit; background: var(--accent); opacity: 0; transition: opacity 0.3s ease; }
.bt__chip span { position: relative; }
.bt__chip.is-on { color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 70%, transparent); }
.bt__chip.is-on i { opacity: 0.22; }
.bt__chip.is-picked { color: #ffffff; box-shadow: 0 6px 18px -6px var(--accent); }
.bt__chip.is-picked i { opacity: 1; }
.bt__chip:focus-visible { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }

.bt__wires { display: block; width: 100%; height: clamp(64px, 24vh, 104px); overflow: visible; fill: none; }
.bt__wire { stroke: var(--accent); stroke-width: 1.600; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0.85; }
/* a short light runs once along each line, from the picked type to the other */
.bt__spark { stroke: #ffffff; stroke-width: 2.200; stroke-linecap: round; stroke-dasharray: 0.12 2; stroke-dashoffset: 0.12; opacity: 0; }

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

@media (hover: hover) {
  .bt__chip:hover { color: var(--ink); }
}

/* on a large screen the board is drawn bigger, so the poster and the preview video are not a small board in a big room */
@media (min-width: 900px) and (min-height: 680px) {
  .bt { zoom: 2; }
}
