:root {
  --bg: #f7f7f3;
  --card: #ffffff;
  --text: #151515;
  --muted: #77776d;
  --line: #e8e7df;
  --accent: #151515;
  --shadow: 0 20px 60px rgba(17, 24, 39, 0.08);
  --radius: 28px;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.9), transparent 35%),
    linear-gradient(180deg, #fbfbf8 0%, #f3f2ec 100%);
}

.beta-banner {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.beta-track {
  display: flex;
  width: max-content;
  gap: 48px;
  padding: 10px 0;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
  animation: beta-marquee 16s linear infinite;
}

.beta-track span {
  padding-left: 16px;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.portal {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 42px);
  padding: 24px;
  padding-top: 8px;
}

.portal-shell {
  width: min(100%, 560px);
  transform: translateY(-36px);
}

.portal-card {
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 100px;
  height: 100px;
  border-radius: 20px;
  background: #f4f4ee;
  overflow: hidden;
  flex: 0 0 auto;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-fallback {
  display: none;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 700;
}

.portal-shell h1 {
  margin: 0;
  font-family: "Apple Chancery", "URW Chancery L", "Snell Roundhand", cursive;
  font-size: clamp(3rem, 7vw, 4rem);
  line-height: 1;
  letter-spacing: 0.01em;
}

.hero-description {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
}

.download-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.download-link {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

.download-link:hover {
  transform: translateY(-1px);
  border-color: #d9d7cb;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
}

.download-link.is-recommended {
  border-color: #151515;
  background: linear-gradient(180deg, #ffffff 0%, #f3f1e8 100%);
  box-shadow:
    0 0 0 3px rgba(21, 21, 21, 0.08),
    0 18px 40px rgba(17, 24, 39, 0.14);
}

.download-link.is-recommended .store-icon {
  transform: scale(1.14);
}

.download-link.is-recommended::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #151515;
}

.download-link.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.download-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.store-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  transition: transform 160ms ease;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.helper {
  margin: 18px 2px 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

@keyframes beta-marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-50% - 24px));
  }
}

@media (max-width: 640px) {
  .portal-shell {
    transform: translateY(-20px);
  }

  .portal-card {
    padding: 14px;
    border-radius: 22px;
  }

  .download-link {
    min-height: 96px;
  }
}
