.cpt-mini {
  position: relative;
  place-items: center;
  background: #fbf9ff;
}

.cpt-mini-target {
  position: absolute;
  top: 16px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cpt-mini-target i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #d9cdef;
  border-radius: 5px;
  color: #5b21b6;
  background: #ffffff;
  font-size: 14px;
  font-style: normal;
  font-weight: 900;
}

.cpt-mini-target i:last-child {
  border-color: #ffd400;
  background: #ffd400;
}

.cpt-mini-focus {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border: 2px solid #7c3aed;
  border-radius: 50%;
  color: #2f2436;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(109, 40, 217, 0.15);
  font-size: 38px;
  font-weight: 900;
  animation: cpt-mini-pulse 1.8s ease-in-out infinite;
}

.cpt-mini-tap {
  position: absolute;
  right: 22px;
  bottom: 18px;
  width: 24px;
  height: 24px;
  border: 3px solid #ffd400;
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(255, 212, 0, 0.18);
}

.cpt-entry-shell {
  width: min(100%, 650px);
  overflow-x: clip;
}

.cpt-cover-topbar {
  flex: 0 0 auto;
  font-weight: 850;
}

.cpt-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: center;
  gap: 30px;
  padding: 18px 0 12px;
}

.cpt-hero > div:first-child {
  min-width: 0;
}

.cpt-hero .brand-mark {
  margin-bottom: 13px;
}

.cpt-hero .product-title {
  font-size: 16px;
}

.cpt-title {
  margin: 9px 0 15px;
  color: var(--teal-dark);
  font-size: 48px;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0;
  animation: cpt-title-in 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.cpt-title span {
  color: #b87900;
}

.cpt-hero .lead {
  font-size: 13px;
  line-height: 1.72;
}

.cpt-cover-scene {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-top: 2px solid #d8caef;
  border-bottom: 5px solid #ffd400;
  background-color: #ffffff;
  background-image:
    linear-gradient(#f1edf7 1px, transparent 1px),
    linear-gradient(90deg, #f1edf7 1px, transparent 1px);
  background-size: 28px 28px;
  box-shadow: 0 14px 30px rgba(109, 40, 217, 0.13);
}

.cpt-cover-target {
  position: absolute;
  top: 17px;
  left: 17px;
  display: flex;
  gap: 4px;
}

.cpt-cover-target i {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid #d8caef;
  border-radius: 5px;
  color: #5b21b6;
  background: #ffffff;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.cpt-cover-target i:last-child {
  border-color: #159a68;
  background: #159a68;
}

.cpt-cover-focus {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 92px;
  height: 92px;
  border: 3px solid #7c3aed;
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    inset 0 0 0 10px #f2ebff,
    0 10px 24px rgba(109, 40, 217, 0.18);
  transform: translate(-50%, -50%);
}

.cpt-cover-stream {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  color: #2f2436;
  font-size: 38px;
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.cpt-cover-stream.one {
  animation: cpt-cover-cycle 3.6s infinite;
}

.cpt-cover-stream.two {
  animation: cpt-cover-cycle 3.6s 1.2s infinite;
}

.cpt-cover-stream.three {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: #159a68;
  animation: cpt-cover-cycle 3.6s 2.4s infinite;
}

.cpt-cover-scene > b {
  position: absolute;
  right: 24px;
  bottom: 22px;
  width: 26px;
  height: 26px;
  border: 3px solid #ffd400;
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(255, 212, 0, 0.18);
  animation: cpt-tap-ring 1.8s ease-out infinite;
}

.cpt-guide-shell {
  width: min(100%, 680px);
}

.cpt-guide-intro {
  padding-bottom: 26px;
}

.cpt-guide-sequence {
  min-height: 116px;
  display: grid;
  grid-template-columns: 58px 24px 58px 24px 58px;
  place-content: center;
  align-items: center;
  gap: 8px;
  margin: 12px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fdfcff;
}

.cpt-guide-sequence span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 2px solid #d9cdef;
  border-radius: 7px;
  color: #5b21b6;
  background: #ffffff;
  font-size: 31px;
  font-weight: 900;
}

.cpt-guide-sequence .letter {
  color: #9b7100;
}

.cpt-guide-sequence .swatch {
  border-color: #159a68;
  background: #159a68;
}

.cpt-guide-sequence i {
  color: #b87900;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.cpt-data-strip {
  grid-template-columns: auto 1fr 1px auto 1fr;
}

.cpt-lobby-shell {
  width: min(100%, 720px);
}

.cpt-setup {
  gap: 22px;
}

.cpt-mode-grid,
.cpt-option-grid {
  display: grid;
  gap: 7px;
}

.cpt-mode-grid,
.cpt-option-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cpt-option-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cpt-option-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cpt-mode-grid button,
.cpt-option-grid button {
  min-width: 0;
  min-height: 46px;
  padding: 8px 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.cpt-mode-grid button:hover,
.cpt-option-grid button:hover {
  border-color: #cdbbea;
}

.cpt-mode-grid button.selected,
.cpt-option-grid button.selected {
  border-color: #7c3aed;
  color: #5b21b6;
  background: #f2ebff;
}

.cpt-option-grid button:disabled {
  cursor: default;
  opacity: 0.58;
}

.cpt-config-note,
.cpt-guest-config {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 12px 14px;
  border-left: 4px solid #ffd400;
  background: #fff9d6;
}

.cpt-config-note strong,
.cpt-guest-config strong {
  color: #5b21b6;
  font-size: 13px;
}

.cpt-config-note span,
.cpt-guest-config span {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.cpt-game-shell {
  position: relative;
  width: min(100%, 820px);
  gap: 12px;
}

.cpt-game-header {
  flex: 0 0 auto;
}

.cpt-target-strip {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fdfcff;
}

.cpt-target-strip > span {
  color: #5b21b6;
  font-size: 12px;
  font-weight: 900;
}

.cpt-target-strip > small {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.cpt-target-strip > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cpt-target-strip i {
  color: #b87900;
  font-size: 16px;
  font-style: normal;
  font-weight: 900;
}

.cpt-token {
  display: inline-grid;
  place-items: center;
  color: #2f2436;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.cpt-token.target {
  width: 42px;
  height: 42px;
  border: 2px solid #d8caef;
  border-radius: 6px;
  background: #ffffff;
  font-size: 23px;
}

.cpt-token.target.color {
  border-color: var(--token-color);
  background: var(--token-color);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.35);
}

.cpt-stage {
  position: relative;
  width: 100%;
  min-height: min(560px, calc(100dvh - 238px));
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d9d3dc;
  border-radius: 8px;
  color: #2f2436;
  background-color: #ffffff;
  background-image:
    linear-gradient(#f3eff7 1px, transparent 1px),
    linear-gradient(90deg, #f3eff7 1px, transparent 1px);
  background-size: 46px 46px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.cpt-stage:not(:disabled):active {
  background-color: #fcfaff;
}

.cpt-stage:disabled {
  cursor: default;
  opacity: 1;
}

.cpt-stage-corner {
  position: absolute;
  width: 42px;
  height: 42px;
  border-color: #7c3aed;
  opacity: 0.38;
}

.cpt-stage-corner.top-left {
  top: 22px;
  left: 22px;
  border-top: 2px solid;
  border-left: 2px solid;
}

.cpt-stage-corner.top-right {
  top: 22px;
  right: 22px;
  border-top: 2px solid;
  border-right: 2px solid;
}

.cpt-stage-corner.bottom-left {
  bottom: 22px;
  left: 22px;
  border-bottom: 2px solid;
  border-left: 2px solid;
}

.cpt-stage-corner.bottom-right {
  right: 22px;
  bottom: 22px;
  border-right: 2px solid;
  border-bottom: 2px solid;
}

.cpt-stimulus {
  position: relative;
  z-index: 2;
  width: min(44vw, 260px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.cpt-stimulus.distributed {
  position: absolute;
  top: var(--stimulus-y, 50%);
  left: var(--stimulus-x, 50%);
  transform: translate(-50%, -50%);
}

.cpt-stimulus > .cpt-token.active {
  animation: cpt-stimulus-enter 180ms cubic-bezier(0.22, 1, 0.36, 1)
    both;
}

.cpt-stimulus > .cpt-token.active.number,
.cpt-stimulus > .cpt-token.active.letter {
  color: #2f2436;
  font-size: clamp(116px, 22vw, 210px);
  text-shadow: 0 7px 0 rgba(255, 212, 0, 0.2);
}

.cpt-stimulus > .cpt-token.active.letter {
  color: #5b21b6;
}

.cpt-stimulus > .cpt-token.active.color {
  width: min(38vw, 220px);
  aspect-ratio: 1;
  border: 10px solid #ffffff;
  border-radius: 8px;
  background: var(--token-color);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--token-color) 65%, #2f2436),
    0 18px 36px rgba(47, 36, 54, 0.17);
}

.cpt-rest-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d8caef;
}

.cpt-click-feedback {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border: 5px solid currentColor;
  border-radius: 50%;
  font-size: 72px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.7);
}

.cpt-click-feedback.visible {
  animation: cpt-feedback 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.cpt-click-feedback.correct {
  color: #159a68;
  background: rgba(235, 253, 245, 0.94);
}

.solo-coach-mode .cpt-click-feedback.visible.correct {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: none;
}

.cpt-click-feedback.wrong {
  color: #e5484d;
  background: rgba(255, 241, 241, 0.94);
}

.cpt-click-feedback.too-late {
  color: #c46601;
  background: rgba(255, 247, 236, 0.94);
}

.cpt-countdown-overlay {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: #5b21b6;
  background: rgba(255, 255, 255, 0.94);
}

.cpt-countdown-overlay small {
  font-size: 12px;
  font-weight: 850;
}

.cpt-countdown-overlay strong {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border: 4px solid #ffd400;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(109, 40, 217, 0.16);
  font-size: 52px;
  line-height: 1;
  animation: cpt-countdown-pop 800ms cubic-bezier(0.16, 1, 0.3, 1)
    infinite;
}

.cpt-live-stats,
.cpt-result-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.cpt-live-stats > div,
.cpt-result-metrics > div {
  min-width: 0;
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 10px 6px;
  background: #ffffff;
  text-align: center;
}

.cpt-live-stats strong,
.cpt-result-metrics strong {
  color: #2f2436;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.cpt-live-stats span,
.cpt-result-metrics span {
  color: var(--muted);
  font-size: 9px;
}

.cpt-result-shell {
  width: min(100%, 720px);
}

.cpt-result-metrics {
  margin: 16px 0;
}

.cpt-result-metrics > div {
  min-height: 86px;
}

.cpt-result-metrics strong {
  color: #5b21b6;
  font-size: 25px;
}

.cpt-result-list {
  display: grid;
  gap: 7px;
}

.cpt-result-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.cpt-result-row.winner {
  border-color: #ffd400;
  background: #fff9d6;
}

.cpt-result-row > span {
  color: #9b7100;
  font-weight: 900;
}

.cpt-result-row > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cpt-result-row > b {
  color: #5b21b6;
  font-size: 12px;
}

.cpt-result-row > small {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 9px;
}

@keyframes cpt-title-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cpt-mini-pulse {
  0%,
  100% {
    transform: scale(0.94);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes cpt-cover-cycle {
  0%,
  27% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.76);
  }
  34%,
  58% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  66%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@keyframes cpt-tap-ring {
  from {
    box-shadow: 0 0 0 0 rgba(255, 212, 0, 0.38);
  }
  to {
    box-shadow: 0 0 0 18px rgba(255, 212, 0, 0);
  }
}

@keyframes cpt-stimulus-enter {
  from {
    opacity: 0;
    transform: scale(0.78);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes cpt-feedback {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
  }
  24% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.06);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.14);
  }
}

@keyframes cpt-countdown-pop {
  0% {
    opacity: 0.55;
    transform: scale(0.82);
  }
  100% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@media (max-width: 620px) {
  .cpt-hero {
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 16px;
  }

  .cpt-cover-scene {
    min-height: 190px;
  }

  .cpt-title {
    font-size: 42px;
  }

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

  .cpt-stage {
    min-height: min(520px, calc(100dvh - 224px));
  }
}

@media (max-width: 480px) {
  .cpt-hero {
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 12px;
  }

  .cpt-hero .product-title {
    font-size: 13px;
  }

  .cpt-title {
    font-size: 35px;
  }

  .cpt-cover-scene {
    min-height: 166px;
  }

  .cpt-cover-focus {
    width: 66px;
    height: 66px;
  }

  .cpt-cover-stream {
    font-size: 29px;
  }

  .cpt-cover-target {
    top: 10px;
    left: 9px;
  }

  .cpt-cover-target i {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }

  .cpt-option-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cpt-config-note,
  .cpt-guest-config {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .cpt-config-note span,
  .cpt-guest-config span {
    text-align: left;
  }

  .cpt-game-shell {
    padding-right: 10px;
    padding-left: 10px;
  }

  .cpt-target-strip {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 7px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .cpt-target-strip > span {
    font-size: 10px;
  }

  .cpt-token.target {
    width: 34px;
    height: 34px;
    font-size: 19px;
  }

  .cpt-target-strip > div {
    gap: 5px;
  }

  .cpt-stage {
    min-height: min(500px, calc(100dvh - 218px));
  }

  .cpt-stimulus {
    width: min(62vw, 230px);
  }

  .cpt-stimulus > .cpt-token.active.number,
  .cpt-stimulus > .cpt-token.active.letter {
    font-size: min(42vw, 174px);
  }

  .cpt-stimulus > .cpt-token.active.color {
    width: min(52vw, 190px);
  }

  .cpt-live-stats strong {
    font-size: 15px;
  }

  .cpt-result-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 360px) {
  .cpt-title {
    font-size: 31px;
  }

  .cpt-data-strip {
    gap: 4px;
    padding-right: 4px;
    padding-left: 4px;
    font-size: 9px;
  }

  .cpt-data-strip i {
    display: block;
    margin-right: 2px;
    margin-left: 2px;
  }

  .cpt-data-strip span:last-child,
  .cpt-data-strip strong:nth-of-type(2) {
    display: inline;
  }

  .cpt-cover-scene {
    min-height: 150px;
  }

  .cpt-guide-sequence {
    grid-template-columns: 48px 18px 48px 18px 48px;
    gap: 5px;
  }

  .cpt-guide-sequence span {
    width: 48px;
    height: 48px;
  }

  .cpt-target-strip > small {
    display: none;
  }

  .cpt-target-strip {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .cpt-game-header .game-controls {
    gap: 4px;
  }

  .cpt-game-header .game-control-button {
    padding-right: 7px;
    padding-left: 7px;
    font-size: 10px;
  }

  .cpt-live-stats span {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cpt-mini-focus,
  .cpt-cover-stream,
  .cpt-cover-scene > b {
    animation: none;
  }
}
