.tb-check {
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  margin-top: 8px;
}
.tb-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--sg-red);
}
details textarea {
  margin-top: 6px;
}

/* ------------------------------------------------------------------ stage */
.tb-stage {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: radial-gradient(ellipse at 50% 45%, #4a2a2a 0%, #1b1416 72%);
  color: #fff;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
  font-family: var(--sg-font-th);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: calc(max(12px, env(safe-area-inset-top)) + 50px) 16px calc(max(16px, env(safe-area-inset-bottom)) + 16px);
  cursor: pointer;
}
.tb-stage[hidden] {
  display: none;
}
.tb-stage.shake {
  animation: tb-shake 0.08s linear 8 alternate;
}
@keyframes tb-shake {
  from { transform: translate(-8px, 4px) rotate(-1deg); }
  to { transform: translate(8px, -4px) rotate(1deg); }
}
.tb-topic-label {
  margin: 0;
  opacity: 0.7;
  font-size: 16px;
}
.tb-topic {
  margin: 0;
  font-family: "Kanit", var(--sg-font-th);
  font-weight: 800;
  font-size: clamp(30px, 9vw, 64px);
  line-height: 1.15;
  text-align: center;
  color: var(--sg-yellow, #ffc21a);
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.4);
}
.tb-skip {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: none;
}
.tb-stage.live .tb-skip {
  visibility: hidden;
}

.tb-bomb-wrap {
  position: relative;
  width: min(68vw, 46vh, 360px);
  aspect-ratio: 220 / 260;
}
.tb-bomb-wrap.hop {
  animation: tb-hop 0.35s ease-out;
}
@keyframes tb-hop {
  30% { transform: translateX(-14%) rotate(-8deg); }
  60% { transform: translateX(6%) rotate(4deg); }
}
.tb-bomb {
  width: 100%;
  height: 100%;
  overflow: visible;
  transition: transform 0.15s, opacity 0.15s;
}
.tb-bomb.throb {
  animation: tb-throb 0.18s ease-out;
}
@keyframes tb-throb {
  40% { transform: scale(1.05); }
}
.tb-bomb.gone {
  transform: scale(1.6);
  opacity: 0;
}
.tb-body {
  fill: #262229;
  stroke: #000;
  stroke-width: 6;
}
.tb-shine {
  fill: rgba(255, 255, 255, 0.18);
}
.tb-cap {
  fill: #5b5560;
  stroke: #000;
  stroke-width: 5;
}
.tb-fuse {
  fill: none;
  stroke: #c9a46b;
  stroke-width: 8;
  stroke-linecap: round;
}
.tb-brand {
  font: 700 22px "Kanit", sans-serif;
  letter-spacing: 3px;
  fill: rgba(255, 255, 255, 0.22);
}
.tb-spark .glow {
  fill: #ffb12a;
  opacity: 0.55;
}
.tb-spark .star {
  fill: #fff3a0;
}
.tb-stage.live .tb-spark {
  animation: tb-spark 0.12s linear infinite alternate;
}
@keyframes tb-spark {
  from { transform: translate(70px, -138px) scale(0.8) rotate(0deg); }
  to { transform: translate(70px, -138px) scale(1.25) rotate(25deg); }
}
.tb-spark {
  transform: translate(70px, -138px) scale(0.6);
}
.tb-stage:not(.live) .tb-spark .glow {
  opacity: 0.25;
}

/* explosion */
.tb-boom {
  position: absolute;
  left: 50%;
  top: 55%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 18%, #ffe066 30%, #ff8a1f 52%, #e8202a 70%, transparent 72%);
  animation: tb-boom 0.7s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
  pointer-events: none;
}
@keyframes tb-boom {
  from { transform: scale(1); opacity: 1; }
  70% { opacity: 1; }
  to { transform: scale(90); opacity: 0; }
}
.tb-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.tb-flash.on {
  animation: tb-flash 0.6s ease-out;
}
@keyframes tb-flash {
  from { opacity: 0.95; }
  to { opacity: 0; }
}
.tb-passes {
  margin: 0;
  font-size: clamp(16px, 4.5vw, 22px);
  opacity: 0.85;
  min-height: 1.5em;
}
.tb-stage.boomed .tb-passes,
.tb-stage.boomed .tb-topic,
.tb-stage.boomed .tb-topic-label,
.tb-stage.boomed .tb-skip {
  visibility: hidden;
}

.tb-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.tb-result {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100% - 24px));
  background: #fff;
  color: var(--sg-ink);
  border: 3px solid var(--sg-ink);
  border-radius: 20px;
  box-shadow: 0 5px 0 var(--sg-ink);
  padding: 18px;
  display: grid;
  gap: 12px;
  text-align: center;
  cursor: default;
  animation: tb-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.tb-result[hidden] {
  display: none;
}
@keyframes tb-pop {
  from { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
}
.tb-result-big {
  font-family: "Kanit", var(--sg-font-th);
  font-weight: 800;
  font-size: clamp(40px, 11vw, 64px);
  line-height: 1;
  color: var(--sg-red, #e8202a);
}
.tb-result-text {
  font-size: 20px;
  line-height: 1.5;
}
.tb-result-text small {
  font-size: 15px;
  color: var(--sk-muted);
}
.tb-dare {
  background: #fff3cf;
  border: 2px dashed var(--sg-ink);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 17px;
  font-weight: 500;
}
.tb-result .tl-row > .sg-btn {
  flex: 1 1 120px;
}

@media (prefers-reduced-motion: reduce) {
  .tb-stage.live .tb-spark,
  .tb-bomb.throb,
  .tb-bomb-wrap.hop,
  .tb-boom {
    animation: none;
  }
}
