.buzz-darts {
  --buzz-x: 49.5%;
  --buzz-y: 49.5%;
  position: relative;
  container-type: inline-size;
  max-width: 835px;
  margin: 28px auto;
  color: #fff;
  background: #0f0f0d;
  border: 2px solid #ffe225;
  border-radius: 16px;
  overflow: hidden;
  font: 700 16px Nunito, sans-serif;
  text-align: center;
}
.buzz-darts [hidden], .buzz-darts[hidden] { display: none !important; }
.buzz-darts-tools {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
}
.buzz-darts button, .buzz-darts .buzz-darts-action {
  border: 2px solid #0f0f0d;
  border-radius: 20px;
  background: #ffe225;
  color: #0f0f0d;
  padding: 6px 16px;
  min-height: 42px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.buzz-darts button:active, .buzz-darts .buzz-darts-action:active {
  background: #0f0f0d;
  color: #ffe225;
  border-color: #ffe225;
}
.buzz-darts :focus-visible { outline: 2px solid white; outline-offset: 3px; }
.buzz-darts button:disabled { cursor: default; opacity: .55; }
.buzz-darts-art { position: relative; background: black; }
.buzz-darts-art::before { content: ""; display: block; padding-top: 56.4072%; }
.buzz-darts-art img { position: absolute; display: block; max-width: none; }
.buzz-darts-poster, .buzz-darts-stand { inset: 0; width: 100%; height: auto; }
.buzz-darts-poster { z-index: 1; transition: opacity .5s; }
.buzz-darts-playing .buzz-darts-poster { opacity: 0; pointer-events: none; }
.buzz-darts-board { left: 32.575%; top: 19.533%; width: 33.772%; transform-origin: 51.773% 49.291%; }
.buzz-darts-dart { width: 7.3%; transform-origin: 50% 50%; pointer-events: none; }
.buzz-darts fieldset {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin: 8px 12px;
  border: 1px solid #ffe225;
  border-radius: 8px;
  padding: 8px;
}
.buzz-darts legend { padding: 0 8px; color: #ffe225; }
.buzz-darts label:has(:disabled) { opacity: .62; }
.buzz-darts-controls { padding: 6px 12px; }
.buzz-darts-controls p:empty { display: none; }
.buzz-darts-controls a { color: #ffe225; text-decoration: underline; }
.buzz-darts:not(:has(.buzz-darts-playing)) [data-action]:enabled {
  animation: buzz-darts-pulse 2s infinite;
}
@keyframes buzz-darts-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); box-shadow: 0 0 13px #ffe22588; }
}
.buzz-darts-reveal { padding: 12px; animation: buzz-darts-reveal .45s ease-out; }
.buzz-darts-reveal strong, .buzz-darts-reveal [data-prize] {
  display: table;
  margin: 4px auto 12px;
  padding: 9px 18px;
  background: #ffe225;
  color: #0f0f0d;
  clip-path: polygon(2% 0, 9% 7%, 90% 7%, 98% 0, 97% 25%, 100% 50%, 97% 75%, 98% 100%, 90% 93%, 9% 93%, 2% 100%, 3% 75%, 0 50%, 3% 25%);
}
.buzz-darts-reveal .buzz-darts-action { display: inline-grid; place-items: center; }
.buzz-darts-disclaimer { padding: 0 14px; font-size: 13px; margin: 24px 0; }
@keyframes buzz-darts-reveal { from { opacity: 0; transform: scale(.9); } }
@media (prefers-reduced-motion: reduce) {
  .buzz-darts *, .buzz-darts *::before { animation: none !important; transition: none !important; }
}

html.buzz-darts-screen-open { overflow: hidden; }
.buzz-darts-screen {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: min(1100px, calc(100vw - 32px));
  height: min(820px, calc(var(--buzz-viewport-height, 100vh) - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(var(--buzz-viewport-height, 100vh) - 32px);
  margin: auto;
  padding: 0;
  border: 2px solid #ffe225;
  border-radius: 18px;
  background: #000;
  color: #fff;
  overscroll-behavior: contain;
}
.buzz-darts-screen::backdrop { background: rgba(0, 0, 0, .72); }
.buzz-darts-screen .buzz-darts {
  width: 100%;
  max-width: none;
  min-height: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 16px;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.buzz-darts-screen .buzz-darts-tools {
  box-sizing: border-box;
  width: 100%;
  flex: 0 0 auto;
}
.buzz-darts-screen .buzz-darts-art {
  width: 100%;
  width: min(100%, max(320px, calc((var(--buzz-viewport-height, 100vh) - 230px) * 1670 / 942)));
  max-width: 100%;
}

/* Align the play button with the opening artwork. */
.buzz-darts:not(.buzz-darts-started) .buzz-darts-controls {
  position: relative;
  padding: 0 12px;
}
.buzz-darts:not(.buzz-darts-started) [data-action] {
  position: absolute;
  z-index: 3;
  left: 50%;
  width: 132px;
  width: max(132px, var(--buzz-play-width));
  padding: 0 8px;
  white-space: nowrap;
  height: var(--buzz-play-height);
  bottom: 8%;
  bottom: var(--buzz-play-bottom);
  transform: translateX(-50%);
  border: 2px solid #0f0f0d;
  min-height: 44px;
  background: #ffe225;
  color: #0f0f0d;
  font-weight: 900;
  animation: none;
}
.buzz-darts:not(.buzz-darts-started) [data-action]:enabled {
  animation: buzz-darts-art-button 2s infinite;
}
@keyframes buzz-darts-art-button {
  50% { box-shadow: 0 0 16px #ffe225aa; }
}
.buzz-darts-screen .buzz-darts {
  --buzz-art-width: min(100vw, max(320px, calc((var(--buzz-viewport-height, 100vh) - 230px) * 1670 / 942)));
  --buzz-play-width: calc(var(--buzz-art-width) * .30);
  --buzz-play-height: calc(var(--buzz-art-width) * .073);
  --buzz-play-bottom: calc(var(--buzz-art-width) * .045);
}
.buzz-darts-screen .buzz-darts-art {
  width: var(--buzz-art-width);
}

@media (max-width: 767px) and (orientation: portrait) {
  .buzz-darts-screen .buzz-darts-tools { padding: 8px; }
  .buzz-darts-screen .buzz-darts { --buzz-play-height: max(44px, calc(var(--buzz-art-width) * .073)); }
}
@media (orientation: landscape) and (max-height: 540px) {
  .buzz-darts-screen .buzz-darts {
    --buzz-art-width: min(78vw, max(260px, calc((var(--buzz-viewport-height, 100vh) - 142px) * 1670 / 942)));
    justify-content: flex-start;
  }
  .buzz-darts-screen .buzz-darts-tools { position: absolute; inset: 0 0 auto; z-index: 4; pointer-events: none; }
  .buzz-darts-screen .buzz-darts-tools button { pointer-events: auto; }
  .buzz-darts-screen .buzz-darts-art { margin-top: 4px; }
  .buzz-darts-screen .buzz-darts-disclaimer { margin: 16px 0 8px; }
}

.buzz-darts-step {
  display: grid;
  gap: 6px;
  margin: 8px 12px;
  color: #ffe225;
}
.buzz-darts-step a {
  color: #ffe225;
  text-decoration: underline;
}

.buzz-darts-screen { overflow-x: hidden; }
.buzz-darts-screen .buzz-darts { overflow: hidden; }
.buzz-darts-screen .buzz-darts-art.buzz-darts-playing {
  width: 175.5%;
  width: min(calc(var(--buzz-art-width) * 1.755), max(240px, calc((var(--buzz-viewport-height, 100vh) - 174px) * 1670 / 942 * 1.3)));
  max-width: none;
  flex: none;
}
.buzz-darts .buzz-darts-controls button.buzz-darts-shoot {
  background: #ffe225;
  color: #0f0f0d;
  border-color: #0f0f0d;
}
.buzz-darts .buzz-darts-controls button.buzz-darts-shoot:active {
  background: #0f0f0d;
  color: #ffe225;
  border-color: #ffe225;
}

.buzz-darts-screen .buzz-darts-controls,
.buzz-darts-screen .buzz-darts-reveal,
.buzz-darts-screen .buzz-darts-disclaimer {
  box-sizing: border-box;
  max-width: 100%;
  flex-shrink: 0;
}
.buzz-darts-screen .buzz-darts-art { flex-shrink: 0; }

.buzz-darts-board.buzz-darts-swipe {
  touch-action: none;
  cursor: grab;
  -webkit-user-drag: none;
  user-select: none;
}
