:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --black: #050607;
  --panel: #0c0e10;
  --gold: #f1b82d;
  --gold-dark: #b9891f;
  --silver: #b8c0c7;
  --line: #343a40;
  --white: #f7f8f8;
  background: var(--black);
  color: var(--white);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 280px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background:
    radial-gradient(circle at 50% 8%, rgba(241, 184, 45, 0.12), transparent 34rem),
    linear-gradient(180deg, #0a0b0c 0%, var(--black) 58%);
}

.mobile-download {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}

.mobile-card {
  width: min(100%, 520px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(8, 10, 11, 0.94);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.mobile-brand {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 26px 28px 22px;
  border-bottom: 3px solid var(--gold);
  background: linear-gradient(145deg, #070809, #171a1d);
}

.mobile-logo {
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.7));
}

.mobile-name {
  width: min(78%, 300px);
  max-height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.65));
}

.mobile-heading {
  padding: 28px 28px 18px;
  text-align: center;
}

.mobile-heading p {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.mobile-heading h1 {
  margin: 0;
  font-size: clamp(29px, 8vw, 42px);
  line-height: 1.05;
}

.mobile-heading span {
  display: block;
  margin-top: 9px;
  color: var(--silver);
  font-size: 16px;
}

.mobile-actions {
  display: grid;
  gap: 8px;
  padding: 4px 28px 24px;
}

.download-login {
  display: grid;
  gap: 14px;
  padding: 4px 28px 28px;
}

.download-login label {
  display: grid;
  gap: 7px;
  color: var(--silver);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.download-login input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #454b51;
  border-radius: 9px;
  padding: 10px 12px;
  background: #030405;
  color: var(--white);
  font: inherit;
  font-size: 17px;
}

.download-login button,
.sign-out-button {
  min-height: 50px;
  border: 1px solid var(--gold-dark);
  border-radius: 9px;
  background: var(--gold);
  color: #101112;
  font: inherit;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
}

.download-login button:disabled,
.mobile-button:disabled { opacity: 0.65; cursor: wait; }

.download-error {
  margin: 0;
  color: #ff7b7b;
  font-size: 13px;
  font-weight: 700;
}

.mobile-button {
  min-height: 78px;
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--gold-dark);
  border-radius: 12px;
  padding: 12px 18px;
  background: var(--gold);
  color: #101112;
  text-decoration: none;
  box-shadow: 0 7px 24px rgba(241, 184, 45, 0.14);
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.mobile-button:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
}

.mobile-button:active { transform: translateY(1px); }

.platform-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 37px;
  line-height: 1;
}

.android-mark {
  border: 3px solid currentColor;
  border-radius: 10px;
  font-family: inherit;
  font-size: 25px;
  font-weight: 950;
}

.windows-mark {
  font-family: inherit;
  font-size: 39px;
  font-weight: 950;
}

.mobile-button small,
.mobile-button strong { display: block; }

.mobile-button small {
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mobile-button strong {
  font-size: 21px;
  line-height: 1.15;
}

.button-note {
  margin: 0 4px 10px;
  color: var(--silver);
  font-size: 12px;
  line-height: 1.4;
}

.desktop-link {
  display: block;
  padding: 0 28px 26px;
  color: var(--silver);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration-color: var(--gold-dark);
  text-underline-offset: 4px;
}

.sign-out-button {
  min-height: 42px;
  margin-top: 2px;
  border-color: #454b51;
  background: transparent;
  color: var(--silver);
  font-size: 14px;
}

@media (max-width: 420px) {
  .mobile-download { padding: 0; }
  .mobile-card {
    min-height: 100vh;
    min-height: 100svh;
    border: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .mobile-brand { min-height: 160px; }
  .mobile-heading { padding: 24px 20px 16px; }
  .mobile-actions { padding: 4px 20px 20px; }
}

@media (prefers-reduced-motion: no-preference) {
  .mobile-button { transition: transform 120ms ease, filter 120ms ease; }
  .mobile-button:hover { filter: brightness(1.06); }
}
