:root {
  color-scheme: light;
  --canvas: #f4f3ee;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --ink: #1c211e;
  --muted: #69716c;
  --line: rgba(28, 33, 30, 0.11);
  --green: #147d5b;
  --green-soft: #ddefe7;
  --blue: #176bb2;
  --blue-soft: #e2eff9;
  --amber: #9a611f;
  --amber-soft: #f6ead8;
  --shadow: 0 20px 50px rgba(42, 51, 46, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--canvas); }

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 4%, rgba(20, 125, 91, 0.12), transparent 32rem),
    var(--canvas);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; }

.shell {
  width: min(100% - 32px, 720px);
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 0 max(28px, env(safe-area-inset-bottom));
}

.hero {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 22px;
  align-items: start;
  padding: 26px 4px 34px;
}

.app-mark {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 22px;
  color: white;
  background: var(--green);
  box-shadow: 0 14px 28px rgba(20, 125, 91, 0.2);
}

.app-mark span { font-size: 34px; font-weight: 750; letter-spacing: -0.06em; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.13em;
}

h1, h2, p { text-wrap: pretty; }

h1 {
  margin: 0;
  font-size: clamp(32px, 7vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

h2 { margin: 0; font-size: 24px; line-height: 1.15; letter-spacing: -0.025em; }

.intro,
.test-card p,
.offline-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.status-card,
.test-card,
.install-card,
.offline-card {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.status-card { padding: 24px; }

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.badge {
  flex: none;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 13px;
  font-weight: 700;
}

.badge.checking { color: var(--amber); background: var(--amber-soft); }

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.status-grid article {
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
}

.status-grid span,
.status-grid small { display: block; color: var(--muted); }
.status-grid span { font-size: 13px; }
.status-grid strong { display: block; margin: 12px 0 7px; font-size: 20px; }
.status-grid small { font-size: 12px; line-height: 1.45; }

.test-card { padding: 26px; }

.counter-panel {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  gap: 14px;
  align-items: center;
  margin-top: 24px;
  padding: 12px;
  border-radius: 20px;
  background: #eef0eb;
}

.counter-panel output { text-align: center; font-size: 40px; font-weight: 720; font-variant-numeric: tabular-nums; }

.circle-button {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 16px;
  color: var(--ink);
  background: var(--surface-solid);
  box-shadow: 0 7px 18px rgba(42, 51, 46, 0.08);
  font-size: 25px;
}

.circle-button.primary { color: white; background: var(--green); }

.circle-button:active,
.action-button:active { transform: scale(0.96); }

.text-button {
  margin-top: 16px;
  padding: 8px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
}

.install-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  padding: 26px;
}

.step-number {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

ol { margin: 20px 0 0; padding-left: 22px; }
li { margin-bottom: 12px; padding-left: 5px; color: #404742; line-height: 1.5; }

.install-hint {
  margin: 18px 0 0;
  padding: 13px 15px;
  border-radius: 14px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 13px;
  line-height: 1.5;
}

.offline-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
}

.action-button {
  flex: none;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  color: white;
  background: var(--ink);
  font-weight: 700;
  transition: transform 180ms ease, opacity 180ms ease;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 16px 6px 0;
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 16px;
  z-index: 10;
  max-width: 520px;
  margin: auto;
  padding: 14px 18px;
  border-radius: 16px;
  color: white;
  background: rgba(28, 33, 30, 0.94);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
  text-align: center;
  font-size: 14px;
}

.toast.show { opacity: 1; transform: translateY(0); }

button:focus-visible { outline: 3px solid rgba(23, 107, 178, 0.28); outline-offset: 3px; }

@media (max-width: 580px) {
  .shell { width: min(100% - 24px, 720px); }
  .hero { grid-template-columns: 56px 1fr; gap: 16px; padding-top: 20px; }
  .app-mark { width: 56px; height: 56px; border-radius: 17px; }
  .app-mark span { font-size: 27px; }
  .status-grid { grid-template-columns: 1fr; }
  .status-grid article { min-height: 112px; }
  .offline-card { align-items: stretch; flex-direction: column; }
  .action-button { width: 100%; }
}

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