﻿:root {
    --cream: #FDF6EC;
    --rose: #C4887A;
    --rose-light: #F0DDD7;
    --rose-deep: #9E5E52;
    --gold: #C9A96E;
    --gold-light: #F5EDD6;
    --sage: #8FAF8A;
    --sage-light: #E2EDDF;
    --brown: #3D2B1F;
    --brown-mid: #6B4C3B;
    --brown-light: #A07860;
    --white: #FFFFFF;
    --critical: #C4887A;
    --save: #8FAF8A;
    --forgotten: #C9A96E;
    --border: rgba(61,43,31,0.12);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: 'Nunito', sans-serif;
    background: var(--cream);
    color: var(--brown);
    min-height: 100vh;
    margin: 0;
  }
  body.modal-open {
    overflow: hidden;
  }
  #app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--cream);
  }
  .hidden { display: none !important; }
  .app-shell { min-height: 100vh; }

  .gate-root {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background:
      radial-gradient(circle at top right, rgba(201,169,110,0.18), transparent 30%),
      radial-gradient(circle at bottom left, rgba(143,175,138,0.16), transparent 25%),
      linear-gradient(180deg, #F9F1E6 0%, #FDF6EC 100%);
    padding: 1.5rem;
  }
  .gate-screen {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .gate-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(61,43,31,0.08);
    border-radius: 28px;
    box-shadow: 0 14px 48px rgba(61,43,31,0.1);
    padding: 2rem 1.5rem;
  }
  .gate-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 28px;
    border-radius: 999px;
    background: var(--gold-light);
    color: var(--brown);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
  }
  .gate-card h1 {
    font-family: 'Cormorant Garant', serif;
    font-size: 2.3rem;
    line-height: 0.95;
    margin-bottom: 0.75rem;
  }
  .gate-copy {
    font-size: 0.94rem;
    line-height: 1.6;
    color: var(--brown-mid);
    margin-bottom: 1.25rem;
  }
  .gate-note {
    margin-top: 1rem;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--brown-light);
  }
  .gate-device-meta {
    margin: -0.2rem 0 1rem;
    font-size: 0.78rem;
    color: var(--brown-light);
  }
  .gate-message {
    min-height: 1.25rem;
    margin-top: 0.85rem;
    font-size: 0.82rem;
    color: var(--rose-deep);
  }
  .gate-email {
    margin-top: -0.2rem;
    margin-bottom: 1rem;
    font-size: 0.84rem;
    color: var(--brown);
    font-weight: 600;
  }
  .login-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  .login-label {
    font-size: 10px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--brown-light);
    font-weight: 700;
  }
  .login-input {
    width: 100%;
    border: 1.5px solid rgba(61,43,31,0.12);
    border-radius: 14px;
    background: var(--white);
    color: var(--brown);
    font: inherit;
    padding: 0.95rem 1rem;
  }
  .login-input:focus {
    outline: none;
    border-color: var(--rose);
    box-shadow: 0 0 0 4px rgba(196,136,122,0.12);
  }
  .gate-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  .gate-primary-btn,
  .gate-secondary-btn,
  .account-signout-btn {
    border: none;
    border-radius: 14px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  }
  .gate-primary-btn {
    background: var(--rose);
    color: var(--white);
    padding: 0.95rem 1rem;
    box-shadow: 0 10px 24px rgba(196,136,122,0.24);
  }
  .gate-secondary-btn,
  .account-signout-btn {
    background: var(--white);
    color: var(--brown);
    border: 1.5px solid rgba(61,43,31,0.1);
    padding: 0.85rem 1rem;
  }
  .gate-primary-btn:active,
  .gate-secondary-btn:active,
  .account-signout-btn:active {
    transform: translateY(1px);
  }
  .gate-primary-btn:disabled,
  .gate-secondary-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
  }
  .gate-spinner {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 4px solid rgba(196,136,122,0.16);
    border-top-color: var(--rose);
    animation: gate-spin 1s linear infinite;
    margin: 1rem 0 0.2rem;
  }
  @keyframes gate-spin {
    to { transform: rotate(360deg); }
  }
  .account-bar {
    max-width: 480px;
    margin: 0 auto;
    padding: 0.9rem 1.25rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }
  .account-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }
  .account-email {
    font-size: 0.8rem;
    color: var(--brown);
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .account-signout-btn {
    flex-shrink: 0;
    font-size: 0.78rem;
  }
  .sync-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    color: var(--brown-mid);
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(61,43,31,0.08);
    border-radius: 999px;
    padding: 0.38rem 0.7rem;
    width: fit-content;
    max-width: 100%;
  }
  .sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
  }
  .sync-pill[data-state="saving"] .sync-dot { background: var(--gold); }
  .sync-pill[data-state="synced"] .sync-dot { background: var(--sage); }
  .sync-pill[data-state="trial"] .sync-dot { background: var(--sage); }
  .sync-pill[data-state="demo"] .sync-dot { background: var(--gold); }
  .sync-pill[data-state="offline"] .sync-dot,
  .sync-pill[data-state="error"] .sync-dot { background: var(--rose); }

  .demo-banner {
    max-width: 480px;
    margin: 0.85rem auto 0;
    padding: 0 1.25rem;
    display: flex;
    align-items: stretch;
    gap: 0.9rem;
  }
  .demo-banner.hidden { display: none; }
  .demo-banner-copy {
    flex: 1;
    min-width: 0;
    background: linear-gradient(135deg, #FFF8EE, #F5EDD6);
    border: 1px solid rgba(61,43,31,0.08);
    border-radius: 18px;
    padding: 0.95rem 1rem;
    box-shadow: 0 2px 10px rgba(61,43,31,0.05);
  }
  .demo-banner-top {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.45rem;
    flex-wrap: wrap;
  }
  .demo-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    border-radius: 999px;
    background: var(--rose-light);
    color: var(--rose-deep);
    padding: 0 0.7rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
  }
  .demo-banner-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brown);
  }
  .demo-banner-copy p {
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--brown-mid);
  }
  .demo-inline-cta {
    display: flex;
    flex-direction: column;
    margin-top: 0.85rem;
  }
  .demo-banner-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 18px;
    background: var(--rose);
    color: var(--white);
    padding: 0.95rem 1rem;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(196,136,122,0.22);
  }
  .demo-banner-side-card {
    width: 132px;
    min-height: 132px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    border: none;
    border-radius: 18px;
    background: linear-gradient(150deg, var(--rose), var(--rose-deep));
    color: var(--white);
    box-shadow: 0 10px 24px rgba(158,94,82,0.24);
    padding: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.35;
    cursor: pointer;
  }
  .demo-banner-btn:disabled,
  .demo-banner-side-card:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
  }

  @media (min-width: 640px) {
    .gate-root {
      padding: 2rem;
    }
    .gate-card {
      padding: 2.4rem 2rem;
    }
  }

  /* ── ONBOARDING ── */
  .onboarding-overlay {
    position: fixed; inset: 0;
    background: linear-gradient(160deg, #F5EDD6 0%, #F0DDD7 50%, #E2EDDF 100%);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 2rem 1.5rem;
    overflow-y: auto;
  }
  .onboarding-overlay.hidden { display: none; }
  .onboarding-card {
    background: var(--white);
    border-radius: 24px;
    padding: 2rem 1.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 40px rgba(61,43,31,0.12);
  }
  .onboarding-emoji { font-size: 2.5rem; text-align: center; margin-bottom: 0.75rem; }
  .onboarding-title {
    font-family: 'Cormorant Garant', serif;
    font-size: 2rem; font-weight: 600;
    text-align: center; color: var(--brown);
    margin-bottom: 0.35rem;
  }
  .onboarding-subtitle {
    font-size: 0.82rem; color: var(--brown-light);
    text-align: center; margin-bottom: 1.5rem; line-height: 1.55;
  }
  .onboarding-field { margin-bottom: 1.25rem; }
  .onboarding-field label {
    display: block; font-size: 10px; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--brown-light);
    margin-bottom: 6px; font-weight: 600;
  }
  .onboarding-field input[type="date"] {
    width: 100%; padding: 12px 14px;
    border: 1.5px solid var(--gold); border-radius: 12px;
    font-family: 'Nunito', sans-serif; font-size: 1rem;
    color: var(--brown); background: var(--white); text-align: center;
  }
  .mode-options { display: flex; flex-direction: column; gap: 8px; }
  .mode-btn {
    padding: 12px 14px; border-radius: 12px;
    border: 1.5px solid var(--border); background: var(--white);
    font-family: 'Nunito', sans-serif; font-size: 0.875rem;
    color: var(--brown-mid); cursor: pointer; text-align: left;
    transition: all 0.2s;
  }
  .mode-btn.selected { border-color: var(--rose); background: var(--rose-light); color: var(--rose-deep); }
  .mode-btn strong { display: block; font-size: 0.9rem; margin-bottom: 2px; }
  .mode-btn span { font-size: 0.75rem; color: var(--brown-light); }
  .mode-btn.selected span { color: var(--rose-deep); opacity: 0.8; }
  .onboarding-start-btn {
    width: 100%; padding: 14px;
    background: var(--rose); color: white;
    border: none; border-radius: 14px;
    font-family: 'Nunito', sans-serif; font-size: 1rem; font-weight: 600;
    cursor: pointer; margin-top: 1.5rem; transition: background 0.2s;
  }
  .onboarding-start-btn:active { background: var(--rose-deep); }

  /* ── COVER ── */
  .cover {
    background: linear-gradient(160deg, #F5EDD6 0%, #F0DDD7 50%, #E2EDDF 100%);
    padding: 2.5rem 2rem 1.5rem;
    text-align: center; position: relative; overflow: hidden;
  }
  .cover::before {
    content: ''; position: absolute; top: -60px; right: -60px;
    width: 200px; height: 200px; border-radius: 50%;
    background: rgba(201,169,110,0.15);
  }
  .cover::after {
    content: ''; position: absolute; bottom: -40px; left: -40px;
    width: 150px; height: 150px; border-radius: 50%;
    background: rgba(196,136,122,0.1);
  }
  .cover h1 {
    font-family: 'Cormorant Garant', serif;
    font-size: 3rem; font-weight: 600; color: var(--brown);
    line-height: 1; margin-bottom: 0.3rem;
  }
  .cover-sub {
    font-family: 'Cormorant Garant', serif;
    font-size: 1.1rem; font-style: italic;
    color: var(--brown-mid); margin-bottom: 1rem;
  }
  .cover-promise {
    background: var(--white); border-radius: 16px;
    padding: 1rem 1.25rem; font-size: 0.82rem;
    color: var(--brown-mid); line-height: 1.6;
    margin-bottom: 1rem; position: relative; z-index: 1;
  }
  .cover-promise strong { color: var(--rose-deep); font-weight: 600; }
  .change-mode-link {
    font-size: 0.75rem; color: var(--brown-light);
    text-decoration: underline; cursor: pointer;
    background: none; border: none;
    font-family: 'Nunito', sans-serif; padding: 0;
    position: relative; z-index: 1;
  }

  /* ── DAYS BANNER ── */
  .days-banner {
    margin: 0.75rem 1.25rem 0;
    background: var(--white); border-radius: 14px;
    padding: 0.875rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between;
    box-shadow: 0 2px 8px rgba(61,43,31,0.06);
  }
  .days-left-wrap { display: flex; align-items: baseline; gap: 6px; }
  .days-count {
    font-family: 'Cormorant Garant', serif;
    font-size: 2.2rem; font-weight: 600; color: var(--rose-deep);
    line-height: 1;
  }
  .days-word { font-size: 0.82rem; color: var(--brown-light); }
  .days-date { font-size: 0.72rem; color: var(--brown-light); margin-top: 2px; }

  /* ── PROGRESS ── */
  .progress-overview {
    background: var(--white); border-radius: 16px;
    padding: 1rem 1.25rem; margin: 0.75rem 1.25rem;
    display: flex; align-items: center; gap: 16px;
    box-shadow: 0 2px 12px rgba(61,43,31,0.06);
  }
  .progress-ring-wrap { flex-shrink: 0; position: relative; width: 56px; height: 56px; }
  .progress-ring-wrap svg { transform: rotate(-90deg); }
  .progress-ring-pct {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 600; color: var(--rose-deep);
  }
  .progress-text { flex: 1; }
  .progress-text h3 { font-size: 0.9rem; font-weight: 600; color: var(--brown); }
  .progress-text p { font-size: 0.78rem; color: var(--brown-light); margin-top: 2px; }
  .stage-progress-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
  .stage-progress-label { font-size: 0.7rem; color: var(--brown-light); white-space: nowrap; }
  .stage-progress-bar {
    flex: 1; height: 4px; background: var(--rose-light);
    border-radius: 2px; overflow: hidden;
  }
  .stage-progress-fill {
    height: 100%; background: var(--rose);
    border-radius: 2px; transition: width 0.3s;
  }

  /* ── COMPLETION BANNER ── */
  .completion-banner {
    margin: 0.5rem 1.25rem;
    background: linear-gradient(135deg, #E2EDDF, #D4EDD0);
    border-radius: 14px; padding: 1rem 1.25rem; text-align: center;
  }
  .completion-banner h3 {
    font-family: 'Cormorant Garant', serif;
    font-size: 1.2rem; color: #3B6B36; margin-bottom: 3px;
  }
  .completion-banner p { font-size: 0.8rem; color: #5C8A57; }
  .completion-banner.hidden { display: none; }

  /* ── FOCUS BLOCK ── */
  .focus-block {
    margin: 0.5rem 1.25rem;
    background: var(--white); border-radius: 16px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 12px rgba(61,43,31,0.06);
  }
  .focus-block.hidden { display: none; }
  .focus-header {
    display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 0.75rem;
  }
  .focus-title {
    font-family: 'Cormorant Garant', serif;
    font-size: 1.1rem; font-weight: 600; color: var(--brown);
  }
  .focus-count {
    font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
    background: var(--rose-light); color: var(--rose-deep);
    padding: 2px 8px; border-radius: 20px;
  }
  .focus-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 7px 0; border-bottom: 1px solid rgba(61,43,31,0.06);
    cursor: pointer;
  }
  .focus-item:last-child { border-bottom: none; }
  .focus-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--gold); margin-top: 5px; flex-shrink: 0;
  }
  .focus-dot.critical { background: var(--rose); }
  .focus-item-text { font-size: 0.82rem; color: var(--brown); line-height: 1.4; }
  .focus-item-stage { font-size: 0.7rem; color: var(--brown-light); margin-top: 1px; }

  /* ── PERSISTENCE HINT ── */
  .persistence-hint {
    margin: 0.25rem 1.25rem 0;
    font-size: 0.72rem; color: var(--brown-light);
    display: flex; align-items: center; gap: 5px;
  }
  .hint-link {
    color: var(--rose-deep); text-decoration: underline; cursor: pointer;
    background: none; border: none; font-family: 'Nunito', sans-serif;
    font-size: 0.72rem; padding: 0;
  }

  /* ── TABS ── */
  nav.tabs {
    display: flex; overflow-x: auto; scrollbar-width: none;
    border-bottom: 1px solid var(--border); background: var(--white);
    position: sticky; top: 0; z-index: 100; margin-top: 0.75rem;
  }
  nav.tabs::-webkit-scrollbar { display: none; }
  .tab-btn {
    flex-shrink: 0; padding: 12px 16px;
    font-family: 'Nunito', sans-serif; font-size: 12px; font-weight: 600;
    color: var(--brown-light); background: none; border: none;
    border-bottom: 2.5px solid transparent; cursor: pointer;
    white-space: nowrap; letter-spacing: 0.3px; transition: all 0.2s;
  }
  .tab-btn.active { color: var(--rose-deep); border-bottom-color: var(--rose); }
  .tab-icon { margin-right: 5px; font-size: 13px; }
  .section { display: none; padding: 1.25rem 1.25rem 6rem; }
  .section.active { display: block; }

  /* ── CHECKLIST SECTION ── */
  .urgent-mode-banner {
    background: linear-gradient(135deg, var(--rose), var(--rose-deep));
    border-radius: 14px; padding: 1rem 1.25rem;
    margin-bottom: 1rem; color: white;
  }
  .urgent-mode-banner strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }
  .urgent-mode-banner p { font-size: 0.8rem; opacity: 0.9; line-height: 1.5; }

  .helper-shortcuts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 0 0 1rem;
  }
  .helper-shortcut {
    border: 1px solid rgba(61,43,31,0.08);
    background: var(--white);
    border-radius: 16px;
    padding: 0.95rem 1rem;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(61,43,31,0.05);
  }
  .helper-shortcut-title {
    display: block;
    font-family: 'Cormorant Garant', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--brown);
    margin-bottom: 0.2rem;
  }
  .helper-shortcut-copy {
    display: block;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--brown-light);
  }

  .urgent-priority-block {
    background: linear-gradient(135deg, #FFF8EE, #F8ECE8);
    border: 1px solid rgba(61,43,31,0.08);
    border-radius: 18px;
    padding: 1rem;
    margin: 0 0 1rem;
    box-shadow: 0 2px 10px rgba(61,43,31,0.05);
  }
  .urgent-priority-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }
  .urgent-priority-title {
    font-family: 'Cormorant Garant', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--brown);
  }
  .urgent-priority-subtitle {
    margin-top: 0.2rem;
    font-size: 0.76rem;
    line-height: 1.5;
    color: var(--brown-light);
  }
  .urgent-priority-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 0.65rem;
    border-radius: 999px;
    background: var(--white);
    color: var(--rose-deep);
    font-size: 0.78rem;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(61,43,31,0.08);
  }
  .urgent-priority-list {
    display: flex;
    flex-direction: column;
  }
  .urgent-priority-item {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0.75rem 0;
    border: none;
    border-bottom: 1px solid rgba(61,43,31,0.06);
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
  }
  .urgent-priority-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  .urgent-priority-item:first-child {
    padding-top: 0;
  }
  .urgent-priority-item.done {
    opacity: 0.45;
  }
  .urgent-priority-item.done .checkbox {
    background: var(--rose);
    border-color: var(--rose);
  }
  .urgent-priority-item.done .checkbox-tick {
    display: block;
  }
  .urgent-priority-item.done .urgent-priority-text {
    text-decoration: line-through;
  }
  .urgent-priority-content {
    min-width: 0;
  }
  .urgent-priority-stage {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0.2rem;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--brown-light);
  }
  .urgent-priority-text {
    font-size: 0.84rem;
    line-height: 1.45;
    color: var(--brown);
  }
  .urgent-priority-empty {
    font-size: 0.8rem;
    color: var(--brown-light);
    line-height: 1.5;
  }

  .stage-nav {
    display: flex; overflow-x: auto; scrollbar-width: none;
    gap: 6px; padding-bottom: 10px; margin-bottom: 0.75rem;
  }
  .stage-nav::-webkit-scrollbar { display: none; }
  .stage-nav-btn {
    flex-shrink: 0; padding: 5px 11px;
    border-radius: 20px; border: 1.5px solid var(--border);
    background: var(--white); font-family: 'Nunito', sans-serif;
    font-size: 11px; font-weight: 500; color: var(--brown-light);
    cursor: pointer; white-space: nowrap; transition: all 0.2s;
  }
  .stage-nav-btn.current {
    background: var(--rose-light); border-color: var(--rose);
    color: var(--rose-deep); font-weight: 700;
  }

  .stage-block { margin-bottom: 1.5rem; scroll-margin-top: 56px; }
  .stage-block.hidden-by-urgent { display: none; }
  .stage-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 0.75rem; cursor: pointer; user-select: none;
    flex-wrap: wrap;
  }
  .stage-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--rose); flex-shrink: 0;
  }
  .stage-title {
    font-family: 'Cormorant Garant', serif;
    font-size: 1.25rem; font-weight: 600; color: var(--brown); flex: 1;
  }
  .stage-count {
    font-size: 11px; color: var(--brown-light);
    background: var(--rose-light); padding: 2px 8px;
    border-radius: 20px; font-weight: 500;
  }
  .stage-filter-note {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: var(--gold-light);
    color: var(--brown-mid);
    padding: 3px 8px;
    border-radius: 999px;
    flex-shrink: 0;
  }
  .stage-badge {
    font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
    text-transform: uppercase; background: var(--rose);
    color: white; padding: 2px 7px; border-radius: 10px; flex-shrink: 0;
  }
  .stage-toggle {
    font-size: 11px; color: var(--brown-light);
    flex-shrink: 0; transition: transform 0.25s;
  }
  .stage-toggle.open { transform: rotate(0deg); }
  .stage-toggle.closed { transform: rotate(-90deg); }

  .stage-items {
    border-left: 2px solid var(--rose-light);
    padding-left: 16px; margin-left: 4px;
    overflow: hidden;
    transition: opacity 0.2s;
  }
  .stage-items.collapsed { display: none; }

  .check-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid rgba(61,43,31,0.06);
    cursor: pointer; transition: opacity 0.2s;
  }
  .check-item:last-child { border-bottom: none; }
  .check-item.done { opacity: 0.45; }
  .check-item.done .item-text { text-decoration: line-through; }
  .checkbox {
    width: 20px; height: 20px; border-radius: 6px;
    border: 1.5px solid var(--border); background: var(--white);
    flex-shrink: 0; margin-top: 1px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
  }
  .check-item.done .checkbox { background: var(--rose); border-color: var(--rose); }
  .checkbox-tick {
    display: none; width: 11px; height: 11px;
    fill: none; stroke: white; stroke-width: 2.5;
    stroke-linecap: round; stroke-linejoin: round;
  }
  .check-item.done .checkbox-tick { display: block; }
  .item-text { font-size: 0.875rem; line-height: 1.4; color: var(--brown); }
  .item-tag {
    display: inline-block; font-size: 9px; font-weight: 700;
    letter-spacing: 0.8px; text-transform: uppercase;
    padding: 2px 6px; border-radius: 4px;
    margin-left: 6px; vertical-align: middle;
  }
  .tag-critical { background: #FAEAEA; color: #C4887A; }
  .tag-save { background: #E7F0E6; color: #5C8A57; }
  .tag-forgotten { background: #FBF2E0; color: #9A7534; }
  .legend {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 1rem; padding: 10px 12px;
    background: var(--white); border-radius: 10px; font-size: 11px;
  }
  .legend-item { display: flex; align-items: center; gap: 4px; }
  .legend-dot { width: 8px; height: 8px; border-radius: 2px; }

  /* ── BUDGET ── */
  section.budget h2, section.vendors h2, section.guests h2, section.timeline h2, section.extras h2 {
    font-family: 'Cormorant Garant', serif; font-size: 1.5rem;
    font-weight: 600; color: var(--brown); margin-bottom: 1rem;
  }
  .budget-total {
    background: linear-gradient(135deg, #F5EDD6, #F0DDD7);
    border-radius: 16px; padding: 1.25rem;
    margin-bottom: 1.25rem; text-align: center;
  }
  .budget-total label {
    display: block; font-size: 11px; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--brown-light); margin-bottom: 4px;
  }
  .budget-total .amount {
    font-family: 'Cormorant Garant', serif;
    font-size: 2rem; font-weight: 600; color: var(--brown);
  }
  .budget-total .diff { font-size: 0.8rem; margin-top: 4px; }
  .diff.over { color: #C4887A; }
  .diff.under { color: #5C8A57; }
  .budget-row {
    display: grid; grid-template-columns: 1fr 90px 90px 70px;
    gap: 6px; align-items: center; padding: 8px 0;
    border-bottom: 1px solid rgba(61,43,31,0.07); font-size: 0.8rem;
  }
  .budget-row.header {
    font-size: 10px; font-weight: 600; letter-spacing: 0.8px;
    text-transform: uppercase; color: var(--brown-light); padding-bottom: 6px;
  }
  .budget-row input[type="number"] {
    width: 100%; padding: 6px 8px; border: 1.5px solid var(--border);
    border-radius: 8px; font-family: 'Nunito', sans-serif;
    font-size: 0.8rem; color: var(--brown);
    background: var(--white); text-align: right;
  }
  .budget-row input[type="number"]:focus { outline: none; border-color: var(--rose); }
  .budget-cat { font-size: 0.82rem; font-weight: 500; }
  .diff-cell { text-align: right; font-weight: 600; }
  .diff-cell.neg { color: var(--rose-deep); }
  .diff-cell.pos { color: var(--sage); }

  /* ── VENDORS ── */
  .vendor-card {
    background: var(--white); border-radius: 14px;
    padding: 1rem; margin-bottom: 10px; border: 1px solid var(--border);
  }
  .vendor-card-header {
    display: flex; align-items: center;
    justify-content: space-between; margin-bottom: 10px;
  }
  .vendor-type {
    font-size: 11px; font-weight: 700; letter-spacing: 1px;
    text-transform: uppercase; color: var(--rose-deep);
    background: var(--rose-light); padding: 3px 10px; border-radius: 20px;
  }
  .vendor-status {
    display: flex; align-items: center; gap: 5px;
    font-size: 11px; color: var(--brown-light);
  }
  .status-dot { width: 7px; height: 7px; border-radius: 50%; }
  .status-dot.confirmed { background: var(--sage); }
  .status-dot.pending { background: var(--gold); }
  .vendor-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .vendor-field label {
    display: block; font-size: 10px; letter-spacing: 0.8px;
    text-transform: uppercase; color: var(--brown-light); margin-bottom: 3px;
  }
  .vendor-field input {
    width: 100%; padding: 7px 10px; border: 1.5px solid var(--border);
    border-radius: 8px; font-family: 'Nunito', sans-serif;
    font-size: 0.8rem; color: var(--brown); background: var(--cream);
  }
  .vendor-field input:focus { outline: none; border-color: var(--rose); background: var(--white); }
  .contract-toggle {
    display: flex; align-items: center; gap: 8px;
    margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border);
    font-size: 0.82rem; color: var(--brown-mid); cursor: pointer;
  }
  .toggle-btn {
    width: 36px; height: 20px; background: var(--border);
    border-radius: 10px; position: relative;
    transition: background 0.2s; cursor: pointer; border: none; flex-shrink: 0;
  }
  .toggle-btn.on { background: var(--sage); }
  .toggle-btn::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 16px; height: 16px; background: white;
    border-radius: 50%; transition: transform 0.2s;
  }
  .toggle-btn.on::after { transform: translateX(16px); }

  /* ── GUESTS ── */
  .guest-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 1rem;
  }
  .guest-summary-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.95rem 1rem;
  }
  .guest-summary-card strong {
    display: block;
    margin-top: 4px;
    font-family: 'Cormorant Garant', serif;
    font-size: 1.6rem;
    color: var(--brown);
  }
  .guest-summary-card-wide { grid-column: 1 / -1; }
  .guest-summary-label {
    display: block;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--brown-light);
    font-weight: 700;
  }
  .guest-toolbar { margin-bottom: 0.9rem; }
  .guest-filters {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .guest-filters::-webkit-scrollbar { display: none; }
  .guest-filter-btn {
    flex-shrink: 0;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    background: var(--white);
    color: var(--brown-mid);
    padding: 0.55rem 0.9rem;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
  }
  .guest-filter-btn.active {
    background: var(--rose-light);
    color: var(--rose-deep);
    border-color: rgba(196,136,122,0.5);
  }
  .guest-form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1rem;
  }
  .guest-form-header {
    margin-bottom: 0.85rem;
  }
  .guest-form-card h3 {
    font-family: 'Cormorant Garant', serif;
    font-size: 1.2rem;
    color: var(--brown);
    margin-bottom: 0.25rem;
  }
  .guest-form-hint {
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--brown-light);
  }
  .guest-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 0.9rem;
  }
  .guest-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .guest-field-wide { grid-column: 1 / -1; }
  .guest-field span {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--brown-light);
    font-weight: 700;
  }
  .guest-field input,
  .guest-field select,
  .guest-field textarea {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--cream);
    color: var(--brown);
    font: inherit;
    padding: 0.75rem 0.85rem;
  }
  .guest-field textarea { resize: vertical; min-height: 88px; }
  .guest-field input:focus,
  .guest-field select:focus,
  .guest-field textarea:focus {
    outline: none;
    border-color: var(--rose);
    background: var(--white);
  }
  .guest-field input:disabled,
  .guest-field select:disabled,
  .guest-field textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #F3EAE5;
  }
  .guest-form-actions {
    display: flex;
    gap: 8px;
  }
  .guest-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .guest-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.95rem 1rem;
  }
  .guest-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0.55rem;
  }
  .guest-card-name {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--brown);
  }
  .guest-card-meta {
    margin-top: 3px;
    font-size: 0.76rem;
    color: var(--brown-light);
    line-height: 1.45;
  }
  .guest-card-note {
    font-size: 0.82rem;
    color: var(--brown-mid);
    line-height: 1.55;
  }
  .guest-card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
  }
  .guest-card-btn {
    border: none;
    border-radius: 10px;
    background: var(--gold-light);
    color: var(--brown-mid);
    padding: 0.45rem 0.75rem;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 800;
    cursor: pointer;
  }
  .guest-card-btn.danger {
    background: #FAEAEA;
    color: var(--rose-deep);
  }

  /* ── TIMELINE ── */
  .timeline-slot {
    display: flex; gap: 12px; padding: 8px 0;
    border-bottom: 1px solid rgba(61,43,31,0.07);
  }
  .time-label {
    font-family: 'Cormorant Garant', serif; font-size: 1.1rem;
    font-weight: 600; color: var(--rose-deep);
    min-width: 55px; flex-shrink: 0;
  }
  .time-input {
    flex: 1; padding: 6px 10px; border: 1.5px solid var(--border);
    border-radius: 8px; font-family: 'Nunito', sans-serif;
    font-size: 0.8rem; color: var(--brown); background: var(--white);
  }
  .time-input::placeholder { color: var(--brown-light); opacity: 0.7; }
  .time-input:focus { outline: none; border-color: var(--rose); }
  .hints-block {
    background: var(--gold-light); border-radius: 12px;
    padding: 1rem; margin-bottom: 1.25rem;
    font-size: 0.8rem; line-height: 1.6; color: var(--brown-mid);
  }
  .hints-block .hint-title {
    font-weight: 600; color: var(--brown);
    margin-bottom: 6px; font-size: 0.85rem;
  }
  .hints-block ul { padding-left: 14px; }
  .hints-block ul li { margin-bottom: 3px; }

  /* ── EXTRAS ── */
  .extras-section-title {
    font-family: 'Cormorant Garant', serif; font-size: 1.2rem;
    font-weight: 600; color: var(--brown); margin-bottom: 0.75rem;
    border-bottom: 1.5px solid var(--rose-light); padding-bottom: 6px;
  }
  .section-intro {
    font-size: 0.82rem; color: var(--brown-light);
    margin-bottom: 1rem; line-height: 1.6;
  }
  .bag-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
  }
  .bag-section {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }
  .bag-section-title {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--brown-mid);
  }
  .bag-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .bag-item {
    display: flex; align-items: center; gap: 8px;
    background: var(--white); border-radius: 10px;
    padding: 8px 10px; border: 1px solid var(--border);
    cursor: pointer; font-size: 0.8rem; transition: all 0.2s;
  }
  .bag-item.done { opacity: 0.5; }
  .bag-item.done .item-text { text-decoration: line-through; }
  .bag-item .checkbox { width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0; margin-top: 0; }
  .qs-block { margin-bottom: 1.5rem; }
  .qs-block h3 {
    font-family: 'Cormorant Garant', serif; font-size: 1.15rem;
    font-weight: 600; color: var(--brown); margin-bottom: 0.6rem;
    padding-bottom: 6px; border-bottom: 1.5px solid var(--rose-light);
  }
  .qs-block .q-item {
    padding: 6px 0; font-size: 0.82rem; color: var(--brown-mid);
    border-bottom: 1px dashed rgba(61,43,31,0.08); line-height: 1.4;
  }
  .qs-block .q-item:last-child { border-bottom: none; }
  .antistress-block {
    background: var(--white); border-radius: 14px;
    padding: 1.25rem; margin-bottom: 1rem; border-left: 4px solid var(--rose);
  }
  .antistress-block h3 {
    font-family: 'Cormorant Garant', serif; font-size: 1.1rem;
    font-weight: 600; color: var(--brown); margin-bottom: 0.6rem;
  }
  .antistress-block p { font-size: 0.82rem; color: var(--brown-mid); line-height: 1.6; }
  .planb-item {
    display: flex; gap: 10px; padding: 8px 0;
    font-size: 0.82rem; border-bottom: 1px solid rgba(61,43,31,0.07);
    color: var(--brown-mid); line-height: 1.4;
  }
  .planb-item:last-child { border-bottom: none; }
  .planb-emoji { flex-shrink: 0; width: 20px; text-align: center; }
  .motiv-card {
    background: linear-gradient(135deg, #F5EDD6, #F0DDD7);
    border-radius: 16px; padding: 1.5rem; text-align: center; margin-top: 1rem;
  }
  .motiv-card p {
    font-family: 'Cormorant Garant', serif; font-size: 1.1rem;
    font-style: italic; color: var(--brown); line-height: 1.6;
  }
  .motiv-card .motiv-sig {
    margin-top: 10px; font-size: 0.78rem;
    color: var(--brown-light); font-style: normal; letter-spacing: 0.5px;
  }

  /* ── DEVICE MANAGER ── */
  .device-manager-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(61,43,31,0.05);
  }
  .device-manager-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 0.9rem;
  }
  .device-manager-stat {
    background: linear-gradient(135deg, #F5EDD6, #F0DDD7);
    border-radius: 12px;
    padding: 0.9rem 1rem;
  }
  .device-manager-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--brown-light);
    margin-bottom: 4px;
    font-weight: 700;
  }
  .device-manager-stat strong {
    font-family: 'Cormorant Garant', serif;
    font-size: 1.5rem;
    color: var(--brown);
  }
  .device-manager-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0.85rem;
  }
  .device-manager-message {
    min-height: 1rem;
    font-size: 0.78rem;
    color: var(--rose-deep);
  }
  .device-manager-note {
    font-size: 0.76rem;
    color: var(--brown-light);
    margin-top: 0.65rem;
    line-height: 1.5;
  }
  .device-invite-card {
    background: var(--cream);
    border: 1px dashed rgba(61,43,31,0.15);
    border-radius: 14px;
    padding: 0.9rem;
    margin-bottom: 0.9rem;
  }
  .device-invite-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0.75rem;
  }
  .device-invite-expiry {
    font-size: 0.78rem;
    color: var(--brown-mid);
  }
  .device-invite-badge,
  .device-current-pill,
  .device-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 700;
  }
  .device-invite-badge {
    background: var(--rose-light);
    color: var(--rose-deep);
  }
  .device-current-pill {
    background: var(--sage-light);
    color: #3B6B36;
  }
  .device-badge.current {
    background: var(--sage-light);
    color: #3B6B36;
  }
  .device-badge.revoked {
    background: #FAEAEA;
    color: var(--rose-deep);
  }
  .device-invite-actions {
    display: flex;
    gap: 8px;
  }
  .device-list-wrap {
    margin-top: 0.75rem;
  }
  .device-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 0.6rem;
    font-size: 0.82rem;
    color: var(--brown);
    font-weight: 700;
  }
  .device-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .device-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.8rem 0.9rem;
  }
  .device-row-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .device-row-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--brown);
  }
  .device-row-sub {
    font-size: 0.76rem;
    color: var(--brown-light);
    line-height: 1.5;
  }
  .device-row-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
  }
  .device-row-remove {
    border: none;
    background: #FAEAEA;
    color: var(--rose-deep);
    border-radius: 10px;
    padding: 0.45rem 0.7rem;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
  }
  .device-row-remove:disabled,
  .export-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
  }

  /* ── FORGOTTEN BLOCK ── */
  .forgotten-items {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    margin-bottom: 1.25rem;
  }
  .forgotten-item {
    background: var(--gold-light); border-radius: 10px;
    padding: 9px 10px; font-size: 0.78rem; color: var(--brown-mid);
    display: flex; align-items: center; gap: 7px; line-height: 1.3;
  }
  .fi-icon { font-size: 1.1rem; flex-shrink: 0; }

  /* ── FAQ ── */
  .faq-item { border-bottom: 1px solid var(--border); }
  .faq-question {
    padding: 12px 0; font-size: 0.85rem; font-weight: 600;
    color: var(--brown); cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
  }
  .faq-answer {
    font-size: 0.8rem; color: var(--brown-mid);
    line-height: 1.6; padding-bottom: 12px; display: none;
  }
  .faq-answer.open { display: block; }
  .faq-chevron { font-size: 11px; color: var(--brown-light); transition: transform 0.2s; }
  .faq-chevron.open { transform: rotate(180deg); }

  /* ── EXPORT BLOCK ── */
  .export-block {
    background: var(--white); border-radius: 14px;
    padding: 1.25rem; margin-bottom: 1rem; border: 1px solid var(--border);
  }
  .export-block h3 {
    font-family: 'Cormorant Garant', serif; font-size: 1.15rem;
    font-weight: 600; color: var(--brown); margin-bottom: 0.4rem;
  }
  .export-block p { font-size: 0.78rem; color: var(--brown-light); margin-bottom: 0.75rem; line-height: 1.5; }
  .export-btns { display: flex; gap: 8px; }
  .export-btn {
    flex: 1; padding: 10px; border-radius: 10px; border: none;
    font-family: 'Nunito', sans-serif; font-size: 0.8rem;
    font-weight: 600; cursor: pointer; transition: opacity 0.2s;
  }
  .export-btn.copy { background: var(--gold-light); color: var(--brown-mid); }
  .export-btn.restore { background: var(--sage-light); color: #3B6B36; }
  .export-btn:active { opacity: 0.75; }
  .demo-locked-note {
    font-size: 0.76rem;
    color: var(--rose-deep);
    margin-bottom: 0.7rem;
  }

  /* ── EMPTY HINTS ── */
  .empty-hint {
    background: var(--gold-light); border-radius: 12px;
    padding: 1.25rem; font-size: 0.82rem; color: var(--brown-mid);
    line-height: 1.6; margin-bottom: 1rem; text-align: center;
  }
  .empty-hint .empty-icon { font-size: 1.75rem; margin-bottom: 6px; display: block; }

  /* ── USER ID FOOTER ── */
  .legal-links-section {
    margin: 0.25rem 1.25rem 0.35rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--brown-light);
  }
  .legal-link {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
    color: var(--rose-deep);
    font: inherit;
    line-height: inherit;
    font-family: inherit;
    text-decoration: underline;
    cursor: pointer;
  }
  .legal-separator {
    margin: 0 0.35rem;
    color: inherit;
  }
  .legal-link:hover,
  .legal-link:focus-visible {
    outline: none;
  }
  .user-id-footer {
    text-align: center; padding: 0.75rem 1rem 1.5rem;
    font-size: 0.7rem; color: var(--brown-light); opacity: 0.55;
  }

  /* ── MODAL ── */
  .modal-overlay {
    position: fixed; inset: 0;
    background: rgba(61,43,31,0.45); z-index: 500;
    display: flex; align-items: flex-end; justify-content: center;
  }
  .modal-overlay.hidden { display: none; }
  .modal-sheet {
    background: var(--white); border-radius: 24px 24px 0 0;
    padding: 1.5rem;
    width: 100%;
    max-width: 480px;
    max-height: 75vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .modal-sheet h3 {
    font-family: 'Cormorant Garant', serif; font-size: 1.3rem;
    font-weight: 600; color: var(--brown); margin-bottom: 0.75rem;
  }
  .modal-sheet p { font-size: 0.85rem; color: var(--brown-mid); line-height: 1.6; margin-bottom: 0.75rem; }
  .modal-sheet ul { padding-left: 16px; font-size: 0.82rem; color: var(--brown-mid); line-height: 1.9; }
  .modal-close {
    width: 100%; padding: 12px;
    background: var(--rose-light); color: var(--rose-deep);
    border: none; border-radius: 12px;
    font-family: 'Nunito', sans-serif; font-size: 0.9rem;
    font-weight: 600; cursor: pointer; margin-top: 1rem;
  }
  .restore-textarea {
    width: 100%; padding: 10px; border: 1.5px solid var(--border);
    border-radius: 10px; font-family: 'Nunito', sans-serif;
    font-size: 0.8rem; color: var(--brown);
    resize: vertical; min-height: 80px; margin-bottom: 8px;
  }
  .restore-textarea:focus { outline: none; border-color: var(--rose); }
  .restore-apply-btn {
    width: 100%; padding: 11px;
    background: var(--sage); color: white;
    border: none; border-radius: 10px;
    font-family: 'Nunito', sans-serif; font-size: 0.875rem;
    font-weight: 600; cursor: pointer;
  }
  .paywall-sheet {
    border-top: 4px solid rgba(196,136,122,0.32);
  }
  .paywall-benefits {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0.9rem 0 1.1rem;
  }
  .paywall-benefit {
    background: rgba(240,221,215,0.55);
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    font-size: 0.82rem;
    color: var(--brown-mid);
    line-height: 1.45;
  }
  .legal-modal-sheet {
    padding:
      max(1.25rem, env(safe-area-inset-top))
      1.25rem
      calc(1.5rem + env(safe-area-inset-bottom));
    max-height: min(88vh, calc(100dvh - 0.5rem));
  }
  .legal-modal-header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    background: var(--white);
    padding-bottom: 0.6rem;
    margin-bottom: 0.75rem;
  }
  .legal-modal-header h3 {
    margin-bottom: 0;
    padding-top: 0.15rem;
  }
  .legal-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: var(--rose-light);
    color: var(--rose-deep);
    font: inherit;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
  }
  .legal-modal-content {
    font-size: 0.84rem;
    line-height: 1.65;
    color: var(--brown-mid);
  }
  .legal-modal-content > * + * {
    margin-top: 0.8rem;
  }
  .legal-modal-content h4 {
    font-size: 0.78rem;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: var(--brown);
  }
  .legal-modal-content ul {
    padding-left: 18px;
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--brown-mid);
  }
  .legal-modal-content li + li {
    margin-top: 0.25rem;
  }
  .legal-modal-content a {
    color: var(--rose-deep);
  }
  .legal-effective-date {
    color: var(--brown-light);
  }

  @media (max-width: 520px) {
    .demo-banner {
      flex-direction: column;
    }
    .demo-banner-btn {
      width: 100%;
    }
    .demo-banner-side-card {
      width: 100%;
      min-height: 108px;
      aspect-ratio: auto;
    }
    .guest-form-grid {
      grid-template-columns: 1fr;
    }
    .guest-card-header {
      flex-direction: column;
    }
    .guest-card-actions {
      width: 100%;
      flex-direction: row;
    }
    .guest-card-btn {
      flex: 1;
    }
  }

  @media print {
    nav.tabs { display: none; }
    .section { display: block !important; page-break-before: always; }
    .section:first-of-type { page-break-before: auto; }
    .onboarding-overlay, .modal-overlay, .demo-banner { display: none !important; }
  }
