.bbt-root {
  --bbt-ink: #101820;
  --bbt-muted: #626967;
  --bbt-paper: #f6f4ef;
  --bbt-paper-2: #e8e4dc;
  --bbt-line: rgba(16, 24, 32, 0.14);
  --bbt-line-strong: rgba(16, 24, 32, 0.28);
  --bbt-action: #111;
  --bbt-action-text: #f7f4ec;
  --bbt-accent: #d8d0c4;
  --bbt-accent-2: #fff;
  --bbt-shadow: rgba(20, 20, 18, 0.16);

  width: 100%;
  color: var(--bbt-ink);
}

.theme-dark .bbt-root {
  --bbt-ink: #ecf4f7;
  --bbt-muted: #8f9698;
  --bbt-paper: #000;
  --bbt-paper-2: #080808;
  --bbt-line: rgba(255, 255, 255, 0.13);
  --bbt-line-strong: rgba(255, 255, 255, 0.24);
  --bbt-action: #fff;
  --bbt-action-text: #050505;
  --bbt-accent: #2a2a2a;
  --bbt-accent-2: #f2f2f2;
  --bbt-shadow: rgba(0, 0, 0, 0.64);
}

html.bbt-page-locked,
body.bbt-page-locked {
  overflow: hidden;
  scrollbar-width: none;
}

html.bbt-page-locked::-webkit-scrollbar,
body.bbt-page-locked::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.bbt-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  overflow: hidden;
  border: 1px solid var(--bbt-line);
  border-radius: 8px;
  padding: clamp(0.7rem, 2vw, 1rem);
  background: linear-gradient(180deg, var(--bbt-paper), var(--bbt-paper-2));
  box-shadow: 0 26px 80px var(--bbt-shadow);
  transition: opacity 180ms linear;
}

.bbt-artboard {
  position: relative;
  min-height: clamp(28rem, 58vw, 40rem);
  overflow: hidden;
  border: 1px solid var(--bbt-line-strong);
  border-radius: 8px;
  isolation: isolate;
  background: #000;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    inset 0 -60px 110px rgba(255, 255, 255, 0.025);
}

.bbt-artboard::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: '';
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 9.09% 16.66%;
  opacity: 0.55;
  mask-image: linear-gradient(150deg, transparent 12%, #000 42%, transparent 88%);
}

.bbt-artboard::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: '';
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 12%, rgba(255, 255, 255, 0.05) 13%, transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.55), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.5));
}

.bbt-edge,
.bbt-zone-map,
.bbt-bloom-ring,
.bbt-white-probe {
  position: absolute;
  display: block;
  pointer-events: none;
}

.bbt-edge {
  z-index: 0;
  filter: blur(28px);
  opacity: 0.92;
}

.bbt-edge-left {
  top: -8%;
  left: -5%;
  width: 20%;
  height: 62%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.54), transparent 66%);
}

.bbt-edge-top {
  top: -14%;
  left: 26%;
  width: 38%;
  height: 22%;
  background: radial-gradient(ellipse, rgba(111, 231, 214, 0.24), transparent 68%);
}

.bbt-edge-corner {
  right: -7%;
  bottom: -12%;
  width: 34%;
  height: 48%;
  background: radial-gradient(ellipse, rgba(201, 255, 88, 0.28), transparent 66%);
}

.bbt-zone-map {
  z-index: 1;
  right: 18%;
  top: 19%;
  width: min(24vw, 15rem);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 25% 25%;
  opacity: 0.72;
}

.bbt-zone-map-alt {
  right: auto;
  top: auto;
  left: 17%;
  bottom: 18%;
  width: min(18vw, 11rem);
  opacity: 0.34;
}

.bbt-bloom-ring {
  z-index: 3;
  left: 50%;
  top: 47%;
  width: clamp(9rem, 25vw, 18rem);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.11), transparent 58%);
}

.bbt-white-probe {
  z-index: 4;
  left: 50%;
  top: 47%;
  width: clamp(4.5rem, 12vw, 8rem);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  box-shadow:
    0 0 22px rgba(255, 255, 255, 0.92),
    0 0 78px rgba(255, 255, 255, 0.46),
    0 0 140px rgba(255, 255, 255, 0.2);
}

.bbt-prep {
  position: absolute;
  z-index: 5;
  top: clamp(0.85rem, 2vw, 1.25rem);
  left: clamp(0.85rem, 2vw, 1.25rem);
  display: grid;
  max-width: min(28rem, calc(100% - 2rem));
  gap: 0.45rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.bbt-prep strong {
  color: #fff;
  font-size: 0.95rem;
}

.bbt-prep span {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  font-size: 0.88rem;
  line-height: 1.45;
}

.bbt-prep span::before {
  width: 0.42rem;
  height: 0.42rem;
  margin-top: 0.48rem;
  border-radius: 50%;
  content: '';
  background: var(--bbt-accent);
}

.bbt-readouts {
  position: absolute;
  z-index: 5;
  right: clamp(0.85rem, 2vw, 1.25rem);
  bottom: clamp(0.85rem, 2vw, 1.25rem);
  left: clamp(0.85rem, 2vw, 1.25rem);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
}

.bbt-readouts span {
  min-width: 0;
  padding: 0.8rem 0.9rem;
  background: rgba(0, 0, 0, 0.52);
}

.bbt-readouts strong,
.bbt-readouts em {
  display: block;
  overflow-wrap: anywhere;
  font-style: normal;
}

.bbt-readouts strong {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.63rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bbt-readouts em {
  margin-top: 0.22rem;
  color: #fff;
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  font-weight: 900;
}

.bbt-console {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--bbt-line);
  border-radius: 8px;
  background: var(--bbt-line);
}

.bbt-actions {
  display: contents;
}

.bbt-mode {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.4rem);
  min-height: 7.8rem;
  border: 0;
  border-radius: 0;
  padding: clamp(1rem, 2.2vw, 1.35rem);
  color: var(--bbt-ink);
  text-align: left;
  cursor: pointer;
  background: color-mix(in srgb, var(--bbt-paper) 94%, var(--bbt-ink) 6%);
  box-shadow: none;
  transition: background 160ms ease, color 160ms ease;
}

.theme-dark .bbt-mode {
  background: #050505;
  box-shadow: none;
}

.bbt-mode:hover,
.bbt-mode:focus-visible {
  background: color-mix(in srgb, var(--bbt-paper) 86%, var(--bbt-ink) 14%);
}

.theme-dark .bbt-mode:hover,
.theme-dark .bbt-mode:focus-visible {
  background: #101010;
}

.bbt-mode::before {
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: 0;
  width: 2px;
  content: '';
  background: var(--bbt-accent);
  opacity: 0.75;
}

.bbt-mode-blooming::before {
  background: var(--bbt-accent-2);
}

.bbt-mode-copy {
  min-width: 0;
}

.bbt-mode-title {
  display: block;
  font-size: clamp(1.1rem, 2.1vw, 1.55rem);
  font-weight: 900;
  line-height: 1;
}

.bbt-mode small {
  display: block;
  margin-top: 0.4rem;
  color: var(--bbt-muted);
  font-size: 0.9rem;
  line-height: 1.42;
}

.bbt-mode strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-width: 10rem;
  border: 1px solid var(--bbt-line-strong);
  border-radius: 8px;
  padding: 0 1rem;
  color: var(--bbt-action-text);
  background: var(--bbt-action);
  font-size: 0.92rem;
  white-space: nowrap;
}

.bbt-mode-blooming strong {
  color: var(--bbt-action-text);
  background: var(--bbt-action);
}

.bbt-test {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000;
  cursor: default;
  touch-action: none;
}

.bbt-test:fullscreen {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

.bbt-test::backdrop {
  background: #000;
}

.bbt-running .bbt-panel {
  opacity: 0;
  pointer-events: none;
}

.bbt-running .bbt-test {
  display: block;
}

.bbt-cursor-hidden {
  cursor: none;
}

.bbt-hotspot {
  position: fixed;
  top: 0;
  left: 0;
  display: none;
  width: clamp(5.5rem, 13vw, 10rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: none;
  will-change: transform;
}

.bbt-blooming-active .bbt-hotspot {
  display: block;
}

.bbt-hint {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  max-width: min(28rem, calc(100vw - 2rem));
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(0, 0, 0, 0.72);
  font-size: 0.9rem;
  opacity: 1;
  transition: opacity 180ms ease;
}

.bbt-cursor-hidden .bbt-hint {
  opacity: 0;
}

@media (max-width: 820px) {
  .bbt-console {
    grid-template-columns: 1fr;
  }

  .bbt-mode {
    grid-template-columns: 1fr;
  }

  .bbt-mode strong {
    min-height: 3rem;
    width: 100%;
  }
}

@media (max-width: 620px) {
  .bbt-artboard {
    min-height: 34rem;
  }

  .bbt-readouts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
