:root {
  color-scheme: light;
  --brand-green: #00c93a;
  --fresh-yellow: #ffd100;
  --ink: #171817;
  --muted: #686b72;
  --canvas: #f5f6fa;
  --outer-canvas: #e7e9ee;
  --surface: #ffffff;
  --focus: #006f2d;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 280px;
  min-height: 100%;
  margin: 0;
  background: var(--outer-canvas);
  color: var(--ink);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  font-size: 16px;
  line-height: 1.45;
}

img {
  display: block;
  max-width: 100%;
}

.landing-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--canvas);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.standard-view {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--canvas);
}

.hero-media {
  width: 100%;
  overflow: hidden;
  background: var(--fresh-yellow);
}

.hero-media img {
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.standard-actions {
  display: grid;
  gap: 16px;
  padding: 28px 22px max(34px, env(safe-area-inset-bottom));
}

.action-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform 120ms ease, background-color 120ms ease;
}

.action-button--primary {
  background: var(--ink);
  color: var(--surface);
}

.action-button--secondary {
  background: transparent;
}

.action-button:active {
  transform: translateY(1px);
}

.action-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.action-button[hidden] {
  display: none;
}

.action-button[aria-disabled="true"] {
  opacity: 0.6;
  cursor: progress;
}

.restricted-view {
  display: none;
  min-height: 100vh;
  min-height: 100svh;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  padding:
    max(28px, env(safe-area-inset-top))
    22px
    max(28px, env(safe-area-inset-bottom));
  background: var(--canvas);
}

.restricted-copy {
  max-width: 360px;
  margin: 0 auto;
  text-align: center;
}

.restricted-copy h1 {
  max-width: 13ch;
  margin: 0 auto;
  font-family: "Arial Rounded MT Bold", Arial, Helvetica, sans-serif;
  font-size: clamp(27px, 7vw, 32px);
  font-weight: 800;
  line-height: 1.06;
}

.restricted-copy p {
  max-width: 330px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.guide-media {
  display: grid;
  min-height: 0;
  place-items: center;
}

.guide-media img {
  width: min(100%, 313px);
  max-height: 100%;
  border-radius: 16px;
  object-fit: contain;
}

.restricted-wordmark {
  width: 142px;
  height: 54px;
  margin: 0 auto;
  object-fit: contain;
}

html[data-browser="restricted"] .standard-view {
  display: none;
}

html[data-browser="restricted"] .restricted-view {
  display: grid;
}

.opening-view {
  display: none;
  min-height: 100vh;
  min-height: 100svh;
  padding: 24px;
  place-items: center;
  background: var(--canvas);
}

.opening-wordmark {
  width: 142px;
  height: 54px;
  margin: 0 auto;
}

.opening-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.opening-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #dce6df;
  border-top-color: var(--brand-green);
  border-radius: 50%;
  animation: opening-spin 800ms linear infinite;
}

html[data-open-state="opening"] .opening-view {
  display: grid;
}

html[data-open-state="opening"] .standard-view,
html[data-open-state="opening"] .restricted-view {
  display: none;
}

html[data-open-state="ready"] .standard-view,
html[data-open-state="ready"] .restricted-view {
  animation: landing-reveal 180ms ease-out both;
}

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

@keyframes landing-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-height: 650px) {
  .hero-media img {
    height: calc(100svh - 170px);
    min-height: 360px;
    object-fit: cover;
    object-position: center bottom;
  }

  .standard-actions {
    gap: 10px;
    padding-top: 14px;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

  .action-button {
    min-height: 48px;
    padding-top: 9px;
    padding-bottom: 9px;
    font-size: 16px;
  }

  .restricted-view {
    gap: 10px;
    padding-top: max(16px, env(safe-area-inset-top));
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .restricted-copy h1 {
    font-size: 25px;
  }

  .restricted-copy p {
    margin-top: 8px;
    font-size: 14px;
  }

  .restricted-wordmark {
    width: 126px;
    height: 48px;
  }
}

@media (min-width: 481px) {
  .landing-shell {
    border-right: 1px solid #d7d9de;
    border-left: 1px solid #d7d9de;
  }
}

@media (prefers-reduced-motion: reduce) {
  .opening-spinner,
  html[data-open-state="ready"] .standard-view,
  html[data-open-state="ready"] .restricted-view {
    animation: none;
  }

  .action-button {
    transition: none;
  }
}
