.jb-boot,
.jb {
  min-height: 100%;
}

.jb {
  --color-paper: #f6f0e6;
  --color-ink: #1a2a30;
  --color-sea: #1c6e74;
  --color-dory: #e24b3b;
  --color-mist: #5e6b68;
  --color-sky: #d7ebf0;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  position: fixed;
  inset: 0;
  overflow: hidden;
  color: var(--color-ink);
  font-family: var(--font-body);
  background: var(--color-sky);
}

.jb canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.jb-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 8px;
  pointer-events: none;
}

.jb-brand {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-shadow: 0 1px 0 rgba(246, 240, 230, 0.4);
}

.jb-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-sea);
  font-weight: 700;
}

.jb-street {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.jb-stats {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.jb-stat {
  min-width: 72px;
  padding: 6px 10px 7px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--color-paper) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-ink) 10%, transparent);
  backdrop-filter: blur(8px);
}

.jb-stat span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-mist);
  font-weight: 700;
}

.jb-stat strong {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.jb-icon {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--color-ink) 12%, transparent);
  background: color-mix(in srgb, var(--color-paper) 88%, transparent);
  color: var(--color-ink);
  display: grid;
  place-items: center;
}

.jb-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.jb-card {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(460px, calc(100% - 28px));
  max-height: min(430px, 52%);
  overflow: auto;
  padding: 22px 22px 16px;
  border-radius: 26px;
  background: color-mix(in srgb, var(--color-paper) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-ink) 12%, transparent);
  box-shadow: 0 24px 60px rgba(26, 42, 48, 0.18);
  backdrop-filter: blur(10px);
}

.jb-card[hidden] {
  display: none;
}

.jb-card h1,
.jb-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 0.92;
  font-size: clamp(46px, 10vw, 68px);
}

.jb-card h2 {
  font-size: clamp(36px, 8vw, 52px);
}

.jb-lede {
  margin: 14px 0 0;
  font-size: 16.5px;
  line-height: 1.45;
  color: var(--color-ink);
}

.jb-help {
  margin: 8px 0 0;
  color: var(--color-mist);
  font-size: 14px;
  line-height: 1.45;
}

.jb-go {
  margin-top: 18px;
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 999px;
  background: var(--color-dory);
  color: var(--color-paper);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.jb-go:hover {
  filter: brightness(1.05);
}

.jb-go:active {
  transform: translateY(1px);
}

.jb-keys {
  margin: 12px 0 0;
  font-size: 12px;
  letter-spacing: 0.01em;
  color: var(--color-mist);
  line-height: 1.4;
}

.jb-arcade {
  display: inline-block;
  margin-top: 14px;
  color: var(--color-sea);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.jb-arcade:hover {
  text-decoration: underline;
}

.jb-scoreline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--color-ink) 10%, transparent);
}

.jb-scoreline span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-mist);
  font-weight: 700;
}

.jb-scoreline strong {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.03em;
}

.jb-banner {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 78px;
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-paper) 82%, transparent);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.jb-banner[hidden] {
  display: none;
}

.jb-rowbar {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 16px;
  bottom: calc(var(--pot-h, 92px) + 10px);
  height: 4px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--color-ink) 12%, transparent);
  overflow: hidden;
  pointer-events: none;
}

.jb-rowbar span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: var(--color-sea);
  border-radius: inherit;
}

.jb-rowbar.warn span {
  background: var(--color-dory);
}

.jb-pots {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(246, 240, 230, 0.94), rgba(246, 240, 230, 0.72) 70%, transparent);
}

.jb-pots[hidden] {
  display: none;
}

.jb-pot {
  min-height: 52px;
  border-radius: 16px;
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
  box-shadow: inset 0 -3px 0 rgba(26, 42, 48, 0.12);
}

.jb-pot.on {
  border-color: var(--color-ink);
  transform: translateY(-2px);
}

.jb-pot small {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.7;
}

.jb-pause {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: min(320px, calc(100% - 32px));
  padding: 22px;
  border-radius: 22px;
  background: var(--color-paper);
  text-align: center;
  box-shadow: 0 18px 50px rgba(26, 42, 48, 0.2);
}

.jb-pause[hidden] {
  display: none;
}

.jb-pause p {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.03em;
}

@media (min-width: 760px) {
  .jb-pots {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    padding-inline: 18px;
  }

  .jb-top {
    padding-inline: 22px;
  }

  .jb-banner {
    top: 86px;
  }
}

@media (max-width: 420px) {
  .jb-stat {
    min-width: 60px;
    padding-inline: 8px;
  }

  .jb-stat strong {
    font-size: 18px;
  }

  .jb-pot {
    font-size: 12px;
  }
}

@media (max-height: 740px) {
  .jb-card {
    bottom: 10px;
    max-height: 50%;
    padding: 16px 16px 12px;
  }

  .jb-card h1 {
    font-size: 42px;
  }

  .jb-lede,
  .jb-help {
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jb-pot.on,
  .jb-go:active {
    transform: none;
  }
}
