.bo-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 24px;
  color: var(--cg-ink);
  font-family: Inter, Arial, sans-serif;
}

.bo-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.bo-statline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.bo-stat,
.bo-hud-card {
  min-width: 74px;
  padding: 8px 10px;
  border: 1px solid var(--cg-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 20px rgba(33, 43, 40, 0.08);
}

.bo-stat span,
.bo-hud-card span {
  display: block;
  color: var(--cg-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.bo-stat strong,
.bo-hud-card strong {
  display: block;
  margin-top: 2px;
  color: var(--cg-ink);
  font-size: 19px;
  line-height: 1;
}

.bo-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bo-btn,
.bo-close {
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--cg-line);
  border-radius: 8px;
  background: var(--cg-panel);
  color: var(--cg-ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(33, 43, 40, 0.08);
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.bo-btn {
  padding: 0 14px;
}

.bo-btn:hover,
.bo-close:hover {
  transform: translateY(-1px);
  border-color: rgba(18, 122, 137, 0.45);
}

.bo-btn:focus-visible,
.bo-close:focus-visible,
.bo-canvas:focus-visible {
  outline: 3px solid rgba(49, 95, 157, 0.35);
  outline-offset: 3px;
}

.bo-primary {
  border-color: transparent;
  background: var(--cg-teal);
  color: #fff;
}

.bo-icon-btn {
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.bo-icon-btn svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bo-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--cg-line);
  border-radius: 8px;
  background: var(--cg-panel);
  box-shadow: var(--cg-shadow);
  touch-action: none;
}

.bo-canvas {
  display: block;
  width: 100%;
  height: min(70vh, 620px);
  min-height: 440px;
  cursor: pointer;
}

.bo-hud {
  position: absolute;
  top: 10px;
  left: 50%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.bo-hud-card {
  min-width: 80px;
  text-align: center;
  backdrop-filter: blur(8px);
}

.bo-hud-card strong {
  letter-spacing: 0.5px;
}

.bo-start,
.bo-result {
  position: absolute;
  left: 50%;
  display: grid;
  gap: 6px;
  width: min(84%, 300px);
  padding: 16px;
  border: 1px solid var(--cg-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--cg-ink);
  text-align: center;
  box-shadow: var(--cg-shadow);
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.bo-start {
  bottom: 56px;
  pointer-events: none;
}

.bo-start strong,
.bo-result strong {
  font-size: 21px;
  line-height: 1.15;
}

.bo-start span,
.bo-result span,
.bo-result p {
  margin: 0;
  color: var(--cg-muted);
  font-size: 14px;
}

.bo-result {
  top: 50%;
  transform: translate(-50%, -50%);
}

.bo-shell[data-state='over'] .bo-canvas {
  filter: saturate(0.6);
}

.bo-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(30, 37, 40, 0.32);
}

.bo-modal-card {
  position: relative;
  width: min(100%, 430px);
  padding: 22px;
  border: 1px solid var(--cg-line);
  border-radius: 8px;
  background: var(--cg-panel);
  color: var(--cg-ink);
  box-shadow: 0 24px 70px rgba(30, 37, 40, 0.22);
}

.bo-modal-card h2 {
  margin: 0 48px 12px 0;
  font-size: 24px;
  line-height: 1.1;
}

.bo-modal-card p {
  margin: 10px 0 0;
  color: var(--cg-muted);
  line-height: 1.45;
}

.bo-close {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.bo-is-hidden {
  display: none !important;
}

@media (max-width: 560px) {
  .bo-shell {
    padding: 0 10px 18px;
  }

  .bo-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .bo-statline,
  .bo-actions {
    justify-content: center;
  }

  .bo-stat {
    flex: 1 1 72px;
    text-align: center;
  }

  .bo-canvas {
    height: min(66vh, 540px);
    min-height: 420px;
  }

  .bo-hud {
    top: 8px;
    width: calc(100% - 14px);
    gap: 6px;
  }

  .bo-hud-card {
    min-width: 0;
    flex: 1 1 0;
    padding: 7px 8px;
  }

  .bo-hud-card strong {
    font-size: 17px;
  }

  .bo-start {
    bottom: 46px;
  }
}
