:root {
  --ink: #10203a;
  --ink-soft: #3d4f6a;
  --paper: #f3f7fb;
  --accent: #0f766e;
  --accent-deep: #0b4f4a;
  --play: #01875f;
  --apple: #111111;
  --line: rgba(16, 32, 58, 0.12);
  --shadow: 0 24px 60px rgba(16, 32, 58, 0.12);
  --radius: 18px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  position: relative;
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 55% at 12% -10%, rgba(15, 118, 110, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 10%, rgba(37, 99, 235, 0.14), transparent 50%),
    linear-gradient(160deg, #eef4f8 0%, #f7fafc 45%, #e8f1f0 100%);
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(16, 32, 58, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 85%);
  pointer-events: none;
}

.shell {
  width: min(440px, 100%);
  text-align: center;
  animation: rise 0.55s ease both;
}

.brand {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 8vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}

.view {
  display: grid;
  gap: 20px;
  justify-items: center;
}

.app-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.app-desc {
  margin: -8px 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.5;
  max-width: 34ch;
}

.muted {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.panel {
  width: 100%;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 28px 22px;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.stores {
  width: 100%;
  display: grid;
  gap: 12px;
}

.store-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 18px;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.store-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.store-btn:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.45);
  outline-offset: 3px;
}

.store-btn--play {
  background: var(--play);
  box-shadow: 0 10px 24px rgba(1, 135, 95, 0.28);
}

.store-btn--apple {
  background: var(--apple);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.store-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.qr-wrap {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--line);
}

.qr-wrap canvas,
.qr-wrap img {
  display: block;
  width: 220px;
  height: 220px;
}

.qr-url {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  word-break: break-all;
}

.redirect-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.redirect-note a {
  color: var(--accent-deep);
  font-weight: 600;
}

.error-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .shell,
  .store-btn {
    animation: none;
    transition: none;
  }
}
