@layer components {
  body:has(#lifeguard-boot) { margin: 0; background: #f5f6f8; }
  :root[data-theme="dark"] body:has(#lifeguard-boot) { background: #181a1d; }
  .lg-launch {
    --launch-bg: var(--app-bg, #f5f6f8);
    --launch-ink: var(--app-ink, #25282e);
    --launch-muted: var(--app-muted, #59616d);
    --launch-accent: var(--app-primary, #176d60);
    --launch-track: var(--app-border, #d8dee6);
    display: grid; place-items: center; min-width: 0; width: 100%;
    color: var(--launch-ink); background: var(--launch-bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    box-sizing: border-box;
  }
  :root[data-theme="dark"] .lg-launch {
    --launch-bg: var(--app-bg, #181a1d);
    --launch-ink: var(--app-ink, #f6f7f9);
    --launch-muted: var(--app-muted, #bac3ce);
    --launch-accent: var(--app-primary, #73dbb6);
    --launch-track: var(--app-border, #3d434b);
  }
  .lg-launch-full {
    min-height: 100dvh; padding: max(32px, env(safe-area-inset-top)) 24px max(32px, env(safe-area-inset-bottom));
  }
  .lg-launch-inline { min-height: min(560px, 65dvh); padding: 32px 16px; }
  .lg-launch-content { display: grid; justify-items: center; width: min(100%, 344px); min-width: 0; text-align: center; }
  .lg-launch-brand { display: flex; align-items: center; justify-content: center; gap: 12px; }
  .lg-launch-brand img { display: block; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 8px; }
  .lg-launch-brand :is(h1, h2) { margin: 0; color: var(--launch-ink); font-size: 30px; font-weight: 700; line-height: 1.25; letter-spacing: 0; }
  .lg-launch-tagline { margin: 12px 0 0; color: var(--launch-muted); font-size: 14px; font-weight: 400; line-height: 1.5; }
  .lg-launch-art { display: grid; place-items: center; width: 168px; height: 168px; margin-block: 32px 24px; }
  .lg-launch-art > span { display: block; width: 100%; height: 100%; background: url("/images/lifeguard-scenes-v1.webp") 0% 0% / 300% 200% no-repeat; animation: lg-launch-float 4s ease-in-out infinite; }
  .lg-launch-message { width: 100%; min-height: 92px; }
  .lg-launch-message strong { display: block; color: var(--launch-ink); font-size: 16px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
  .lg-launch-message p { margin: 8px 0 0; color: var(--launch-muted); font-size: 14px; font-weight: 400; line-height: 1.6; overflow-wrap: anywhere; }
  .lg-launch-progress { width: min(100%, 168px); height: 3px; margin-top: 16px; border-radius: 3px; background: var(--launch-track); overflow: hidden; }
  .lg-launch-progress > span { display: block; width: 40%; height: 100%; border-radius: inherit; background: var(--launch-accent); animation: lg-launch-travel 1.8s ease-in-out infinite; }
  .lg-launch-content > button { margin-top: 20px; }
  .lg-launch[data-state="error"] .lg-launch-art > span { animation: none; }
  .lg-launch-inline .lg-launch-brand :is(h1, h2) { font-size: 24px; }
  .lg-launch-inline .lg-launch-art { width: 128px; height: 128px; margin-block: 24px 16px; }
  .lg-launch [hidden] { display: none; }
  .lg-launch-boot-retry { min-height: 44px; padding: 10px 16px; border: 1px solid var(--launch-track); border-radius: 8px; background: var(--launch-bg); color: var(--launch-ink); font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.5; cursor: pointer; }
  .lg-launch-boot-retry:focus-visible { outline: 2px solid var(--launch-accent); outline-offset: 3px; }
  @keyframes lg-launch-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-2deg); } }
  @keyframes lg-launch-travel { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }
  @media (max-height: 600px) {
    .lg-launch-full { padding-block: 24px; }
    .lg-launch-art { width: 104px; height: 104px; margin-block: 20px 16px; }
    .lg-launch-inline { min-height: 320px; }
    .lg-launch-inline .lg-launch-art { width: 96px; height: 96px; margin-block: 16px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .lg-launch-art > span, .lg-launch-progress > span { animation: none; transform: none; }
    .lg-launch-progress > span { transform: translateX(75%); }
  }
}
