:root {
  color-scheme: dark;
  --bg: #0b0f17;
  --panel: #111827;
  --panel-soft: #1f2937;
  --text: #f9fafb;
  --muted: #a7b0c0;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #f97316;
  --accent-strong: #fb923c;
  --success: #22c55e;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 12%, rgba(249, 115, 22, 0.22), transparent 30rem),
    linear-gradient(135deg, #080b12 0%, #111827 46%, #19130f 100%);
  color: var(--text);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top)) clamp(16px, 4vw, 48px) 16px;
  background: rgba(11, 15, 23, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #111827;
}

.install-button,
.primary,
.secondary {
  min-height: 44px;
  border-radius: 8px;
  border: 0;
  font-weight: 800;
  cursor: pointer;
}

.install-button {
  padding: 0 18px;
  background: var(--text);
  color: #111827;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: clamp(28px, 7vw, 76px);
  align-items: center;
  min-height: calc(100vh - 160px);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  text-decoration: none;
}

.primary {
  background: var(--accent);
  color: #111827;
}

.secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: var(--text);
}

.phone-shell {
  justify-self: center;
  width: min(100%, 360px);
  padding: 13px;
  border-radius: 34px;
  background: #020617;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.phone-screen {
  min-height: 640px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  background: #111827;
}

.video-frame {
  position: relative;
  display: grid;
  min-height: 455px;
  place-items: center;
  background:
    linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.58)),
    linear-gradient(155deg, #713f12, #991b1b 45%, #111827 100%);
}

.episode-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 12px;
  font-weight: 900;
}

.play-button {
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  font-size: 26px;
  cursor: pointer;
}

.show-info,
.unlock-box {
  padding: 18px;
}

.show-title {
  margin-bottom: 6px;
  font-size: 20px;
  font-weight: 900;
}

.show-meta {
  margin: 0;
  color: var(--muted);
}

.unlock-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 14px 14px;
  border-radius: 8px;
  background: rgba(249, 115, 22, 0.16);
  color: #fed7aa;
}

.unlock-box strong {
  color: #fff7ed;
  white-space: nowrap;
}

.status-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 42px;
}

.status-panel > div,
.guide article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.status-panel > div {
  padding: 18px;
}

.status-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.status-panel strong {
  color: var(--success);
}

.guide h2 {
  margin-bottom: 18px;
  font-size: 30px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.guide article {
  padding: 20px;
}

.guide h3 {
  margin-bottom: 10px;
}

.guide p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.ios-tip {
  position: fixed;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 16px;
  z-index: 20;
  display: grid;
  gap: 6px;
  max-width: 420px;
  margin: 0 auto;
  padding: 18px 54px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.ios-tip button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 860px) {
  main {
    padding-top: 28px;
  }

  .hero,
  .status-panel,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .phone-shell {
    width: min(100%, 330px);
  }

  .phone-screen {
    min-height: 560px;
  }

  .video-frame {
    min-height: 380px;
  }
}

@media (display-mode: standalone) {
  .install-button,
  #mainInstallButton {
    display: none;
  }
}
