/* Keep the invitation optional, legible and comfortably inside the viewport. */
html { scrollbar-gutter: stable; }
html.welcome-is-open { overflow: hidden; }
.welcome-dialog:not([open]) { display: none; }
.welcome-dialog {
  width: min(640px, calc(100% - 32px));
  max-width: 640px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid #d9d7d1;
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 100px #05142360;
  overflow: hidden;
}
.welcome-dialog[open] { display: flex; flex-direction: column; }
.welcome-dialog::backdrop { background: #051423a6; backdrop-filter: blur(3px); }
.welcome-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 26px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.welcome-brand { display: flex; align-items: center; gap: 15px; }
.welcome-brand img { width: 66px; height: auto; }
.welcome-brand span { font-size: .875rem; font-weight: 500; line-height: 1.5; }
.welcome-brand small { display: block; font-size: .75rem; font-weight: 400; color: var(--muted); }
.welcome-close { display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; width: 44px; height: 44px; background: transparent; color: var(--ink); flex-shrink: 0; }
.welcome-close svg { width: 20px; height: 20px; }
.welcome-close:hover { background: #eee9e7; border-color: var(--wine); color: var(--wine); }
.welcome-content { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 26px 32px 24px; }
.welcome-content:focus-visible { outline: 2px solid var(--wine); outline-offset: -4px; }
.welcome-content .eyebrow { color: var(--wine); font-size: .75rem; margin-bottom: 15px; }
.welcome-content h2 { font-size: clamp(2.1rem, 5vw, 3.1rem); line-height: 1.08; margin: 0 0 20px; }
.welcome-content p:not(.eyebrow) { color: var(--muted); font-size: 1rem; line-height: 1.75; margin-top: 14px; }
.welcome-content .welcome-budget { padding: 14px 18px; border-left: 3px solid var(--wine); background: #f0ece8; color: var(--ink); }
.welcome-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; padding: 18px 32px; border-top: 1px solid var(--line); flex-shrink: 0; }
.welcome-actions .button { font-size: .95rem; min-height: 48px; }
.welcome-later { border: 0; background: transparent; color: var(--muted); font-size: .875rem; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; padding: 8px; }
.back-to-top { position: fixed; z-index: 40; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); width: 48px; height: 48px; border: 1px solid #bb8491; border-radius: 50%; display: grid; place-items: center; background: var(--wine); color: white; box-shadow: 0 5px 20px #06131d30; }
.back-to-top svg { width: 23px; height: 23px; }
.back-to-top:hover { background: var(--wine-dark); }
@media (prefers-reduced-motion: no-preference) {
  .welcome-dialog[open] { animation: welcome-arrive .45s cubic-bezier(.2,.75,.2,1) both; }
  .welcome-dialog[open]::backdrop { animation: welcome-shade .3s ease both; }
  @keyframes welcome-arrive { from { opacity: 0; transform: translateY(-44px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes welcome-shade { from { opacity: 0; } to { opacity: 1; } }
}
@media (max-width: 700px) {
  .welcome-header { padding: 15px 20px; }
  .welcome-content { padding: 23px 24px; }
  .welcome-actions { padding: 16px 24px; }
  .welcome-brand img { width: 56px; }
  .welcome-budget { padding: 12px 15px; }
}
@media (max-width: 380px) {
  .welcome-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
  .welcome-header, .welcome-content, .welcome-actions { padding-inline: 18px; }
  .welcome-brand span { font-size: .8rem; }
  .welcome-content h2 { font-size: 2.05rem; }
  .welcome-actions { gap: 8px; }
  .welcome-actions .button { width: 100%; }
  .back-to-top { right: 14px; bottom: 14px; }
}
