*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #FFFDFA;
}

#photo-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.war-photo {
  position: absolute;
  object-fit: cover;
  opacity: 0.85;
  pointer-events: none;
}

#map-svg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

#map-path {
  fill: none;
  stroke: #FF4B14;
  stroke-width: 3px;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

#hero {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  padding: 2rem;
}

#headline {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: clamp(48px, 12vmin, 100px);
  text-align: center;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #00347C;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05em;
  max-width: 90vw;
}

.line {
  display: block;
  white-space: nowrap;
}

#dynamic-word {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

@media (min-width: 768px) {
  #headline {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25em;
    font-size: clamp(48px, 7vw, 100px);
  }

  .line {
    white-space: nowrap;
  }

  #dynamic-word {
    white-space: nowrap;
  }
}

/* ─── Top-right controls ──────────────────────────────────────────────────── */

#top-right {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 110;
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
}

#sound-btn,
#skip-btn {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  height: 2.6rem;
  border: 2.5px solid currentColor;
  background: transparent;
  cursor: pointer;
  color: inherit;
}

#sound-btn {
  width: 2.6rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  order: 2;
}

#sound-btn svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

#skip-btn {
  padding: 0 1em;
  order: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

#skip-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

#skip-btn.disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── Consent screen ──────────────────────────────────────────────────────── */

#consent-screen {
  position: fixed;
  inset: 0;
  background-color: #FF4B14;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  transition: opacity 0.5s ease;
}

#consent-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

#consent-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: min(600px, 88vw);
  text-align: center;
  padding: 2rem;
}

#consent-body {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: clamp(18px, 4vmin, 28px);
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: #1a1a1a;
}

#enter-btn {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: clamp(14px, 2.5vmin, 18px);
  letter-spacing: 0.14em;
  padding: 0.7em 2.2em;
  margin-top: 0.5rem;
  border: 3px solid #1a1a1a;
  background: transparent;
  color: #1a1a1a;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

#enter-btn:hover {
  background: #1a1a1a;
  color: #FF4B14;
}

/* ─── End screen ──────────────────────────────────────────────────────────── */

#end-screen {
  position: fixed;
  inset: 0;
  background-color: #FF4B14;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

#end-screen.visible {
  opacity: 1;
  pointer-events: auto;
}

#end-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4em;
  text-align: center;
  padding: 2rem;
}

#end-text {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: clamp(64px, 14vmin, 160px);
  letter-spacing: -0.03em;
  color: #1a1a1a;
}

#end-subtext {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: clamp(20px, 4vmin, 52px);
  letter-spacing: -0.02em;
  color: #1a1a1a;
  min-height: 1.2em;
}

/* ─── Stat screen (2nd skip) ─────────────────────────────────────────────── */

#stat-screen {
  position: fixed;
  inset: 0;
  background-color: #FF4B14;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

#stat-screen.visible {
  opacity: 1;
  pointer-events: auto;
}

#stat-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4em;
  text-align: center;
  padding: 2rem;
}

#stat-number {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: clamp(64px, 14vmin, 160px);
  letter-spacing: -0.03em;
  color: #1a1a1a;
}

#stat-label {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: clamp(20px, 4vmin, 52px);
  letter-spacing: -0.02em;
  color: #1a1a1a;
  min-height: 1.2em;
}

/* ─── Death screen (3rd skip) ────────────────────────────────────────────── */

#death-screen {
  position: fixed;
  inset: 0;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

#death-screen.visible {
  opacity: 1;
  pointer-events: auto;
}

#death-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

#death-subtext {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: clamp(16px, 3vmin, 32px);
  letter-spacing: 0.04em;
  color: #FFFFFF;
}
