

    :root {
      --sand: #F4EDE1;
      --sand-2: #EBE1D0;
      --paper: #FFFCF7;
      --ink: #221A14;
      --ink-2: #5A5046;
      --ink-3: #8A7E72;
      --line: #E8DCCB;
      --terra: #C24E24;
      --terra-d: #9A3816;
      --terra-s: #F8E6DC;
      --teal: #1A6B5C;
      --teal-d: #0F4A40;
      --teal-s: #E4F3EF;
      --gold: #C99A2E;
      --gold-s: #F8EFCC;
      --rose: #B42318;
      --sky: #3D6B8C;
      --shadow: 0 10px 30px rgba(34, 26, 20, 0.08);
      --shadow-sm: 0 2px 10px rgba(34, 26, 20, 0.06);
      --nav-h: 72px;
      --radius: 20px;
      --font: "Cairo", "Noto Sans Arabic", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif;
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    html, body { height: 100%; overflow-x: hidden; max-width: 100%; }
    body {
      font-family: var(--font);
      background: var(--sand);
      color: var(--ink);
      line-height: 1.7;
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
    }
    button, input, select, textarea { font-family: inherit; font-size: 16px; }
    button { cursor: pointer; border: 0; background: none; color: inherit; }
    img { max-width: 100%; }
    a { color: var(--teal); }
    #app, #shell { min-height: 100%; max-width: 100%; overflow-x: hidden; }
    .hidden { display: none !important; }

    /* ========== Onboarding ========== */
    #onboarding {
      min-height: 100dvh;
      background:
        radial-gradient(1200px 500px at 100% -10%, rgba(194, 78, 36, 0.18), transparent 55%),
        radial-gradient(900px 420px at 0% 100%, rgba(26, 107, 92, 0.16), transparent 50%),
        var(--sand);
      padding: 28px 20px 40px;
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .ob-brand { text-align: center; margin: 12px 0 22px; }
    .logo {
      width: 72px; height: 72px;
      display: inline-flex; align-items: center; justify-content: center;
      filter: drop-shadow(0 8px 16px rgba(194, 78, 36, 0.28));
    }
    .logo svg, .logo img, .logo-img { width: 72px; height: 72px; display: block; }
    .ob-brand h1 {
      font-size: 1.85rem; font-weight: 800; letter-spacing: -0.02em;
      margin-top: 10px; color: var(--ink);
    }
    .ob-brand p { color: var(--ink-2); font-size: 0.98rem; margin-top: 4px; }
    .ob-card {
      width: 100%; max-width: 480px;
      background: var(--paper);
      border-radius: 28px;
      padding: 22px 20px 24px;
      box-shadow: var(--shadow);
      border: 1px solid rgba(255,255,255,0.7);
    }
    .ob-card h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: 4px; }
    .ob-card .hint { color: var(--ink-3); font-size: 0.88rem; margin-bottom: 16px; }

    /* ========== Forms ========== */
    .field { margin-bottom: 14px; }
    .field label {
      display: block; font-weight: 700; font-size: 0.86rem;
      margin-bottom: 6px; color: var(--ink);
    }
    .field input, .field select, .field textarea {
      width: 100%;
      background: #fff;
      border: 1.5px solid var(--line);
      border-radius: 14px;
      padding: 12px 14px;
      color: var(--ink);
      outline: none;
      transition: border-color .15s, box-shadow .15s;
    }
    .field textarea { min-height: 88px; resize: vertical; }
    .field input:focus, .field select:focus, .field textarea:focus {
      border-color: var(--terra);
      box-shadow: 0 0 0 4px rgba(194, 78, 36, 0.12);
    }
    .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .field-label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--ink-2); }
    .field > .hint { margin: 6px 0 0; font-size: 0.8rem; color: var(--ink-3); font-weight: 600; }
    .chips { display: flex; flex-wrap: wrap; gap: 8px; }
    .chip {
      border: 1.5px solid var(--line);
      background: #fff;
      color: var(--ink-2);
      border-radius: 999px;
      padding: 6px 12px;
      font-size: 0.86rem;
      font-weight: 600;
      transition: .15s;
    }
    .chip.on {
      background: var(--teal-s);
      border-color: var(--teal);
      color: var(--teal-d);
    }
    .btn {
      display: inline-flex; align-items: center; justify-content: center; gap: 8px;
      border-radius: 14px;
      padding: 12px 18px;
      font-weight: 800;
      transition: transform .12s, background .15s, box-shadow .15s;
    }
    .btn:active { transform: scale(0.98); }
    .btn-primary {
      background: linear-gradient(180deg, #D05A2C, var(--terra));
      color: #fff;
      box-shadow: 0 8px 18px rgba(194, 78, 36, 0.28);
    }
    .btn-primary:hover { background: var(--terra-d); }
    .btn-teal {
      background: linear-gradient(180deg, #218574, var(--teal));
      color: #fff;
      box-shadow: 0 8px 18px rgba(26, 107, 92, 0.22);
    }
    .btn-ghost {
      background: #fff;
      border: 1.5px solid var(--line);
      color: var(--ink);
    }
    .btn-danger {
      background: #FDECEC;
      color: var(--rose);
      border: 1.5px solid #F5C6C2;
    }
    .btn-block { width: 100%; }
    .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

    /* ========== Shell ========== */
    #shell { min-height: 100dvh; display: flex; flex-direction: column; }
    .topbar {
      position: sticky; top: 0; z-index: 20;
      background: rgba(244, 237, 225, 0.88);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      padding: 10px 18px 8px;
      display: flex; align-items: center; justify-content: space-between; gap: 10px;
      border-bottom: 1px solid rgba(232, 220, 203, 0.7);
    }
    .brand-mini { display: flex; align-items: center; gap: 10px; }
    .brand-mini .logo { width: 40px; height: 40px; filter: drop-shadow(0 4px 8px rgba(194,78,36,.25)); }
    .brand-mini .logo svg, .brand-mini .logo img { width: 40px; height: 40px; display: block; }
    .brand-mini strong { display: block; font-size: 1.02rem; font-weight: 800; line-height: 1.2; }
    .brand-mini span { display: block; font-size: 0.72rem; color: var(--ink-3); font-weight: 600; }
    .main {
      flex: 1;
      width: min(920px, 100%);
      max-width: 100%;
      min-width: 0;
      margin: 0 auto;
      padding: 14px 16px calc(var(--nav-h) + 40px);
      overflow-x: hidden;
    }
    .view { max-width: 100%; min-width: 0; }
    .view { animation: fadeUp .28s ease; }
    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: none; }
    }

    /* ========== Bottom nav ========== */
    .nav {
      position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
      height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
      padding: 6px 10px env(safe-area-inset-bottom, 0px);
      background: rgba(255, 252, 247, 0.94);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border-top: 1px solid var(--line);
      display: flex; justify-content: space-around; align-items: flex-start;
      max-width: 920px; margin: 0 auto;
    }
    .nav-btn {
      flex: 1;
      display: flex; flex-direction: column; align-items: center; gap: 2px;
      color: var(--ink-3);
      font-size: 0.7rem; font-weight: 700;
      padding: 4px 2px;
    }
    .nav-btn svg { width: 24px; height: 24px; }
    .nav-btn.active { color: var(--terra); }
    .nav-btn.create .plus {
      width: 46px; height: 46px; margin-top: -18px;
      border-radius: 16px;
      background: linear-gradient(180deg, #D05A2C, var(--terra));
      color: #fff;
      display: flex; align-items: center; justify-content: center;
      box-shadow: 0 8px 16px rgba(194, 78, 36, 0.35);
    }
    .nav-btn.create { color: var(--terra-d); }
    .nav-btn.create.active .plus { outline: 3px solid rgba(194,78,36,.2); }

    /* ========== Discover ========== */
    .search-wrap { position: relative; margin-bottom: 12px; }
    .search-wrap svg {
      position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
      width: 20px; height: 20px; color: var(--ink-3); pointer-events: none;
    }
    .search-wrap input {
      width: 100%;
      background: var(--paper);
      border: 1.5px solid var(--line);
      border-radius: 16px;
      padding: 12px 44px 12px 14px;
      outline: none;
    }
    .search-wrap input:focus { border-color: var(--terra); box-shadow: 0 0 0 4px rgba(194,78,36,.1); }
    .filters { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; width: 100%; max-width: 100%; min-width: 0; padding: 0 0 8px; margin: 0 0 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .filters .chip, .filters select { flex-shrink: 0; }
    .type-filters {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      width: 100%;
      max-width: 100%;
      margin: 0 0 12px;
    }
    .type-filters-label {
      font-weight: 800;
      font-size: 0.86rem;
      color: var(--ink-2);
      width: 100%;
      text-align: start;
    }
    .type-chip, .type-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      text-align: start;
      flex: 0 1 auto;
      max-width: 100%;
      white-space: normal;
      line-height: 1.25;
    }
    #ct-types, #et-types, .type-filters {
      display: flex;
      flex-wrap: wrap;
      min-width: 0;
      width: 100%;
      max-width: 100%;
    }
    @media (max-width: 480px) {
      .type-chip, .type-pill {
        padding: 5px 10px;
        font-size: 0.8rem;
      }
    }
    .type-chip svg, .type-pill svg {
      width: 16px;
      height: 16px;
      flex: 0 0 16px;
    }
    .type-pill {
      border: 1.5px solid var(--line);
      background: var(--teal-s);
      color: var(--teal-d);
      border-radius: 999px;
      padding: 4px 10px;
      font-size: 0.78rem;
      font-weight: 700;
      line-height: 1.2;
    }
    .trip-types {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin: 8px 0 4px;
      text-align: start;
    }
    .filters::-webkit-scrollbar { display: none; }
    .filters select {
      border: 1.5px solid var(--line);
      background: var(--paper);
      border-radius: 999px;
      padding: 8px 10px;
      font-weight: 700;
      font-size: 0.84rem;
      color: var(--ink-2);
      outline: none;
      min-width: 0;
    }
    .section-head {
      display: flex; align-items: baseline; justify-content: space-between;
      margin: 6px 0 12px;
    }
    .section-head h2 { font-size: 1.15rem; font-weight: 800; }
    .section-head span { color: var(--ink-3); font-size: 0.82rem; font-weight: 600; }

    .trip-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
    @media (min-width: 720px) {
      .trip-grid, .people-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    }

    .trip-card {
      background: var(--paper);
      border-radius: 22px;
      overflow: hidden;
      box-shadow: var(--shadow-sm);
      border: 1px solid rgba(232,220,203,.7);
      text-align: right;
      width: 100%;
      display: block;
    }
    .trip-hero {
      height: 124px;
      position: relative;
      overflow: hidden;
    }
    .trip-hero svg { width: 100%; height: 100%; display: block; }
    .badge {
      position: absolute; top: 10px; right: 10px;
      background: rgba(255,252,247,.92);
      color: var(--terra-d);
      font-size: 0.7rem; font-weight: 800;
      padding: 3px 9px; border-radius: 999px;
    }
    .seats-pill {
      position: absolute; bottom: 10px; left: 10px;
      background: rgba(34,26,20,.72);
      color: #fff;
      font-size: 0.74rem; font-weight: 700;
      padding: 3px 10px; border-radius: 999px;
    }
    .seats-pill.full { background: rgba(180,35,24,.85); }
    .trip-body { padding: 12px 14px 14px; }
    .trip-body h3 { font-size: 1.05rem; font-weight: 800; line-height: 1.35; }
    .meta { color: var(--ink-2); font-size: 0.84rem; margin-top: 6px; display: grid; gap: 3px; }
    .meta-row { display: flex; align-items: center; gap: 6px; }
    .meta-row svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--ink-3); }
    .trip-actions { display: flex; gap: 8px; margin-top: 12px; }
    .trip-actions .btn { flex: 1; padding: 10px 12px; font-size: 0.9rem; }

    /* ========== Travelers ========== */
    .people-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .person-card {
      background: var(--paper);
      border-radius: 22px;
      padding: 16px;
      box-shadow: var(--shadow-sm);
      border: 1px solid rgba(232,220,203,.7);
      display: flex; flex-direction: column; gap: 10px;
      max-width: 100%;
      min-width: 0;
      overflow: hidden;
    }
    .person-top { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
    .avatar {
      width: 56px; height: 56px; border-radius: 18px; flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
      font-weight: 800; color: #fff; font-size: 1.15rem;
      position: relative; overflow: hidden;
    }
    .avatar.sm { width: 36px; height: 36px; border-radius: 12px; font-size: .85rem; }
    .avatar.lg { width: 84px; height: 84px; border-radius: 26px; font-size: 1.7rem; }
    .person-id { flex: 1; min-width: 0; overflow: hidden; }
    .person-id h3 { font-size: 1.02rem; font-weight: 800; line-height: 1.3; }
    .person-id .sub { color: var(--ink-3); font-size: 0.82rem; font-weight: 600; }
    .match {
      background: var(--gold-s);
      color: #7A5C10;
      font-weight: 800;
      font-size: 0.75rem;
      border-radius: 999px;
      padding: 4px 8px;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .bio { color: var(--ink-2); font-size: 0.88rem; }
    .tag {
      display: inline-block;
      background: var(--sand-2);
      color: var(--ink-2);
      font-size: 0.75rem; font-weight: 700;
      border-radius: 999px;
      padding: 3px 8px;
      margin: 0 0 6px 6px;
    }
    .sample-tag {
      background: var(--terra-s);
      color: var(--terra-d);
      font-size: 0.68rem;
      font-weight: 800;
      border-radius: 999px;
      padding: 2px 7px;
      margin-right: 6px;
    }

    /* ========== Trip detail / chat ========== */
    #trip-detail {
      position: fixed; inset: 0; z-index: 40;
      background: var(--sand);
      display: flex; flex-direction: column;
      overflow: hidden;
      animation: fadeUp .25s ease;
    }
    .td-top {
      background: var(--paper);
      border-bottom: 1px solid var(--line);
      padding: 8px 8px 0;
    }
    .td-nav {
      display: flex; align-items: center; justify-content: flex-start;
      gap: 8px;
      padding: 4px 52px 8px 8px;
      position: relative;
    }
    .td-nav .icon-btn { position: absolute; right: 8px; top: 4px; }
    .icon-btn {
      width: 40px; height: 40px; border-radius: 12px;
      display: flex; align-items: center; justify-content: center;
      background: var(--sand);
    }
    .icon-btn svg { width: 22px; height: 22px; }
    .td-nav h2 { flex: 1; min-width: 0; font-size: 1.05rem; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .td-hero { height: 88px; flex-shrink: 0; position: relative; border-radius: 0; overflow: hidden; }
    .td-hero svg { width: 100%; height: 100%; display: block; }
    .td-scroll { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
    .td-info { padding: 10px 16px 8px; flex-shrink: 0; }
    .td-info h1 { font-size: 1.35rem; font-weight: 900; line-height: 1.35; }
    .members { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
    .member { display: flex; flex-direction: column; align-items: center; width: 64px; flex-shrink: 0; }
    .member span { font-size: 0.7rem; font-weight: 700; color: var(--ink-2); text-align: center; line-height: 1.3; margin-top: 4px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .chat-wrap {
      margin: 8px 16px 16px;
      background: var(--paper);
      border-radius: 22px;
      border: 1px solid var(--line);
      display: flex; flex-direction: column;
      flex: 1;
      min-height: 200px;
      overflow: hidden;
    }
    .chat-head {
      padding: 10px 14px;
      border-bottom: 1px solid var(--line);
      font-weight: 800;
      font-size: 0.92rem;
      display: flex; align-items: center; gap: 8px;
    }
    .dot { width: 8px; height: 8px; border-radius: 50%; background: #27A36A; }
    .chat-log {
      flex: 1;
      padding: 12px;
      display: flex; flex-direction: column; gap: 8px;
      min-height: 0;
      flex: 1;
      overflow: auto;
      background:
        radial-gradient(circle at 20% 10%, rgba(194,78,36,.04), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(26,107,92,.05), transparent 40%),
        #FBF6EE;
    }
    .msg { display: flex; }
    .msg.mine { justify-content: flex-end; }
    .msg.theirs { justify-content: flex-start; }
    .bubble {
      max-width: 82%;
      padding: 8px 12px;
      border-radius: 16px;
      font-size: 0.9rem;
      line-height: 1.55;
    }
    .msg.theirs .bubble {
      background: #fff;
      border: 1px solid var(--line);
      border-top-right-radius: 6px;
    }
    .msg.mine .bubble {
      background: var(--teal);
      color: #fff;
      border-top-left-radius: 6px;
    }
    .bubble .who { font-size: 0.72rem; font-weight: 800; margin-bottom: 2px; opacity: .8; }
    .bubble .when { font-size: 0.68rem; opacity: .65; margin-top: 2px; }
    .chat-input {
      display: flex; gap: 8px; padding: 10px;
      border-top: 1px solid var(--line);
      background: #fff;
    }
    .chat-input input {
      flex: 1;
      border: 1.5px solid var(--line);
      border-radius: 14px;
      padding: 10px 12px;
      outline: none;
    }
    .chat-input input:focus { border-color: var(--teal); }
    .chat-input .btn { padding: 10px 14px; border-radius: 14px; }

    /* ========== Profile ========== */
    .profile-hero {
      background: var(--paper);
      border-radius: 24px;
      padding: 20px 16px;
      text-align: center;
      box-shadow: var(--shadow-sm);
      border: 1px solid rgba(232,220,203,.7);
      margin-bottom: 14px;
    }
    .profile-hero .avatar { margin: 0 auto 10px; }
    .empty {
      text-align: center;
      padding: 36px 16px;
      color: var(--ink-3);
    }
    .empty .illus { font-size: 2.4rem; margin-bottom: 8px; }
    .empty h3 { color: var(--ink); font-size: 1.05rem; margin-bottom: 4px; }
    .footer-note {
      text-align: center;
      color: var(--ink-3);
      font-size: 0.75rem;
      padding: 18px 8px 8px;
      line-height: 1.6;
    }

    /* ========== Toast ========== */
    #toasts {
      position: fixed;
      left: 50%;
      bottom: calc(var(--nav-h) + 12px);
      transform: translateX(-50%);
      z-index: 80;
      display: flex; flex-direction: column; gap: 8px;
      width: min(420px, calc(100% - 32px));
      pointer-events: none;
    }
    .toast {
      background: var(--ink);
      color: #fff;
      padding: 11px 14px;
      border-radius: 14px;
      font-weight: 700;
      font-size: 0.9rem;
      box-shadow: 0 10px 24px rgba(0,0,0,.2);
      animation: toastIn .25s ease;
      text-align: center;
    }
    @keyframes toastIn {
      from { opacity: 0; transform: translateY(8px); }
      to { opacity: 1; transform: none; }
    }

    .confirm-back {
      position: fixed; inset: 0; z-index: 350;
      background: rgba(34,26,20,.45);
      display: flex; align-items: center; justify-content: center;
      padding: 20px;
    }
    .confirm-card {
      background: var(--paper);
      border-radius: 22px;
      padding: 20px;
      width: min(400px, 100%);
      box-shadow: var(--shadow);
    }
    .confirm-card h3 { margin-bottom: 6px; }
    .confirm-card p { color: var(--ink-2); font-size: 0.92rem; margin-bottom: 16px; }
    .confirm-actions { display: flex; gap: 8px; }
    .confirm-actions .btn { flex: 1; }

    .typing { font-size: 0.8rem; color: var(--ink-3); padding: 0 4px; font-style: italic; }
  
    /* Logical + LTR support */
    .trip-card { text-align: start; }
    .search-wrap svg {
      right: auto; left: auto;
      inset-inline-start: 14px;
    }
    .search-wrap input { padding: 12px 14px; padding-inline-start: 44px; }
    .badge { right: auto; left: auto; inset-inline-start: 10px; }
    .seats-pill { left: auto; right: auto; inset-inline-end: 10px; }
    .td-nav { padding-inline-start: 52px; padding-inline-end: 8px; padding-top: 4px; padding-bottom: 8px; }
    .td-nav .icon-btn { right: auto; left: auto; inset-inline-start: 8px; top: 4px; }
    [dir="ltr"] .icon-back { transform: scaleX(-1); }
    .tag { margin: 0; margin-inline-end: 6px; margin-bottom: 6px; }
    .sample-tag { margin-right: 0; margin-inline-start: 6px; }
    .msg.theirs .bubble {
      border-top-right-radius: 16px;
      border-start-start-radius: 6px;
    }
    .msg.mine .bubble {
      border-top-left-radius: 16px;
      border-start-end-radius: 6px;
    }
    .msg { align-items: flex-end; gap: 8px; }
    .msg .msg-av { width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0; overflow: hidden; }
    .msg .msg-av img, .msg .msg-av svg { width: 100%; height: 100%; display: block; }
    .msg.mine .msg-av { order: 2; }

    /* Language picker */
    .lang-bar { width: 100%; max-width: 480px; margin: 0 auto 14px; }
    .lang-bar label { display: block; font-weight: 700; font-size: 0.82rem; margin-bottom: 6px; }
    .lang-select, select.lang-select {
      width: 100%;
      background: var(--paper);
      border: 1.5px solid var(--line);
      border-radius: 14px;
      padding: 10px 12px;
      font-weight: 700;
      color: var(--ink);
      outline: none;
    }
    .topbar .lang-select { width: auto; max-width: 148px; padding: 6px 8px; font-size: 0.78rem; border-radius: 12px; }

    /* Auth */
    #auth {
      min-height: 100dvh;
      background:
        radial-gradient(1200px 500px at 100% -10%, rgba(194, 78, 36, 0.18), transparent 55%),
        radial-gradient(900px 420px at 0% 100%, rgba(26, 107, 92, 0.16), transparent 50%),
        var(--sand);
      padding: 24px 20px 40px;
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .auth-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
    .auth-tabs .btn { flex: 1; }
    .auth-tabs .btn.on { background: var(--terra); color: #fff; border-color: var(--terra); }
    .or-row { text-align: center; color: var(--ink-3); font-size: 0.8rem; font-weight: 700; margin: 12px 0; }
    .account-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
    .account-row {
      display: flex; align-items: center; gap: 10px;
      width: 100%; text-align: start;
      background: #fff; border: 1.5px solid var(--line);
      border-radius: 14px; padding: 10px 12px;
      font-weight: 700;
    }
    .account-row:hover { border-color: var(--teal); }
    .account-row .meta { flex: 1; min-width: 0; }
    .account-row .meta strong { display: block; font-size: 0.92rem; }
    .account-row .meta span { display: block; font-size: 0.75rem; color: var(--ink-3); font-weight: 600; }

    /* Photo picker */
    .photo-picker { text-align: center; margin-bottom: 14px; }
    .photo-edit { position: relative; display: inline-block; }
    .photo-edit .avatar { margin: 0 auto; cursor: pointer; }
    .photo-edit .cam {
      position: absolute; inset-inline-end: -2px; bottom: -2px;
      width: 28px; height: 28px; border-radius: 10px;
      background: var(--teal); color: #fff;
      display: flex; align-items: center; justify-content: center;
      box-shadow: 0 4px 10px rgba(26,107,92,.3);
    }
    .photo-edit .cam svg { width: 16px; height: 16px; }
    .photo-actions { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
    .chips.scrollish { max-height: 170px; overflow: auto; padding-bottom: 4px; }
    .profile-hero .avatar.lg img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

    .pw-field { position: relative; }
    .pw-toggle {
      position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%);
      color: var(--ink-3); font-size: 0.78rem; font-weight: 800; padding: 4px;
    }

    .chat-log { overflow-x: hidden; padding-inline: 14px; }
    .msg { max-width: 100%; width: 100%; min-width: 0; box-sizing: border-box; }
    .msg .msg-av { flex: 0 0 28px; width: 28px; height: 28px; }
    .bubble { min-width: 0; }
    .msg .bubble { flex: 0 1 auto; max-width: calc(100% - 44px); }
    #auth { padding: 16px 20px 28px; }
    #auth .ob-brand { margin: 6px 0 12px; }
    #auth .logo { width: 64px; height: 64px; }
    #auth .logo svg, #auth .logo img { width: 64px; height: 64px; display: block; }
    #auth .ob-brand h1 { font-size: 1.65rem; margin-top: 6px; }
    #auth .ob-card { padding: 16px 16px 18px; }
    #auth .field { margin-bottom: 10px; }
    #auth .hint { font-size: 0.78rem; line-height: 1.45; }
    #auth .or-row { margin: 8px 0; }

    #auth .footer-note { padding-top: 10px; }
    .chat-wrap { overflow: hidden; }

    .chat-wrap { min-width: 0; }
    .chat-log { min-width: 0; min-height: 0; }

    .who-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
    .who-row .avatar, .who-row .msg-av { width: 22px; height: 22px; border-radius: 7px; flex: 0 0 22px; }
    .who-row .who { margin-bottom: 0; }
    .msg.mine { gap: 8px; }

  
    /* ===== Server app extras ===== */
    .test-banner, .trial-banner {
      background: #3D2A12;
      color: #F8EFCC;
      font-size: 0.78rem;
      font-weight: 700;
      text-align: center;
      padding: 8px 12px;
      line-height: 1.45;
      position: sticky;
      top: 0;
      z-index: 260;
    }
    .trial-banner {
      background: #5C2E16;
      color: #F8EFCC;
    }
    .install-strip {
      display: none;
      flex: 0 0 auto;
      justify-content: center;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      padding: 6px 12px;
      background: #F4EDE1;
      border-bottom: 1px solid rgba(43, 33, 24, 0.08);
    }
    body.has-install-ui .install-strip { display: flex; }
    .install-app-btn { font-weight: 800; font-size: 0.85rem; }
    .install-ios-hint {
      margin: 0;
      font-size: 0.8rem;
      color: #5C4E42;
      text-align: center;
      line-height: 1.45;
    }
    body.has-banner { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
    .test-banner, .trial-banner { position: relative; flex: 0 0 auto; }
    body.has-banner #app { flex: 1; min-height: 0; position: relative; overflow: hidden; }
    body.has-banner #shell {
      position: absolute; inset: 0;
      height: auto; min-height: 0;
      overflow: auto;
    }
    body.has-banner #trip-detail { position: absolute; inset: 0; }
    body.has-banner #auth, body.has-banner #onboarding {
      position: absolute; inset: 0;
      min-height: 0; height: auto;
      overflow: auto;
    }
    body.has-banner #legal-page,
    body.has-banner #profile-edit,
    body.has-banner #support {
      position: absolute; inset: 0;
      min-height: 0; height: auto;
      overflow: auto;
    }
    .topbar { flex-wrap: wrap; }
    .td-top { flex-shrink: 0; position: relative; z-index: 2; }
    .paywall-back {
      position: fixed; inset: 0; z-index: 400;
      background: rgba(34,26,20,.5);
      display: flex; align-items: flex-end; justify-content: center;
      padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    }
    @media (min-width: 640px) {
      .paywall-back { align-items: center; }
    }
    .paywall-card {
      background: var(--paper);
      border-radius: 24px;
      padding: 22px 20px 20px;
      width: min(440px, 100%);
      box-shadow: var(--shadow);
      max-height: min(90dvh, 720px);
      overflow: auto;
    }
    .paywall-card h2 { font-size: 1.25rem; font-weight: 900; margin-bottom: 6px; }
    .price-tag {
      display: block;
      width: fit-content;
      max-width: 100%;
      background: var(--gold-s);
      color: #7A5C10;
      font-weight: 800;
      border-radius: 999px;
      padding: 8px 14px;
      font-size: 0.9rem;
      margin: 8px auto 10px;
      text-align: center;
      white-space: nowrap;
    }
    .benefits { list-style: none; margin: 10px 0 16px; display: grid; gap: 8px; }
    .benefits li {
      background: var(--teal-s);
      color: var(--teal-d);
      border-radius: 14px;
      padding: 8px 12px;
      font-weight: 700;
      font-size: 0.9rem;
    }
    .sub-badge {
      display: inline-block;
      background: var(--teal-s);
      color: var(--teal-d);
      font-weight: 800;
      font-size: 0.72rem;
      border-radius: 999px;
      padding: 3px 8px;
      margin-inline-start: 6px;
    }
    .currency-mini { max-width: 110px; font-size: 0.75rem; padding: 6px 8px; }
    .converted { color: var(--ink-3); font-size: 0.8rem; font-weight: 600; }
    .topbar-extra-row { display: flex; align-items: center; gap: 6px; }

    #trip-detail .footer-note { display: none; }
    .chat-wrap { margin: 4px 16px 10px; }
    .td-info .bio { margin: 4px 0 0; }
    .members { padding: 2px 2px 6px; }

    .renew-banner {
      background: var(--gold-s);
      color: #7A5C10;
      font-size: 0.82rem;
      font-weight: 700;
      text-align: center;
      padding: 8px 12px;
      line-height: 1.45;
      border-bottom: 1px solid #ead9a0;
      display: flex;
      gap: 8px;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
    }
    .renew-banner button {
      background: var(--terra);
      color: #fff;
      border-radius: 999px;
      padding: 4px 12px;
      font-weight: 800;
      font-size: 0.78rem;
    }
    .price-tag .approx { display: block; font-size: 0.78rem; font-weight: 700; opacity: .85; margin-top: 2px; white-space: nowrap; }
    .period-note { color: var(--ink-3); font-size: 0.82rem; margin: 6px 0 0; line-height: 1.5; }


    /* ===== Edit profile + user menu ===== */
    .user-menu-btn {
      width: 36px; height: 36px; border-radius: 12px;
      overflow: hidden; flex: 0 0 36px; padding: 0;
      border: 1.5px solid var(--line);
      background: var(--paper);
    }
    .user-menu-btn .avatar, .user-menu-btn img {
      width: 36px; height: 36px; display: block; object-fit: cover;
    }
    .user-menu {
      position: fixed;
      top: 58px;
      inset-inline-end: 12px;
      z-index: 280;
      width: min(240px, calc(100% - 24px));
      background: var(--paper);
      border: 1.5px solid var(--line);
      border-radius: 16px;
      box-shadow: var(--shadow);
      padding: 6px;
    }
    .user-menu button {
      display: flex; align-items: center; gap: 8px;
      width: 100%; text-align: start;
      padding: 10px 12px; border-radius: 12px;
      font-weight: 700; font-size: 0.9rem;
    }
    .user-menu button:hover { background: var(--sand); }

    #profile-edit {
      position: fixed; inset: 0; z-index: 220;
      background: var(--sand);
      display: flex; flex-direction: column;
      overflow: hidden;
    }
    body.has-banner #profile-edit { position: absolute; inset: 0; }
    .pe-top {
      flex-shrink: 0;
      background: var(--paper);
      border-bottom: 1px solid var(--line);
      padding: 8px 8px 0;
    }
    .pe-nav {
      display: flex; align-items: center; gap: 8px;
      position: relative;
      padding: 4px 8px 8px;
      min-height: 48px;
    }
    .pe-nav h2 {
      flex: 1; min-width: 0; text-align: center;
      font-size: 1.05rem; font-weight: 800;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
      padding: 0 44px;
    }
    .pe-nav .icon-btn { position: relative; z-index: 1; flex: 0 0 40px; }
    .pe-scroll {
      flex: 1; min-height: 0; overflow: auto;
      padding: 16px 16px 8px;
      width: min(640px, 100%);
      margin: 0 auto;
    }
    .pe-card {
      background: var(--paper);
      border: 1px solid rgba(232,220,203,.7);
      border-radius: 22px;
      padding: 16px 16px 8px;
      margin-bottom: 14px;
      box-shadow: var(--shadow-sm);
    }
    .pe-card h3 {
      font-size: 0.95rem; font-weight: 800;
      margin-bottom: 12px;
    }
    .pe-foot {
      flex-shrink: 0;
      display: flex; gap: 8px;
      padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
      background: rgba(255,252,247,.96);
      border-top: 1px solid var(--line);
      width: min(640px, 100%);
      margin: 0 auto;
    }
    .pe-foot .btn { flex: 1; }
    .pe-error {
      background: #FDECEC; color: var(--rose);
      border: 1.5px solid #F5C6C2;
      border-radius: 14px;
      padding: 10px 12px;
      font-weight: 700; font-size: 0.88rem;
      margin-bottom: 12px;
    }
    .profile-hero { cursor: default; }
    .profile-hero .avatar.lg { cursor: pointer; }
    .char-count { font-size: 0.75rem; color: var(--ink-3); font-weight: 600; text-align: end; margin-top: 4px; }
    .gender-chips { display: flex; flex-wrap: wrap; gap: 8px; }
    
    .avatar-hit { display: inline-block; border-radius: 50%; padding: 0; background: none; }
    .profile-hero .avatar-hit { margin: 0 auto 10px; }
    
    /* ===== Verify, support, reports ===== */
    .verify-banner {
      background: #F8E7C9;
      color: #6B3E12;
      font-weight: 700;
      font-size: 0.85rem;
      padding: 8px 12px;
      display: flex;
      gap: 8px;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      border-bottom: 1px solid #E8DCCB;
    }
    .verify-banner .btn { padding: 6px 10px; font-size: 0.8rem; }
    body.has-banner.has-verify-banner #shell,
    body.has-verify-banner #shell { }
    .linkish {
      background: none; border: 0; padding: 0;
      color: var(--terracotta, #C24E24);
      font-weight: 700; cursor: pointer;
      text-decoration: underline;
      font-size: inherit;
    }
    #support {
      position: fixed; inset: 0; z-index: 220;
      background: var(--sand);
      display: flex; flex-direction: column;
      overflow: hidden;
    }
    body.has-banner #support { position: absolute; inset: 0; }
    .row-actions {
      display: flex; flex-wrap: wrap; gap: 8px;
      margin-top: 8px;
    }
    .row-actions .btn { flex: 1; min-width: 120px; }
    .ticket-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
    .ticket-row {
      width: 100%; text-align: start;
      display: flex; justify-content: space-between; gap: 8px; align-items: center;
      padding: 12px; border-radius: 14px; background: var(--sand);
      border: 1px solid var(--line); font-weight: 700;
    }
    .pill {
      font-size: 0.75rem; font-weight: 800;
      padding: 3px 8px; border-radius: 999px;
      background: #E8DCCB;
    }
    .pill.open { background: #F8E7C9; }
    .pill.pending { background: #D7EAE3; }
    .pill.closed { background: #E5E0DA; }
    .ticket-thread { margin-top: 16px; display: grid; gap: 10px; }
    .tmsg {
      background: var(--paper);
      border: 1px solid var(--line);
      border-radius: 16px; padding: 10px 12px;
    }
    .tmsg.admin { border-color: #C24E24; }
    .tmsg .who { font-size: 0.75rem; color: var(--ink-3); font-weight: 700; margin-bottom: 4px; }
    .tmsg .shot { max-width: 100%; border-radius: 12px; margin-top: 8px; }
    .report-mini { margin-inline-start: auto; font-size: 0.75rem; }
    .who-row { display: flex; align-items: center; gap: 6px; }

    /* admin */
    .admin-app { min-height: 100vh; background: var(--sand, #F6EFE4); }
    .admin-top {
      display: flex; align-items: center; justify-content: space-between;
      gap: 12px; padding: 12px 16px;
      background: var(--paper, #FFFCF7);
      border-bottom: 1px solid var(--line, #E8DCCB);
      flex-wrap: wrap;
    }
    .admin-nav { display: flex; flex-wrap: wrap; gap: 6px; }
    .admin-nav .btn.on { background: #C24E24; color: #fff; }
    .admin-main { padding: 16px; width: min(1100px, 100%); margin: 0 auto; }
    .stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
    .stat-card {
      background: var(--paper, #FFFCF7);
      border: 1px solid var(--line, #E8DCCB);
      border-radius: 16px; padding: 12px;
    }
    .stat-card .n { font-size: 1.4rem; font-weight: 800; }
    .stat-card .l { font-size: 0.78rem; font-weight: 700; color: var(--ink-3, #6B5C50); }
    .admin-table { width: 100%; border-collapse: collapse; background: var(--paper, #FFFCF7); border-radius: 16px; overflow: hidden; }
    .admin-table th, .admin-table td { padding: 8px 10px; border-bottom: 1px solid var(--line, #E8DCCB); text-align: start; font-size: 0.85rem; vertical-align: top; }
    .admin-table th { font-weight: 800; background: #F6EFE4; }
    .admin-actions { display: flex; flex-wrap: wrap; gap: 4px; }
    .admin-actions .btn { padding: 4px 8px; font-size: 0.75rem; }
    .chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; margin: 8px 0 20px; }
    .chart i { flex: 1; background: #C24E24; border-radius: 3px 3px 0 0; min-height: 2px; display: block; opacity: 0.85; }
    .filters-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }


/* Legal, safety, consent, fraud, 2FA */
.legal-page { max-width: 720px; margin: 0 auto; padding: 16px 16px 48px; }
.legal-page h1 { font-size: 1.45rem; margin: 8px 0 12px; }
.legal-draft { background: #fff4e5; border: 1px solid #e8c48a; color: #6a3b00; padding: 10px 12px; border-radius: 10px; margin: 8px 0 16px; font-weight: 600; }
.legal-section { margin: 0 0 18px; }
.legal-section h2 { font-size: 1.05rem; margin: 0 0 6px; }
.legal-section p { margin: 0; line-height: 1.65; white-space: pre-wrap; }
.legal-links a { color: inherit; text-decoration: underline; }
.consent-box { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; text-align: start; }
.consent-box input { margin-top: 4px; flex: 0 0 auto; }
.chat-pin { background: #fff6e8; border: 1px solid #efd2a8; color: #5c3b10; padding: 10px 12px; font-size: .9rem; line-height: 1.45; }
.msg-warn { margin-top: 6px; font-size: .8rem; background: #fff1f0; color: #8a1f11; border-radius: 8px; padding: 6px 8px; }
.restricted-banner { background: #3b1d1d; color: #ffe8e5; padding: 10px 14px; font-size: .92rem; }
.qr-wrap { text-align: center; margin: 12px 0; }
.qr-wrap img { width: 200px; height: 200px; background: #fff; padding: 8px; border-radius: 12px; }
.backup-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-family: ui-monospace, monospace; direction: ltr; text-align: left; margin: 12px 0; }
.backup-codes code { background: #f4f0ea; padding: 6px 8px; border-radius: 8px; }
.severity-high { color: #b42318; font-weight: 700; }
.pe-danger { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(0,0,0,.08); display: flex; flex-wrap: wrap; gap: 8px; }
.evidence-box { background: #f7f4ef; padding: 10px; border-radius: 8px; font-size: .85rem; white-space: pre-wrap; max-height: 240px; overflow: auto; }

.shell-legal { padding: 4px 16px 8px; font-size: .8rem; text-align: center; }
.shell-legal .footer-note { margin: 0; }
body .nav { /* keep */ }

/* Reviews */
.stars { display: inline-flex; align-items: center; gap: 1px; direction: ltr; unicode-bidi: isolate; }
.star { color: #C99A2E; font-size: 1.05rem; line-height: 1; }
.star.off { color: #D4CBBE; }
.stars-lg .star { font-size: 1.45rem; }
.review-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-weight: 700; color: var(--ink); }
.review-summary .sub { font-weight: 600; color: var(--ink-2); }
.review-list { display: grid; gap: 12px; margin: 12px 0 20px; }
.review-card { background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: 0 1px 0 rgba(34,26,20,.06); }
.review-card .review-head { display: flex; gap: 10px; align-items: flex-start; }
.review-card .review-meta { flex: 1; min-width: 0; }
.review-card .review-meta strong { display: block; }
.review-card .review-trip, .review-card .review-date { color: var(--ink-2); font-size: .82rem; font-weight: 600; }
.review-card .review-body { margin-top: 8px; color: var(--ink); line-height: 1.65; }
.review-form { background: #fff; border-radius: 16px; padding: 16px; margin: 12px 0 20px; display: grid; gap: 10px; }
.rating-pick { display: flex; gap: 4px; direction: ltr; unicode-bidi: isolate; }
.rating-pick button { appearance: none; background: none; border: 0; padding: 4px; cursor: pointer; font-size: 1.6rem; color: #D4CBBE; line-height: 1; }
.rating-pick button.on, .rating-pick button:hover { color: #C99A2E; }
.rating-pick button:focus-visible { outline: 2px solid #1A6B5C; outline-offset: 2px; border-radius: 6px; }
.person-profile-page { min-height: 100%; background: var(--sand); }
.pp-scroll { padding: 8px 16px 32px; max-width: 640px; margin: 0 auto; }
.pending-list { display: grid; gap: 8px; margin: 8px 0 16px; }
.pending-row { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 10px 12px; }
.pending-row .grow { flex: 1; min-width: 0; }
.member.member-btn { appearance: none; background: none; border: 0; cursor: pointer; color: inherit; font: inherit; }
.member.member-btn:focus-visible { outline: 2px solid #1A6B5C; outline-offset: 2px; border-radius: 8px; }

/* Launch a11y: visible focus rings where outline was removed */
.filters select:focus-visible,
.lang-select:focus-visible,
select.lang-select:focus-visible,
.chat-input input:focus-visible,
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible,
.search-wrap input:focus-visible,
.btn:focus-visible,
.chip:focus-visible,
.nav-btn:focus-visible,
.linkish:focus-visible,
.user-menu-btn:focus-visible {
  outline: 2px solid #1A6B5C;
  outline-offset: 2px;
}


    /* ========== Auth + interests onboarding (0.2.4) ========== */
    #auth, #onboarding {
      --auth-font: "IBM Plex Sans Arabic", var(--font);
      --auth-pri: #BA3A10;
      --auth-text: #221A14;
      --auth-muted: #5C4E42;
      --auth-outline: #6B5648;
      --auth-outline2: #8C7660;
      --auth-chip: #F6EDE0;
      --auth-bg: #F4EDE1;
    }
    #auth {
      font-family: var(--auth-font);
      background: var(--auth-bg);
      color: var(--auth-text);
      padding: 16px 20px 32px;
    }
    #auth .lang-bar { width: 100%; max-width: 480px; margin-bottom: 8px; }
    #auth .auth-hero, #onboarding .auth-hero {
      font-family: var(--auth-font);
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      padding: 8px 8px 16px;
      width: 100%;
      max-width: 480px;
    }
    #auth .auth-hero .logo, #auth .logo {
      width: 80px; height: 80px;
      border-radius: 20px;
      overflow: hidden;
      filter: none;
      box-shadow: 0 8px 24px rgba(186, 58, 16, 0.22);
    }
    #auth .auth-hero .logo svg, #auth .auth-hero .logo img,
    #auth .logo svg, #auth .logo img { width: 80px; height: 80px; display: block; }
    #auth .auth-hero h1, #onboarding .auth-hero h1 {
      font-size: 24px; line-height: 34px; font-weight: 700; margin: 0; color: var(--auth-text);
    }
    #auth .auth-hero p, #onboarding .auth-hero p {
      font-size: 14px; line-height: 22px; color: var(--auth-muted); margin: 0;
    }
    #onboarding .auth-hero.compact { padding-top: 0; }
    #auth .auth-card {
      width: 100%; max-width: 480px;
      background: transparent;
      border: 0;
      box-shadow: none;
      padding: 0;
    }
    #auth .auth-card .field label { color: var(--auth-text); font-weight: 600; font-size: 14px; }
    #auth .auth-card .field input {
      height: 56px;
      border-radius: 8px;
      border: 1px solid var(--auth-outline);
      background: transparent;
      padding: 0 16px;
      font-family: var(--auth-font);
      font-size: 16px;
    }
    #auth .auth-card .field input:focus {
      border-color: var(--auth-pri);
      box-shadow: 0 0 0 3px rgba(186, 58, 16, 0.12);
    }
    #auth .btn-primary, #onboarding .interest-foot .btn-primary {
      height: 56px;
      border-radius: 999px;
      background: var(--auth-pri);
      box-shadow: none;
      font-family: var(--auth-font);
      font-size: 16px;
      line-height: 24px;
      font-weight: 600;
      color: #fff;
    }
    #auth .btn-primary:hover, #onboarding .interest-foot .btn-primary:hover { background: #9E300D; }
    #auth .btn-primary:disabled, #onboarding .interest-foot .btn-primary:disabled {
      background: #EADFCC; color: #5C4E42; opacity: 1;
    }
    #auth .btn-text {
      background: transparent;
      color: var(--auth-pri);
      font-weight: 600;
      font-size: 16px;
      height: 48px;
      border-radius: 999px;
    }
    #auth .btn-google {
      height: 56px;
      border-radius: 999px;
      border: 1px solid var(--auth-outline2);
      background: #FFFCF7;
      color: var(--auth-text);
      font-family: var(--auth-font);
      font-size: 16px;
      font-weight: 600;
    }
    #auth .btn-google svg { width: 20px; height: 20px; flex: none; }
    #auth .auth-or {
      display: flex; align-items: center; gap: 12px;
      color: var(--auth-muted);
      font-size: 12px; line-height: 16px; font-weight: 500;
      margin: 16px 0;
    }
    #auth .auth-or::before, #auth .auth-or::after {
      content: ""; flex: 1; height: 1px;
      background: color-mix(in srgb, var(--auth-outline2) 50%, transparent);
    }
    #auth .auth-legal {
      display: flex; justify-content: center; gap: 16px;
      padding-top: 16px; width: 100%; max-width: 480px;
    }
    #auth .auth-legal a {
      color: var(--auth-muted); font-size: 12px; line-height: 16px;
      text-decoration: none; font-weight: 500;
    }
    #auth .hint, #auth .hint .linkish, #auth .bio { color: var(--auth-muted); }
    #auth .linkish { color: var(--auth-pri); font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
    #auth .consent-box { margin: 8px 0 16px; font-size: 14px; color: var(--auth-text); }
    .google-btn-slot { margin-top: 8px; display: flex; justify-content: center; }

    #onboarding .interest-top {
      font-family: var(--auth-font);
      width: 100%; max-width: 480px;
      display: flex; align-items: center; justify-content: space-between;
      min-height: 48px; padding: 0 0 8px;
    }
    #onboarding .step-label { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--auth-muted); }
    #onboarding .btn-skip {
      height: 48px; padding: 0 12px;
      color: var(--auth-pri); font-family: var(--auth-font);
      font-size: 16px; line-height: 24px; font-weight: 600;
    }
    #onboarding .interest-body {
      font-family: var(--auth-font);
      width: 100%; max-width: 480px;
      display: flex; flex-direction: column; gap: 16px;
      padding-bottom: 12px;
    }
    #onboarding .interest-body h2, .pe-card .pref-lab, .pref-lab {
      font-size: 16px; line-height: 24px; font-weight: 600; color: var(--auth-text, var(--ink));
    }
    .pref-lab { font-size: 12px !important; line-height: 16px !important; font-weight: 500 !important; color: var(--auth-muted, var(--ink-2)) !important; }
    .pref-grid {
      display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    }
    .pref-grid .pref-tile:last-child { grid-column: 1; }
    .pref-tile {
      min-height: 48px; border-radius: 16px;
      border: 1px solid var(--auth-outline2, var(--line));
      background: var(--auth-chip, var(--sand-2));
      color: var(--auth-text, var(--ink));
      display: flex; align-items: center; gap: 8px;
      padding: 8px 12px;
      font-size: 14px; line-height: 20px; font-weight: 600; text-align: start;
    }
    .pref-tile svg { width: 20px; height: 20px; flex: none; color: var(--auth-muted, var(--ink-2)); }
    .pref-tile.on { background: var(--auth-pri, var(--terra)); color: #fff; border-color: var(--auth-pri, var(--terra)); }
    .pref-tile.on svg { color: #fff; }
    .pref-row { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
    .pref-chips { display: flex; flex-wrap: wrap; gap: 8px; }
    .pref-chip {
      min-height: 48px; padding: 0 14px; border-radius: 999px;
      border: 1px solid var(--auth-outline2, var(--line));
      background: var(--auth-chip, var(--sand-2));
      color: var(--auth-text, var(--ink));
      font-size: 14px; line-height: 20px; font-weight: 600;
    }
    .pref-chip.on { background: var(--auth-pri, var(--terra)); color: #fff; border-color: var(--auth-pri, var(--terra)); }
    #onboarding .interest-foot {
      font-family: var(--auth-font);
      width: 100%; max-width: 480px;
      padding: 12px 0 8px;
    }
    .pe-pref-grid { margin: 8px 0 16px; }

    #auth-sheet .auth-sheet-card {
      background: var(--paper);
      border-radius: 28px 28px 16px 16px;
      padding: 24px 20px 20px;
      width: min(440px, 100%);
      box-shadow: var(--shadow);
    }
    #auth-sheet .auth-sheet-card h2 { font-size: 1.35rem; font-weight: 900; margin: 0 0 8px; }
    #auth-sheet .auth-sheet-card .bio { margin: 0 0 18px; color: var(--ink-3); }
    #auth-sheet .auth-sheet-card .btn { margin-top: 8px; }
