:root {
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255, 255, 255, 0.6);
  --rule: rgba(255, 255, 255, 0.4);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: "Unbounded", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- Language toggle ---------- */
.lang-toggle {
  position: fixed;
  top: clamp(16px, 2.5vw, 28px);
  right: clamp(16px, 2.5vw, 28px);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Unbounded", sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  z-index: 10;
}

.lang-btn {
  background: transparent;
  border: 0;
  padding: 4px 2px;
  color: var(--muted);
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  transition: color 160ms ease, opacity 160ms ease;
}

.lang-btn:hover { color: var(--fg); }

.lang-btn.is-active {
  color: var(--fg);
}

.lang-divider {
  color: var(--muted);
  font-size: 11px;
  user-select: none;
}

/* ---------- Stage ---------- */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vh, 32px);
  padding: 32px 24px;
  width: min(640px, 100%);
  margin: 0 auto;
  text-align: center;
}

/* ---------- Loader video (lo-res / pixelated) ---------- */
.loader {
  width: clamp(140px, 22vh, 220px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
}

@media (min-width: 768px) {
  .loader {
    width: clamp(220px, 30vh, 320px);
  }
}

/* Render small, then upscale with crisp-edges so pixels stay chunky */
.loader-video {
  width: 36%;
  height: 36%;
  object-fit: contain;
  background: transparent;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  transform: scale(2.78);
  transform-origin: center;
}

/* ---------- Loading bar ---------- */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(280px, 70vw);
}

.loading-label {
  margin: 0;
  font-family: "VT323", "Unbounded", monospace;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--fg);
  line-height: 1;
}

.loading-bar {
  width: 100%;
  height: auto;
  display: block;
  background: transparent;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

/* ---------- Title ---------- */
.title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.title-en {
  margin: 0;
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 4.4vw, 38px);
  letter-spacing: -0.01em;
  line-height: 1;
}

.title-en .amp {
  font-weight: 400;
  margin: 0 0.04em;
}

.title-jp {
  margin: 0;
  font-family: "DotGothic16", sans-serif;
  font-size: clamp(13px, 1.6vw, 16px);
  letter-spacing: 0.18em;
  color: var(--fg);
}

/* ---------- Description ---------- */
.description {
  margin: 0;
  max-width: 38ch;
  font-family: "Unbounded", sans-serif;
  font-weight: 400;
  font-size: clamp(11px, 1.1vw, 13px);
  line-height: 1.6;
  color: var(--muted);
}

/* JP description: Noto Sans JP body, wider measure */
body[data-lang="jp"] .description {
  font-family: "Noto Sans JP", "Unbounded", sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.8;
  font-size: clamp(12px, 1.15vw, 13.5px);
  max-width: 46ch;
}

/* ---------- Counters footer ---------- */
.counters {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(36px, 8vw, 96px);
  padding: clamp(20px, 3vh, 36px) 24px clamp(24px, 3.5vh, 40px);
}

.counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 64px;
}

.counter-num {
  font-family: "VT323", "Unbounded", monospace;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1;
  color: var(--fg);
  letter-spacing: 0.02em;
}

.counter-label {
  font-family: "Unbounded", sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

body[data-lang="jp"] .counter-label {
  font-family: "Unbounded", "Noto Sans JP", sans-serif;
  letter-spacing: 0.16em;
  text-transform: none;
  font-size: 11px;
}

