:root {
  color-scheme: light;
  --ink: #231f20;
  --muted: #6f6664;
  --paper: #fffdf8;
  --cream: #f6efe3;
  --red: #9f1d24;
  --red-dark: #741218;
  --line: rgba(93, 44, 40, 0.16);
  --shadow: 0 28px 80px rgba(72, 25, 22, 0.16);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--cream); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(159, 29, 36, 0.09), transparent 28rem),
    linear-gradient(140deg, #fffaf2 0%, var(--cream) 100%);
}

button { font: inherit; }

.page-shell {
  min-height: calc(100vh - 70px);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}

.download-card {
  width: min(100%, 980px);
  min-height: 570px;
  display: grid;
  grid-template-columns: minmax(290px, 0.82fr) minmax(360px, 1.18fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 32px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.brand-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.5rem;
  overflow: hidden;
  padding: 3rem;
  color: white;
  background: linear-gradient(155deg, #b02a31 0%, var(--red) 44%, #681017 100%);
}

.brand-panel::after {
  content: "60";
  position: absolute;
  right: -1.2rem;
  bottom: -4.5rem;
  z-index: -1;
  font: 800 13rem/1 Georgia, serif;
  color: rgba(255, 255, 255, 0.06);
}

.app-icon {
  width: 132px;
  height: 132px;
  aspect-ratio: 1;
  border-radius: 30px;
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(44, 0, 3, 0.32);
}

.brand-kicker { margin: 0; font: 600 1.15rem/1.4 Georgia, serif; letter-spacing: 0.02em; }

.orbit { position: absolute; z-index: -1; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 50%; }
.orbit-one { width: 300px; height: 300px; }
.orbit-two { width: 430px; height: 430px; }

.content-panel { display: grid; padding: clamp(2rem, 6vw, 4.5rem); }
.state { align-self: center; }
.state[hidden] { display: none; }
.loading-state { display: flex; align-items: center; gap: 1.25rem; }
.loading-state h1 { margin: 0 0 0.35rem; font: 700 clamp(1.45rem, 3vw, 2rem)/1.15 Georgia, serif; }
.loading-state p { margin: 0; color: var(--muted); }

.spinner {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 3px solid rgba(159, 29, 36, 0.18);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.eyebrow { margin: 0 0 0.75rem; color: var(--red); font-size: 0.82rem; font-weight: 750; letter-spacing: 0.11em; text-transform: uppercase; }
h1 { margin: 0; font: 700 clamp(2.55rem, 6vw, 4.5rem)/0.98 Georgia, serif; letter-spacing: -0.045em; }
.description { max-width: 35rem; margin: 1.3rem 0 1.75rem; color: var(--muted); font-size: 1.05rem; line-height: 1.65; }

.store-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.store-button {
  min-width: 174px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.72rem 1rem;
  border: 1px solid #1b1b1b;
  border-radius: 12px;
  color: white;
  background: #111;
  cursor: pointer;
  text-align: left;
  transition: transform 150ms ease, background 150ms ease, opacity 150ms ease;
}
.store-button:hover { transform: translateY(-2px); background: #292929; }
.store-button:focus-visible, .text-button:focus-visible { outline: 3px solid rgba(159, 29, 36, 0.3); outline-offset: 3px; }
.store-button:disabled { cursor: wait; opacity: 0.58; transform: none; }
.store-button small { display: block; margin-bottom: 0.08rem; font-size: 0.68rem; }
.store-button span:last-child { font-size: 1.02rem; font-weight: 650; line-height: 1.05; }
.store-mark { width: 1.65rem; display: inline-grid; place-items: center; font-size: 1.55rem; }
.play { font-size: 1.25rem; }

.notice { margin: 0 0 1.25rem; padding: 0.85rem 1rem; border-left: 3px solid var(--red); background: #fff3f1; color: #632126; line-height: 1.5; }
.text-button { margin-top: 1rem; padding: 0.45rem 0; border: 0; color: var(--red); background: transparent; font-weight: 700; cursor: pointer; }

.desktop-extra {
  display: grid;
  grid-template-columns: 104px 1fr;
  align-items: center;
  gap: 1.1rem;
  margin-top: 2.2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.qr-frame { width: 104px; height: 104px; display: grid; place-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: white; }
#qr-code img, #qr-code canvas { width: 86px !important; height: 86px !important; display: block; }
.desktop-extra h2 { margin: 0 0 0.35rem; font: 700 1rem/1.2 Georgia, serif; }
.desktop-extra p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }

footer { min-height: 70px; display: flex; align-items: center; justify-content: center; gap: 0.65rem; padding: 1rem; color: var(--muted); font-size: 0.82rem; }
.footer-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.noscript { position: fixed; inset: auto 1rem 1rem; padding: 1rem; border-radius: 10px; color: white; background: #111; text-align: center; }

@media (max-width: 720px) {
  .page-shell { min-height: auto; padding: 0; }
  .download-card { min-height: 100vh; grid-template-columns: 1fr; border: 0; border-radius: 0; }
  .brand-panel { min-height: 250px; padding: 2rem; }
  .app-icon { width: 102px; height: 102px; border-radius: 24px; }
  .brand-kicker { font-size: 1rem; }
  .orbit-one { width: 230px; height: 230px; }
  .orbit-two { width: 330px; height: 330px; }
  .content-panel { padding: 2.2rem 1.35rem 3rem; }
  .loading-state { min-height: 220px; }
  .store-actions { flex-direction: column; }
  .store-button { width: 100%; justify-content: center; }
  .desktop-extra { grid-template-columns: 90px 1fr; }
  .qr-frame { width: 90px; height: 90px; }
  #qr-code img, #qr-code canvas { width: 74px !important; height: 74px !important; }
  footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
