.reveal .stats306-live-prompt {
  cursor: pointer;
  padding-bottom: 1.8em;
  position: relative;
}

.stats306-debug-bar {
  align-items: center;
  background: #00274c;
  color: white;
  display: flex;
  font: 800 13px/1 Arial, sans-serif;
  gap: 9px;
  left: 50%;
  padding: 7px 10px;
  position: fixed;
  top: 0;
  transform: translateX(-50%);
  z-index: 1100;
}

.stats306-debug-bar select {
  background: white;
  border: 2px solid #ffcb05;
  color: #00274c;
  font: 800 13px/1 Arial, sans-serif;
  padding: 4px 22px 4px 7px;
}

.reveal .stats306-live-prompt:hover,
.reveal .stats306-live-prompt:focus-visible {
  box-shadow: 0 0 0 7px #ffcb05;
  outline: 4px solid #0055a5;
  outline-offset: 3px;
}

.reveal .stats306-prompt-chip {
  bottom: 0.35em;
  color: #00274c;
  font-size: 0.52em;
  font-weight: 800;
  letter-spacing: 0.02em;
  position: absolute;
  right: 0.65em;
}

.stats306-prompt-shell {
  bottom: 14px;
  display: none;
  height: 58px;
  position: fixed;
  right: 18px;
  width: 136px;
  z-index: 1000;
}

.stats306-prompt-shell.available {
  display: block;
}

.stats306-prompt-frame {
  background: transparent;
  border: 0;
  box-sizing: border-box;
  height: 100%;
  position: relative;
  width: 100%;
  z-index: 2;
}

.stats306-prompt-frame:focus-visible {
  outline: 4px solid #ffcb05;
  outline-offset: 3px;
}

.stats306-prompt-backdrop {
  display: none;
}

.stats306-prompt-status {
  align-items: center;
  background: white;
  border: 4px solid #00274c;
  box-shadow: 0 18px 70px rgb(0 39 76 / 28%);
  box-sizing: border-box;
  color: #00274c;
  display: none;
  flex-direction: column;
  inset: 0;
  justify-content: center;
  padding: 2rem;
  position: absolute;
  text-align: center;
  z-index: 3;
}

.stats306-prompt-status:focus {
  outline: 0;
}

.stats306-prompt-shell.open .stats306-prompt-status.visible {
  display: flex;
}

.stats306-prompt-status strong {
  font: 800 1.3rem/1.2 Arial, sans-serif;
}

.stats306-prompt-status p {
  font: 500 0.95rem/1.45 Arial, sans-serif;
  margin: 0.8rem 0 1.25rem;
  max-width: 31rem;
}

.stats306-prompt-status div {
  display: flex;
  gap: 0.7rem;
}

.stats306-prompt-status button {
  background: #ffcb05;
  border: 2px solid #00274c;
  border-radius: 0.3rem;
  color: #00274c;
  cursor: pointer;
  font: 800 0.9rem/1 Arial, sans-serif;
  padding: 0.75rem 1rem;
}

.stats306-prompt-status button:last-child {
  background: white;
}

.stats306-prompt-status button:focus-visible {
  outline: 3px solid #ffcb05;
  outline-offset: 3px;
}

.stats306-prompt-shell.open {
  bottom: 4vh;
  height: min(680px, 92vh);
  right: 4vw;
  width: min(620px, 92vw);
}

.stats306-prompt-shell.open.compact {
  bottom: 88px;
  height: min(340px, 70vh);
  width: min(520px, 92vw);
}

.stats306-point-total {
  align-items: center;
  background: #00274c;
  border: 3px solid #ffcb05;
  border-radius: 999px;
  bottom: 14px;
  box-shadow: 0 8px 28px rgb(0 39 76 / 28%);
  box-sizing: border-box;
  color: white;
  display: flex;
  flex-direction: column;
  height: 62px;
  justify-content: center;
  min-width: 132px;
  padding: 6px 14px;
  pointer-events: none;
  position: fixed;
  right: 18px;
  z-index: 1001;
}

.stats306-point-total[hidden],
.stats306-extra-credit-pop[hidden] {
  display: none;
}

.stats306-point-total strong {
  color: #ffcb05;
  font: 950 26px/1 "Arial Narrow", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}

.stats306-point-total span {
  font: 900 10px/1.1 Arial, sans-serif;
  letter-spacing: 0.13em;
  margin-top: 4px;
}

.stats306-point-total.rolling strong {
  animation: stats306-score-roll 150ms linear infinite;
}

.stats306-point-total.won {
  animation: stats306-score-win 650ms ease-out;
}

.stats306-extra-credit-pop {
  background: #ffcb05;
  border: 3px solid #00274c;
  bottom: 84px;
  box-shadow: 0 10px 32px rgb(0 39 76 / 24%);
  color: #00274c;
  font: 950 20px/1 Arial, sans-serif;
  padding: 10px 14px;
  pointer-events: none;
  position: fixed;
  right: 18px;
  z-index: 1002;
}

.stats306-extra-credit-pop.visible {
  animation: stats306-extra-credit-float 1.65s ease-out forwards;
}

.stats306-prompt-shell.open .stats306-prompt-frame {
  background: white;
  border: 4px solid #00274c;
  box-shadow: 0 18px 70px rgb(0 39 76 / 28%);
}

.stats306-prompt-shell.open .stats306-prompt-backdrop {
  background: rgb(0 39 76 / 28%);
  border: 0;
  display: block;
  inset: -100vh -100vw;
  position: fixed;
  z-index: 1;
}

.stats306-prompt-shell.point-earned:not(.open) {
  animation: stats306-score-pulse 650ms ease-out;
}

.stats306-help-overlay {
  background: white;
  border: 5px solid #ffcb05;
  bottom: 4vh;
  box-shadow: 0 14px 48px rgb(0 39 76 / 28%);
  box-sizing: border-box;
  color: #00274c;
  font: 600 18px/1.35 Arial, sans-serif;
  left: 4vw;
  max-height: 48vh;
  overflow: hidden;
  padding: 18px 22px;
  pointer-events: none;
  position: fixed;
  width: min(760px, 70vw);
  z-index: 1010;
}

.stats306-help-overlay[hidden] {
  display: none;
}

.stats306-help-overlay > strong {
  background: #ffcb05;
  display: inline-block;
  font-size: 14px;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  padding: 5px 8px;
}

.stats306-help-overlay ul {
  margin: 0;
  padding-left: 1.25em;
}

.stats306-help-overlay li + li {
  margin-top: 8px;
}

.stats306-help-overlay p {
  font-size: 14px;
  margin: 10px 0 0;
}

.stats306-instructor-questions {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 1020;
}

.stats306-instructor-questions[hidden],
.stats306-instructor-questions-badge[hidden],
.stats306-instructor-questions-panel[hidden] {
  display: none;
}

.stats306-instructor-questions-button {
  align-items: center;
  background: #00274c;
  border: 3px solid #ffcb05;
  border-radius: 50%;
  box-shadow: 0 8px 28px rgb(0 39 76 / 28%);
  color: white;
  cursor: pointer;
  display: flex;
  font: 950 32px/1 Arial, sans-serif;
  height: 58px;
  justify-content: center;
  padding: 0;
  position: relative;
  width: 58px;
}

.stats306-instructor-questions-button:hover,
.stats306-instructor-questions-button:focus-visible,
.stats306-instructor-questions-button[aria-expanded="true"] {
  outline: 4px solid #0055a5;
  outline-offset: 3px;
}

.stats306-instructor-questions-badge {
  align-items: center;
  background: #c43d32;
  border: 2px solid white;
  border-radius: 999px;
  color: white;
  display: flex;
  font: 900 13px/1 Arial, sans-serif;
  height: 24px;
  justify-content: center;
  min-width: 24px;
  padding: 0 5px;
  position: absolute;
  right: -8px;
  top: -8px;
}

.stats306-instructor-questions-panel {
  background: white;
  border: 4px solid #00274c;
  box-shadow: 0 14px 48px rgb(0 39 76 / 28%);
  box-sizing: border-box;
  color: #00274c;
  margin-top: 10px;
  max-height: min(62vh, 620px);
  overflow-y: auto;
  padding: 16px 18px;
  width: min(620px, 76vw);
}

.stats306-instructor-questions-panel h2 {
  font: 900 19px/1.2 Arial, sans-serif;
  margin: 0 0 12px;
}

.stats306-instructor-questions-panel p {
  font: 600 16px/1.4 Arial, sans-serif;
  margin: 0;
}

.stats306-instructor-questions-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.stats306-instructor-questions-panel li {
  align-items: start;
  border-top: 1px solid #c7d2dc;
  display: flex;
  font: 600 18px/1.35 Arial, sans-serif;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 0;
}

.stats306-instructor-questions-panel li.answered {
  color: #465a68;
}

.stats306-instructor-questions-panel li > span:first-child {
  display: grid;
  gap: 3px;
}

.stats306-instructor-questions-panel li small {
  color: #5f7280;
  font: 800 12px/1 Arial, sans-serif;
  text-transform: uppercase;
}

.stats306-instructor-question-answered {
  flex: none;
  font-size: 20px;
}

.stats306-student-question-button {
  align-items: center;
  background: #00274c;
  border: 3px solid #ffcb05;
  border-radius: 50%;
  box-shadow: 0 8px 28px rgb(0 39 76 / 28%);
  color: white;
  cursor: pointer;
  display: flex;
  font: 950 32px/1 Arial, sans-serif;
  height: 58px;
  justify-content: center;
  padding: 0;
  position: fixed;
  right: 18px;
  top: 18px;
  width: 58px;
  z-index: 990;
}

.stats306-student-question-button[hidden] {
  display: none;
}

.stats306-student-question-button:hover,
.stats306-student-question-button:focus-visible {
  outline: 4px solid #0055a5;
  outline-offset: 3px;
}

.stats306-current-slide-button {
  align-items: center;
  background: #00274c;
  border: 3px solid #ffcb05;
  border-radius: 999px;
  box-shadow: 0 8px 28px rgb(0 39 76 / 28%);
  color: white;
  cursor: pointer;
  display: flex;
  font: 850 15px/1 Arial, sans-serif;
  height: 58px;
  justify-content: center;
  padding: 0 18px;
  position: fixed;
  right: 86px;
  top: 18px;
  z-index: 990;
}

.stats306-current-slide-button[hidden] {
  display: none;
}

.stats306-current-slide-button:hover,
.stats306-current-slide-button:focus-visible {
  outline: 4px solid #0055a5;
  outline-offset: 3px;
}

.stats306-current-slide-button:disabled {
  cursor: default;
  opacity: 0.65;
}

.stats306-prompt-timer {
  align-items: center;
  background: #00274c;
  border: 3px solid #ffcb05;
  border-radius: 999px;
  box-shadow: 0 8px 28px rgb(0 39 76 / 28%);
  color: white;
  display: flex;
  font-family: Arial, sans-serif;
  gap: 10px;
  left: 50%;
  padding: 8px 10px 8px 15px;
  position: fixed;
  top: 18px;
  transform: translateX(-50%);
  z-index: 990;
}

.stats306-prompt-timer[hidden] {
  display: none;
}

.stats306-prompt-timer > span {
  font: 900 11px/1 Arial, sans-serif;
  letter-spacing: 0.12em;
}

.stats306-prompt-timer > strong {
  color: #ffcb05;
  font: 950 27px/1 "Arial Narrow", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  min-width: 58px;
  text-align: center;
}

.stats306-prompt-timer.urgent {
  background: #8c3428;
}

.stats306-prompt-timer button {
  background: #ffcb05;
  border: 2px solid white;
  border-radius: 999px;
  color: #00274c;
  cursor: pointer;
  font: 900 14px/1 Arial, sans-serif;
  padding: 8px 10px;
}

.stats306-prompt-timer button:disabled {
  cursor: default;
  opacity: 0.7;
}

.stats306-prompt-timer button:focus-visible {
  outline: 4px solid #0055a5;
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .stats306-prompt-timer {
    top: 84px;
  }
}

@keyframes stats306-score-pulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

@keyframes stats306-score-roll {
  0% { filter: blur(0); transform: translateY(-2px); }
  50% { filter: blur(1px); transform: translateY(2px); }
  100% { filter: blur(0); transform: translateY(-2px); }
}

@keyframes stats306-score-win {
  0% { transform: scale(1); }
  45% { box-shadow: 0 0 0 10px rgb(255 203 5 / 32%); transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes stats306-extra-credit-float {
  0% { opacity: 0; transform: translateY(18px) scale(0.8); }
  25% { opacity: 1; transform: translateY(0) scale(1.08); }
  100% { opacity: 0; transform: translateY(-90px) scale(0.95); }
}

@media print {
  .stats306-prompt-shell,
  .stats306-help-overlay,
  .stats306-instructor-questions,
  .stats306-student-question-button,
  .stats306-current-slide-button,
  .stats306-prompt-timer,
  .stats306-point-total,
  .stats306-extra-credit-pop,
  .stats306-debug-bar,
  .reveal .stats306-prompt-chip {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stats306-prompt-shell.point-earned {
    animation: none;
  }

  .stats306-point-total.rolling strong,
  .stats306-point-total.won,
  .stats306-extra-credit-pop.visible {
    animation: none;
  }
}
