:root {
  color-scheme: light;
  --ink: #112b27;
  --ink-soft: #31514b;
  --paper: #f4f0e8;
  --card: #fffdf8;
  --lime: #d8ff63;
  --lime-deep: #bde943;
  --coral: #ef654c;
  --coral-dark: #c93d2a;
  --line: rgba(17, 43, 39, 0.16);
  --shadow: 0 26px 70px rgba(17, 43, 39, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #4f8df7; outline-offset: 3px; }
.hidden { display: none !important; }

.site-header { max-width: 1180px; margin: 0 auto; padding: 24px 28px; display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; text-decoration: none; letter-spacing: -0.03em; }
.brand em { font-family: Georgia, serif; font-weight: 400; }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--lime); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.install-button { min-height: 36px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: white; cursor: pointer; font-size: 12px; font-weight: 850; }
.language-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.language-switch button { border: 0; background: transparent; color: var(--ink-soft); padding: 7px 10px; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 800; }
.language-switch button.active { background: var(--ink); color: white; }

.landing { overflow: hidden; }
.hero { max-width: 1180px; min-height: 620px; margin: 0 auto; padding: 66px 28px 86px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); align-items: center; gap: 72px; }
.eyebrow, .card-kicker { margin: 0 0 18px; color: #537068; font-size: 12px; font-weight: 900; letter-spacing: .18em; }
h1, h2, h3, p { overflow-wrap: break-word; }
.hero h1 { max-width: 720px; margin: 0; font-family: Georgia, serif; font-size: clamp(54px, 7vw, 92px); line-height: .97; letter-spacing: -.055em; font-weight: 500; }
.lead { max-width: 630px; margin: 28px 0 0; color: var(--ink-soft); font-size: clamp(18px, 2vw, 23px); line-height: 1.55; }
.lead.compact { margin: 12px auto 0; max-width: 520px; font-size: 18px; }
.hero-actions { margin-top: 36px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.button { min-height: 52px; padding: 0 24px; border: 1px solid transparent; border-radius: 16px; cursor: pointer; font-weight: 850; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.button:hover { transform: translateY(-2px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-primary { background: var(--ink); color: white; box-shadow: 0 12px 30px rgba(17, 43, 39, .18); }
.button-primary:hover { background: #1d403a; }
.button-secondary { border-color: var(--line); background: white; color: var(--ink); }
.button-alarm { background: var(--coral); color: white; box-shadow: 0 12px 28px rgba(239, 101, 76, .24); }
.button-alarm:hover { background: var(--coral-dark); }
.button-full { width: 100%; }
.text-link { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--ink); padding-bottom: 3px; font-weight: 800; }
.emergency-note { max-width: 620px; margin-top: 20px; color: #6e5b53; font-size: 13px; line-height: 1.5; }
.centered { text-align: center; margin: 16px auto 0; }

.hero-visual { position: relative; min-height: 490px; display: grid; place-items: center; }
.hero-visual::before { content: ""; position: absolute; width: 430px; height: 430px; border-radius: 50%; background: var(--lime); filter: saturate(.9); }
.route-line { position: absolute; width: 540px; height: 300px; border: 2px dashed rgba(17,43,39,.25); border-color: rgba(17,43,39,.25) transparent transparent; border-radius: 50%; transform: rotate(-12deg); }
.phone-card { position: relative; z-index: 1; width: 260px; min-height: 455px; padding: 18px 20px 28px; border: 8px solid var(--ink); border-radius: 42px; background: var(--card); box-shadow: var(--shadow); text-align: center; transform: rotate(4deg); }
.phone-top { display: flex; justify-content: space-between; font-size: 10px; font-weight: 800; }
.phone-card strong { display: block; margin-top: 18px; font-family: Georgia, serif; font-size: 24px; }
.phone-card p { color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.mini-status { margin-top: 28px; padding: 13px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 14px; background: #edf4ef; font-size: 12px; font-weight: 800; }
.mini-status span:first-child { width: 8px; height: 8px; border-radius: 50%; background: #31a369; box-shadow: 0 0 0 5px rgba(49,163,105,.15); }

.safety-orb { width: 174px; height: 174px; margin: 12px auto 24px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 46%, var(--lime) 0 33%, rgba(216,255,99,.25) 34% 55%, rgba(216,255,99,.08) 56%); }
.safety-orb::before, .safety-orb span { content: ""; display: block; border-radius: 50%; }
.safety-orb::before { width: 50px; height: 50px; background: var(--ink); }
.safety-orb span { position: absolute; width: 118px; height: 118px; border: 1px solid rgba(17,43,39,.17); animation: breathe 2.2s ease-out infinite; }
.safety-orb.small { width: 138px; height: 138px; margin-top: 62px; }
.safety-orb.small::before { width: 40px; height: 40px; }
.safety-orb.small span { width: 96px; height: 96px; }
@keyframes breathe { 0% { transform: scale(.75); opacity: .1; } 70% { opacity: .55; } 100% { transform: scale(1.08); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } .safety-orb span { animation: none; } }

.trust-strip { padding: 22px 28px; display: flex; justify-content: center; gap: clamp(28px, 7vw, 100px); flex-wrap: wrap; background: var(--ink); color: white; font-size: 13px; font-weight: 750; }
.trust-strip span::before { content: "✓"; color: var(--lime); margin-right: 9px; }
.how-section { max-width: 1180px; margin: 0 auto; padding: 110px 28px 130px; }
.how-section h2 { max-width: 630px; margin: 0; font-family: Georgia, serif; font-size: clamp(38px, 5vw, 62px); line-height: 1.05; font-weight: 500; letter-spacing: -.04em; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 56px; }
.steps article { min-height: 230px; padding: 28px; border-top: 1px solid var(--ink); background: rgba(255,255,255,.34); }
.steps article > span { font-size: 12px; font-weight: 900; color: #5c746e; }
.steps h3 { margin: 52px 0 10px; font-family: Georgia, serif; font-size: 28px; }
.steps p { margin: 0; color: var(--ink-soft); line-height: 1.6; }

.app-shell { width: min(920px, calc(100% - 32px)); margin: 30px auto 90px; }
.back-button { margin-bottom: 18px; border: 0; background: transparent; color: var(--ink); cursor: pointer; font-weight: 800; }
.app-card { border: 1px solid rgba(17,43,39,.09); border-radius: 28px; background: var(--card); box-shadow: var(--shadow); }
.setup-card { max-width: 560px; margin: 0 auto; padding: clamp(28px, 6vw, 52px); }
.setup-card h1, .session-header h1, .watch-card h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(36px, 7vw, 56px); line-height: 1.05; font-weight: 500; letter-spacing: -.04em; }
.muted { color: var(--ink-soft); line-height: 1.6; }
form label:not(.consent-row) { display: block; margin: 24px 0 9px; font-weight: 850; }
input, select { width: 100%; min-height: 54px; padding: 0 15px; border: 1px solid var(--line); border-radius: 13px; background: white; color: var(--ink); }
.field-help { margin: 8px 0 0; color: #657b76; font-size: 12px; line-height: 1.5; }
.consent-row { margin: 22px 0; display: flex; align-items: flex-start; gap: 11px; color: var(--ink-soft); line-height: 1.45; font-size: 14px; }
.consent-row input { width: 19px; min-height: 19px; margin-top: 1px; accent-color: var(--ink); }
.inline-error { margin: 14px 0; padding: 12px 14px; border-radius: 10px; background: #fff0ed; color: #9e2f20; font-size: 14px; }
.session-header { margin: 54px 0 28px; display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.timer { padding: 12px 16px; border-radius: 999px; background: var(--ink); color: white; font-variant-numeric: tabular-nums; font-weight: 850; }
.active-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.status-card, .share-card { padding: 34px; }
.status-card { text-align: center; }
.status-card h2, .share-card h2 { margin: 0; font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.status-details { margin-top: 28px; padding: 18px; display: grid; gap: 12px; border-radius: 16px; background: #f1f5f1; text-align: left; font-size: 13px; font-weight: 700; }
.status-details > div { display: flex; align-items: center; gap: 10px; }
.detail-dot { width: 9px; height: 9px; border-radius: 50%; background: #8aa099; }
.detail-dot.live { background: #31a369; box-shadow: 0 0 0 5px rgba(49,163,105,.13); }
.share-card { display: flex; flex-direction: column; justify-content: center; }
.share-card .button { margin-top: 24px; }
.session-actions { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.session-actions .button { min-height: 62px; }

.watch-card { padding: clamp(30px, 7vw, 62px); text-align: center; }
.watcher { width: 150px; height: 150px; }
.watch-details { margin: 34px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.watch-details div { padding: 20px 10px; }
.watch-details div + div { border-left: 1px solid var(--line); }
.watch-details dt { color: #667c77; font-size: 12px; }
.watch-details dd { margin: 7px 0 0; font-weight: 850; }
.privacy-note { margin: 28px auto 0; max-width: 570px; padding: 17px 20px; border-radius: 15px; display: flex; flex-direction: column; gap: 5px; background: #eef4ef; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.privacy-note strong { color: var(--ink); }

dialog { width: min(460px, calc(100% - 28px)); padding: 34px; border: 0; border-radius: 24px; color: var(--ink); background: var(--card); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(17,43,39,.62); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; right: 18px; top: 14px; width: 38px; height: 38px; border: 0; background: transparent; cursor: pointer; color: var(--ink); font-size: 26px; }
dialog h2 { margin: 0; font-family: Georgia, serif; font-size: 34px; font-weight: 500; }
dialog input { margin: 14px 0; }
.install-icon { display: block; margin: 0 0 22px; border-radius: 22px; box-shadow: 0 12px 26px rgba(17,43,39,.16); }

.connection-banner { padding: 10px 18px; background: #fff1ca; color: #684d00; text-align: center; font-size: 13px; font-weight: 800; }
.update-banner { position: fixed; z-index: 20; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); max-width: min(390px, calc(100% - 36px)); padding: 14px 14px 14px 18px; display: flex; align-items: center; gap: 14px; border: 1px solid rgba(216,255,99,.4); border-radius: 18px; background: var(--ink); color: white; box-shadow: 0 18px 48px rgba(17,43,39,.28); font-size: 13px; font-weight: 750; }
.update-banner button { min-height: 38px; padding: 0 13px; border: 0; border-radius: 12px; background: var(--lime); color: var(--ink); cursor: pointer; font-weight: 900; }

.offline-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.offline-shell { width: min(540px, 100%); padding: clamp(28px, 7vw, 54px); border: 1px solid rgba(17,43,39,.1); border-radius: 30px; background: var(--card); box-shadow: var(--shadow); text-align: center; }
.offline-shell img { display: block; margin: 0 auto 24px; border-radius: 24px; }
.offline-shell h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(42px, 10vw, 64px); font-weight: 500; letter-spacing: -.04em; }
.offline-shell p { color: var(--ink-soft); line-height: 1.6; }
.offline-shell .button { display: inline-flex; align-items: center; justify-content: center; margin-top: 16px; text-decoration: none; }
.offline-shell .emergency-note { margin: 22px auto 0; color: #6e5b53; }

body.mode-alarm { --lime: #ff8a75; }
body.mode-alarm .status-card { border-color: rgba(201,61,42,.35); }

@media (max-width: 760px) {
  .site-header { padding: 17px 18px; }
  .hero { min-height: auto; padding: 50px 20px 70px; grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: clamp(49px, 15vw, 72px); }
  .hero-visual { min-height: 390px; }
  .hero-visual::before { width: 340px; height: 340px; }
  .phone-card { width: 222px; min-height: 385px; }
  .safety-orb.small { margin-top: 42px; }
  .how-section { padding: 82px 20px 90px; }
  .steps { grid-template-columns: 1fr; }
  .steps article { min-height: auto; }
  .steps h3 { margin-top: 28px; }
  .active-grid { grid-template-columns: 1fr; }
  .session-header { margin-top: 32px; align-items: center; }
  .session-header h1 { font-size: 38px; }
  .status-card, .share-card { padding: 27px 22px; }
  .session-actions { grid-template-columns: 1fr; }
  .watch-details { grid-template-columns: 1fr; }
  .watch-details div + div { border-left: 0; border-top: 1px solid var(--line); }
  .update-banner { left: 18px; right: 18px; max-width: none; justify-content: space-between; }
}

@media (max-width: 420px) {
  .site-header { gap: 10px; }
  .brand { gap: 7px; font-size: 14px; }
  .brand-mark { width: 32px; height: 32px; }
  .header-actions { gap: 6px; }
  .install-button { padding: 0 10px; }
  .language-switch button { padding-inline: 8px; }
}
