
    :root {
      --bg: #fff8ef;
      --surface: #ffffff;
      --surface-2: #f6f4f0;
      --surface-3: #edf8f5;
      --ink: #173234;
      --muted: #667878;
      --line: #e7e3dc;
      --primary: #e9654b;
      --primary-dark: #bd4734;
      --primary-soft: #fff0e9;
      --secondary: #1d8f80;
      --secondary-dark: #126b62;
      --secondary-soft: #e6f6f2;
      --gold: #e7aa33;
      --danger: #b83d4b;
      --success: #18775f;
      --navy: #153e48;
      --shadow-sm: 0 5px 18px rgba(27, 57, 55, 0.07);
      --shadow-md: 0 18px 50px rgba(27, 57, 55, 0.13);
      --radius-sm: 12px;
      --radius-md: 18px;
      --radius-lg: 28px;
      --safe-bottom: env(safe-area-inset-bottom, 0px);
      --content: 1180px;
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      min-height: 100vh;
      background:
        radial-gradient(circle at 4% 0%, rgba(233, 101, 75, .10), transparent 26rem),
        radial-gradient(circle at 98% 8%, rgba(29, 143, 128, .10), transparent 28rem),
        var(--bg);
      color: var(--ink);
      font-family: "Nunito Sans", "Avenir Next", Avenir, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      -webkit-font-smoothing: antialiased;
    }

    button, input, select, textarea { font: inherit; }
    button { color: inherit; }
    a { color: inherit; }
    img, svg { display: block; }
    [hidden] { display: none !important; }

    :focus-visible {
      outline: 3px solid rgba(29, 143, 128, .35);
      outline-offset: 3px;
    }

    .icon {
      width: 22px;
      height: 22px;
      stroke: currentColor;
      stroke-width: 1.9;
      fill: none;
      stroke-linecap: round;
      stroke-linejoin: round;
      flex: 0 0 auto;
    }
    .icon-sm { width: 18px; height: 18px; }
    .icon-lg { width: 30px; height: 30px; }

    .app-layout { min-height: 100vh; }
    #app.is-refreshing::before {
      content: "";
      position: fixed;
      inset: 0 auto auto 0;
      width: 34%;
      height: 3px;
      z-index: 120;
      background: var(--secondary);
      box-shadow: 0 0 10px rgba(29, 143, 128, .28);
      animation: appRefresh 1s ease-in-out infinite;
    }
    @keyframes appRefresh {
      0% { transform: translateX(-110%); }
      100% { transform: translateX(395%); }
    }
    @media (prefers-reduced-motion: reduce) {
      #app.is-refreshing::before { width: 100%; animation: none; }
    }

    .desktop-sidebar {
      display: none;
      position: fixed;
      inset: 0 auto 0 0;
      width: 260px;
      padding: 26px 20px;
      background: rgba(255,255,255,.88);
      backdrop-filter: blur(18px);
      border-right: 1px solid rgba(231, 227, 220, .9);
      z-index: 30;
    }

    .brand {
      display: inline-flex;
      align-items: center;
      gap: 11px;
      text-decoration: none;
      font-size: 21px;
      font-weight: 900;
      letter-spacing: -.03em;
    }
    .brand-mark {
      width: 44px;
      height: 44px;
      border-radius: 15px;
      display: grid;
      place-items: center;
      color: white;
      background: linear-gradient(145deg, var(--primary), #f29468);
      box-shadow: 0 10px 22px rgba(233,101,75,.27);
    }
    .brand-mark .icon { width: 25px; height: 25px; stroke-width: 2.2; }
    .brand small { display: block; color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; font-weight: 800; }

    .side-nav { display: grid; gap: 8px; margin-top: 34px; }
    .side-link {
      border: 0;
      background: transparent;
      width: 100%;
      min-height: 48px;
      display: flex;
      align-items: center;
      gap: 13px;
      padding: 0 14px;
      border-radius: 15px;
      cursor: pointer;
      font-weight: 800;
      color: #526565;
      text-align: left;
    }
    .side-link:hover { background: var(--surface-2); }
    .side-link.active { color: var(--secondary-dark); background: var(--secondary-soft); }
    .side-link.active::after {
      content: "";
      width: 7px; height: 7px; border-radius: 999px; background: var(--secondary); margin-left: auto;
    }
    .side-card {
      margin-top: auto;
      padding: 16px;
      border-radius: 20px;
      background: linear-gradient(145deg, #174b55, #1d746e);
      color: white;
    }
    .side-card p { color: rgba(255,255,255,.75); margin: 7px 0 12px; font-size: 13px; line-height: 1.4; }
    .side-card button { width: 100%; }

    .app-main { min-width: 0; }
    .topbar {
      position: sticky;
      top: 0;
      z-index: 20;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      min-height: 72px;
      padding: 12px 18px;
      background: rgba(255,248,239,.85);
      backdrop-filter: blur(18px);
      border-bottom: 1px solid rgba(231,227,220,.75);
    }
    .topbar .brand { font-size: 19px; }
    .topbar .brand-mark { width: 40px; height: 40px; border-radius: 14px; }
    .topbar-actions { display: flex; align-items: center; gap: 8px; }

    .icon-button {
      min-width: 44px;
      min-height: 44px;
      border: 1px solid var(--line);
      background: rgba(255,255,255,.8);
      display: inline-grid;
      place-items: center;
      border-radius: 14px;
      cursor: pointer;
      transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
    }
    .icon-button:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: #d8d1c8; }
    .avatar-button {
      width: 44px; height: 44px; border-radius: 50%; border: 3px solid white; background: #f7c9ad; color: #7c3d29; font-weight: 900; box-shadow: var(--shadow-sm); cursor: pointer;
    }

    .page-container {
      width: min(100%, var(--content));
      margin: 0 auto;
      padding: 22px 16px calc(100px + var(--safe-bottom));
    }
    .page { display: none; animation: pageIn .25s ease both; }
    .page.active { display: block; }
    @keyframes pageIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      color: var(--secondary-dark);
      font-size: 12px;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: .09em;
    }
    h1, h2, h3, p { margin-top: 0; }
    h1 { margin-bottom: 8px; font-size: clamp(28px, 8vw, 44px); line-height: 1.02; letter-spacing: -.045em; }
    h2 { margin-bottom: 8px; font-size: 24px; line-height: 1.1; letter-spacing: -.035em; }
    h3 { margin-bottom: 6px; font-size: 18px; letter-spacing: -.02em; }
    .lead { color: var(--muted); line-height: 1.55; margin-bottom: 0; }
    .section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 28px 0 14px; }
    .section-head h2 { margin: 0; }
    .section-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
    .text-button {
      border: 0; background: transparent; min-height: 44px; padding: 0 4px; color: var(--secondary-dark); font-weight: 900; cursor: pointer;
    }

    .card {
      background: rgba(255,255,255,.92);
      border: 1px solid rgba(231,227,220,.95);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-sm);
    }

    .hero-grid { display: grid; gap: 16px; }
    .trip-hero {
      position: relative;
      overflow: hidden;
      padding: 22px;
      color: white;
      border-radius: var(--radius-lg);
      background:
        radial-gradient(circle at 85% 0%, rgba(255,255,255,.25), transparent 18rem),
        linear-gradient(145deg, #1c7e73, #14525f 72%);
      box-shadow: 0 22px 55px rgba(21, 82, 95, .24);
    }
    .trip-hero::after {
      content: "";
      position: absolute;
      width: 160px; height: 160px; border-radius: 50%; right: -58px; bottom: -75px; border: 24px solid rgba(255,255,255,.08);
    }
    .trip-hero .eyebrow { color: #c8fff2; }
    .trip-hero h2 { font-size: clamp(28px, 8vw, 40px); margin: 8px 0 6px; }
    .trip-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: rgba(255,255,255,.8); font-weight: 700; font-size: 13px; }
    .trip-meta span { display: inline-flex; align-items: center; gap: 6px; }
    .hero-stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0 18px; }
    .hero-stat {
      padding: 13px 14px;
      border-radius: 17px;
      background: rgba(255,255,255,.12);
      border: 1px solid rgba(255,255,255,.12);
      backdrop-filter: blur(8px);
    }
    .hero-stat strong { display: block; font-size: 23px; line-height: 1; }
    .hero-stat span { display: block; margin-top: 5px; font-size: 12px; color: rgba(255,255,255,.72); }
    .progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.18); }
    .progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffd37d, #fff1bd); transition: width .25s ease; }
    .progress-label { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0 14px; font-size: 12px; font-weight: 800; color: rgba(255,255,255,.8); }
    .hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

    .btn {
      border: 0;
      min-height: 46px;
      border-radius: 14px;
      padding: 0 17px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      font-weight: 900;
      cursor: pointer;
      text-decoration: none;
      transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
    }
    .btn:hover { transform: translateY(-1px); }
    .btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
    .btn-primary { background: var(--primary); color: white; box-shadow: 0 9px 20px rgba(233,101,75,.24); }
    .btn-primary:hover { box-shadow: 0 12px 24px rgba(233,101,75,.3); }
    .btn-secondary { background: var(--secondary); color: white; box-shadow: 0 9px 20px rgba(29,143,128,.21); }
    .btn-white { background: white; color: var(--navy); }
    .btn-soft { background: var(--secondary-soft); color: var(--secondary-dark); }
    .btn-ghost { background: transparent; color: inherit; border: 1px solid var(--line); }
    .btn-danger-soft { background: #fff0f1; color: var(--danger); }
    .btn-block { width: 100%; }

    .quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .quick-action {
      min-height: 120px;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 20px;
      background: var(--surface);
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: space-between;
      text-align: left;
      cursor: pointer;
      box-shadow: var(--shadow-sm);
    }
    .quick-action .bubble {
      width: 43px; height: 43px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark);
    }
    .quick-action.secondary .bubble { background: var(--secondary-soft); color: var(--secondary-dark); }
    .quick-action > span:last-child { display: block; min-width: 0; }
    .quick-action strong { display: block; font-size: 15px; }
    .quick-action small { display: block; color: var(--muted); margin-top: 4px; }

    .trip-list, .recent-grid, .family-grid, .settings-grid { display: grid; gap: 13px; }
    .trip-card { padding: 16px; display: grid; gap: 14px; }
    .trip-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
    .trip-card h3 { margin-bottom: 4px; }
    .trip-card p { margin: 0; color: var(--muted); font-size: 13px; }
    .status-pill, .tag {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      min-height: 27px;
      padding: 0 9px;
      border-radius: 999px;
      font-size: 11px;
      line-height: 1;
      font-weight: 900;
      white-space: nowrap;
    }
    .status-pill.active { background: var(--secondary-soft); color: var(--secondary-dark); }
    .status-pill.draft { background: #fff5dc; color: #8a5a08; }
    .status-pill.done { background: #eef1f1; color: #536767; }
    .status-pill.ai { background: #f2ecff; color: #63469a; }
    .trip-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .mini-progress { flex: 1; }
    .mini-progress .progress-track { background: #e9efed; height: 7px; }
    .mini-progress .progress-bar { background: var(--secondary); }
    .mini-progress small { display: flex; justify-content: space-between; color: var(--muted); margin-bottom: 6px; font-weight: 800; }

    .avatar-stack { display: flex; padding-left: 6px; }
    .avatar {
      width: 34px; height: 34px; border-radius: 50%; border: 3px solid white; margin-left: -7px; display: grid; place-items: center; font-size: 11px; font-weight: 900; box-shadow: 0 2px 6px rgba(0,0,0,.08);
    }
    .avatar.a1 { background: #f9c5a8; color: #7d3f28; }
    .avatar.a2 { background: #bfded8; color: #175f57; }
    .avatar.a3 { background: #f6d884; color: #75500a; }
    .avatar.a4 { background: #d6c9ec; color: #594185; }

    .family-summary { padding: 17px; }
    .family-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
    .member-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
    .member-row:first-of-type { border-top: 0; }
    .member-row .avatar { margin-left: 0; width: 42px; height: 42px; }
    .member-row-info { min-width: 0; flex: 1; }
    .member-row-info strong { display: block; }
    .member-row-info small { color: var(--muted); }
    .rule-count { font-size: 11px; font-weight: 900; color: var(--secondary-dark); background: var(--secondary-soft); padding: 6px 8px; border-radius: 999px; }

    .page-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
    .page-title-row h1 { font-size: clamp(30px, 8vw, 42px); }

    .segmented {
      display: flex;
      gap: 4px;
      padding: 4px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: rgba(255,255,255,.75);
      overflow-x: auto;
      scrollbar-width: none;
    }
    .segmented::-webkit-scrollbar { display: none; }
    .segmented button {
      border: 0; background: transparent; min-height: 39px; padding: 0 13px; border-radius: 12px; color: var(--muted); font-weight: 900; white-space: nowrap; cursor: pointer;
    }
    .segmented button.active { background: white; color: var(--ink); box-shadow: 0 3px 12px rgba(18,52,54,.08); }

    .notice-card {
      padding: 16px;
      display: flex;
      gap: 12px;
      align-items: flex-start;
      border-radius: 18px;
      background: #fff7dd;
      border: 1px solid #f2df9b;
      color: #6c5215;
    }
    .notice-card p { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: #806b38; }

    /* Packing page */
    .packing-header {
      padding: 18px;
      border-radius: 24px;
      background: linear-gradient(145deg, #ffffff, #f3fbf8);
      border: 1px solid #dfeee9;
      box-shadow: var(--shadow-sm);
    }
    .packing-headline { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
    .packing-headline h1 { font-size: 29px; margin-bottom: 5px; }
    .packing-headline p { margin: 0; color: var(--muted); font-size: 13px; }
    .progress-ring {
      --p: 0;
      width: 68px; height: 68px; border-radius: 50%; flex: 0 0 auto;
      display: grid; place-items: center;
      background: conic-gradient(var(--secondary) calc(var(--p) * 1%), #e7efed 0);
      position: relative;
    }
    .progress-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: white; }
    .progress-ring strong { position: relative; z-index: 1; font-size: 14px; }
    .packing-toolbar { margin-top: 15px; display: grid; gap: 10px; }
    .search-wrap { position: relative; }
    .search-wrap .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
    .search-input {
      width: 100%; min-height: 48px; border: 1px solid var(--line); background: white; border-radius: 14px; padding: 0 14px 0 43px; color: var(--ink);
    }
    .chip-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 5px; scrollbar-width: none; }
    .chip-scroll::-webkit-scrollbar { display: none; }
    .chip {
      min-height: 37px; border: 1px solid var(--line); background: white; color: var(--muted); border-radius: 999px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 900; white-space: nowrap; cursor: pointer;
    }
    .chip.active { color: var(--secondary-dark); background: var(--secondary-soft); border-color: #bde0d8; }

    .category-list { display: grid; gap: 12px; margin-top: 14px; }
    .category-card { overflow: hidden; }
    .category-header {
      width: 100%; min-height: 64px; border: 0; background: white; padding: 13px 14px; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
    }
    .category-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); }
    .category-icon.green { background: var(--secondary-soft); color: var(--secondary-dark); }
    .category-icon.gold { background: #fff5dc; color: #9d680a; }
    .category-icon.purple { background: #f0eaff; color: #684c9b; }
    .category-title { flex: 1; min-width: 0; }
    .category-title strong { display: block; }
    .category-title small { color: var(--muted); }
    .category-chevron { transition: transform .2s ease; color: var(--muted); }
    .category-card.collapsed .category-chevron { transform: rotate(-90deg); }
    .category-card.collapsed .category-body { display: none; }
    .category-body { border-top: 1px solid var(--line); }
    .pack-item {
      min-height: 68px;
      padding: 12px 10px 12px 12px;
      display: flex;
      align-items: flex-start;
      gap: 11px;
      border-top: 1px solid #f0eeea;
      background: white;
    }
    .pack-item:first-child { border-top: 0; }
    .pack-check {
      appearance: none;
      width: 27px; height: 27px; flex: 0 0 auto; border-radius: 9px; border: 2px solid #c8d4d1; background: white; margin: 1px 0 0; cursor: pointer; display: grid; place-items: center;
    }
    .pack-check::after { content: ""; width: 10px; height: 6px; border-left: 2px solid white; border-bottom: 2px solid white; transform: rotate(-45deg) translate(1px,-1px); opacity: 0; }
    .pack-check:checked { border-color: var(--secondary); background: var(--secondary); }
    .pack-check:checked::after { opacity: 1; }
    .pack-item-info { min-width: 0; flex: 1; }
    .pack-item-name { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-weight: 850; line-height: 1.25; }
    .pack-item.packed .pack-item-name > span:first-child { text-decoration: line-through; color: #899695; }
    .pack-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); font-size: 11px; margin-top: 5px; }
    .required-badge { background: #fff0e9; color: #a94531; }
    .person-badge { background: #edf6ff; color: #315f83; }
    .ai-badge { background: #f1ebff; color: #674aa3; }
    .item-more { border: 0; background: transparent; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--muted); cursor: pointer; }
    .category-footer { padding: 10px 12px; display: flex; justify-content: flex-end; background: #fcfbf9; border-top: 1px solid var(--line); }
    .category-footer button { border: 0; background: transparent; color: var(--secondary-dark); font-size: 12px; font-weight: 900; min-height: 38px; padding: 0 8px; cursor: pointer; }
    .packing-fab {
      position: fixed;
      right: 18px;
      bottom: calc(86px + var(--safe-bottom));
      width: 58px; height: 58px; border-radius: 19px; border: 0; background: var(--primary); color: white; display: grid; place-items: center; box-shadow: 0 15px 30px rgba(233,101,75,.35); z-index: 18; cursor: pointer;
    }

    /* Family */
    .member-card { padding: 16px; }
    .member-card-top { display: flex; align-items: flex-start; gap: 13px; }
    .member-card .avatar { margin: 0; width: 54px; height: 54px; font-size: 15px; border: 0; }
    .member-card-info { flex: 1; min-width: 0; }
    .member-card-info p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
    .member-size-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
    .member-size { padding: 10px 12px; border-radius: 13px; background: var(--surface-2); }
    .member-size small { display: block; color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
    .member-size strong { display: block; margin-top: 3px; }
    .rule-chips { display: flex; gap: 7px; flex-wrap: wrap; }
    .rule-chip { background: var(--secondary-soft); color: var(--secondary-dark); padding: 7px 9px; border-radius: 999px; font-size: 11px; font-weight: 900; }
    .family-rules { padding: 17px; }
    .family-rule-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
    .family-rule-row:first-of-type { border-top: 0; }
    .family-rule-row .category-icon { width: 36px; height: 36px; border-radius: 12px; }
    .family-rule-row > div:nth-child(2) { flex: 1; }
    .family-rule-row strong { display: block; font-size: 14px; }
    .family-rule-row small { color: var(--muted); }

    /* Settings */
    .settings-card { overflow: hidden; }
    .settings-row {
      width: 100%; min-height: 66px; padding: 11px 14px; border: 0; border-top: 1px solid var(--line); background: white; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
    }
    .settings-row:first-child { border-top: 0; }
    .settings-row-icon { width: 41px; height: 41px; border-radius: 13px; display: grid; place-items: center; color: var(--secondary-dark); background: var(--secondary-soft); }
    .settings-row-info { flex: 1; min-width: 0; }
    .settings-row-info strong { display: block; }
    .settings-row-info small { display: block; color: var(--muted); margin-top: 2px; line-height: 1.3; }
    .settings-profile { padding: 18px; display: flex; align-items: center; gap: 14px; }
    .settings-profile .avatar { margin: 0; width: 58px; height: 58px; font-size: 16px; border: 0; }

    /* Bottom navigation */
    .bottom-nav {
      position: fixed;
      z-index: 25;
      left: 0; right: 0; bottom: 0;
      min-height: calc(72px + var(--safe-bottom));
      padding: 7px 7px var(--safe-bottom);
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      background: rgba(255,255,255,.94);
      backdrop-filter: blur(18px);
      border-top: 1px solid var(--line);
      box-shadow: 0 -8px 25px rgba(25,58,56,.08);
    }
    .bottom-link {
      min-height: 58px; border: 0; background: transparent; color: #7c8988; border-radius: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; font-weight: 900; cursor: pointer; position: relative;
    }
    .bottom-link .icon { width: 22px; height: 22px; }
    .bottom-link.active { color: var(--secondary-dark); background: var(--secondary-soft); }
    .bottom-link.active::before { content: ""; position: absolute; top: 3px; width: 19px; height: 3px; border-radius: 99px; background: var(--secondary); }
    .bottom-link.create { color: var(--primary-dark); }
    .bottom-link.create .nav-plus {
      margin-top: -22px; width: 52px; height: 52px; border-radius: 18px; background: var(--primary); color: white; display: grid; place-items: center; border: 5px solid white; box-shadow: 0 8px 20px rgba(233,101,75,.28);
    }

    /* Modal / sheet */
    .modal-backdrop {
      position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-end; justify-content: center; padding: 0; background: rgba(11,31,34,.52); backdrop-filter: blur(5px);
    }
    .modal-backdrop.open { display: flex; }
    .modal {
      width: 100%; max-height: 92vh; overflow: auto; background: var(--bg); border-radius: 28px 28px 0 0; box-shadow: var(--shadow-md); animation: sheetUp .25s ease both;
    }
    @keyframes sheetUp { from { transform: translateY(26px); opacity: .6; } to { transform: none; opacity: 1; } }
    .modal-header { position: sticky; top: 0; z-index: 2; min-height: 68px; padding: 12px 16px; background: rgba(255,248,239,.93); backdrop-filter: blur(14px); display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
    .modal-header h2 { margin: 0; font-size: 21px; }
    .modal-body { padding: 18px 16px calc(22px + var(--safe-bottom)); }
    .modal-footer { position: sticky; bottom: 0; padding: 12px 16px calc(12px + var(--safe-bottom)); background: rgba(255,248,239,.96); backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: flex; gap: 10px; }
    .modal-footer .btn { flex: 1; }

    .form-grid { display: grid; gap: 14px; }
    .form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .field { display: grid; gap: 7px; }
    .field label { font-size: 12px; font-weight: 900; color: #455a59; }
    .field input, .field select, .field textarea {
      width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--ink); padding: 11px 13px;
    }
    .field textarea { min-height: 105px; resize: vertical; }
    .helper { color: var(--muted); font-size: 11px; line-height: 1.4; }
    .toggle-row { min-height: 54px; display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
    .toggle-row:first-child { border-top: 0; }
    .toggle-row > div:first-child { flex: 1; }
    .toggle-row strong { display: block; font-size: 14px; }
    .toggle-row small { color: var(--muted); }
    .switch { appearance: none; width: 49px; height: 29px; border-radius: 999px; background: #d8dfdd; position: relative; cursor: pointer; transition: .2s ease; }
    .switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 21px; height: 21px; border-radius: 50%; background: white; box-shadow: 0 2px 7px rgba(0,0,0,.18); transition: .2s ease; }
    .switch:checked { background: var(--secondary); }
    .switch:checked::after { transform: translateX(20px); }

    /* Wizard */
    .wizard-modal { max-height: 100vh; min-height: 100vh; border-radius: 0; }
    .wizard-top { padding: 13px 16px 10px; background: white; border-bottom: 1px solid var(--line); }
    .wizard-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .wizard-head strong { font-size: 16px; }
    .wizard-progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-top: 12px; }
    .wizard-progress span { height: 5px; border-radius: 99px; background: #e7e8e4; }
    .wizard-progress span.active { background: var(--primary); }
    .wizard-step-label { color: var(--muted); font-size: 11px; font-weight: 900; margin-top: 8px; }
    .wizard-content { padding: 22px 16px 110px; width: min(100%, 720px); margin: 0 auto; }
    .wizard-content h1 { font-size: 30px; }
    .wizard-step { display: none; }
    .wizard-step.active { display: block; animation: pageIn .22s ease; }
    .wizard-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; padding: 12px 16px calc(12px + var(--safe-bottom)); background: rgba(255,255,255,.95); backdrop-filter: blur(15px); border-top: 1px solid var(--line); display: flex; gap: 10px; }
    .wizard-footer .btn { flex: 1; }
    .choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .choice-card {
      min-height: 98px; border: 1px solid var(--line); border-radius: 18px; padding: 13px; background: white; text-align: left; cursor: pointer; position: relative;
    }
    .choice-card.selected { border-color: var(--secondary); background: var(--secondary-soft); box-shadow: inset 0 0 0 1px var(--secondary); }
    .choice-card .choice-icon { width: 39px; height: 39px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); color: var(--navy); margin-bottom: 11px; }
    .choice-card strong { display: block; font-size: 14px; }
    .choice-card small { color: var(--muted); font-size: 11px; }
    .choice-check { position: absolute; right: 10px; top: 10px; width: 21px; height: 21px; border: 2px solid #d4dcda; border-radius: 50%; display: grid; place-items: center; color: white; }
    .choice-card.selected .choice-check { background: var(--secondary); border-color: var(--secondary); }
    .choice-card.selected .choice-check::after { content: "✓"; font-size: 12px; font-weight: 900; }
    .participant-grid { display: grid; gap: 10px; }
    .participant-card { min-height: 72px; padding: 10px 12px; border: 1px solid var(--line); background: white; border-radius: 18px; display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left; position: relative; }
    .participant-card.selected { background: var(--secondary-soft); border-color: var(--secondary); }
    .participant-card .avatar { margin: 0; width: 46px; height: 46px; border: 0; }
    .participant-card > div:nth-child(2) { flex: 1; }
    .participant-card strong { display: block; }
    .participant-card small { color: var(--muted); }
    .participant-card .choice-check { position: static; }
    .summary-card { padding: 15px; margin-bottom: 12px; }
    .summary-row { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
    .summary-row:first-child { border-top: 0; }
    .summary-row .icon { color: var(--secondary); }
    .summary-row strong { display: block; font-size: 13px; }
    .summary-row p { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
    .ai-card { padding: 17px; background: linear-gradient(145deg, #f2ecff, #eaf8f5); border: 1px solid #d8d2ed; border-radius: 20px; }
    .ai-card-head { display: flex; gap: 12px; align-items: flex-start; }
    .ai-spark { width: 45px; height: 45px; border-radius: 15px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, #7559b2, #4f8a8c); }
    .ai-card p { color: #59626a; font-size: 12px; line-height: 1.5; margin: 5px 0 0; }

    .loading-overlay {
      position: fixed; inset: 0; z-index: 140; display: none; place-items: center; padding: 24px; background: rgba(255,248,239,.96); backdrop-filter: blur(15px);
    }
    .loading-overlay.open { display: grid; }
    .loading-card { width: min(100%, 380px); text-align: center; }
    .loader-orbit { width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 22px; position: relative; display: grid; place-items: center; background: var(--secondary-soft); color: var(--secondary-dark); }
    .loader-orbit::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--primary); border-right-color: var(--secondary); animation: spin 1.2s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .loading-card h2 { font-size: 25px; }
    .loading-card p { color: var(--muted); min-height: 44px; line-height: 1.45; }
    .loading-dots { display: flex; justify-content: center; gap: 6px; }
    .loading-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--secondary); animation: pulse 1s ease-in-out infinite; }
    .loading-dots span:nth-child(2) { animation-delay: .15s; }
    .loading-dots span:nth-child(3) { animation-delay: .3s; }
    @keyframes pulse { 0%,100% { opacity: .25; transform: scale(.85); } 50% { opacity: 1; transform: scale(1); } }

    .toast {
      position: fixed; left: 50%; bottom: calc(88px + var(--safe-bottom)); z-index: 160; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; width: min(calc(100% - 28px), 420px); padding: 13px 15px; background: #173234; color: white; border-radius: 15px; box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; transition: .22s ease;
    }
    .toast.show { opacity: 1; transform: translate(-50%, 0); }

    .context-menu {
      position: fixed; z-index: 130; width: 210px; padding: 7px; border-radius: 16px; background: white; border: 1px solid var(--line); box-shadow: var(--shadow-md); display: none;
    }
    .context-menu.open { display: block; }
    .context-menu button { width: 100%; min-height: 43px; padding: 0 10px; border: 0; background: transparent; border-radius: 11px; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; font-size: 13px; font-weight: 800; }
    .context-menu button:hover { background: var(--surface-2); }
    .context-menu .danger { color: var(--danger); }

    .empty-state { padding: 32px 18px; text-align: center; }
    .empty-icon { width: 66px; height: 66px; border-radius: 22px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); margin: 0 auto 14px; }
    .empty-state p { color: var(--muted); max-width: 340px; margin: 0 auto 15px; line-height: 1.5; }

    .login-screen {
      position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 22px; background:
        radial-gradient(circle at 15% 0%, rgba(233,101,75,.2), transparent 22rem),
        radial-gradient(circle at 90% 90%, rgba(29,143,128,.18), transparent 25rem),
        var(--bg);
    }
    .login-screen.open { display: flex; }
    .login-card { width: min(100%, 420px); padding: 24px; border-radius: 28px; background: rgba(255,255,255,.92); border: 1px solid var(--line); box-shadow: var(--shadow-md); }
    .login-card .brand { margin-bottom: 30px; }
    .login-card h1 { font-size: 34px; }
    .login-card .lead { margin-bottom: 23px; }
    .login-note { padding: 12px; margin-top: 15px; border-radius: 14px; background: var(--secondary-soft); color: var(--secondary-dark); font-size: 12px; line-height: 1.45; }

    @media (min-width: 720px) {
      .page-container { padding-left: 24px; padding-right: 24px; }
      .hero-grid { grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); align-items: stretch; }
      .quick-actions { grid-template-columns: 1fr; }
      .quick-action { min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; }
      .trip-list, .recent-grid, .family-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .settings-grid { grid-template-columns: 1.1fr .9fr; align-items: start; }
      .packing-toolbar { grid-template-columns: minmax(260px, .75fr) 1.25fr; align-items: center; }
      .choice-grid { grid-template-columns: repeat(3, 1fr); }
      .participant-grid { grid-template-columns: repeat(2, 1fr); }
      .modal-backdrop { align-items: center; padding: 24px; }
      .modal { max-width: 600px; border-radius: 28px; max-height: 88vh; }
      .wizard-modal { max-width: 860px; min-height: auto; border-radius: 28px; }
      .wizard-footer { position: sticky; left: auto; right: auto; bottom: 0; }
    }

    @media (min-width: 1024px) {
      .desktop-sidebar { display: flex; flex-direction: column; }
      .app-main { margin-left: 260px; }
      .topbar .brand { display: none; }
      .topbar { justify-content: flex-end; padding-left: 26px; padding-right: 26px; }
      .bottom-nav { display: none; }
      .page-container { padding-top: 32px; padding-bottom: 50px; }
      .packing-fab { right: 30px; bottom: 30px; }
      .toast { bottom: 30px; }
      .trip-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .recent-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .family-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .category-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
      .category-card.wide { grid-column: 1 / -1; }
      .wizard-footer { position: sticky; }
    }

    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    }


    /* -----------------------------------------------------------------
       Brand refinement – quieter, editorial and less template-like
       ----------------------------------------------------------------- */
    :root {
      --bg: #f1efe8;
      --surface: #fffefa;
      --surface-2: #eae7df;
      --surface-3: #e6ece7;
      --ink: #202621;
      --muted: #687068;
      --line: #d7d3c9;
      --primary: #b94f38;
      --primary-dark: #8e3929;
      --primary-soft: #f3e1dc;
      --secondary: #3d6257;
      --secondary-dark: #29483f;
      --secondary-soft: #dfe9e4;
      --gold: #b88a3a;
      --danger: #a43d43;
      --success: #3f6a59;
      --navy: #263830;
      --shadow-sm: 0 1px 2px rgba(32, 38, 33, .05), 0 8px 22px rgba(32, 38, 33, .05);
      --shadow-md: 0 3px 8px rgba(32, 38, 33, .08), 0 20px 48px rgba(32, 38, 33, .10);
      --radius-sm: 8px;
      --radius-md: 13px;
      --radius-lg: 18px;
    }

    body {
      background: var(--bg);
      font-family: Aptos, "Helvetica Neue", Helvetica, Arial, sans-serif;
      font-size: 15px;
      letter-spacing: -.005em;
    }

    h1, h2, .brand > span:last-child, .trip-hero h2, .login-card h1 {
      font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
      font-weight: 700;
    }
    h1 { letter-spacing: -.035em; }
    h2 { letter-spacing: -.025em; }
    h3 { letter-spacing: -.012em; }

    .desktop-sidebar {
      width: 248px;
      background: #f8f6f0;
      backdrop-filter: none;
      border-right-color: var(--line);
    }
    .app-main { background: transparent; }

    .brand {
      gap: 12px;
      font-size: 23px;
      font-weight: 700;
      letter-spacing: -.025em;
    }
    .brand-mark {
      position: relative;
      width: 38px;
      height: 43px;
      border-radius: 3px;
      clip-path: polygon(0 0, 72% 0, 100% 24%, 100% 100%, 0 100%);
      display: grid;
      place-items: center;
      color: #fffefa;
      background: var(--ink);
      box-shadow: none;
      transform: rotate(-2deg);
    }
    .brand-mark::after {
      content: "";
      position: absolute;
      top: 7px;
      right: 7px;
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: var(--bg);
      box-shadow: 0 0 0 1px rgba(255,255,255,.35);
    }
    .brand-letter {
      font-family: "Iowan Old Style", Georgia, serif;
      font-size: 23px;
      font-weight: 700;
      line-height: 1;
      margin-top: 4px;
    }
    .brand small {
      margin-top: 2px;
      color: var(--muted);
      font-family: Aptos, "Helvetica Neue", Helvetica, Arial, sans-serif;
      font-size: 9px;
      letter-spacing: .13em;
      font-weight: 700;
    }
    .topbar .brand { font-size: 21px; }
    .topbar .brand-mark { width: 34px; height: 38px; border-radius: 3px; }
    .topbar .brand-letter { font-size: 20px; }

    .topbar {
      min-height: 68px;
      background: rgba(241,239,232,.94);
      backdrop-filter: blur(10px);
      border-bottom-color: var(--line);
    }

    .side-link {
      min-height: 46px;
      border-radius: 8px;
      font-weight: 650;
      color: #59615a;
    }
    .side-link.active {
      color: var(--ink);
      background: #e5e1d7;
      box-shadow: inset 3px 0 0 var(--primary);
    }
    .side-link.active::after { display: none; }
    .side-card {
      border-radius: 12px;
      background: var(--ink);
    }

    .eyebrow {
      color: var(--secondary-dark);
      font-size: 11px;
      font-weight: 750;
      letter-spacing: .12em;
    }
    .lead { color: #697169; }

    .card,
    .packing-header,
    .category-card,
    .login-card,
    .modal,
    .wizard-modal {
      background: var(--surface);
      border-color: var(--line);
      box-shadow: var(--shadow-sm);
    }

    .trip-hero {
      border: 1px solid #294a41;
      border-radius: 16px;
      background: #31574d;
      box-shadow: 0 14px 34px rgba(38, 56, 48, .16);
    }
    .trip-hero::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      opacity: .10;
      background-image: repeating-linear-gradient(125deg, transparent 0 28px, rgba(255,255,255,.5) 29px 30px);
    }
    .trip-hero::after {
      width: 140px;
      height: 140px;
      right: -78px;
      bottom: -82px;
      border-width: 1px;
      opacity: .65;
    }
    .trip-hero > * { position: relative; z-index: 1; }
    .trip-hero .eyebrow { color: #e4eee8; }
    .hero-stat {
      border-radius: 9px;
      background: rgba(255,255,255,.08);
      border-color: rgba(255,255,255,.18);
      backdrop-filter: none;
    }
    .progress-track { height: 7px; }
    .progress-bar { background: #e0b660; }

    .btn {
      min-height: 44px;
      border-radius: 8px;
      font-weight: 700;
      transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
    }
    .btn-primary,
    .btn-secondary { box-shadow: none; }
    .btn-primary { background: var(--primary); }
    .btn-secondary { background: var(--secondary); }
    .btn-primary:hover { background: var(--primary-dark); box-shadow: none; }
    .btn-white { background: #fffefa; }
    .btn-soft { background: var(--secondary-soft); }

    .icon-button {
      border-radius: 8px;
      background: var(--surface);
      box-shadow: none;
    }
    .avatar-button { border-width: 1px; background: #e4c1aa; box-shadow: none; }

    .quick-action {
      min-height: 112px;
      border-radius: 12px;
      box-shadow: none;
    }
    .quick-action .bubble,
    .category-icon,
    .ai-spark,
    .empty-icon {
      border-radius: 8px;
    }
    .quick-action strong,
    .side-card strong,
    .member-row-info strong,
    .category-title strong { font-weight: 700; }

    .status-pill, .tag, .rule-count {
      border-radius: 6px;
      font-weight: 700;
    }
    .status-pill.ai { background: #ece7dd; color: #655d4d; }
    .status-pill.draft { background: #efe6cf; color: #755a23; }

    .segmented {
      border-radius: 10px;
      background: #e9e6de;
    }
    .segmented button { border-radius: 7px; font-weight: 700; }
    .segmented button.active { box-shadow: none; }

    .packing-header {
      border-radius: 14px;
      background: var(--surface);
    }
    .search-input,
    .field input,
    .field select,
    .field textarea {
      border-radius: 8px;
      background: #fffefa;
    }
    .chip {
      min-height: 36px;
      border-radius: 8px;
      font-weight: 700;
    }
    .chip.active { border-color: #9db4aa; }
    .category-header { background: var(--surface); }
    .pack-item { background: var(--surface); }
    .pack-check { border-radius: 5px; }

    .ai-card {
      border-radius: 12px;
      background: #eeebe3;
      border: 1px solid var(--line);
      border-left: 4px solid var(--secondary);
    }
    .ai-spark {
      color: var(--secondary-dark);
      background: #d9e3de;
    }

    .notice-card {
      border-radius: 10px;
      background: #f0e8d5;
      border-color: #d9c79e;
    }

    .login-screen {
      background: #e9e6dd;
    }
    .login-card { border-radius: 16px; }
    .login-note { border-radius: 8px; }

    .modal-backdrop { background: rgba(28, 32, 29, .46); }
    .modal,
    .wizard-modal { border-radius: 16px; }
    .context-menu { border-radius: 10px; }
    .context-menu button { border-radius: 6px; }

    @media (min-width: 1024px) {
      .app-main { margin-left: 248px; }
    }


    /* -----------------------------------------------------------------
       Public landing page + OTP entry
       ----------------------------------------------------------------- */
    .landing-page {
      min-height: 100vh;
      background: var(--bg);
      overflow: hidden;
    }
    .landing-shell {
      width: min(calc(100% - 32px), 1160px);
      margin: 0 auto;
    }
    .landing-header {
      min-height: 76px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      border-bottom: 1px solid var(--line);
    }
    .landing-header .brand { flex: 0 0 auto; }
    .landing-nav { display: none; align-items: center; gap: 28px; margin-left: auto; }
    .landing-nav a {
      color: #515a52;
      text-decoration: none;
      font-size: 14px;
      font-weight: 650;
    }
    .landing-nav a:hover { color: var(--ink); }
    .landing-login {
      min-height: 42px;
      padding: 0 14px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--surface);
      cursor: pointer;
      font-weight: 700;
    }
    .landing-login:hover { border-color: #aaa398; }

    .landing-hero {
      position: relative;
      display: grid;
      gap: 42px;
      padding: 68px 0 76px;
    }
    .landing-hero::before {
      content: "";
      position: absolute;
      z-index: 0;
      width: 340px;
      height: 340px;
      left: -220px;
      top: 45px;
      border: 1px solid #d5d0c5;
      border-radius: 50%;
    }
    .landing-hero-copy,
    .landing-preview { position: relative; z-index: 1; }
    .landing-kicker {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 18px;
      color: var(--secondary-dark);
      font-size: 11px;
      font-weight: 750;
      letter-spacing: .13em;
      text-transform: uppercase;
    }
    .landing-kicker::before { content: ""; width: 30px; height: 1px; background: var(--secondary); }
    .landing-hero h1 {
      max-width: 720px;
      margin-bottom: 20px;
      font-size: clamp(43px, 12.5vw, 78px);
      line-height: .96;
      letter-spacing: -.052em;
    }
    .landing-hero h1 em { color: var(--primary); font-style: normal; }
    .landing-hero .lead {
      max-width: 610px;
      font-size: clamp(17px, 4.4vw, 20px);
      line-height: 1.55;
    }
    .landing-hero-actions {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 10px;
      margin-top: 28px;
    }
    .landing-hero-actions .btn { min-height: 50px; }
    .landing-subnote {
      display: flex;
      flex-wrap: wrap;
      gap: 10px 18px;
      margin-top: 17px;
      color: #687068;
      font-size: 12px;
      font-weight: 650;
    }
    .landing-subnote span { display: inline-flex; align-items: center; gap: 6px; }

    .landing-preview {
      width: min(100%, 470px);
      justify-self: center;
    }
    .preview-window {
      position: relative;
      padding: 13px;
      border: 1px solid #cfc9be;
      background: #dad5ca;
      box-shadow: 0 24px 54px rgba(42, 45, 40, .14);
      transform: rotate(1.2deg);
    }
    .preview-window::before {
      content: "MITVIGYEK / 01";
      position: absolute;
      right: -10px;
      top: 66px;
      padding: 7px 9px;
      background: var(--primary);
      color: #fff;
      font-size: 9px;
      font-weight: 800;
      letter-spacing: .13em;
      transform: rotate(90deg) translateX(100%);
      transform-origin: right top;
    }
    .preview-app {
      overflow: hidden;
      border: 1px solid #c8c2b7;
      background: var(--surface);
    }
    .preview-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 56px;
      padding: 9px 13px;
      border-bottom: 1px solid var(--line);
      background: #f4f1e9;
    }
    .preview-brand { display: flex; align-items: center; gap: 9px; font-family: "Iowan Old Style", Georgia, serif; font-weight: 700; }
    .preview-brand .brand-mark { width: 27px; height: 31px; }
    .preview-brand .brand-letter { font-size: 16px; }
    .preview-avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: #e4c1aa; font-size: 10px; font-weight: 800; }
    .preview-body { padding: 18px 15px 17px; }
    .preview-body > small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 750; }
    .preview-body h3 { margin: 5px 0 12px; font-family: "Iowan Old Style", Georgia, serif; font-size: 25px; }
    .preview-trip {
      padding: 15px;
      border: 1px solid #294a41;
      background: #31574d;
      color: #fff;
    }
    .preview-trip-head { display: flex; justify-content: space-between; gap: 10px; }
    .preview-trip strong { font-family: "Iowan Old Style", Georgia, serif; font-size: 19px; }
    .preview-trip small { color: rgba(255,255,255,.7); }
    .preview-progress { height: 5px; margin-top: 14px; background: rgba(255,255,255,.18); }
    .preview-progress span { display: block; width: 63%; height: 100%; background: #e0b660; }
    .preview-list { margin-top: 12px; border: 1px solid var(--line); }
    .preview-item {
      display: grid;
      grid-template-columns: 22px 1fr auto;
      align-items: center;
      gap: 9px;
      min-height: 48px;
      padding: 7px 10px;
      border-bottom: 1px solid var(--line);
      font-size: 12px;
    }
    .preview-item:last-child { border-bottom: 0; }
    .preview-check { width: 19px; height: 19px; display: grid; place-items: center; border: 1px solid #a9a399; border-radius: 4px; }
    .preview-check.checked { background: var(--secondary); border-color: var(--secondary); color: #fff; }
    .preview-item small { color: var(--muted); }
    .preview-person { padding: 3px 6px; background: #ece8df; color: #5f625c; font-size: 9px; font-weight: 700; }
    .landing-handnote {
      width: fit-content;
      margin: -4px 10px 0 auto;
      padding: 8px 11px;
      background: #efe2bd;
      box-shadow: 0 7px 16px rgba(55, 50, 38, .09);
      color: #5b4b27;
      font-family: "Bradley Hand", "Segoe Print", cursive;
      font-size: 13px;
      transform: rotate(-2.5deg);
    }

    .landing-section { padding: 74px 0; border-top: 1px solid var(--line); }
    .landing-section-head { max-width: 690px; margin-bottom: 32px; }
    .landing-section-head h2 { font-size: clamp(34px, 9vw, 53px); line-height: 1.02; }
    .landing-section-head p { color: var(--muted); font-size: 16px; line-height: 1.6; }
    .landing-number { display: inline-block; margin-bottom: 13px; color: var(--primary); font-family: "Iowan Old Style", Georgia, serif; font-size: 16px; }

    .problem-band {
      padding: 26px 0;
      border-top: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      background: var(--ink);
      color: #fffefa;
    }
    .problem-band .landing-shell { display: grid; gap: 18px; }
    .problem-line { font-family: "Iowan Old Style", Georgia, serif; font-size: clamp(25px, 7vw, 38px); line-height: 1.14; }
    .problem-line em { color: #e0b660; font-style: normal; }
    .problem-note { max-width: 480px; color: #bec5bf; line-height: 1.55; }

    .step-grid { display: grid; gap: 14px; }
    .landing-step {
      min-height: 215px;
      padding: 22px;
      border: 1px solid var(--line);
      background: var(--surface);
    }
    .landing-step-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .landing-step-index { color: var(--primary); font-family: "Iowan Old Style", Georgia, serif; font-size: 30px; }
    .landing-step-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface-2); }
    .landing-step h3 { margin-top: 34px; font-size: 21px; }
    .landing-step p { margin-bottom: 0; color: var(--muted); line-height: 1.55; }

    .feature-layout { display: grid; gap: 22px; }
    .feature-visual {
      min-height: 430px;
      padding: 18px;
      border: 1px solid #294a41;
      background: #31574d;
      color: #fff;
    }
    .feature-visual-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.18); }
    .feature-visual-head h3 { font-family: "Iowan Old Style", Georgia, serif; font-size: 27px; }
    .feature-visual-head p { color: rgba(255,255,255,.67); font-size: 12px; }
    .feature-rule { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 11px; min-height: 68px; border-bottom: 1px solid rgba(255,255,255,.14); }
    .feature-rule-icon { width: 32px; height: 32px; display: grid; place-items: center; background: rgba(255,255,255,.09); }
    .feature-rule small { display: block; color: rgba(255,255,255,.62); }
    .feature-rule-tag { padding: 4px 7px; border: 1px solid rgba(255,255,255,.2); font-size: 10px; font-weight: 700; }
    .feature-copy { display: grid; align-content: center; gap: 21px; }
    .feature-point { display: grid; grid-template-columns: 34px 1fr; gap: 12px; }
    .feature-point-index { color: var(--primary); font-family: "Iowan Old Style", Georgia, serif; font-size: 23px; }
    .feature-point h3 { margin-bottom: 4px; }
    .feature-point p { margin: 0; color: var(--muted); line-height: 1.55; }

    .privacy-panel {
      display: grid;
      gap: 24px;
      padding: 27px;
      border: 1px solid var(--line);
      background: #e6ece7;
    }
    .privacy-panel h2 { font-size: clamp(32px, 8vw, 48px); }
    .privacy-panel p { color: #59655e; line-height: 1.6; }
    .privacy-list { display: grid; gap: 10px; }
    .privacy-item { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
    .privacy-item .icon { color: var(--secondary); }

    .landing-final { padding: 76px 0 84px; text-align: center; }
    .landing-final h2 { max-width: 800px; margin: 0 auto 18px; font-size: clamp(39px, 10vw, 66px); line-height: .98; }
    .landing-final p { max-width: 560px; margin: 0 auto 27px; color: var(--muted); font-size: 17px; line-height: 1.6; }
    .landing-final .btn { min-height: 51px; }
    .landing-footer { padding: 24px 0 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
    .landing-footer-inner { display: flex; flex-direction: column; gap: 14px; }
    .landing-footer-links { display: flex; flex-wrap: wrap; gap: 14px 22px; }
    .landing-footer a { color: inherit; text-decoration: none; }

    .auth-card { position: relative; }
    .auth-close { position: absolute; right: 17px; top: 17px; }
    .auth-step[hidden] { display: none !important; }
    .auth-back {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-height: 34px;
      margin-bottom: 14px;
      padding: 0;
      border: 0;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      font-weight: 700;
    }
    .otp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin: 15px 0; }
    .otp-input {
      width: 100%;
      min-width: 0;
      height: 52px;
      padding: 0;
      border: 1px solid #bdb7ac;
      border-radius: 7px;
      background: #fffefa;
      color: var(--ink);
      text-align: center;
      font-size: 22px;
      font-weight: 750;
      caret-color: var(--primary);
    }
    .otp-input:focus { border-color: var(--secondary); outline: 3px solid rgba(61,98,87,.14); }
    .auth-email-label { color: var(--ink); font-weight: 750; }
    .auth-resend { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; color: var(--muted); font-size: 12px; }
    .auth-resend button { border: 0; background: transparent; color: var(--secondary-dark); cursor: pointer; font-weight: 750; }
    .auth-error { min-height: 18px; margin: 8px 0 0; color: var(--danger); font-size: 12px; font-weight: 650; }
    .auth-success { display: grid; place-items: center; min-height: 300px; text-align: center; }
    .auth-success-mark { width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 18px; background: var(--secondary); color: #fff; }

    @media (min-width: 560px) {
      .landing-hero-actions { flex-direction: row; align-items: center; }
      .landing-hero-actions .btn { min-width: 178px; }
    }
    @media (min-width: 780px) {
      .landing-nav { display: flex; }
      .landing-hero { grid-template-columns: minmax(0, 1.1fr) minmax(360px, .72fr); align-items: center; padding: 94px 0 104px; }
      .landing-preview { justify-self: end; }
      .problem-band .landing-shell { grid-template-columns: 1.15fr .65fr; align-items: center; }
      .step-grid { grid-template-columns: repeat(3, 1fr); }
      .feature-layout { grid-template-columns: minmax(360px, .86fr) minmax(340px, 1fr); gap: 62px; }
      .privacy-panel { grid-template-columns: 1fr .92fr; align-items: center; padding: 44px; }
      .landing-footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
    }
    @media (min-width: 1040px) {
      .landing-shell { width: min(calc(100% - 64px), 1160px); }
      .landing-header { min-height: 84px; }
      .landing-section { padding: 100px 0; }
    }

  
/* Development-only OpenAI request/response viewer. */
.ai-debug-button {
  margin: 14px 0 16px;
  width: 100%;
  justify-content: center;
  border-style: dashed;
}
.ai-debug-notice {
  margin-bottom: 14px;
  background: var(--secondary-soft);
  border-color: #c7e5de;
  color: var(--secondary-dark);
}
.ai-debug-error {
  margin: 14px 0;
  background: #fff0f1;
  border-color: #efc7cb;
  color: var(--danger);
}
.ai-debug-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.ai-debug-meta-row {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .48);
}
.ai-debug-meta-row span,
.ai-debug-meta-row strong {
  display: block;
  overflow-wrap: anywhere;
}
.ai-debug-meta-row span {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.ai-debug-meta-row strong { font-size: 13px; }
.ai-debug-section {
  margin-top: 10px;
  border: 1px solid var(--line);
  background: #fffdf9;
}
.ai-debug-section summary {
  min-height: 44px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 750;
}
.ai-debug-code {
  max-height: 340px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border-top: 1px solid var(--line);
  background: #222723;
  color: #f4f0e8;
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}
@media (max-width: 520px) {
  .ai-debug-meta { grid-template-columns: 1fr; }
  .ai-debug-code { max-height: 280px; }
}
