:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #050607;
  color: #f7f0df;
  text-rendering: geometricPrecision;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, rgba(95, 175, 210, 0.16), transparent 32%),
    linear-gradient(180deg, #050607 0%, #0a0c0d 100%);
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #020304;
}

.topbar,
.control-panel,
.hint-strip,
.intro-panel {
  position: absolute;
  z-index: 10;
}

.topbar {
  top: 20px;
  left: 20px;
  right: 20px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 235, 190, 0.22);
  border-radius: 8px;
  background: rgba(5, 6, 7, 0.62);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 218, 150, 0.54);
  color: #f6cc7f;
  background: rgba(255, 214, 138, 0.08);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0;
}

.brand strong,
.brand small,
.system-readout span,
.hint-strip span {
  display: block;
}

.brand strong {
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.05;
}

.brand small {
  margin-top: 4px;
  color: rgba(247, 240, 223, 0.68);
  font-size: 13px;
}

.system-readout {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.system-readout span,
.hint-strip span {
  border: 1px solid rgba(255, 235, 190, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(247, 240, 223, 0.78);
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 700;
}

.intro-panel {
  inset: 0;
  display: grid;
  place-items: center;
  padding: 120px 24px 96px;
  background:
    radial-gradient(circle at 48% 42%, rgba(9, 13, 15, 0.1), rgba(3, 4, 5, 0.76) 58%),
    linear-gradient(180deg, rgba(5, 6, 7, 0.08), rgba(5, 6, 7, 0.72));
  transition:
    opacity 420ms ease,
    visibility 420ms ease;
}

.intro-panel.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-panel:not(.is-hidden) ~ .control-panel,
.intro-panel:not(.is-hidden) ~ .hint-strip {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-copy {
  width: min(680px, 100%);
  padding: 28px;
  border: 1px solid rgba(255, 235, 190, 0.22);
  border-radius: 8px;
  background: rgba(5, 6, 7, 0.64);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(16px);
}

.eyebrow {
  margin: 0 0 12px;
  color: #edc77e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro-copy h1 {
  max-width: 620px;
  margin: 0;
  color: #fff5de;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.92;
  letter-spacing: 0;
}

.intro-copy p:not(.eyebrow) {
  max-width: 570px;
  margin: 22px 0 0;
  color: rgba(247, 240, 223, 0.78);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}

.intro-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.intro-actions {
  margin-top: 28px;
}

.primary-action,
.secondary-action,
.button-row button {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 235, 190, 0.34);
  padding: 11px 17px;
  color: #fff6df;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.primary-action {
  border-color: rgba(246, 204, 127, 0.9);
  background: linear-gradient(135deg, #f6cc7f, #c99b4a);
  color: #11110d;
}

.secondary-action:hover,
.button-row button:hover,
.button-row button[aria-pressed="true"] {
  border-color: rgba(246, 204, 127, 0.8);
  background: rgba(246, 204, 127, 0.18);
}

.button-row button:disabled {
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(247, 240, 223, 0.38);
  background: rgba(255, 255, 255, 0.035);
}

.control-panel {
  left: 20px;
  bottom: 72px;
  width: min(430px, calc(100vw - 40px));
  padding: 18px;
  border: 1px solid rgba(255, 235, 190, 0.2);
  border-radius: 8px;
  background: rgba(5, 6, 7, 0.66);
  box-shadow: 0 24px 88px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(18px);
}

.control-panel h2 {
  margin: 0;
  color: #fff4dc;
  font-size: 24px;
  line-height: 1.08;
}

.control-panel p:not(.eyebrow) {
  margin: 12px 0 16px;
  color: rgba(247, 240, 223, 0.72);
  font-size: 14px;
  line-height: 1.5;
}

.button-row button {
  min-height: 38px;
  padding: 9px 12px;
  font-size: 13px;
}

.hint-strip {
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 720px) {
  #app {
    min-height: 100dvh;
  }

  .topbar {
    top: 10px;
    left: 10px;
    right: 10px;
    align-items: flex-start;
    padding: 12px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .system-readout {
    display: none;
  }

  .intro-panel {
    padding: 96px 12px 150px;
    align-items: end;
  }

  .intro-copy {
    padding: 18px;
  }

  .intro-copy h1 {
    font-size: clamp(38px, 12vw, 58px);
  }

  .intro-copy p:not(.eyebrow) {
    font-size: 16px;
  }

  .control-panel {
    left: 10px;
    right: 10px;
    bottom: 74px;
    width: auto;
    padding: 14px;
  }

  .control-panel h2 {
    font-size: 20px;
  }

  .hint-strip {
    left: 10px;
    right: 10px;
    bottom: 10px;
    justify-content: flex-start;
  }

  .hint-strip span {
    padding: 7px 9px;
    font-size: 11px;
  }
}
