    * { box-sizing: border-box; margin: 0; padding: 0; }
    button, input, select, textarea { font-family: inherit; }

    body {
      background: #f4f4f4;
      color: #222325;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      font-size: 15px;
      line-height: 1.5;
      min-height: 100vh;
    }

    /* ── Global input / select / textarea styling ── */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="number"],
    input[type="tel"],
    select,
    textarea {
      width: 100%;
      padding: 11px 14px;
      border: 1.5px solid #d3d2d2;
      border-radius: 8px;
      font-size: 0.92rem;
      font-family: inherit;
      color: #222325;
      background: #fff;
      transition: border-color 0.18s, box-shadow 0.18s;
      outline: none;
      appearance: none;
      -webkit-appearance: none;
    }
    input[type="text"]:focus,
    input[type="email"]:focus,
    input[type="password"]:focus,
    input[type="date"]:focus,
    input[type="number"]:focus,
    input[type="tel"]:focus,
    select:focus,
    textarea:focus {
      border-color: #42b77a;
      box-shadow: 0 0 0 3px rgba(66,183,122,0.15);
    }
    input::placeholder, textarea::placeholder { color: #b0b0b0; }
    select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2395979d' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; cursor: pointer; }
    label { display: block; font-size: 0.78rem; font-weight: 700; color: #444; margin-bottom: 5px; letter-spacing: 0.02em; text-transform: uppercase; }
    .field { margin-bottom: 16px; }

    /* ── Top nav bar ── */
    .topbar {
      background: #000;
      padding: 16px 40px;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .topbar-logo { color: #fff; font-size: 1.2rem; font-weight: 700; letter-spacing: -0.5px; }
    .topbar-logo span { color: #42b77a; }

    /* ── Page wrapper ── */
    .page { max-width: 100%; margin: 0; padding: 20px 24px 40px; box-sizing: border-box; }
    #viewLogin.active, #viewRegister.active { margin: -20px -24px -60px; }
    #viewGifts { margin-left: calc(50% - 50vw + 20px); margin-right: calc(50% - 50vw + 20px); }

    .page-title { font-size: 1.6rem; font-weight: 700; color: #000; margin-bottom: 6px; }
    .page-sub { color: #62646a; font-size: 0.9rem; margin-bottom: 32px; }

    /* ── Views ── */
    .view { display: none; }
    .view.active { display: block; }

    /* ── Dashboard header ── */
    .dashboard-header {
      display: flex; justify-content: space-between; align-items: center;
      margin-bottom: 20px;
    }
    .section-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #95979d; }
    .btn-primary-green {
      background: #42b77a; color: #fff; border: none;
      padding: 10px 20px; border-radius: 2px;
      font-size: 0.88rem; font-weight: 700; cursor: pointer;
      letter-spacing: 0.03em; transition: background 0.15s;
    }
    .btn-primary-green:hover { background: #219358; }

    /* ── Empty state ── */
    .empty-state {
      background: #fff; border: 1px solid #d3d2d2; border-radius: 2px;
      padding: 60px 30px; text-align: center; grid-column: 1 / -1;
    }
    .empty-state p { color: #62646a; margin-bottom: 20px; }

    /* ── Person cards ── */
    .person-card {
      background: #fff;
      border: 1px solid #d3d2d2;
      border-radius: 2px;
      padding: 12px 14px;
      display: flex;
      align-items: center;
      gap: 10px;
      cursor: pointer;
      transition: box-shadow 0.15s, border-color 0.15s;
      min-width: 0;
      overflow: hidden;
      box-sizing: border-box;
      width: 100%;
    }
    .person-card:hover { box-shadow: 0 0 30px rgba(0,0,0,.08); border-color: #38a39c; }
    @media (max-width: 900px) { #peopleList { grid-template-columns: repeat(2,1fr) !important; } }
    @media (max-width: 580px) { #peopleList { grid-template-columns: 1fr !important; } }

    /* ── Timeline ── */
    .timeline-wrap { padding: 8px 0 2px 0; overflow-x: auto; }
    .timeline { display: flex; align-items: flex-start; gap: 0; position: relative; padding-bottom: 4px; min-width: max-content; }
    .timeline-item { display: flex; flex-direction: column; align-items: center; position: relative; min-width: 80px; }
    .timeline-item:not(:last-child)::after {
      content: ''; position: absolute; top: 21px; left: 50%; width: 100%;
      height: 2px; background: #d3d2d2; z-index: 0;
    }
    .timeline-dot {
      width: 42px; height: 42px; border-radius: 50%; border: 3px solid #d3d2d2;
      background: #fff; display: flex; align-items: center; justify-content: center;
      font-size: 1.25rem; font-weight: 700; position: relative; z-index: 1; cursor: pointer;
      transition: transform 0.15s;
    }
    .timeline-dot:hover { transform: scale(1.15); }
    .timeline-dot.soon { border-color: #ff5a60; background: #fff0f0; color: #ff5a60; }
    .timeline-dot.upcoming { border-color: #42b77a; background: #e6f5ef; color: #219358; }
    .timeline-dot.far { border-color: #d3d2d2; background: #fff; color: #95979d; }
    .timeline-dot.missing { border-color: #ffc107; background: #fff8e1; color: #f59e0b; border-style: dashed; }
    .timeline-dot.auto { border-style: dashed; }
    .timeline-label { font-size: 0.68rem; color: #62646a; margin-top: 5px; text-align: center; max-width: 76px; line-height: 1.2; }
    .timeline-days { font-size: 0.65rem; color: #95979d; margin-top: 2px; }
    .avatar {
      width: 64px; height: 64px; border-radius: 50%;
      object-fit: cover; flex-shrink: 0;
      border: 2px solid #d3d2d2;
    }
    .avatar-init {
      width: 64px; height: 64px; border-radius: 50%;
      background: #000; color: #fff;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.4rem; font-weight: 700; flex-shrink: 0;
    }
    .card-info { flex: 1; min-width: 0; overflow: hidden; }
    .card-meta { color: #95979d; font-size: 0.8rem; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .card-name { font-weight: 700; font-size: 0.95rem; color: #000; }

    .card-events { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
    .event-badge {
      font-size: 0.72rem; padding: 2px 8px; border-radius: 2px;
      font-weight: 600; white-space: nowrap; letter-spacing: 0.02em;
    }
    .event-badge.soon { background: #fbe7e9; color: #ff5a60; border: 1px solid #ff5a60; }
    .event-badge.upcoming { background: #e6f5ef; color: #219358; border: 1px solid #42b77a; }
    .event-badge.far { background: #f4f4f4; color: #95979d; border: 1px solid #d3d2d2; }
    .card-actions { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
    .btn-gift {
      background: #42b77a; color: #fff; border: none;
      padding: 5px 10px; border-radius: 2px;
      font-size: 0.72rem; font-weight: 700; cursor: pointer; white-space: nowrap;
      text-decoration: none; display: inline-block;
    }
    .btn-gift:hover { background: #219358; color: #fff; }
    .btn-events {
      background: #42b77a; color: #fff; border: 1px solid #42b77a;
      padding: 4px 10px; border-radius: 2px;
      font-size: 0.72rem; font-weight: 600; cursor: pointer; white-space: nowrap;
    }
    .btn-events:hover { background: #219358; border-color: #219358; }
    .btn-remove {
      background: #fff; color: #95979d; border: 1px solid #d3d2d2;
      padding: 4px 10px; border-radius: 2px;
      font-size: 0.72rem; cursor: pointer;
    }
    .btn-remove:hover { color: #ff5a60; border-color: #ff5a60; }

    /* ── Card panel (forms) ── */
    .card-panel {
      background: #fff;
      border: 1px solid #d3d2d2;
      border-radius: 2px;
      padding: 20px 24px;
    }
    .panel-header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid #f4f4f4; }
    .panel-header h2 { font-size: 1.1rem; font-weight: 700; color: #000; }
    .btn-back {
      background: transparent; border: 1px solid #d3d2d2;
      color: #62646a; padding: 6px 10px; border-radius: 2px;
      font-size: 0.85rem; cursor: pointer; line-height: 1;
    }
    .btn-back:hover { border-color: #000; color: #000; }

    /* ── Form fields ── */
    .field { margin-bottom: 18px; }
    .field label { color: #62646a; }
    .field-label { display:block;font-size:0.75rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#111;margin-bottom:4px; }
    .gender-row { display: flex; gap: 10px; }
    .gender-option {
      flex: 1; display: flex; align-items: center; gap: 8px;
      padding: 10px 14px; border: 1px solid #d3d2d2; border-radius: 2px;
      background: #fff; cursor: pointer; color: #222325; font-size: 0.9rem;
      transition: border-color 0.15s;
    }
    .gender-option:has(input:checked) { border-color: #42b77a; background: #e6f5ef; }
    .gender-option input[type="radio"] { accent-color: #42b77a; }

    .btn-submit {
      display: block; width: 100%; margin-top: 24px;
      padding: 13px; border: none; border-radius: 2px;
      background: #000; color: #fff;
      font-size: 0.9rem; font-weight: 700; letter-spacing: 0.05em;
      text-transform: uppercase; cursor: pointer; transition: background 0.15s;
    }
    .btn-submit:hover:not(:disabled) { background: #222; }
    .btn-submit:disabled { background: #d3d2d2; cursor: not-allowed; }

    /* ── Events section ── */
    .events-section { margin-top: 8px; padding-top: 0; border-top: none; }
    .events-section h3 { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #62646a; margin-bottom: 14px; }
    .preset-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
    .preset-tag {
      background: #f4f4f4; border: 1px solid #d3d2d2;
      color: #62646a; padding: 5px 12px; border-radius: 2px;
      font-size: 0.78rem; font-weight: 600; cursor: pointer;
      transition: all 0.12s;
    }
    .preset-tag:hover { border-color: #38a39c; color: #38a39c; background: #e6f5f4; }
    .event-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
    .event-row input { flex: 1; padding: 9px 10px; border: 1px solid #d3d2d2; border-radius: 2px; font-size: 0.88rem; color: #222; background: #fff; }
    .event-row input:focus { outline: none; border-color: #38a39c; }
    .btn-remove-event { background: transparent; border: none; color: #d3d2d2; font-size: 1.3rem; cursor: pointer; flex-shrink: 0; line-height: 1; }
    .btn-remove-event:hover { color: #ff5a60; }
    .btn-add-event {
      background: #fff; border: 1px dashed #d3d2d2;
      color: #95979d; padding: 8px 16px; border-radius: 2px;
      font-size: 0.82rem; cursor: pointer; margin-top: 4px;
    }
    .btn-add-event:hover { border-color: #38a39c; color: #38a39c; }

    /* ── Budget buttons ── */
    .budget-btn {
      padding: 7px 14px; border: 1px solid #d3d2d2; border-radius: 2px;
      background: #fff; color: #62646a; font-size: 0.82rem; font-weight: 600; cursor: pointer;
    }
    .budget-btn.active { background: #000; color: #fff; border-color: #000; }

    /* ── Gift page cards (3-column vertical) ── */
    .gift-cards-grid {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
    }
    .gift-card-row {
      display: flex; flex-direction: column; background: #fff;
      border: 1.5px solid #e8e8e8; border-radius: 4px;
      overflow: hidden; cursor: pointer;
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    .gift-card-row:hover { border-color: #42b77a; box-shadow: 0 2px 12px rgba(66,183,122,0.12); }
    .gift-card-row.selected { border-color: #42b77a; background: #f8fdf9; }
    .gift-card-img {
      width: 100%; height: 180px; flex-shrink: 0;
      background: #f5f5f5; display: flex; align-items: center;
      justify-content: center; overflow: hidden;
    }
    .gift-card-img img { width: 100%; height: 180px; object-fit: contain; background: #f5f5f5; }
    .gift-card-body {
      flex: 1; padding: 12px 14px;
      display: flex; flex-direction: column; justify-content: space-between; min-width: 0;
    }

    /* ── Event preset pills (Edit form) ── */
    .event-preset {
      display: inline-flex; align-items: center; gap: 4px;
      padding: 5px 11px; border-radius: 20px; border: 1.5px solid;
      font-size: 0.75rem; font-weight: 700; cursor: pointer;
      line-height: 1.2; white-space: nowrap; transition: opacity 0.15s; background: none;
    }
    .event-preset:hover { opacity: 0.75; }
    .ep-anniversary { background: #fce7f3; color: #9d174d; border-color: #f9a8d4; }
    .ep-graduation  { background: #ede9fe; color: #6d28d9; border-color: #c4b5fd; }
    .ep-moms        { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
    .ep-dads        { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
    .ep-wedding     { background: #fffbeb; color: #b45309; border-color: #fde68a; }
    .ep-custom      { background: #f9fafb; color: #6b7280; border-color: #d1d5db; border-style: dashed; }

    /* ── Edit view: compact inputs ── */
    #viewEdit input[type="text"],
    #viewEdit input[type="date"],
    #viewEdit input[type="number"],
    #viewEdit select { padding: 8px 12px; }

    /* ── Edit view: budget + theme buttons single-row ── */
    #editBudgetBtns .budget-btn,
    #editThemeBtns .budget-btn { padding: 6px 10px; font-size: 0.78rem; }

    /* ── Gift reason tooltip ── */
    .gift-reason { font-size: 0.78rem; color: #62646a; margin-top: 4px; line-height: 1.4; }
    .gift-cat-tag { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 7px; border-radius: 2px; background: #f4f4f4; color: #62646a; border: 1px solid #d3d2d2; flex-shrink: 0; }
    .loading-state { text-align: center; padding: 40px 20px; color: #62646a; }
    .loading-state p { font-size: 0.95rem; margin-top: 12px; }

    /* ── Loading modal ── */
    #loadingModal {
      display: none;
      position: fixed; inset: 0; z-index: 9999;
      background: rgba(255,255,255,0.92);
      backdrop-filter: blur(4px);
      align-items: center; justify-content: center;
      flex-direction: column; gap: 20px;
    }
    #loadingModal.active { display: flex; }
    .loading-magnifier {
      font-size: 4rem;
      animation: magnify 1.4s ease-in-out infinite;
    }
    @keyframes magnify {
      0%   { transform: scale(1) rotate(-8deg); }
      50%  { transform: scale(1.15) rotate(8deg); }
      100% { transform: scale(1) rotate(-8deg); }
    }
    .loading-dots {
      display: flex; gap: 8px; align-items: center;
    }
    .loading-dots span {
      width: 10px; height: 10px; border-radius: 50%;
      background: #42b77a;
      animation: bounce 1.1s ease-in-out infinite;
    }
    .loading-dots span:nth-child(2) { animation-delay: 0.18s; }
    .loading-dots span:nth-child(3) { animation-delay: 0.36s; }
    @keyframes bounce {
      0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
      40%            { transform: scale(1.2); opacity: 1; }
    }
    .loading-msg { font-size: 1rem; font-weight: 600; color: #333; letter-spacing: 0.01em; }

    /* ── Past gifts ── */
    .past-gift-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #fafafa; border: 1px solid #d3d2d2; border-radius: 2px; margin-bottom: 6px; }
    .past-gift-text { flex: 1; font-size: 0.88rem; color: #222; }
    .past-gift-meta { font-size: 0.75rem; color: #95979d; white-space: nowrap; }
    .ai-badge { display: inline-flex; align-items: center; gap: 4px; background: #000; color: #fff; font-size: 0.68rem; padding: 2px 7px; border-radius: 2px; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 12px; }

    /* ── Security accordion ── */
    .acc-item { border-bottom: 1px solid #f0f0f0; }
    .acc-item:last-child { border-bottom: none; }
    .acc-header {
      display: flex; align-items: center; gap: 10px;
      padding: 14px 18px; cursor: pointer; user-select: none;
      transition: background 0.12s;
    }
    .acc-header:hover { background: #fafafa; }
    .acc-icon { font-size: 1.1rem; flex-shrink: 0; width: 24px; text-align: center; }
    .acc-title { flex: 1; font-weight: 700; font-size: 0.88rem; color: #111; }
    .acc-status { font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 2px; letter-spacing: 0.04em; text-transform: uppercase; flex-shrink: 0; }
    .acc-status.active { background: #e6f5ef; color: #219358; }
    .acc-status.info { background: #f4f4f4; color: #62646a; }
    .acc-chevron {
      font-size: 0.7rem; color: #95979d; flex-shrink: 0;
      transition: transform 0.2s;
    }
    .acc-item.open .acc-chevron { transform: rotate(180deg); }
    .acc-body {
      display: none; padding: 0 18px 16px 52px;
      font-size: 0.84rem; color: #444; line-height: 1.65;
    }
    .acc-item.open .acc-body { display: block; }
    .acc-body ul { margin: 6px 0 0 0; padding-left: 18px; }
    .acc-body li { margin-bottom: 4px; }
    .acc-body code { background: #f4f4f4; padding: 1px 5px; border-radius: 2px; font-size: 0.8rem; color: #c0392b; }
    .acc-body .tag-green { display: inline-block; background: #e6f5ef; color: #219358; font-size: 0.72rem; font-weight: 700; padding: 1px 6px; border-radius: 2px; margin-right: 4px; }
    .acc-body .tag-grey { display: inline-block; background: #f4f4f4; color: #62646a; font-size: 0.72rem; font-weight: 700; padding: 1px 6px; border-radius: 2px; margin-right: 4px; }

    /* ── Existing events list ── */
    .existing-event {
      display: flex; align-items: center; gap: 10px;
      padding: 11px 14px; background: #fafafa;
      border: 1px solid #d3d2d2; border-radius: 2px; margin-bottom: 8px;
    }
    .ev-label { font-weight: 600; font-size: 0.88rem; flex: 1; color: #222; }
    .ev-date { color: #95979d; font-size: 0.8rem; }
    .divider { border: none; border-top: 1px solid #f4f4f4; margin: 24px 0; }

    /* ── Gift picker ── */
    .person-header { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
    .avatar-lg { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid #d3d2d2; flex-shrink: 0; }
    .avatar-init-lg {
      width: 48px; height: 48px; border-radius: 50%;
      background: #000; color: #fff;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.2rem; font-weight: 700; flex-shrink: 0;
    }
    .gift-person-name { font-size: 1.1rem; font-weight: 700; color: #000; }
    .gift-person-meta { color: #95979d; font-size: 0.82rem; margin-top: 2px; }
    .countdown-bar {
      background: #e6f5ef; border: 1px solid #42b77a; border-radius: 2px;
      padding: 12px 16px; margin-bottom: 24px;
      display: flex; align-items: center; justify-content: center; gap: 8px;
      color: #219358; font-weight: 600; font-size: 0.9rem;
    }
    .countdown-bar .days { font-size: 1.4rem; font-weight: 700; color: #000; }
    .timeline-dot.gifted { outline: 2px solid #42b77a; outline-offset: 2px; }

    .gift-option {
      display: flex; align-items: center; gap: 14px;
      padding: 14px 16px; border: 1px solid #d3d2d2; border-radius: 2px;
      margin-bottom: 8px; cursor: pointer; background: #fff;
      transition: all 0.12s;
    }
    .gift-option:hover { border-color: #38a39c; }
    .gift-option.selected { border-color: #42b77a; background: #e6f5ef; }
    .btn-shop-inline {
      display:inline-block;margin-top:10px;padding:8px 16px;background:#42b77a;color:#fff;
      border:none;border-radius:2px;font-size:0.82rem;font-weight:700;cursor:pointer;
      letter-spacing:0.04em;text-transform:uppercase;width:100%;
    }
    .btn-shop-inline:hover { background:#219358; }
    .btn-shop-etsy { background:#f1641e; }
    .btn-shop-etsy:hover { background:#c0360a; }
    .radio {
      width: 18px; height: 18px; border-radius: 50%;
      border: 2px solid #d3d2d2; flex-shrink: 0;
    }
    .gift-option.selected .radio {
      border-color: #42b77a;
      background: radial-gradient(circle, #42b77a 50%, transparent 50%);
    }
    .gift-text { flex: 1; color: #222325; font-size: 0.92rem; }
    .best-badge {
      background: #000; color: #fff;
      font-size: 0.68rem; padding: 3px 8px; border-radius: 2px;
      font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    }
    .btn-amazon {
      display: block; width: 100%; margin-top: 20px;
      padding: 13px; border: none; border-radius: 2px;
      background: #42b77a; color: #fff;
      font-size: 0.9rem; font-weight: 700; letter-spacing: 0.05em;
      text-transform: uppercase; cursor: pointer; transition: background 0.15s;
    }
    .btn-amazon:disabled { background: #d3d2d2; cursor: not-allowed; }
    .btn-amazon:hover:not(:disabled) { background: #219358; }
    .back-link {
      display: block; text-align: center; margin-top: 16px;
      color: #95979d; cursor: pointer; font-size: 0.85rem;
    }
    .back-link:hover { color: #38a39c; }

    /* ── Mobile bottom nav ── */
    .mobile-bottom-nav {
      display: none;
    }
    @media (max-width: 640px) {
      /* Prevent content hiding behind bottom nav */
      body { padding-bottom: 64px; }
      .mobile-bottom-nav.auth-visible {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        background: #fff;
        border-top: 1px solid #e8e8e8;
        z-index: 300;
        height: 64px;
        align-items: stretch;
      }
      .mobile-bottom-nav button {
        flex: 1;
        background: none;
        border: none;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        font-size: 0.62rem;
        font-weight: 600;
        color: #95979d;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        padding: 8px 4px 10px;
        transition: color 0.15s;
      }
      .mobile-bottom-nav button .nav-icon { font-size: 1.4rem; line-height: 1; }
      .mobile-bottom-nav button.active { color: #000; }
      .mobile-bottom-nav button:active { color: #42b77a; }

      /* Fix: active login/register views have -60px bottom margin on desktop to cancel page padding.
         On mobile that collapses the scroll area, hiding social proof below. Reset it. */
      #viewLogin.active, #viewRegister.active { margin: -12px -12px 0 !important; }

      /* Topbar: hide tagline + auth labels on mobile */
      .topbar em { display: none; }
      .topbar { padding: 12px 16px; }
      #authNav { gap: 8px !important; }
      #authNav button { padding: 7px 12px !important; font-size: 0.78rem !important; }
      .page { padding: 12px 12px 24px; }

      /* Login + Register: stack hero on top, form below, social proof at bottom */
      #viewLogin > div,
      #viewRegister > div {
        flex-direction: column !important;
        min-height: auto !important;
        overflow: visible !important;
      }
      /* Hero: show at top, compact */
      #loginHero {
        display: flex !important;
        flex: none !important;
        padding: 36px 24px 28px !important;
      }
      #viewRegister #onboardLeft {
        display: flex !important;
        flex: none !important;
        padding: 36px 24px 28px !important;
      }
      /* Shrink headline on mobile */
      #loginHero h1,
      #viewRegister #onboardLeft h1 {
        font-size: 1.75rem !important;
        margin-bottom: 12px !important;
      }
      /* Hide testimonial cards from hero — they appear below the form instead */
      #loginHero > div:last-child,
      #viewRegister #onboardLeft > div:last-child {
        display: none !important;
      }
      /* Mobile-only social proof block: visible on mobile */
      .mobile-social-proof { display: block !important; }
      /* Form panel: full width, white, below hero */
      #viewLogin > div > div:last-child {
        width: 100% !important;
        flex: none !important;
        padding: 32px 24px 40px !important;
        min-height: auto !important;
        justify-content: flex-start !important;
      }
      #onboardPanel {
        width: 100% !important;
        flex: none !important;
        padding: 24px 20px 40px !important;
        min-height: auto !important;
      }

      /* Dashboard: collapse to single column, hide sidebar */
      #viewDashboard > div { flex-direction: column !important; }
      #viewDashboard > div > div:last-child { display: none !important; }
      #peopleList { grid-template-columns: 1fr 1fr !important; }

      /* Person cards: more compact on mobile */
      .person-card { padding: 10px 12px; }
      .avatar, .avatar-init { width: 44px; height: 44px; font-size: 1rem; }
      .card-name { font-size: 0.88rem; }
      .card-meta { font-size: 0.75rem; }

      /* Add person form: single-column fields */
      #viewForm > div { border: none !important; border-radius: 0 !important; }
      #viewForm > div > div { padding: 16px !important; }
      #addForm > div[style*="display:flex"] { flex-direction: column !important; }
      #addForm .field[style*="flex:1"] { width: 100% !important; }

      /* Edit person form: single column */
      #viewEdit > div {
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        max-width: 100% !important;
      }
      #editForm > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
      }
      /* Hide column divider on mobile */
      #editForm > div > div[style*="background:#f0f0f0"] { display: none !important; }
      /* Edit form inner grids: single column */
      #viewEdit [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
      }
      /* Budget + theme buttons: wrap */
      #editBudgetBtns, #editThemeBtns { flex-wrap: wrap !important; }
      /* Edit action bar: stack */
      #editForm > div[style*="border-top"] { flex-direction: column !important; }
      #editForm > div[style*="border-top"] button:first-child { width: 100% !important; }

      /* Gift panel: bottom sheet */
      #viewGifts {
        display: block !important;
        position: fixed !important;
        bottom: 0; left: 0; right: 0;
        top: auto !important;
        height: 92vh;
        background: #fff;
        border-radius: 20px 20px 0 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateY(110%);
        transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        z-index: 200;
        box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
        margin: 0 !important;
        padding: 0 !important;
        pointer-events: none;
      }
      #viewGifts.active {
        transform: translateY(0);
        pointer-events: auto;
      }
      #viewGifts .card-panel {
        min-width: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 16px 24px !important;
      }
      #viewGifts .panel-header {
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 10;
        padding-top: 12px;
        margin: 0 -16px 12px;
        padding-left: 16px;
        padding-right: 16px;
        border-bottom: 1px solid #f0f0f0;
      }
      /* Gift sheet: person header + event selector stack vertically */
      #viewGifts > .card-panel > div[style*="display:flex;gap:24px"] {
        flex-direction: column !important;
        gap: 12px !important;
      }
      /* Sheet drag handle */
      #viewGifts::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #d3d2d2;
        border-radius: 2px;
        margin: 12px auto 0;
      }

      /* Gift cards: 2-col on mobile */
      .gift-cards-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
      .gift-card-img, .gift-card-img img { height: 130px !important; }

      /* Etsy picks: horizontal scroll row on mobile */
      .etsy-picks-grid {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        gap: 12px;
        padding: 4px 0 12px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
      }
      .etsy-picks-grid::-webkit-scrollbar { display: none; }
      .etsy-picks-grid > * {
        flex: 0 0 78vw;
        scroll-snap-align: start;
        margin-bottom: 0 !important;
      }

      /* Guest CTA modal: stack columns */
      #guestCtaModal > div > div[style*="display:flex;gap:14px"] {
        flex-direction: column !important;
      }

      /* Onboard step 2 CTAs: stack on mobile */
      #onboardStep2 > div[style*="display:flex;gap:12px"] {
        flex-direction: column !important;
      }

      /* Simplify gift panel header on mobile */
      #viewGifts .card-panel > .countdown-bar { margin-bottom: 8px; }
      #viewGifts #giftFilters { padding: 6px 8px !important; }
    }

    /* Mobile social proof: hidden on desktop, shown inside media query */
    .mobile-social-proof { display: none; }

    /* Gift sheet backdrop */
    #giftSheetBackdrop {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.45);
      z-index: 199;
    }
