:root {
  --bg: #faf9f6;
  --ink: #111;
  --mute: #77736c;
  --line: rgba(17, 17, 17, 0.15);
  --dark: #080808;
  --light: #f8f4eb;
  --yellow: #d7b938;
  --blue: #cfe5e9;
  --lilac: #e7ddf2;
  --peach: #f0d8bd;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

a,
button {
  color: inherit;
}

button {
  font: inherit;
}

.index-page {
  background: var(--dark);
  color: var(--light);
}

.index-min {
  min-height: 100svh;
  padding: 24px;
  display: grid;
  place-items: center;
  gap: 36px;
}

.index-min h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.8rem, 18vw, 15rem);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: 0;
}

.index-min nav {
  display: flex;
  gap: clamp(18px, 5vw, 58px);
}

.index-min a {
  font-size: 0.9rem;
  text-decoration: none;
  color: rgba(248, 244, 235, 0.7);
}

.index-min a:hover {
  color: var(--light);
}

.micro-nav,
.corner-clock {
  position: fixed;
  z-index: 10;
  top: 22px;
  font-size: 0.9rem;
  color: var(--mute);
}

.micro-nav {
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.micro-nav a {
  pointer-events: auto;
  text-decoration: none;
}

.micro-nav > a {
  color: var(--ink);
  font-weight: 700;
}

.micro-nav nav {
  display: flex;
  gap: 18px;
}

.corner-clock {
  right: 24px;
  top: auto;
  bottom: 22px;
  font-variant-numeric: tabular-nums;
}

.inverse,
.inverse a,
.v4 .micro-nav > a {
  color: rgba(248, 244, 235, 0.72);
}

.single-mark,
.rail-stage,
.poster-stage,
.progress-stage {
  min-height: 100svh;
  padding: 72px 24px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: clamp(26px, 5vw, 48px);
}

.mark-button {
  width: min(68vw, 520px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.mark-button span,
.rail-code,
.progress-count {
  font-size: clamp(5rem, 24vw, 18rem);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: 0;
}

.play-link,
.poster-play {
  min-width: 74px;
  min-height: 44px;
  padding: 12px 18px;
  display: inline-grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-size: 0.95rem;
}

.dot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.dot,
.rail-dot,
.orbit-dot {
  width: 12px;
  height: 12px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
}

.dot.is-active,
.orbit-dot.is-active {
  background: currentColor;
}

.dot-row.large {
  max-width: 430px;
  gap: 14px;
}

.dot-row.large .dot {
  width: 18px;
  height: 18px;
}

.tile-board {
  min-height: 100svh;
  width: min(820px, calc(100vw - 48px));
  margin: 0 auto;
  padding: clamp(72px, 10vw, 112px) clamp(18px, 5vw, 72px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, 2vw, 18px);
}

.tile {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  text-decoration: none;
  font-size: clamp(2rem, 6vw, 4.3rem);
  font-weight: 800;
  line-height: 1;
}

.tile:nth-child(3n + 1) {
  background: var(--peach);
}

.tile:nth-child(3n + 2) {
  background: var(--blue);
}

.tile:nth-child(3n) {
  background: var(--lilac);
}

.rail-stage {
  gap: clamp(34px, 7vw, 72px);
}

.rail-picker {
  width: min(760px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
  gap: 0;
}

.rail-dot {
  width: 100%;
  height: 18px;
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  position: relative;
}

.rail-dot::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--bg);
  transform: translateX(-50%);
}

.rail-dot.is-active::before {
  background: var(--ink);
}

.v4 {
  overflow: hidden;
  background: var(--dark);
  color: var(--light);
}

.poster-stage {
  position: relative;
}

.poster-word {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(6rem, 27vw, 24rem);
  line-height: 0.78;
  letter-spacing: 0;
  color: var(--light);
}

.poster-play {
  position: relative;
  z-index: 2;
  background: var(--light);
  color: var(--dark);
}

.orbit {
  position: absolute;
  width: min(68vw, 520px);
  aspect-ratio: 1;
  border: 1px solid rgba(248, 244, 235, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  color: var(--light);
  transform:
    translate(-50%, -50%)
    rotate(var(--angle))
    translateY(calc(min(34vw, 260px) * -1));
}

.progress-stage {
  gap: clamp(24px, 5vw, 40px);
}

.progress-count {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 720px) {
  .tile-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rail-picker {
    grid-template-columns: repeat(6, 1fr);
    row-gap: 24px;
  }
}

@media (max-width: 480px) {
  .micro-nav,
  .corner-clock {
    font-size: 0.84rem;
  }

  .single-mark,
  .rail-stage,
  .poster-stage,
  .progress-stage {
    padding-left: 14px;
    padding-right: 14px;
  }

  .tile-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-left: 14px;
    padding-right: 14px;
  }

  .dot-row.large {
    gap: 9px;
  }

  .dot-row.large .dot {
    width: 16px;
    height: 16px;
  }

  .mark-button {
    width: min(82vw, 360px);
  }

  .poster-word {
    font-size: clamp(5.5rem, 28vw, 9rem);
  }
}
