:root {
  color-scheme: dark;
  --ink: #f7f4ed;
  --muted: #b8b3a8;
  --panel: rgba(24, 24, 22, 0.82);
  --panel-strong: rgba(16, 16, 15, 0.94);
  --line: rgba(247, 244, 237, 0.18);
  --accent: #f4b740;
  --accent-2: #37d1b2;
  --danger: #ff6b57;
  --shadow: rgba(0, 0, 0, 0.42);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #111111;
  color: var(--ink);
}

button {
  font: inherit;
}

.experience {
  position: relative;
  width: 100vw;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  touch-action: manipulation;
}

#stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #151515;
  z-index: -1;
}

.hud {
  position: fixed;
  inset: env(safe-area-inset-top) env(safe-area-inset-right) auto env(safe-area-inset-left);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(14px, 4vw, 34px);
  pointer-events: none;
}

.title-group {
  min-width: 0;
}

.eyebrow,
.panel-label {
  margin: 0 0 7px;
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1;
}

h1 {
  font-size: clamp(1.7rem, 6vw, 3.7rem);
  max-width: 9ch;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.45rem, 5vw, 2.2rem);
}

.status-grid {
  display: grid;
  gap: 8px;
  width: min(360px, 44vw);
}

.status-pill {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 17, 17, 0.62);
  color: var(--ink);
  box-shadow: 0 12px 26px var(--shadow);
  font-size: 0.78rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
  backdrop-filter: blur(14px);
}

.control-panel {
  position: fixed;
  right: calc(env(safe-area-inset-right) + clamp(14px, 4vw, 34px));
  bottom: calc(env(safe-area-inset-bottom) + clamp(14px, 4vw, 34px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: min(690px, calc(100vw - 28px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 54px var(--shadow);
  backdrop-filter: blur(18px);
}

.panel-copy {
  max-width: 46ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.88rem, 2.2vw, 1rem);
  line-height: 1.35;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 228px;
  min-height: 54px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #1a160b;
  cursor: pointer;
  font-weight: 820;
  letter-spacing: 0;
  box-shadow: 0 12px 30px rgba(244, 183, 64, 0.28);
}

.primary-action:active {
  transform: translateY(1px);
}

.primary-action:focus-visible,
.close-button:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 3px;
}

.button-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.install-sheet {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(env(safe-area-inset-top) + 18px) 14px calc(env(safe-area-inset-bottom) + 14px);
  background: rgba(0, 0, 0, 0.72);
  z-index: 5;
}

.sheet-surface {
  position: relative;
  width: min(520px, 100%);
  max-height: min(680px, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 28px));
  overflow-y: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #11110f;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.sheet-surface h2 {
  padding-right: 54px;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.steps {
  display: grid;
  gap: 9px;
  margin: 18px 0;
  padding-left: 1.25rem;
  color: var(--ink);
  font-size: clamp(0.96rem, 3.5vw, 1.04rem);
  line-height: 1.35;
}

.sheet-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .hud {
    display: grid;
    gap: 14px;
  }

  h1 {
    max-width: 12ch;
  }

  .status-grid {
    width: min(100%, 430px);
  }

  .control-panel {
    left: calc(env(safe-area-inset-left) + 14px);
    right: calc(env(safe-area-inset-right) + 14px);
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .primary-action {
    width: 100%;
    min-width: 0;
  }

  .sheet-surface {
    padding: 18px;
  }
}

@media (max-height: 590px) and (orientation: landscape) {
  .hud {
    padding-block: 12px;
  }

  .status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(620px, 58vw);
  }

  .control-panel {
    width: min(590px, calc(100vw - 28px));
    padding: 10px;
  }

  .panel-copy {
    display: none;
  }
}
