* {
  box-sizing: border-box;
}

html,
body {
  background: #060606;
  margin: 0;
  min-height: 100%;
}

body {
  color: #f7f4ef;
  font-family: Helvetica, Arial, sans-serif;
}

a {
  color: inherit;
}

code {
  color: #ded6c8;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

.shell {
  min-height: 100vh;
  padding: 28px;
}

.entrance-shell {
  padding: 0;
}

.shell--index {
  align-items: center;
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
}

.intro {
  max-width: 640px;
}

.kicker {
  color: #adff00;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.2;
  margin: 0 0 18px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(42px, 7vw, 96px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.92;
  margin: 0;
  text-transform: uppercase;
}

.lead {
  color: #c9c2b8;
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.45;
  margin: 24px 0 0;
  max-width: 560px;
}

.route-grid {
  display: grid;
  gap: 14px;
}

.route-card {
  border: 1px solid #34312c;
  border-radius: 6px;
  display: grid;
  gap: 12px;
  min-height: 210px;
  padding: 28px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.route-card:hover,
.route-card:focus-visible {
  background: #11110f;
  border-color: #adff00;
  outline: 0;
  transform: translateY(-2px);
}

.route-card__label {
  color: #adff00;
  font-size: 13px;
  font-weight: 700;
}

.route-card strong {
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1;
  text-transform: uppercase;
}

.route-card span:last-child {
  align-self: end;
  color: #bdb5a8;
  font-size: 16px;
  line-height: 1.45;
}

.topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}

.back-link,
.enter-link {
  border: 1px solid #3a3832;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 12px 16px;
  text-decoration: none;
  text-transform: uppercase;
}

.enter-link {
  background: #f7f4ef;
  border-color: #f7f4ef;
  color: #060606;
}

.player-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100vh - 108px);
}

.entrance-shell .player-stage {
  min-height: 100vh;
}

.video-frame {
  align-items: center;
  background: #000;
  border: 0;
  border-radius: 0;
  display: grid;
  min-height: calc(100vh - 108px);
  overflow: hidden;
  position: relative;
}

.entrance-shell .video-frame {
  min-height: 100vh;
}

.test-video,
.bunny-iframe {
  background: #000;
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.bunny-iframe {
  border: 0;
}

.video-fallback {
  color: #d7d0c4;
  font-size: 17px;
  line-height: 1.55;
  margin: auto;
  max-width: 520px;
  padding: 28px;
  text-align: center;
  z-index: 1;
}

.entrance-actions {
  align-items: center;
  bottom: clamp(22px, 4vw, 48px);
  display: flex;
  gap: 16px;
  position: absolute;
  right: clamp(22px, 4vw, 52px);
  z-index: 3;
}

.circle-action {
  align-items: center;
  appearance: none;
  background: #000;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
  height: 88px;
  justify-content: center;
  letter-spacing: 0.08em;
  line-height: 1.05;
  padding: 0;
  text-align: center;
  text-decoration: none;
  width: 88px;
}

.circle-action:focus-visible {
  outline: 2px solid #adff00;
  outline-offset: 4px;
}

.circle-action--small {
  font-size: 12px;
  height: 72px;
  width: 72px;
}

.meter-panel {
  border: 1px solid #34312c;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  padding: 24px;
}

.meter-panel h1 {
  font-size: clamp(34px, 4vw, 54px);
  margin-bottom: 22px;
}

.source-line {
  color: #bdb5a8;
  font-size: 14px;
  line-height: 1.4;
  margin: -6px 0 24px;
}

.source-form {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.source-form label,
.control-row label {
  color: #bdb5a8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-form input,
.source-form button,
.control-row select {
  border: 1px solid #3a3832;
  border-radius: 4px;
  font: inherit;
  min-height: 44px;
}

.source-form input,
.control-row select {
  background: #0e0e0d;
  color: #f7f4ef;
  padding: 0 12px;
}

.source-form button {
  background: #adff00;
  color: #060606;
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
}

.control-row {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.metrics {
  border-top: 1px solid #2d2a25;
  margin: 0;
}

.metrics div {
  align-items: baseline;
  border-bottom: 1px solid #2d2a25;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 48px;
  padding: 12px 0;
}

.metrics dt {
  color: #bdb5a8;
  font-size: 13px;
  text-transform: uppercase;
}

.metrics dd {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  text-align: right;
}

.note {
  color: #8f877c;
  font-size: 13px;
  line-height: 1.45;
  margin: auto 0 0;
  padding-top: 22px;
}

@media (max-width: 900px) {
  .shell {
    padding: 18px;
  }

  .shell--index,
  .player-stage {
    grid-template-columns: 1fr;
  }

  .shell--index {
    align-content: center;
  }

  .video-frame,
  .meter-panel {
    min-height: auto;
  }

  .video-frame {
    aspect-ratio: 16 / 9;
  }

  .entrance-shell .video-frame {
    aspect-ratio: auto;
    min-height: 100vh;
  }

  .entrance-actions {
    bottom: 14px;
    gap: 10px;
    right: 14px;
  }

  .circle-action {
    font-size: 13px;
    height: 64px;
    width: 64px;
  }

  .circle-action--small {
    font-size: 10px;
    height: 54px;
    width: 54px;
  }

  .meter-panel {
    padding: 20px;
  }
}
