/* Shared by React's error boundary and the pre-bundle startup recovery screen. */
.recovery-screen, .recovery-screen * { box-sizing: border-box; }

.recovery-screen {
  --recovery-background: #f8f8fa;
  --recovery-surface: #fff;
  --recovery-ink: #25262b;
  --recovery-muted: #6d707a;
  --recovery-border: #e9e9ee;
  --recovery-accent: #5755d9;
  --recovery-accent-hover: #4745bc;
  --recovery-icon-background: #f0effc;
  --recovery-icon-ink: #5755d9;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--recovery-background);
  color: var(--recovery-ink);
  color-scheme: light;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

html[data-theme='dark'] .recovery-screen {
  --recovery-background: #131720;
  --recovery-surface: #1b202c;
  --recovery-ink: #f1f3f8;
  --recovery-muted: #a0a9bc;
  --recovery-border: #343d50;
  --recovery-accent: #6863d7;
  --recovery-accent-hover: #5755d9;
  --recovery-icon-background: #302d4c;
  --recovery-icon-ink: #aaa6ff;
  color-scheme: dark;
}

html:has(.recovery-screen), body:has(.recovery-screen) { background: #f8f8fa; }
body:has(.recovery-screen) { margin: 0; }
html[data-theme='dark']:has(.recovery-screen),
html[data-theme='dark'] body:has(.recovery-screen) { background: #131720; color-scheme: dark; }

.recovery-screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 40px;
  border-bottom: 1px solid var(--recovery-border);
  background: var(--recovery-surface);
}

.recovery-screen-brand { display: inline-flex; flex-direction: column; min-width: 0; min-height: 44px; justify-content: center; text-decoration: none; color: var(--recovery-ink); }
.recovery-screen-brand strong { overflow-wrap: anywhere; font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.recovery-screen-brand span { color: var(--recovery-muted); font-size: 10px; font-weight: 500; letter-spacing: .15em; }
.recovery-screen-home { display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 44px; color: var(--recovery-muted); font-size: 12px; text-decoration: none; }
.recovery-screen-home:hover { color: var(--recovery-icon-ink); }
.recovery-screen-main { display: flex; flex: 1; align-items: center; justify-content: center; padding: 48px 24px; }
.recovery-screen-card { width: 100%; max-width: 480px; min-width: 0; padding: 40px; border: 1px solid var(--recovery-border); border-radius: 12px; background: var(--recovery-surface); box-shadow: 0 3px 16px #25262b05; }
.recovery-screen-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 24px; border-radius: 12px; background: var(--recovery-icon-background); color: var(--recovery-icon-ink); }
.recovery-screen-card h1 { margin: 0 0 12px; color: var(--recovery-ink); font-family: inherit; font-size: 28px; line-height: 1.25; font-weight: 500; letter-spacing: -.035em; }
.recovery-screen-card p { margin: 0; color: var(--recovery-muted); line-height: 1.7; overflow-wrap: anywhere; }
.recovery-screen-refresh { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin-top: 28px; padding: 11px 20px; border: 1px solid transparent; border-radius: 999px; background: var(--recovery-accent); color: #fff; font: inherit; font-size: 13px; font-weight: 500; line-height: 1.4; cursor: pointer; transition: background-color .15s; }
.recovery-screen-refresh:hover { background: var(--recovery-accent-hover); }
.recovery-screen-card .recovery-screen-hint { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--recovery-border); font-size: 12px; }
.recovery-screen-footer { padding: 20px 24px 28px; color: var(--recovery-muted); text-align: center; font-size: 11px; }
.recovery-screen :is(a, button):focus-visible { outline: 2px solid var(--recovery-icon-ink); outline-offset: 4px; }

@media (max-width: 600px) {
  .recovery-screen-header { gap: 16px; padding: 18px 20px; }
  .recovery-screen-main { padding: 32px 16px; }
  .recovery-screen-card { padding: 28px 24px; }
  .recovery-screen-card h1 { font-size: 26px; }
}

@media (max-width: 380px) {
  .recovery-screen-header { gap: 12px; padding: 16px; }
  .recovery-screen-home { gap: 4px; font-size: 11px; }
  .recovery-screen-card { padding: 26px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .recovery-screen-refresh { transition: none; }
}
