:root {
  --bg: #000;
  --seg-on: #ff1414;
  --seg-on-glow: #ff4a4a;
  --seg-off: #1a0202;
  --label: #ffffff;
  --label-dim: #8a8a8a;
  --glow-blur: 0.04em;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--label);
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
}
html { height: 100%; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

body.warning { animation: flash 0.6s ease-in-out infinite alternate; }
@keyframes flash {
  from { background: #000; }
  to   { background: #2a0000; }
}

.stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vmin;
}

.timer {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.tg-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.tg-digits {
  display: flex;
  gap: 0.06em;
  font-size: 1em;
  line-height: 1;
}

.tg-digit {
  display: block;
  width: 0.62em;
  height: 1em;
  flex: 0 0 auto;
}

.tg-digit svg {
  width: 100%;
  height: 100%;
  display: block;
}

.tg-seg { fill: var(--seg-off); transition: fill 80ms linear; }
.tg-seg.on {
  fill: var(--seg-on);
  filter: drop-shadow(0 0 var(--glow-blur) var(--seg-on-glow));
}

.tg-colon {
  width: 0.32em;
  height: 1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.32em;
  flex: 0 0 auto;
}
.tg-colon .dot {
  width: 0.18em;
  height: 0.18em;
  border-radius: 50%;
  background: var(--seg-on);
  box-shadow: 0 0 var(--glow-blur) var(--seg-on-glow);
}

.tg-label {
  margin-top: 0.18em;
  font-size: 0.22em;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--label);
  font-weight: 400;
  padding-left: 0.32em;
  text-align: center;
}

.tg-labels {
  display: flex;
  width: 100%;
  justify-content: space-between;
  margin-top: 0.12em;
}
.tg-labels span {
  font-size: 0.18em;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.audio-unlock {
  position: fixed;
  inset: 0;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(80vw, 360px);
  height: 84px;
  background: rgba(0, 0, 0, 0.85);
  border: 2px solid var(--seg-on);
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 12px;
  cursor: pointer;
  z-index: 50;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 60px rgba(255, 20, 20, 0.4);
}
.audio-unlock__icon { font-size: 24px; color: var(--seg-on); }
.audio-unlock:hover { background: rgba(40, 0, 0, 0.9); }
.audio-unlock:active { transform: scale(0.98); }

.fs-toggle {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 200ms ease;
  z-index: 40;
}
.stage:hover ~ .fs-toggle,
.fs-toggle:hover,
.fs-toggle:focus-visible { opacity: 1; }

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 45;
}

@media (orientation: landscape) {
  .timer { font-size: min(40vh, 22vw); }
}
@media (orientation: portrait) {
  .timer { font-size: min(28vh, 32vw); }
}

@media (max-width: 480px) {
  .audio-unlock { width: 90vw; height: 76px; font-size: 18px; }
}
