:root {
  --brand: #36AB9C;
  --brand-dark: #2B867A;
  --accent: #F58A48;
  --ink: #0F172A;
  --text: #334155;
  --muted: #64748B;
  --line: #E5E7EB;
  --soft: #F7F7F7;
  --soft-teal: #EFFAF8;
  --soft-orange: #FFF4EC;
  --soft-yellow: #FFF8E8;
  --card: #FFFFFF;
  --danger: #9F1239;
  --r: 18px;
  --shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  --focus: 0 0 0 4px rgba(54, 171, 156, 0.24);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(54,171,156,.14), transparent 32rem),
    linear-gradient(180deg, #FFFFFF 0%, var(--soft) 100%);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
}

:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

@supports (min-height: 100dvh) {
  body { min-height: 100dvh; }
}

* { -webkit-tap-highlight-color: rgba(54,171,156,.12); }

button,
.button-link {
  font: inherit;
}

input,
textarea,
button,
a,
summary {
  -webkit-tap-highlight-color: rgba(54,171,156,.12);
}

input:focus,
textarea:focus,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.startup-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: calc(var(--safe-top) + 1.25rem) 1.25rem calc(var(--safe-bottom) + 1.25rem);
  text-align: center;
  background:
    radial-gradient(circle at 18% 0%, rgba(54,171,156,.18), transparent 20rem),
    linear-gradient(180deg, var(--soft-teal) 0%, #F7FDFB 100%);
  color: var(--ink);
  transition: opacity .18s ease, visibility .18s ease;
}

.startup-splash-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-loading {
  min-height: 56vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  text-align: center;
}

.startup-splash-card,
.app-loading-card {
  width: min(22rem, 100%);
  display: grid;
  justify-items: center;
  gap: .75rem;
  padding: 1.25rem;
  border-radius: 1.5rem;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(229,231,235,.8);
  box-shadow: var(--shadow);
}

.startup-splash-icon,
.app-loading-icon {
  width: 5.35rem;
  height: 5.35rem;
  border-radius: 1.45rem;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(15,23,42,.10);
}

.startup-splash-title,
.app-loading-title {
  margin: .15rem 0 0;
  font-size: 1.15rem;
  font-weight: 850;
  letter-spacing: -.01em;
}

.startup-splash-text,
.app-loading-text {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.45;
}

.startup-splash-dots,
.app-loading-dots {
  display: inline-flex;
  gap: .28rem;
  align-items: center;
  justify-content: center;
  margin-top: .2rem;
  min-height: .5rem;
}

.startup-splash-dots span,
.app-loading-dots span {
  width: .42rem;
  height: .42rem;
  border-radius: 999px;
  background: var(--brand);
  opacity: .45;
  animation: sg-load-pulse 1.15s ease-in-out infinite;
}

.startup-splash-dots span:nth-child(2),
.app-loading-dots span:nth-child(2) { animation-delay: .15s; }
.startup-splash-dots span:nth-child(3),
.app-loading-dots span:nth-child(3) { animation-delay: .3s; }

@keyframes sg-load-pulse {
  0%, 80%, 100% { opacity: .35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-.16rem); }
}

@media (prefers-reduced-motion: reduce) {
  .startup-splash { transition: none; }
  .startup-splash-dots span,
  .app-loading-dots span {
    animation: none;
    opacity: .65;
  }
}

